Super-Mario-Bros

為什麼在《超級瑪利歐兄弟1》中,當我觸摸一朵小瑪利歐的火花時,我變成了超級瑪利歐而不是火瑪利歐?

  • March 22, 2021

當我在玩超級瑪利歐兄弟 1 時,我 - 作為超級瑪利歐 - 撞到了一個包含一朵火花的方塊。然後我被敵人擊中,將我變成了小瑪利歐,但螢火蟲仍在螢幕上。

當我以小瑪利歐的身份觸摸火花時,它只是把我變成了超級瑪利歐,而不是火瑪利歐。

為什麼會這樣?

技術上的解釋,如果我們看一下《超級瑪利歐兄弟》的反彙編程式碼,我們可以看到採集火花和超級蘑菇的套路是完全一樣的。

HandlePowerUpCollision:
 jsr EraseEnemyObject    ;erase the power-up object
 lda #$06
 jsr SetupFloateyNumber  ;award 1000 points to player by default
 lda #Sfx_PowerUpGrab
 sta Square2SoundQueue   ;play the power-up sound
 lda PowerUpType         ;check power-up type
 cmp #$02
 bcc Shroom_Flower_PUp   ;if mushroom or fire flower, branch
 cmp #$03
 beq SetFor1Up           ;if 1-up mushroom, branch
 lda #$23                ;otherwise set star mario invincibility
 sta StarInvincibleTimer ;timer, and load the star mario music
 lda #StarPowerMusic     ;into the area music queue, then leave
 sta AreaMusicQueue
 rts

Shroom_Flower_PUp:
 lda PlayerStatus    ;if player status = small, branch
 beq UpToSuper
 cmp #$01            ;if player status not super, leave
 bne NoPUp
 ldx ObjectOffset    ;get enemy offset, not necessary
 lda #$02            ;set player status to fiery
 sta PlayerStatus
 jsr GetPlayerColors ;run sub to change colors of player
 ldx ObjectOffset    ;get enemy offset again, and again not necessary
 lda #$0c            ;set value to be used by subroutine tree (fiery)
 jmp UpToFiery       ;jump to set values accordingly

我會說這是預期的行為。如果你在成為超級瑪利歐時能以某種方式在螢幕上獲得一個超級蘑菇,他就會變成火力瑪利歐。最有可能的原因是為了節省 ROM 上的空間。

引用自:https://gaming.stackexchange.com/questions/383516