![]() |
Routines |
| Prev: 938D | Up: Map | Next: 9457 |
|
The code for an object of type 13, which is run by RunObjectHandler.
|
||||||||
| UpdateType13 | 93F2 | LD A,$80 | Set the collision effects in 8E2C to 80. | |||||
| 93F4 | LD ($8E2C),A | |||||||
| 93F7 | LD A,(IX+$04) | Fetch the map zone of the object. | ||||||
| 93FA | CP $0A | Jump to UpdateType13_Zone3 if it is not 0A. | ||||||
| 93FC | JR NZ,UpdateType13_Zone3 | |||||||
| 93FE | LD A,(IX+$05) | Fetch the vertical position of the object. | ||||||
| 9401 | CP $A0 | Jump to UpdateType13_Move if it is lower than A0. | ||||||
| 9403 | JR C,UpdateType13_Move | |||||||
| 9405 | SET 3,(IX+$17) | Set bit 3 of the second set of flags of the object. | ||||||
| 9409 | JR UpdateType13_Move | Jump to UpdateType13_Move. | ||||||
| UpdateType13_Zone3 | 940B | CP $03 | Jump to UpdateType13_Move if the map is not zone 03. | |||||
| 940D | JR NZ,UpdateType13_Move | |||||||
| 940F | SET 3,(IX+$17) | Set bit 3 of the second set of flags of the object. | ||||||
| UpdateType13_Move | 9413 | LD A,$03 | Set ScratchValue to 03. | |||||
| 9415 | LD ($5C1C),A | |||||||
| 9418 | LD A,(IX+$0D) | Fetch the attribute of the object. | ||||||
| 941B | CP $77 | Is it 77? | ||||||
| 941D | PUSH IY | Stash IY on the stack. | ||||||
| 941F | CALL Z,FireRandomShot | Fire a random shot if so. | ||||||
| 9422 | POP IY | Bring IY back off the stack. | ||||||
| 9424 | LD A,(IX+$10) | Fetch the flags of the object. | ||||||
| 9427 | AND %00000011 | Keep the bottom two bits. | ||||||
| 9429 | CP $03 | Jump to UpdateType13_Accelerate if they are not both set. | ||||||
| 942B | JR NZ,UpdateType13_Accelerate | |||||||
| 942D | LD (IX+$0E),$00 | Clear the vertical acceleration of the object. | ||||||
| 9431 | LD (IX+$0F),$00 | |||||||
| UpdateType13_Accelerate | 9435 | CALL AccelerateObject | Move the object. | |||||
| 9438 | LD BC,$2030 | BC=2030. | ||||||
| 943B | LD A,(IX+$13) | Fetch the first state byte of the object. | ||||||
| 943E | AND A | Test it. | ||||||
| 943F | JP Z,UpdateType14_Move | Jump to UpdateType14_Move if it is zero. | ||||||
| 9442 | LD A,($8E2B) | Fetch the number of active enemies from 8E2B. | ||||||
| 9445 | INC A | Add one and store it. | ||||||
| 9446 | LD ($8E2B),A | |||||||
| 9449 | JP UpdateType14_Move | Jump to UpdateType14_Move. | ||||||
| UpdateType13_Table | 944C | DEFB $50,$50,$50,$28,$58,$58,$1C,$58,$1A,$FF,$58 | ||||||
| Prev: 938D | Up: Map | Next: 9457 |