This commit is contained in:
Antoine Vignau 2024-07-23 19:40:29 +02:00
parent b34959edbf
commit 948c9c2535
2 changed files with 76 additions and 74 deletions

View File

@ -7328,12 +7328,12 @@ courseCHAMPION
HEX C23A4B3CD64AC2C23CC24BD5DCE7 HEX C23A4B3CD64AC2C23CC24BD5DCE7
*----------------------------------- *-----------------------------------
* * FLYING SAUCERS SPRITES TABLES
*----------------------------------- *-----------------------------------
LB343 DS 4 ; X tblSAUCER_X DS 4 ; X
LB347 DS 4 ; Y tblSAUCER_Y DS 4 ; Y
LB34B DS 4 ; INDEX tblSAUCER_INDEX DS 4 ; INDEX
LB34F DS 4 LB34F DS 4
LB353 DS 4 LB353 DS 4
LB357 DS 4 LB357 DS 4

View File

@ -301,7 +301,7 @@ L09C6 JSR L3158
L09CC JSR getCOURSEDATA L09CC JSR getCOURSEDATA
JSR animSHOOTS JSR animSHOOTS
JSR L164F JSR animSAUCERS
JSR L1FB0 JSR L1FB0
JSR L2FD8 JSR L2FD8
JSR L3693 JSR L3693
@ -1240,7 +1240,7 @@ L1009 LDA #$AA
LDA #$00 LDA #$00
STA fwdSHOOTX STA fwdSHOOTX
LDX #$03 LDX #$03
L1025 STA LB34B,X L1025 STA tblSAUCER_INDEX,X
STA LB3DE,X STA LB3DE,X
STA LB413,X STA LB413,X
STA tblFIREX,X STA tblFIREX,X
@ -1327,9 +1327,9 @@ L109F LDA $E8,X
L10A6 LDX $50 L10A6 LDX $50
RTS RTS
L10A9 LDA LB343,Y L10A9 LDA tblSAUCER_X,Y
STA $E2,X STA $E2,X
LDA LB347,Y LDA tblSAUCER_Y,Y
STA $E5,X STA $E5,X
LDA #$10 LDA #$10
SEC SEC
@ -1730,7 +1730,7 @@ L13A5 LDA #$00
JMP L1378 JMP L1378
L13AD LDX #$03 L13AD LDX #$03
L13AF LDA LB34B,X L13AF LDA tblSAUCER_INDEX,X
BEQ L13D6 BEQ L13D6
BMI L13D6 BMI L13D6
CMP #$0E CMP #$0E
@ -1760,7 +1760,7 @@ L13E0 DEX
*----------------------------------- *-----------------------------------
L13E4 LDY #$03 L13E4 LDY #$03
L13E6 LDA LB34B,Y L13E6 LDA tblSAUCER_INDEX,Y
BEQ L13F4 BEQ L13F4
BMI L13F4 BMI L13F4
CMP #$0E CMP #$0E
@ -1771,7 +1771,7 @@ L13F4 DEY
BPL L13E6 BPL L13E6
JMP L13E0 JMP L13E0
L13FA LDA LB343,Y L13FA LDA tblSAUCER_X,Y
CLC CLC
ADC LB3BF,Y ADC LB3BF,Y
CMP tblFIREX,X CMP tblFIREX,X
@ -1780,9 +1780,9 @@ L13FA LDA LB343,Y
CLC CLC
ADC #$01 ADC #$01
ADC LB3BB,Y ADC LB3BB,Y
CMP LB343,Y CMP tblSAUCER_X,Y
BCC L146E BCC L146E
LDA LB347,Y LDA tblSAUCER_Y,Y
CLC CLC
ADC LB3B7,Y ADC LB3B7,Y
SEC SEC
@ -1793,12 +1793,12 @@ L13FA LDA LB343,Y
CLC CLC
ADC #$06 ADC #$06
ADC LB3B3,Y ADC LB3B3,Y
CMP LB347,Y CMP tblSAUCER_Y,Y
BCC L146E BCC L146E
LDA #$01 LDA #$01
STA LB37F,Y STA LB37F,Y
STA LB059,X STA LB059,X
LDA LB34B,Y LDA tblSAUCER_INDEX,Y
PHA PHA
JSR L108F JSR L108F
PLA PLA
@ -2039,7 +2039,7 @@ L15D4 RTS
L15D5 STA $47 L15D5 STA $47
LDX #$03 LDX #$03
L15D9 LDA LB34B,X L15D9 LDA tblSAUCER_INDEX,X
BEQ L15E6 BEQ L15E6
DEX DEX
BPL L15D9 BPL L15D9
@ -2071,15 +2071,15 @@ L160C LDA #sprENEMY2
JMP L1613 JMP L1613
L1613 LDA $47 L1613 LDA $47
STA LB34B,X STA tblSAUCER_INDEX,X
LDA #$00 LDA #$00
STA LB36F,X STA LB36F,X
STA LB373,X STA LB373,X
JSR L2507 JSR L2507
JSR L2548 JSR L2548
LDA LB347,X LDA tblSAUCER_Y,X
TAY TAY
LDA LB343,X LDA tblSAUCER_X,X
TAX TAX
LDA $47 LDA $47
JSR drawSPRITE JSR drawSPRITE
@ -2099,22 +2099,23 @@ L1613 LDA $47
RTS RTS
*----------------------------------- *-----------------------------------
* * ANIM SAUCERS
*----------------------------------- *-----------------------------------
L164F LDX #$03 animSAUCERS
L1651 LDA LB34B,X LDX #$03
L1651 LDA tblSAUCER_INDEX,X
BNE L165A BNE L165A
L1656 DEX L1656 DEX
BPL L1651 BPL L1651
RTS RTS
L165A STX $50 L165A STX $50
LDA LB34B,X LDA tblSAUCER_INDEX,X ; saucer index
STA $B0 STA $B0
LDA LB343,X LDA tblSAUCER_X,X ; X
STA $B1 STA $B1
LDA LB347,X LDA tblSAUCER_Y,X ; Y
STA $B2 STA $B2
LDA LB373,X LDA LB373,X
STA $B3 STA $B3
@ -2123,49 +2124,50 @@ L165A STX $50
BNE L167D BNE L167D
LDA #$01 LDA #$01
STA LB36F,X STA LB36F,X
L167D LDA LB34B,X L167D LDA tblSAUCER_INDEX,X
CMP #$0C CMP #sprENEMY2
BCS L1693 BCS L1693
INC LB34B,X INC tblSAUCER_INDEX,X
LDA LB34B,X LDA tblSAUCER_INDEX,X
CMP #$0C CMP #sprENEMY14+1
BNE L1693 BNE L1693
LDA #$08 LDA #sprENEMY11
STA LB34B,X STA tblSAUCER_INDEX,X
L1693 CMP #$0F L1693 CMP #$0F
BNE L169F BNE L169F
LDA #$FF LDA #$FF
STA LB34B,X STA tblSAUCER_INDEX,X
JMP L16BF JMP L16BF
L169F CMP #$0E L169F CMP #$0E
BNE L16A8 BNE L16A8
LDA #$0F LDA #$0F
STA LB34B,X STA tblSAUCER_INDEX,X
L16A8 CMP #$10 L16A8 CMP #$10
BCC L16BF BCC L16BF
CMP #$14 CMP #$14
BCS L16BF BCS L16BF
INC LB34B,X INC tblSAUCER_INDEX,X
LDA LB34B,X LDA tblSAUCER_INDEX,X
CMP #$14 CMP #$14
BNE L16BF BNE L16BF
LDA #$FF LDA #$FF
STA LB34B,X STA tblSAUCER_INDEX,X
L16BF LDA LB37F,X L16BF LDA LB37F,X
BEQ L16CE BEQ L16CE
LDA #$0E LDA #$0E
STA LB34B,X STA tblSAUCER_INDEX,X
LDA #$00 LDA #$00
STA LB37F,X STA LB37F,X
L16CE LDA LB383,X L16CE LDA LB383,X
BEQ L16E6 BEQ L16E6
LDA #$10 LDA #$10
STA LB34B,X STA tblSAUCER_INDEX,X
LDA LB347,X LDA tblSAUCER_Y,X
SEC SEC
SBC #$05 SBC #$05
STA LB347,X STA tblSAUCER_Y,X
LDA #$00 LDA #$00
STA LB383,X STA LB383,X
L16E6 LDA $B3 L16E6 LDA $B3
@ -2184,13 +2186,13 @@ L16FD JSR eraseSPRITE
L1700 LDX $50 L1700 LDX $50
LDA LB373,X LDA LB373,X
STA $39 STA $39
LDA LB347,X LDA tblSAUCER_Y,X
TAY TAY
LDA LB34B,X ; index LDA tblSAUCER_INDEX,X ; index
STA $B0 STA $B0
LDA LB347,X ; Y LDA tblSAUCER_Y,X ; Y
TAY TAY
LDA LB343,X ; X LDA tblSAUCER_X,X ; X
TAX TAX
LDA $B0 LDA $B0
BMI L172F BMI L172F
@ -2206,7 +2208,7 @@ L1729 JSR drawSPRITE
L172F LDX $50 L172F LDX $50
LDA #$00 LDA #$00
STA LB34B,X STA tblSAUCER_INDEX,X
L1736 LDX $50 L1736 LDX $50
LDA #$00 LDA #$00
STA $39 STA $39
@ -3279,7 +3281,7 @@ L1FA2 JSR doBEEP
*----------------------------------- *-----------------------------------
L1FB0 LDX #$03 ; do we have a flying enemy? L1FB0 LDX #$03 ; do we have a flying enemy?
L1FB2 LDA LB34B,X L1FB2 LDA tblSAUCER_INDEX,X
BEQ L1FBB BEQ L1FBB
CMP #sprSMALLROCK CMP #sprSMALLROCK
BCC L1FC1 ; yes, handle it BCC L1FC1 ; yes, handle it
@ -3301,7 +3303,7 @@ L1FC1 STX $50
LDA #$01 LDA #$01
STA $06 STA $06
LDA LB34B,X LDA tblSAUCER_INDEX,X
CMP #sprENEMY2 CMP #sprENEMY2
BCS L2020 BCS L2020
LDA #$78 LDA #$78
@ -3336,7 +3338,7 @@ L2016 LDA tblFLYINGENEMIES_INDEX,Y
DEY DEY
BPL L2016 BPL L2016
L2020 LDA LB343,X L2020 LDA tblSAUCER_X,X
CMP $06 CMP $06
BCC L1FBB BCC L1FBB
CLC CLC
@ -3344,12 +3346,12 @@ L2020 LDA LB343,X
CMP #$DC CMP #$DC
BCS L1FBB BCS L1FBB
STA tblFLYINGENEMIES_X,X STA tblFLYINGENEMIES_X,X
LDA LB347,X LDA tblSAUCER_Y,X
CLC CLC
ADC #$08 ADC #$08
STA tblFLYINGENEMIES_Y,X STA tblFLYINGENEMIES_Y,X
LDA LB34B,X LDA tblSAUCER_INDEX,X
CMP #sprENEMY3+1 CMP #sprENEMY3+1
BCC L2044 BCC L2044
JMP L1FBB JMP L1FBB
@ -3486,7 +3488,7 @@ L2134 LDA tblFLYINGENEMIES_INDEX,X
JMP L2060 JMP L2060
L2148 LDX #$03 L2148 LDX #$03
L214A LDA LB34B,X L214A LDA tblSAUCER_INDEX,X
BEQ L2171 BEQ L2171
BMI L2171 BMI L2171
CMP #$0E CMP #$0E
@ -3505,7 +3507,7 @@ L214A LDA LB34B,X
L2171 DEX L2171 DEX
BPL L214A BPL L214A
LDY #$03 LDY #$03
L2176 LDA LB34B,Y L2176 LDA tblSAUCER_INDEX,Y
BEQ L2184 BEQ L2184
BMI L2184 BMI L2184
CMP #$0E CMP #$0E
@ -3516,7 +3518,7 @@ L2184 DEY
BPL L2176 BPL L2176
RTS RTS
L2188 LDA LB343,Y L2188 LDA tblSAUCER_X,Y
CLC CLC
ADC LB3BF,Y ADC LB3BF,Y
CMP vehicleX CMP vehicleX
@ -3525,9 +3527,9 @@ L2188 LDA LB343,Y
CLC CLC
ADC #$26 ADC #$26
ADC LB3BB,Y ADC LB3BB,Y
CMP LB343,Y CMP tblSAUCER_X,Y
BCC L21B3 BCC L21B3
LDA LB347,Y LDA tblSAUCER_Y,Y
CLC CLC
ADC LB3B7,Y ADC LB3B7,Y
SEC SEC
@ -4008,14 +4010,14 @@ L2507 LDA #$1E
LDA #$14 LDA #$14
STA LB357,X STA LB357,X
LDA #$23 LDA #$23
STA LB347,X STA tblSAUCER_Y,X
LDA #$73 LDA #$73
STX xCNT STX xCNT
JSR L26EC JSR L26EC
LDX xCNT LDX xCNT
CLC CLC
ADC #$8C ADC #$8C
STA LB343,X STA tblSAUCER_X,X
LDA #$00 LDA #$00
STA LB34F,X STA LB34F,X
STA LB353,X STA LB353,X
@ -4032,7 +4034,7 @@ L2507 LDA #$1E
L2548 LDA LB36F,X L2548 LDA LB36F,X
BEQ L257D BEQ L257D
LDA LB343,X LDA tblSAUCER_X,X
CMP #$8C CMP #$8C
BCS L257D BCS L257D
STA $00 STA $00
@ -4047,12 +4049,12 @@ L2548 LDA LB36F,X
LDA LB373,X LDA LB373,X
BEQ L2572 BEQ L2572
LDA #$FF LDA #$FF
STA LB34B,X STA tblSAUCER_INDEX,X
RTS RTS
L2572 CLC L2572 CLC
ADC #$2A ADC #$2A
STA LB343,X STA tblSAUCER_X,X
LDA #$FA LDA #$FA
STA LB373,X STA LB373,X
L257D LDA LB35B,X L257D LDA LB35B,X
@ -4070,12 +4072,12 @@ L2588 TAY
CLC CLC
ADC #$01 ADC #$01
L2595 CLC L2595 CLC
ADC LB343,X ADC tblSAUCER_X,X
AND #$FE AND #$FE
L259B STA LB343,X L259B STA tblSAUCER_X,X
LDA LB36F,X LDA LB36F,X
BEQ L25D3 BEQ L25D3
LDA LB34B,X LDA tblSAUCER_INDEX,X
CMP #$0D CMP #$0D
BEQ L25B9 BEQ L25B9
CMP #$0C CMP #$0C
@ -4086,14 +4088,14 @@ L259B STA LB343,X
BCS L25D3 BCS L25D3
JMP L25D0 JMP L25D0
L25B9 LDA LB347,X L25B9 LDA tblSAUCER_Y,X
CLC CLC
ADC #$02 ADC #$02
STA LB347,X STA tblSAUCER_Y,X
CMP #$86 CMP #$86
BCC L25D0 BCC L25D0
LDA #$89 LDA #$89
STA LB347,X STA tblSAUCER_Y,X
LDA #$01 LDA #$01
STA LB383,X STA LB383,X
L25D0 JMP L25F1 L25D0 JMP L25F1
@ -4112,8 +4114,8 @@ L25DE TAY
CLC CLC
ADC #$01 ADC #$01
L25EA CLC L25EA CLC
ADC LB347,X ADC tblSAUCER_Y,X
STA LB347,X STA tblSAUCER_Y,X
L25F1 LDA LB35B,X L25F1 LDA LB35B,X
SEC SEC
SBC LB363,X SBC LB363,X
@ -4202,14 +4204,14 @@ L2691 LDA #$0A
CLC CLC
ADC #$01 ADC #$01
STA LB367,X STA LB367,X
L26AB LDA LB347,X L26AB LDA tblSAUCER_Y,X
CMP #$41 CMP #$41
BCS L26BC BCS L26BC
LDA LB357,X LDA LB357,X
BPL L26BC BPL L26BC
LDA #$FB LDA #$FB
STA LB35F,X STA LB35F,X
L26BC LDA LB347,X L26BC LDA tblSAUCER_Y,X
CMP #$43 CMP #$43
BCC L26D1 BCC L26D1
BEQ L26D1 BEQ L26D1
@ -4218,12 +4220,12 @@ L26BC LDA LB347,X
BEQ L26D1 BEQ L26D1
LDA #$05 LDA #$05
STA LB35F,X STA LB35F,X
L26D1 LDA LB343,X L26D1 LDA tblSAUCER_X,X
CMP #$28 CMP #$28
BCS L26DD BCS L26DD
LDA #$F0 LDA #$F0
STA LB363,X STA LB363,X
L26DD LDA LB343,X L26DD LDA tblSAUCER_X,X
CMP #$BE CMP #$BE
BCC L26EB BCC L26EB
BEQ L26EB BEQ L26EB
@ -5118,7 +5120,7 @@ L2EE6 JSR animSHOOTS
LDA #$16 LDA #$16
STA timeCNT STA timeCNT
JSR printTIME JSR printTIME
L2EF4 JSR L164F L2EF4 JSR animSAUCERS
JSR L13AD JSR L13AD
JSR L1FB0 JSR L1FB0
JSR L1797 JSR L1797