Hmm I will have to double check in SMB Special to see if the music terminates correctly when you have a star and touch the flagpole, I'm pretty sure it's correct and plays the end level music. The rest of that code in Flagpole Slide has to do with modifying the flag object to be allowed in any sprite slot and also reinitializing the flag if for some reason it despawnsSMB2J-2Q wrote: ↑Sat Sep 24, 2022 7:34 am @frantik,
I tried the first one and it didn't quite work, going straight to the current area music upon getting on the pole. What I want to do is for it to not switch back to the area music when the Starman wears off, meaning once Mario reached the flagpole.
...
I saw your code where you included it within SMB Special 35th; however, there is one LDX instruction (before the "LDA Enemy_ID,x") and two STA instructions containing out-of-bounds addresses ($7fec, $7ff9, $7ffa, etc.) coming after the "STA StarInvincibleTimer" and before the "LDA FlagpoleSoundQueue"; may I ask you what this LDX and the two STAs are supposed to do?
edit: it looks like I also set StarInvincibleTimer to 0 in FlagpoleCollision.. commenting out the code in FlagpoleSlide seems to have no effect. It might have been a previous unsuccessful attempt to fix the bug that I forgot to clean up
Code: Select all
;hack turn off starman if present
lda StarInvincibleTimer
beq +
lda #$00
sta StarInvincibleTimer
+
;endhack
ldx #$04 ; Start at end of vertical coordinate data
lda Player_Y_Position
sta FlagpoleCollisionYPos ; Store player's vertical coordinate here to be used later
ChkFlagpoleYPosLoop: