Level and Replay files
Moderator: Moporators
- The_BoneLESS
- 38mins club
- Posts: 4604
- Joined: 7 Sep 2003, 00:30
- Team: HHIT
- Location: Dangerously close to the St-Lawrence River
- Contact:
Level and Replay files
After looking at Mila, Viper and Skint's code that Skint uses on his website to read informations from a replay file, i started to look closer at those files. I first tried to modify the name of the level, which i did. After, i succeeded to switch a mask from big to horizontal. But those are extremely simple to do.
What i would like to know is :
- Would it be possible ( sure it is ) to create a level, directly by coding it ?
- What the hell is all that so called by milagros junk ?
Sample from the getRecInfo() function programmed by mila, viper and skint
I would like someone, like mila who seems to have a good knowledge of the files, to explain that to me. Because, i would love to make an elma related program.
What i would like to know is :
- Would it be possible ( sure it is ) to create a level, directly by coding it ?
- What the hell is all that so called by milagros junk ?
Sample from the getRecInfo() function programmed by mila, viper and skint
I would like someone, like mila who seems to have a good knowledge of the files, to explain that to me. Because, i would love to make an elma related program.
Website || TT:38:05:33 || WC5:15th || HHIT for life || 9th world wide ... BAP is next
i dont understand how those fread() functions work exactly, but wouldnt fread($f,1) read the same information over and over? since the variable in the function ($f) doesnt change. i wouldve thought they'd use $i somewhere in the loop code, like fread($f,$i)
but if it does in fact work, judging by the comment on the first line, it probably reads the first 12 bytes of the file. then again..opening a rec file in notepad shows the first 12 chars are useless, the corresponding level name is at a different position. maybe the time of the rec is encoded in the first 12 chars? who knows
but if it does in fact work, judging by the comment on the first line, it probably reads the first 12 bytes of the file. then again..opening a rec file in notepad shows the first 12 chars are useless, the corresponding level name is at a different position. maybe the time of the rec is encoded in the first 12 chars? who knows
C: http://en.wikibooks.org/wiki/C_Programm ... d_function
PHP: http://fi.php.net/fread
C++: http://www.cplusplus.com/ref/cstdio/fread.html
Maybe?
PHP: http://fi.php.net/fread
C++: http://www.cplusplus.com/ref/cstdio/fread.html
Maybe?
40:02,71 (151.) | WCup4: 8. | 3x WR | 3x GAA | 11x FEM | KOM | The History of Elasto Mania (1995-2018)
You can see the whole code here: http://www.skintatious.net/src/getRecInfo.phps
Actually now that I look at it, I'm not sure what the point is of looping through those 12 bytes instead of just doing fread($f,12). I have no idea what those bytes are either way though.
And to answer your question in skintatious topic ($time * 62500 / 273), Balasz uses some big magic number or something. milagros gave me the code for the proper calculations a while ago, but neither vk or myself could figure out how to use it in PHP.
Actually now that I look at it, I'm not sure what the point is of looping through those 12 bytes instead of just doing fread($f,12). I have no idea what those bytes are either way though.
Obviously. I don't think ALE uses magic after all. You could check out these guides by ribot http://elma.not-dot-anything.net/index.php?page=hacking- Would it be possible ( sure it is ) to create a level, directly by coding it ?
And to answer your question in skintatious topic ($time * 62500 / 273), Balasz uses some big magic number or something. milagros gave me the code for the proper calculations a while ago, but neither vk or myself could figure out how to use it in PHP.
Code: Select all
double con;
((long *)&con)[1]=0x406c9e01;
((long *)&con)[0]=0xe01e01e1;
i=time*con
Prestigious member of 14.6x Tutor14 club
no point in reading 12 bytes one-by-one, I had it in my c++code because saved 11bytes of memory(not really)Actually now that I look at it, I'm not sure what the point is of looping through those 12 bytes instead of just doing fread($f,12). I have no idea what those bytes are either way though.
I really don't remember what were those 12 bytes, some of them were magic numebr and some of them some info about lev
sure (check ribot's levs) and rec too (check my slesk recs)Would it be possible ( sure it is ) to create a level, directly by coding it ?
I simply copied bytes of the double number that elma uses to count time, then those 0.0000000001 differences won't occure and the time should be rightCode: Select all
double con; ((long *)&con)[1]=0x406c9e01; ((long *)&con)[0]=0xe01e01e1; i=time*con
who cares anyway
[carebox]
- The_BoneLESS
- 38mins club
- Posts: 4604
- Joined: 7 Sep 2003, 00:30
- Team: HHIT
- Location: Dangerously close to the St-Lawrence River
- Contact:
Some other question on an elma file...
With what program can i open the .dat file ? How the hell do you do that?
With what program can i open the .dat file ? How the hell do you do that?
Website || TT:38:05:33 || WC5:15th || HHIT for life || 9th world wide ... BAP is next
max ezThe_BoneLESS wrote:Some other question on an elma file...
With what program can i open the .dat file ? How the hell do you do that?
get teh textpad @ http://download.textpad.com/download/v47/txpeng473.exe
TT: 45:43:64
Maybe this: http://elma.not-dot-anything.net/index. ... rt=recedit
will help to understand what are those bytes in rec file for
will help to understand what are those bytes in rec file for