The first byte (nibble?) of X's position is the screen number he's in, the other byte (nibble?) is his position relative to the first byte (nibble?). I'm not sure what the conditions for this are, but I'm working towards analyzing the disassembly to figure out how this is done. X’s initial jump velocity is 1363 (Y values are stored inverted) and 1363/256 = 5.32421875p/f which might look like a weird rounding error, but it's correct and should not be changed. Sub-pixel movement is tracked separately and added if greater than 255 or less than -255. All movement data stored in Mega Man X is multiplied by 256 and divided & rounded when modifying player’s X/Y values, remainder is added to sub-pixel movement values.
0 Comments
Leave a Reply. |