![]() |
Routines |
| Prev: 38036 | Up: Map | Next: 38151 |
|
The code for an object of type 25, which is run by RunObjectHandler.
|
||||||||
| UpdateType19 | 38056 | CALL PlayMovingSound | Play a sound. | |||||
| 38059 | LD (IX+13),85 | Make the attribute of the object 85. | ||||||
| 38063 | BIT 5,(IX+16) | Jump to UpdateType19_Clear if bit 5 of the flags of the object is clear. | ||||||
| 38067 | JR Z,UpdateType19_Clear | |||||||
| 38069 | LD A,(39524) | Fetch the frame counter from FrameCounter. | ||||||
| 38072 | AND %00000111 | Keep the bottom three bits. | ||||||
| 38074 | JR NZ,UpdateType19_Clear | Jump to UpdateType19_Clear if any are set. | ||||||
| 38076 | INC (IX+22) | Add one to the third state byte of the object. | ||||||
| 38079 | CALL ScoreDestroyedObject | Score the points for the object. | ||||||
| 38082 | CALL PlayHitSound | Play the explosion sound. | ||||||
| UpdateType19_Clear | 38085 | RES 5,(IX+16) | Clear bit 5 of the flags of the object. | |||||
| 38089 | LD A,(IX+22) | Fetch the third state byte of the object. | ||||||
| 38092 | AND %00111111 | Keep the bottom six bits. | ||||||
| 38094 | CP 10 | Jump to UpdateType19_Count if it is not ten or more. | ||||||
| 38096 | JR C,UpdateType19_Count | |||||||
| 38098 | LD (IX+13),255 | Make the attribute of the object 255. | ||||||
| UpdateType19_Count | 38102 | CP 14 | Jump to UpdateType19_Shoot if it is not fourteen or more. | |||||
| 38104 | JR C,UpdateType19_Shoot | |||||||
| 38106 | SET 3,(IX+23) | Set bit 3 of the second set of flags of the object. | ||||||
| 38110 | CALL ScoreDestroyedObject | Score the points for the object. | ||||||
| UpdateType19_Shoot | 38113 | PUSH IY | Stash IY on the stack. | |||||
| 38115 | LD A,(IX+19) | Fetch the first state byte of the object. | ||||||
| 38118 | AND %00000001 | Keep bit 0. | ||||||
| 38120 | ADD A,7 | Add seven. | ||||||
| 38122 | LD (23580),A | Store it in ScratchValue. | ||||||
| 38125 | CALL FireRandomShot | Fire a random shot. | ||||||
| 38128 | POP IY | Bring IY back off the stack. | ||||||
| 38130 | CALL RunObjectBehaviour | Run the behaviour code for the object. | ||||||
| 38133 | CALL AccelerateObject | Move the object. | ||||||
| 38136 | LD A,(IX+7) | Fetch the horizontal speed of the object. | ||||||
| 38139 | OR (IX+8) | Combine it with the low byte of the speed. | ||||||
| 38142 | CALL NZ,SetFacing | Set the facing of the object if it is moving. | ||||||
| 38145 | LD BC,6192 | BC=6192. | ||||||
| 38148 | JP UpdateType14_Move | Jump to UpdateType14_Move. | ||||||
| Prev: 38036 | Up: Map | Next: 38151 |