![]() |
Routines |
| Prev: CB52 | Up: Map | Next: CE7B |
|
||||||||||
| CB88 | LD A,(IY+$00) | Set A to the type of static enemy (with reverse bit) | ||||||||
|
This entry point is used by the routine at CA49.
|
||||||||||
| CB8B | LD (IX+$0E),$03 | Initialize the width of the sprite (in bytes) to $03 | ||||||||
| CB8F | LD (IX+$0F),$10 | Initialize the height of the sprite (in pixels) to $10 | ||||||||
| CB93 | LD (IX+$10),$02 | Initialize speed to $02 | ||||||||
| CB97 | LD (IX+$15),$00 | Initialize bubble energy to $00 | ||||||||
| CB9B | AND $7F | Set to 0 the reverse bit of the type of enemy | ||||||||
| CB9D | LD (IX+$09),A | Initialize the enemy type | ||||||||
| CBA0 | OR A | enemy type = $00? | ||||||||
| CBA1 | CALL Z,$CC48 | Configure FOOT MAN | ||||||||
| CBA4 | CP $01 | enemy type = $01? | ||||||||
| CBA6 | CALL Z,$CC83 | Configure STOMPER | ||||||||
| CBA9 | CP $03 | enemy type = $03? | ||||||||
| CBAB | CALL Z,$CC96 | Configure WAGON | ||||||||
| CBAE | CP $04 | enemy type = $04? | ||||||||
| CBB0 | CALL Z,$CCA1 | Configure REAR TRAIN | ||||||||
| CBB3 | CP $05 | enemy type = $05? | ||||||||
| CBB5 | CALL Z,$CCB0 | Configure FRONT TRAIN | ||||||||
| CBB8 | CP $08 | enemy type = $08? | ||||||||
| CBBA | CALL Z,$CCBF | Configure SCANNER | ||||||||
| CBBD | CP $09 | enemy type = $09? | ||||||||
| CBBF | CALL Z,$CCF8 | Configure SWING GUN | ||||||||
| CBC2 | CP $0A | enemy type = $0A? | ||||||||
| CBC4 | CALL Z,$CD5A | Configure SHOOTER | ||||||||
| CBC7 | CP $0B | enemy type = $0B? | ||||||||
| CBC9 | CALL Z,$CD7C | Configure LAUNCHER | ||||||||
| CBCC | CP $0C | enemy type = $0C? | ||||||||
| CBCE | CALL Z,$CDA2 | Configue POD | ||||||||
| CBD1 | CP $0D | enemy type = $0D? | ||||||||
| CBD3 | CALL Z,$CDB9 | Configure MINE LAYER | ||||||||
| CBD6 | CP $0E | enemy type = $0E? | ||||||||
| CBD8 | CALL Z,$CDD8 | Configure MINE | ||||||||
| CBDB | CP $0F | enemy type = $0F? | ||||||||
| CBDD | CALL Z,$CE13 | Configure BLOB | ||||||||
| CBE0 | CP $10 | enemy type = $10? | ||||||||
| CBE2 | CALL Z,$CE3E | Configure BOSS | ||||||||
| CBE5 | CP $11 | enemy type = $11? | ||||||||
| CBE7 | CALL Z,$CD1A | Configure fixed SWING GUN LEFT | ||||||||
| CBEA | CP $12 | enemy type = $12? | ||||||||
| CBEC | CALL Z,$CD2A | Configure fixed SWING GUN LEFT-BOTTOM | ||||||||
| CBEF | CP $13 | enemy type = $13? | ||||||||
| CBF1 | CALL Z,$CD3A | Configure fixed SWING GUN RIGHT | ||||||||
| CBF4 | CP $14 | enemy type = $14? | ||||||||
| CBF6 | CALL Z,$CD4A | Configure fixed SWING GUN RIGHT-BOTTOM | ||||||||
| CBF9 | CP $06 | enemy type = $06? | ||||||||
| CBFB | CALL Z,$CC5B | Configure FOOT MAN CROUCHED | ||||||||
| CBFE | CP $7D | enemy type = $7D? | ||||||||
| CC00 | CALL Z,$CCE6 | Configure SMARTBOMB | ||||||||
| CC03 | LD (IX+$16),E | Save address for graphic data of animated sprite | ||||||||
| CC06 | LD (IX+$17),D | |||||||||
| CC09 | LD (IX+$0A),L | Save address for animation offset | ||||||||
| CC0C | LD (IX+$0B),H | |||||||||
| CC0F | LD A,(IY+$01) | Set A to the x-position of sprite | ||||||||
| CC12 | LD (IX+$00),A | Save x-position into enemy configuration buffer | ||||||||
| CC15 | LD A,(IY+$02) | Set A to the y-position of sprite | ||||||||
| CC18 | SLA A | Copy bits 7-3 to the y-position for the enemy configuration buffer | ||||||||
| CC1A | SLA A | |||||||||
| CC1C | SLA A | |||||||||
| CC1E | LD (IX+$01),A | |||||||||
| CC21 | LD A,(IY+$00) | If bit 7 of enemy type is set then set the reverse sprite indicator in enemy configuration buffer | ||||||||
| CC24 | AND $80 | |||||||||
| CC26 | SRL A | |||||||||
| CC28 | SRL A | |||||||||
| CC2A | SRL A | |||||||||
| CC2C | SRL A | |||||||||
| CC2E | SRL A | |||||||||
| CC30 | SRL A | |||||||||
| CC32 | SRL A | |||||||||
| CC34 | LD (IX+$02),A | |||||||||
| CC37 | LD (IX+$03),$00 | |||||||||
| CC3B | LD (IX+$06),$00 | |||||||||
| CC3F | LD (IX+$0C),$01 | Set sprite active (alive) | ||||||||
| CC43 | LD (IX+$0D),$00 | |||||||||
| CC47 | RET | |||||||||
|
Configure FOOT MAN
|
||||||||||
| CC48 | LD HL,$AE5D | Set HL to the offset animation table | ||||||||
| CC4B | LD (IX+$11),$00 | Set state counter to $00 | ||||||||
| CC4F | LD (IX+$12),$00 | Set FOOT MAN walking | ||||||||
| CC53 | LD (IX+$14),$02 | Set health to $02 | ||||||||
| CC57 | LD DE,$7F72 | Set DE to the graphics data for the enemy | ||||||||
| CC5A | RET | |||||||||
|
Configure FOOT MAN CROUCHED
|
||||||||||
| CC5B | LD HL,$8E8A | Set address of graphic data for crouched FOOT MAN | ||||||||
| CC5E | LD (IX+$04),L | |||||||||
| CC61 | LD (IX+$05),H | |||||||||
| CC64 | LD (IX+$11),$C8 | Set state counter to fixed FOOT MAN crouched | ||||||||
| CC68 | LD (IX+$12),$01 | Set FOOT MAN crouched | ||||||||
| CC6C | LD (IX+$10),$00 | Set enemy stopped | ||||||||
| CC70 | LD (IX+$0E),$02 | Set width of the sprite (in bytes) | ||||||||
| CC74 | LD (IX+$09),$80 | Set graphic data from static sprite & enmey type FOOT MAN | ||||||||
| CC78 | LD (IX+$14),$02 | Set health | ||||||||
| CC7C | LD HL,$AE5D | Set HL to the offset animation table | ||||||||
| CC7F | LD DE,$7F72 | Set DE to the graphics data for the enemy | ||||||||
| CC82 | RET | |||||||||
|
Configure STOMPER
|
||||||||||
| CC83 | LD (IX+$10),$02 | Set enemy speed | ||||||||
| CC87 | LD (IX+$14),$08 | Set health to $08 | ||||||||
| CC8B | LD (IX+$15),$01 | Set big energy bubble | ||||||||
| CC8F | LD HL,$AE5D | Set HL to the offset animation table | ||||||||
| CC92 | LD DE,$8032 | Set DE to the graphics data for the enemy | ||||||||
| CC95 | RET | |||||||||
|
Configure WAGON
|
||||||||||
| CC96 | LD (IX+$14),$0F | Set health to $0F | ||||||||
| CC9A | LD HL,$AE5D | Set HL to the offset animation table | ||||||||
| CC9D | LD DE,$84B2 | Set DE to the graphics data for the enemy | ||||||||
| CCA0 | RET | |||||||||
|
Configure REAR TRAIN
|
||||||||||
| CCA1 | LD (IX+$14),$05 | Set health to $05 | ||||||||
| CCA5 | LD (IX+$15),$01 | Set big energy bubble | ||||||||
| CCA9 | LD HL,$AE5D | Set HL to the offset animation table | ||||||||
| CCAC | LD DE,$8572 | Set DE to the graphics data for the enemy | ||||||||
| CCAF | RET | |||||||||
|
Configure FRONT TRAIN
|
||||||||||
| CCB0 | LD (IX+$14),$0F | Set health to $0F | ||||||||
| CCB4 | LD (IX+$15),$01 | Set big energy bubble | ||||||||
| CCB8 | LD HL,$AE5D | Set HL to the offset animation table | ||||||||
| CCBB | LD DE,$83F2 | Set DE to the graphics data for the enemy | ||||||||
| CCBE | RET | |||||||||
|
Configure SCANNER
|
||||||||||
| CCBF | LD (IX+$14),$10 | Set health to $10 | ||||||||
| CCC3 | LD (IX+$15),$01 | Set big energy bubble | ||||||||
| CCC7 | LD (IX+$10),$01 | Set speed | ||||||||
| CCCB | LD (IX+$0E),$02 | Set width of sprite | ||||||||
| CCCF | LD (IX+$0F),$0B | Set height of sprite | ||||||||
| CCD3 | LD (IX+$12),$10 | Set shot frequency? | ||||||||
| CCD7 | LD (IX+$11),$00 | |||||||||
| CCDB | LD (IX+$06),$00 | |||||||||
| CCDF | LD HL,$AE7D | Set HL to the offset animation table | ||||||||
| CCE2 | LD DE,$8B5A | Set DE to the graphics data for the enemy | ||||||||
| CCE5 | RET | |||||||||
|
Configure SMARTBOMB
|
||||||||||
| CCE6 | LD HL,$8CEA | Set graphic data address for sprite | ||||||||
| CCE9 | LD (IX+$04),L | |||||||||
| CCEC | LD (IX+$05),H | |||||||||
| CCEF | LD (IX+$0E),$02 | Set width of sprite | ||||||||
| CCF3 | SET 7,(IX+$09) | Set graphics data from static sprite | ||||||||
| CCF7 | RET | |||||||||
|
Configure SWING GUN
|
||||||||||
| CCF8 | LD HL,$8EAA | Set graphic data address for sprite | ||||||||
| CCFB | LD (IX+$04),L | |||||||||
| CCFE | LD (IX+$05),H | |||||||||
| CD01 | LD (IX+$0E),$02 | Set width of sprite | ||||||||
| CD05 | LD (IX+$14),$0A | Set health to $0A | ||||||||
| CD09 | LD (IX+$11),$00 | |||||||||
| CD0D | LD (IX+$15),$01 | Set big energy bubble | ||||||||
| CD11 | LD (IX+$12),$00 | Set mobile SWING GUN | ||||||||
| CD15 | SET 7,(IX+$09) | Set graphic data from static sprite | ||||||||
| CD19 | RET | |||||||||
|
Configure fixed SWING GUN LEFT
|
||||||||||
| CD1A | LD (IX+$09),$09 | Set enemy type | ||||||||
| CD1E | CALL $CCF8 | Configure SWING GUN | ||||||||
| CD21 | LD (IX+$11),$00 | Set left orientation | ||||||||
| CD25 | LD (IX+$12),$01 | Set fixed SWING GUN | ||||||||
| CD29 | RET | |||||||||
|
Configure fixed SWING GUN LEFT-BOTTOM
|
||||||||||
| CD2A | LD (IX+$09),$09 | Set enemy type | ||||||||
| CD2E | CALL $CCF8 | Configure SWING GUN | ||||||||
| CD31 | LD (IX+$11),$01 | Set left-bottom orientation | ||||||||
| CD35 | LD (IX+$12),$01 | Set fixed SWING GUN | ||||||||
| CD39 | RET | |||||||||
|
Configure fixed SWING GUN RIGHT
|
||||||||||
| CD3A | LD (IX+$09),$09 | Set enemy type | ||||||||
| CD3E | CALL $CCF8 | Configure SWING GUN | ||||||||
| CD41 | LD (IX+$11),$04 | Set right orientation | ||||||||
| CD45 | LD (IX+$12),$01 | Set fixed SWING GUN | ||||||||
| CD49 | RET | |||||||||
|
Configure fixed SWING GUN RIGHT-BOTTOM
|
||||||||||
| CD4A | LD (IX+$09),$09 | Set enemy type | ||||||||
| CD4E | CALL $CCF8 | Configure SWING GUN | ||||||||
| CD51 | LD (IX+$11),$03 | Set right-bottom orientation | ||||||||
| CD55 | LD (IX+$12),$01 | Set fixed SWING GUN | ||||||||
| CD59 | RET | |||||||||
|
Configure SHOOTER
|
||||||||||
| CD5A | LD HL,$8E6A | Set graphic data address for the sprite | ||||||||
| CD5D | LD (IX+$04),L | |||||||||
| CD60 | LD (IX+$05),H | |||||||||
| CD63 | LD (IX+$0E),$02 | Set width of sprite | ||||||||
| CD67 | LD (IX+$14),$0A | Set health to $0A | ||||||||
| CD6B | LD (IX+$15),$01 | Set big energy bubble | ||||||||
| CD6F | LD (IX+$11),$14 | Set shot counter | ||||||||
| CD73 | LD (IX+$12),$11 | Set shot frequency | ||||||||
| CD77 | SET 7,(IX+$09) | Set graphic data from static sprite | ||||||||
| CD7B | RET | |||||||||
|
Configure LAUNCHER
|
||||||||||
| CD7C | LD HL,$8E4A | Set graphic data address for the sprite | ||||||||
| CD7F | LD (IX+$04),L | |||||||||
| CD82 | LD (IX+$05),H | |||||||||
| CD85 | LD (IX+$0E),$02 | Set width of sprite | ||||||||
| CD89 | LD (IX+$14),$08 | Set health to $08 | ||||||||
| CD8D | LD (IX+$11),$00 | |||||||||
| CD91 | LD (IX+$15),$01 | Set big energy bubble | ||||||||
| CD95 | LD (IX+$11),$0A | Set shot counter | ||||||||
| CD99 | LD (IX+$12),$06 | Set shot frequency | ||||||||
| CD9D | SET 7,(IX+$09) | Set graphic data from static sprite | ||||||||
| CDA1 | RET | |||||||||
|
Configure POD
|
||||||||||
| CDA2 | LD (IX+$14),$02 | Set health to $02 | ||||||||
| CDA6 | LD (IX+$06),$00 | |||||||||
| CDAA | LD (IX+$11),$00 | Set direction up | ||||||||
| CDAE | LD (IX+$12),$00 | Set speed 0 | ||||||||
| CDB2 | LD HL,$AE5D | Set HL to the offset animation table | ||||||||
| CDB5 | LD DE,$8D8A | Set graphic data from static sprite | ||||||||
| CDB8 | RET | |||||||||
|
Configure MINE LAYER
|
||||||||||
| CDB9 | LD (IX+$14),$0F | Set health to $02 | ||||||||
| CDBD | LD (IX+$06),$00 | |||||||||
| CDC1 | LD (IX+$0F),$0C | Set height in pixels | ||||||||
| CDC5 | LD (IX+$11),$01 | Set direction down | ||||||||
| CDC9 | LD (IX+$12),$01 | Set speed 1 | ||||||||
| CDCD | LD (IX+$15),$01 | Set big energy bubble | ||||||||
| CDD1 | LD HL,$AE6D | Set HL to the offset animation table | ||||||||
| CDD4 | LD DE,$90A2 | et graphic data from static sprite | ||||||||
| CDD7 | RET | |||||||||
|
Configure MINE
|
||||||||||
| CDD8 | LD (IX+$14),$02 | Set health to $02 | ||||||||
| CDDC | LD (IX+$06),$00 | |||||||||
| CDE0 | LD (IX+$0E),$02 | Set width in bytes | ||||||||
| CDE4 | LD (IX+$0F),$08 | Set height in pixels | ||||||||
| CDE8 | LD (IX+$10),$01 | Set speed | ||||||||
| CDEC | LD (IX+$04),$00 | |||||||||
| CDF0 | LD (IX+$05),$00 | |||||||||
| CDF4 | LD (IX+$11),$10 | |||||||||
| CDF8 | LD (IX+$12),$00 | |||||||||
| CDFC | LD (IX+$15),$FF | Set no energy bubble | ||||||||
| CE00 | LD HL,$AE75 | Set animation offset table | ||||||||
| CE03 | LD (IX+$0A),L | |||||||||
| CE06 | LD (IX+$0B),H | |||||||||
| CE09 | LD DE,$9132 | Set graphic data for mine | ||||||||
| CE0C | LD (IX+$16),E | |||||||||
| CE0F | LD (IX+$17),D | |||||||||
| CE12 | RET | |||||||||
|
Configure BLOB
|
||||||||||
| CE13 | LD (IX+$14),$04 | Set health to $04 | ||||||||
| CE17 | LD (IX+$06),$00 | |||||||||
| CE1B | LD (IX+$0E),$02 | Set width in bytes | ||||||||
| CE1F | LD (IX+$0F),$08 | Set height in pixels | ||||||||
| CE23 | LD (IX+$10),$01 | Set speed | ||||||||
| CE27 | LD (IX+$04),$00 | |||||||||
| CE2B | LD (IX+$05),$00 | |||||||||
| CE2F | LD (IX+$11),$02 | |||||||||
| CE33 | LD (IX+$15),$FF | Set no energy bubble | ||||||||
| CE37 | LD HL,$AE75 | Set animation offset table | ||||||||
| CE3A | LD DE,$9022 | Set graphic data for blob | ||||||||
| CE3D | RET | |||||||||
|
Configure BOSS
|
||||||||||
| CE3E | LD HL,$91D2 | Set graphic data address | ||||||||
| CE41 | LD (IX+$04),L | |||||||||
| CE44 | LD (IX+$05),H | |||||||||
| CE47 | LD (IX+$0E),$06 | Set width in bytes | ||||||||
| CE4B | LD (IX+$0F),$30 | Set height in pixels | ||||||||
| CE4F | CALL $CE67 | Set health | ||||||||
| CE52 | LD (IX+$15),$FF | Set no energy bubble | ||||||||
| CE56 | LD (IX+$11),$00 | Set boos direction up | ||||||||
| CE5A | LD (IX+$13),$00 | Set Boss status | ||||||||
| CE5E | SET 7,(IX+$09) | Set graphic data from static enemy | ||||||||
| CE62 | LD (IX+$12),$02 | Set Boss speed | ||||||||
| CE66 | RET | |||||||||
|
Computes health for BOSS enemy
|
||||||||||
| CE67 | LD A,($A013) | Multiply $32 by the value of A013 | ||||||||
| CE6A | LD B,A | |||||||||
| CE6B | LD DE,$0032 | |||||||||
| CE6E | CALL $C8E8 | |||||||||
| CE71 | LD A,L | Adds $10 to the result | ||||||||
| CE72 | ADD A,$10 | |||||||||
| CE74 | LD (IX+$14),A | Set the health for the BOSS | ||||||||
| CE77 | LD ($A022),A | Save the health at A022 | ||||||||
| CE7A | RET | |||||||||
| Prev: CB52 | Up: Map | Next: CE7B |