Code: Select all
PositionPlayerOnVPlat:
lda Enemy_Y_Position,x ;get vertical coordinate
ldy GameEngineSubroutine
cpy #$0b ;if certain routine being executed on this frame,
beq ExPlPos ;skip all of this
ldy Enemy_Y_HighPos,x
cpy #$01 ;if vertical high byte offscreen, skip this
bne ExPlPos
sec ;subtract 32 pixels from vertical coordinate
sbc #$20 ;for the player object's height
sta Player_Y_Position ;save as player's new vertical coordinate
tya
sbc #$00 ;subtract borrow and store as player's
sta Player_Y_HighPos ;new vertical high byte
bne ExPlPos
stz PlatformCollisionFlag,x
lda #$01
sta $0028
lda #$00
sta Player_Y_Speed ;initialize vertical speed and low byte of force
sta Player_Y_MoveForce ;and then leave
ExPlPos: rts
Code: Select all
bne ExPlPos
stz PlatformCollisionFlag,x
lda #$01
sta $0028
Code: Select all
lda #$00
sta PlatformCollisionFlag,x
https://themushroomkingdom.net/bugs/10
This has been fixed in SMAS, with pictures below for proof:
Thank you,
Ben (SMB2J-2Q)