Skip to content

Commit

Permalink
Add quick death and hide lives
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJoeSmo committed Nov 4, 2023
1 parent cd22f62 commit 5a71ad7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
3 changes: 1 addition & 2 deletions PRG/prg000.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5857,7 +5857,7 @@ Player_Die:
LDA #-64
STA Player_YVel ; Player_YVel = -64

LDA #$30
LDA #$10
STA Event_Countdown ; Event_Countdown = $30 (ticks until dropped back to map)

LDA #$01
Expand Down Expand Up @@ -7088,4 +7088,3 @@ Video_3CMFlowBot
DBYT $226C
.byte VU_REPEAT | $08, $A9
.byte $00 ; Terminator

6 changes: 2 additions & 4 deletions PRG/prg008.asm
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ PRG008_A3FA:
JSR Player_Die ; Begin death sequence

; This jumps the initial part of the death sequence
LDA #$c0
LDA #$30
STA Event_Countdown ; Event_Countdown = $C0
LDA #$02
STA Player_IsDying ; Player_IsDying = 2 (already dropped off screen)
Expand Down Expand Up @@ -899,7 +899,7 @@ PRG008_A44D:
LDA #$01
STA Player_QueueSuit ; Queue change to small (superfluous, Player_Die sets it to 1)

LDA #$50 ; Event_Countdown to be set to $50
LDA #$30 ; Event_Countdown to be set to $50

STA Event_Countdown
JMP PRG008_A472 ; Jump to PRG008_A472
Expand Down Expand Up @@ -7065,5 +7065,3 @@ PRG008_BFF9:
RTS ; Return

; Rest of ROM bank was empty


13 changes: 6 additions & 7 deletions PRG/prg010.asm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Video_DoWXMario00:
.byte $05, $BA, $BC, $E9, $FC, $F0 ; MARIO

DBYT $29B3
.byte $01, $FB
.byte $01, $FE

; ----

Expand Down Expand Up @@ -153,7 +153,7 @@ Video_DoWXMario80:
.byte $05, $BA, $BC, $E9, $FC, $F0 ; MARIO

DBYT $29A3
.byte $01, $FB
.byte $01, $FE

DBYT $2BD0
.byte VU_REPEAT | 2, $00
Expand Down Expand Up @@ -408,7 +408,7 @@ Video_DoWXLuigi00:
.byte $05, $EC, $DA, $FC, $EB, $FC ; LUIGI

DBYT $29B3
.byte $01, $FB
.byte $01, $FE

DBYT $2BD2
.byte VU_REPEAT | 4, $00
Expand Down Expand Up @@ -495,7 +495,7 @@ Video_DoWXLuigi80:
.byte $05, $EC, $DA, $FC, $EB, $FC ; LUIGI

DBYT $29A3
.byte $01, $FB
.byte $01, $FE

DBYT $2BD0
.byte VU_REPEAT | 2, $00
Expand Down Expand Up @@ -683,9 +683,9 @@ Map_ConfigWorldIntro:
STA Graphics_Buffer+6

; Takes the lives from the status bar!
LDA StatusBar_LivesH
LDA #$FE
STA Graphics_Buffer+7
LDA StatusBar_LivesL
LDA #$FE
STA Graphics_Buffer+8

LDA #$00
Expand Down Expand Up @@ -4087,4 +4087,3 @@ DMC08:
DMC08_End

; Rest of ROM bank was empty

12 changes: 6 additions & 6 deletions PRG/prg026.asm
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Flip_MidBItems:
DBYT $2B40

; | < M > x [ Lives]
.byte 32, $FC, $A6, $74, $75, $FB, $FE, $F3, $FE, $FE
.byte 32, $FC, $A6, $74, $75, $FE, $FE, $F3, $FE, $FE

; Bottom of items start rendering here (replaced at runtime)
; Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Item 7
Expand Down Expand Up @@ -315,7 +315,7 @@ Flip_MidBStatCards:
DBYT $2B40

; Discrepency --------v (Pattern is ... $FE, $FE ... in PRG030 status bar) Unimportant; inserts <M> which is replaced anyway
.byte 32, $FC, $A6, $74, $75, $FB, $FE, $F3, $FE, $F0, $F0, $F0, $F0, $F0, $F0 ; [M/L]x 000000 c000| etc.
.byte 32, $FC, $A6, $74, $75, $FE, $FE, $F3, $FE, $F0, $F0, $F0, $F0, $F0, $F0 ; [M/L]x 000000 c000| etc.
.byte $F0, $FE, $ED, $F0, $F0, $F0, $A7, $A6, $FE, $FE, $AA, $FE, $FE, $AA, $FE
.byte $FE, $A7, $FC
; Discrepency --------^ (Pattern is ... $F4, $F0 ... in PRG030 status bar graphics)
Expand Down Expand Up @@ -624,9 +624,9 @@ InvFlipFrame_DrawMLLivesScore:

LDX Temp_Var9 ; X = Temp_Var9

LDA StatusBar_LivesH
LDA #$FE
STA Graphics_Buffer+8,X
LDA StatusBar_LivesL
LDA #$FE
STA Graphics_Buffer+9,X

LDA InvFlip_Frame
Expand Down Expand Up @@ -3714,9 +3714,9 @@ PRG026_B48B:

; *** Lives copy
LDY Graphics_BufCnt ; Y = Graphics_BufCnt
LDA StatusBar_LivesH
LDA #$FE
STA Graphics_Buffer+18,Y
LDA StatusBar_LivesL
LDA #$FE
STA Graphics_Buffer+19,Y

; *** Score copy loop
Expand Down
13 changes: 8 additions & 5 deletions PRG/prg029.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2114,10 +2114,14 @@ Player_Die_Dying:
LDA Player_AboveTop
BNE PRG029_D6DA ; If Player is above top of screen, jump to PRG029_D6DA

LDA Player_SpriteY
AND #$f0
CMP #$b0
BEQ PRG029_D6E5 ; If Player_SpriteY >= $B0 && Player_SpriteY <= $BF (Player is halfway below status bar), jump to PRG029_D6E5
NOP
NOP
NOP
NOP
NOP
NOP
NOP
JMP PRG029_D6E5

PRG029_D6DA:
LDA Event_Countdown
Expand Down Expand Up @@ -3154,4 +3158,3 @@ PRG029_DFEB:
RTS ; Return

; Rest of ROM bank was empty

9 changes: 5 additions & 4 deletions PRG/prg030.asm
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Video_Upd_Table: ; $803E
; Sync this with PRG026 Flip_MidBStatCards
DBYT _1 + $40
; Discrepency --------v (Pattern is ... $FE, $FE ... in PRG030 status bar) Unimportant; inserts <M> which is replaced anyway
.byte $20, $FC, $A6, $FE, $FE, $FB, $FE, $F3, $FE, $F0, $F0, $F0, $F0, $F0, $F0, $F0 ; [M/L]x 000000 c000| etc.
.byte $20, $FC, $A6, $FE, $FE, $FE, $FE, $F3, $FE, $F0, $F0, $F0, $F0, $F0, $F0, $F0 ; [M/L]x 000000 c000| etc.
.byte $FE, $ED, $F4, $F0, $F0, $A7, $A6, $FE, $FE, $AA, $FE, $FE, $AA, $FE, $FE, $A7, $FC
; Discrepency --------^ (Pattern is ... $F4, $F0 ... in PRG030 status bar graphics)

Expand Down Expand Up @@ -2839,7 +2839,7 @@ PRG030_910C:

; Player returns to map dead

LDY #$02 ; Y = 2 (Will be the Map_Operation value)
LDY #$0D ; Y = 2 (Will be the Map_Operation value)

; Map_ReturnStatus = 0
LDA #$00
Expand All @@ -2857,7 +2857,9 @@ PRG030_910C:
LDA Map_PlayerLost2PVs
BNE PRG030_9128 ; If Map_PlayerLost2PVs is set, jump to PRG030_9128

DEC Player_Lives,X ; One less life for the Player...
NOP
NOP
NOP
BMI PRG030_9133 ; If fell below zero, GAMEOVER!; jump to PRG030_9133

PRG030_9128:
Expand Down Expand Up @@ -5978,4 +5980,3 @@ PRG030_9FAF:
JMP IntIRQ_32PixelPartition_Part3

; NOTE: The remaining ROM space was all blank ($FF)

0 comments on commit 5a71ad7

Please sign in to comment.