Following up on what was said earlier, I've been making tons of progress, but here is a new issue I can't figure out.
So to make the shield that deflects bullets, what I do is take the player's X-Y coordinate (low), add/substract to it, and check if the projectile is in that zone. (A similar method is used in the original game for enemies which have certain parts of their body deflect player's shots)
The problem being that if the player's X coordinate is between F1 and FF (which can happen in the middle of a screen during scrolls), and I add say 0F, the result will go over and back to 00+, and the hit detection won't work.
I'd like to understand how the game goes around this originally, I believe it uses the "coordinate high" which represents room number, but I'm not sure how.
So here is the hit detection routine when being hit by an object in a similar case, when the X low coordinate of the player is FB in room 0 and the projectile is 04 in room 1.
I'm sure the answer is there somehow but I can't figure it out.
Some help to understand this:
390=Y coordinate (high), representing room number
408=Type bite (hit judgement, size, etc)
330= X coordinate (low)
348= X coordinate (high), representing room number
378= Y coordinate (low)
F0F1 onward as well and F0B1 onward are table for projectile size
For the part at the end, 558 is anim number and 0030 current move
I'm sure this is a common issue so please let me know if you know how to go around this...