View Single Post
  #25  
10-17-2010, 03:19 PM
LIJI's Avatar
LIJI
Howler Punk
 
: Mar 2007
: Israel
: 318
Rep Power: 19
LIJI  (206)LIJI  (206)LIJI  (206)

"the screen number seems to be the index into the array of screen names too, for 0 in R1 in AO it gets no objects, since the first screen is null"
I'm not sure if I got it right, do you mean that the ID is the order in which the screen appears in the screen array? I.e. in AE mi it's "C36 -> 0, C1 -> 1, C9 -> 2 etc"?

Well, to match collision data with the screen, you should first find the position of the screen in the 2d screen array. For example, MIP1C36 is in (2,1) (0-based).
Then, multiply the x position by 375 (Screen width in units) and the y position by 260 (screen height in units) and you'll get it's starting point, (750,260) in game units. Add 375 and 260 and you'll get the ending point. So the rect for the screen is:
(750,260)-(1125,520). Then matching the collision mask should be easy.

Edit: Btw, I think that the parts of background which are displayed above Abe are stored as objects type 4B, can you confirm?
Edit2: Turns out that in the .sav file, the first 2 bytes are simply the offset from the beginning of the object list in the level file. No clue what the other two bytes are, but the game crashes if they change.

Last edited by LIJI; 10-17-2010 at 04:02 PM..
Reply With Quote