@Storm Kyleis: I were actually going to assume you wanted to check when both A and B are pressed.
Not sure if you want that, but if my assumptions are right, maybe this could fit your case:
CodeLDA $17 ;\ Check if A
AND $16 ; | and B are pressed (toghether)
BPL nopress ;/ if not, branch
*code* ; else, do stuff
nopress:
Originally posted by DakressAnyway, how can I make a sprite use a diferent tilemap when it's facing a certain direction?
Most sprites keep track of their direction using $157C,x (#$00 = Right; #$01 = Left), so you can probably take advantage from that one in your GFX routine.
If you're looking for an X-flip instead, you just need to use $157C,x to index a YXPPCCCT properties table containing two values, one of which has the X flip bit set (6th), depending on which direction needs horizontal flipping.
@RonaldCoLtd: this is not exactly the correct place for that, next time you can try
here.
That code could also use a lot of optimization, such as loading from RAM mirrors for $7E0071 ($71) and $7E0DBF ($0DBF), instead of pointing directly to the WRAM bank. See how much smaller it can be:
CodeLDA $0DBF ;\ If coins == 50
CMP #50 ; |
BNE return ;/ branch away
LDA #$08 ;\ Else send the player to the yoshi bonus game thing
STA $71 ;/
STZ $0DBF ; And get away the coins
return: ;
RTS ;
I hope you can learn something from this, I didn't feel like overanalizing >_>