strawmancomics
New member
I'm really struggling to understand basic programing logic. I want to click on a screen flag and have it change the hud for that particular level. I'm working with the doDrawSpriteHud_L2RPlatformer.asm file. After drawing my initial hud elements I want to change a background sprite to a different image. In my code example the moon sprites show up on the level. However the screen flag doesn't seem to matter if it's checked or not. To test the code I only wanted one sprite to show up on the next level. The following code doesn't work like it should but it doesn't break the game either.
For any solutions provided I would appreciate an explanation of what's happening with the code.
For any solutions provided I would appreciate an explanation of what's happening with the code.
LDA ScreenFlags00 ; load screenflags 0-7
CMP #%00000110 ; checks the screen flag 6 bit
BEQ +Moon
+Moon:
DrawSprite #220, #30, #$2A, #%00000000
DrawSprite #228, #30, #$2B, #%00000000
DrawSprite #236, #30, #$2C, #%00000000
DrawSprite #220, #38, #$3A, #%00000000
DrawSprite #228, #38, #$3B, #%00000000
DrawSprite #236, #38, #$3C, #%00000000
DrawSprite #220, #44, #$4A, #%00000000
DrawSprite #228, #44, #$4B, #%00000000
DrawSprite #236, #44, #$4C, #%00000000
JMP +finishMoon
DrawSprite #220, #30, #$2A, #%00000000
+finishMoon
rts