Dynamite Dan | Routines |
Prev: DB9B | Up: Map | Next: DBED |
Each item of food scores (ID + 1) * 5 points
|
||||||||
DBB8 | LD E,(IX+$05) | Put the X co-ordinate in E. | ||||||
DBBB | LD D,(IX+$06) | Put the Y co-ordinate in D. | ||||||
DBBE | RES 3,(IX+$04) | Reset the "food in room" flag. | ||||||
DBC2 | LD A,(IX+$04) | Get bits 0-2 of the room flags, which contain the food index. | ||||||
DBC5 | AND $07 | |||||||
DBC7 | PUSH AF | Store A with the food ID. | ||||||
DBC8 | CALL $DCE8 | Convert this to a graphic address in HL. | ||||||
DBCB | LD B,(HL) | Put the actual address referenced in BC. | ||||||
DBCC | INC HL | |||||||
DBCD | LD C,(HL) | |||||||
DBCE | CALL $E897 | Remove the food from screen. | ||||||
DBD1 | POP AF | Restore A. | ||||||
Now add points based on the type of food.
|
||||||||
DBD2 | INC A | Increment by 1, then multiply by 5 to get the score to add. | ||||||
DBD3 | LD B,A | |||||||
DBD4 | ADD A,A | |||||||
DBD5 | ADD A,A | |||||||
DBD6 | ADD A,B | |||||||
DBD7 | LD HL,$C86B | Point HL at the score to add. (C86B) | ||||||
DBDA | ADD A,(HL) | Add on this score. | ||||||
DBDB | LD (HL),A | |||||||
DBDC | LD HL,$EE46 | Play the "picked up the food" tune. | ||||||
DBDF | CALL $DB0B | |||||||
DBE2 | LD A,$08 | Restore the energy (C86D) to 8. | ||||||
DBE4 | LD ($C86D),A | |||||||
DBE7 | LD A,$C8 | Reset the tick count before energy is decreased (C86F) to the maximum of C8. | ||||||
DBE9 | LD ($C86F),A | |||||||
DBEC | RET | Return. |
Prev: DB9B | Up: Map | Next: DBED |