![]() |
Routines |
| Prev: 917C | Up: Map | Next: 925E |
|
Adds the points for an object to the score of player one. The points come from the table at PointsTable, indexed by the type of the object. Objects of type 0D and 1B are worth 0250 points. The points are doubled if bit 3 of the second flags of the object is set.
|
||||||||
| ScoreDestroyedObject | 9234 | LD A,(IX+$00) | Fetch the type of the object. | |||||
| 9237 | CP $0D | Jump to ScoreDestroyedObject_Fixed if it is 0D. | ||||||
| 9239 | JR Z,ScoreDestroyedObject_Fixed | |||||||
| 923B | CP $1B | Jump to ScoreDestroyedObject_Table if it is not 1B. | ||||||
| 923D | JR NZ,ScoreDestroyedObject_Table | |||||||
| ScoreDestroyedObject_Fixed | 923F | LD BC,$0250 | Set the points to 0250. | |||||
| 9242 | JR AddToScore | Jump to AddToScore. | ||||||
| ScoreDestroyedObject_Table | 9244 | SUB $13 | Subtract 13 from the type. | |||||
| 9246 | ADD A,A | Double it. | ||||||
| 9247 | LD HL,$929C | Use the table at PointsTable. | ||||||
| 924A | CALL AddAToHL | Add the offset to the address. | ||||||
| 924D | LD B,(HL) | Fetch the points into BC. | ||||||
| 924E | INC HL | |||||||
| 924F | LD C,(HL) | |||||||
| 9250 | BIT 3,(IX+$17) | Jump to AddToScore if bit 3 of the second set of flags is clear. | ||||||
| 9254 | JR Z,AddToScore | |||||||
| 9256 | LD A,C | Double the points. | ||||||
| 9257 | ADD A,A | |||||||
| 9258 | DAA | |||||||
| 9259 | LD C,A | |||||||
| 925A | LD A,B | |||||||
| 925B | ADC A,B | |||||||
| 925C | DAA | |||||||
| 925D | LD B,A | Keep the result in B. | ||||||
|
Continue on to AddToScore.
|
||||||||
| Prev: 917C | Up: Map | Next: 925E |