jorotroid
Member
Some time ago, I wrote a Macro to change the values of the player's bounding box. Currently I am trying to write an input script that takes action base on the type of tiles near the player. While doing this, I needed to access the player's bounding box values to find the appropriate points to check for tile types. But by LDAing ObjectBboxLeft,y and ObjectWidth,y I only ever got back a value of 0. I then checked and found out my Macro to change the bounding box was actually doing nothing. After some sleuthing, I found that the bounding box data is stored in Bank 1C. I tried bank switching by setting Y to #$1C and calling JSR bankswitchY as it appears to be use elsewhere in the code, then after the code to get the values I need runs, setting the bank back to whatever it was before. Running my games with these changes will cause the game to freeze which seems to imply that either I am calling for a bank switch incorrectly or bank switches can't happen during an input script. Can anyone offer me any wisdom?
I can think of a few alternate ways I can get my desired effects, but bank switching during an input script seems like it would be the most ideal answer.
I can think of a few alternate ways I can get my desired effects, but bank switching during an input script seems like it would be the most ideal answer.