![]() |
Routines |
| Prev: 37773 | Up: Map | Next: 37975 |
|
The code for an object of type 19, which is run by RunObjectHandler.
|
||||||||
| UpdateType13 | 37874 | LD A,128 | Set the collision effects in 36396 to 128. | |||||
| 37876 | LD (36396),A | |||||||
| 37879 | LD A,(IX+4) | Fetch the map zone of the object. | ||||||
| 37882 | CP 10 | Jump to UpdateType13_Zone3 if it is not 10. | ||||||
| 37884 | JR NZ,UpdateType13_Zone3 | |||||||
| 37886 | LD A,(IX+5) | Fetch the vertical position of the object. | ||||||
| 37889 | CP 160 | Jump to UpdateType13_Move if it is lower than 160. | ||||||
| 37891 | JR C,UpdateType13_Move | |||||||
| 37893 | SET 3,(IX+23) | Set bit 3 of the second set of flags of the object. | ||||||
| 37897 | JR UpdateType13_Move | Jump to UpdateType13_Move. | ||||||
| UpdateType13_Zone3 | 37899 | CP 3 | Jump to UpdateType13_Move if the map is not zone 3. | |||||
| 37901 | JR NZ,UpdateType13_Move | |||||||
| 37903 | SET 3,(IX+23) | Set bit 3 of the second set of flags of the object. | ||||||
| UpdateType13_Move | 37907 | LD A,3 | Set ScratchValue to 3. | |||||
| 37909 | LD (23580),A | |||||||
| 37912 | LD A,(IX+13) | Fetch the attribute of the object. | ||||||
| 37915 | CP 119 | Is it 119? | ||||||
| 37917 | PUSH IY | Stash IY on the stack. | ||||||
| 37919 | CALL Z,FireRandomShot | Fire a random shot if so. | ||||||
| 37922 | POP IY | Bring IY back off the stack. | ||||||
| 37924 | LD A,(IX+16) | Fetch the flags of the object. | ||||||
| 37927 | AND %00000011 | Keep the bottom two bits. | ||||||
| 37929 | CP 3 | Jump to UpdateType13_Accelerate if they are not both set. | ||||||
| 37931 | JR NZ,UpdateType13_Accelerate | |||||||
| 37933 | LD (IX+14),0 | Clear the vertical acceleration of the object. | ||||||
| 37937 | LD (IX+15),0 | |||||||
| UpdateType13_Accelerate | 37941 | CALL AccelerateObject | Move the object. | |||||
| 37944 | LD BC,8240 | BC=8240. | ||||||
| 37947 | LD A,(IX+19) | Fetch the first state byte of the object. | ||||||
| 37950 | AND A | Test it. | ||||||
| 37951 | JP Z,UpdateType14_Move | Jump to UpdateType14_Move if it is zero. | ||||||
| 37954 | LD A,(36395) | Fetch the number of active enemies from 36395. | ||||||
| 37957 | INC A | Add one and store it. | ||||||
| 37958 | LD (36395),A | |||||||
| 37961 | JP UpdateType14_Move | Jump to UpdateType14_Move. | ||||||
| UpdateType13_Table | 37964 | DEFB 80,80,80,40,88,88,28,88,26,255,88 | ||||||
| Prev: 37773 | Up: Map | Next: 37975 |