![]() |
Routines |
| Prev: AB1F | Up: Map | Next: ABF5 |
|
Reached through UPDATES: the scene after a lost game (GAME_ENDED), with the robot (graphics 88 to 91) on its stand in the middle, sparks over its head (SCENE_SPARKS), and three tools round it -- a glove at the right (81), a hammer above (82) and a hook at the left (83). Once the sparks have stopped (SCENE_STATE not zero) the tools take turns: when none is swinging, each on its turn has a chance of one in four to start, with a thud. A swing is six steps towards the robot -- eight pixels across for the glove and the hook, four down for the hammer -- a crash, and six steps back. Fifteen swings end the scene and go back to the menu (AFTER_GAME); so does any of the keys 1 to 0.
+11: bit 0 swinging, bit 7 on the way back. +F the steps left. +10 the colour, which every turn paints the cells it covers (COLOUR_SCENE_OBJECT, in SCENE_SPARKS).
|
||||
| SCENE_TOOL | AB61 | LD HL,SCENE_STATE | the sparks still flashing: only colour its cells | |
| AB64 | LD A,(HL) | |||
| AB65 | AND A | |||
| AB66 | JR Z,SCENE_TOOL_5 | |||
| AB68 | LD A,$E7 | keys 1 to 0: back to the menu | ||
| AB6A | CALL READ_KEYS | |||
| AB6D | JP NZ,AFTER_GAME | |||
| AB70 | BIT 0,(IX+$11) | swinging | ||
| AB74 | JR NZ,SCENE_TOOL_0 | |||
| AB76 | BIT 7,(HL) | another is swinging | ||
| AB78 | JR NZ,SCENE_TOOL_5 | |||
| AB7A | LD A,(RANDOM) | one turn in four | ||
| AB7D | CPL | |||
| AB7E | AND $03 | |||
| AB80 | JR NZ,SCENE_TOOL_5 | |||
| AB82 | PUSH HL | a thud | ||
| AB83 | CALL THUD_SOUND | |||
| AB86 | POP HL | |||
| AB87 | SET 0,(IX+$11) | swing: this one, one at a time, six steps | ||
| AB8B | SET 7,(HL) | |||
| AB8D | LD (IX+$0F),$06 | |||
| SCENE_TOOL_0 | AB91 | LD A,(IX+$00) | the hammer (even) swings down; the glove and hook across | |
| AB94 | AND $01 | |||
| AB96 | JR Z,SCENE_TOOL_6 | |||
| AB98 | LD A,(IX+$1A) | eight pixels towards the middle of the screen, or back | ||
| AB9B | XOR (IX+$11) | |||
| AB9E | AND $80 | |||
| ABA0 | LD A,$08 | |||
| ABA2 | JR Z,SCENE_TOOL_1 | |||
| ABA4 | NEG | |||
| SCENE_TOOL_1 | ABA6 | ADD A,(IX+$1A) | ||
| ABA9 | LD (IX+$1A),A | |||
| SCENE_TOOL_2 | ABAC | DEC (IX+$0F) | steps left | |
| ABAF | JR NZ,SCENE_TOOL_4 | |||
| ABB1 | LD (IX+$0F),$06 | six more, the other way | ||
| ABB5 | LD A,(IX+$11) | |||
| ABB8 | XOR $80 | |||
| ABBA | LD (IX+$11),A | |||
| ABBD | AND $80 | |||
| ABBF | JR Z,SCENE_TOOL_3 | |||
| ABC1 | CALL CRASH_SOUND | at the robot: a crash | ||
| ABC4 | JR SCENE_TOOL_4 | |||
| SCENE_TOOL_3 | ABC6 | RES 0,(IX+$11) | back where it started: the swing is over | |
| ABCA | RES 7,(HL) | |||
| ABCC | INC (HL) | count it: fifteen swings | ||
| ABCD | LD A,(HL) | |||
| ABCE | AND $7F | |||
| ABD0 | CP $10 | |||
| ABD2 | JR NZ,SCENE_TOOL_4 | |||
| ABD4 | JP AFTER_GAME | and back to the menu | ||
| SCENE_TOOL_4 | ABD7 | CALL SET_WIPE_AND_DRAW_FLAGS | redraw | |
| SCENE_TOOL_5 | ABDA | JP COLOUR_SCENE_OBJECT | colour its cells | |
| SCENE_TOOL_6 | ABDD | LD A,(IX+$1B) | the hammer: four pixels towards the middle, or back | |
| ABE0 | ADD A,$20 | |||
| ABE2 | XOR (IX+$11) | |||
| ABE5 | AND $80 | |||
| ABE7 | LD A,$04 | |||
| ABE9 | JR Z,SCENE_TOOL_7 | |||
| ABEB | NEG | |||
| SCENE_TOOL_7 | ABED | ADD A,(IX+$1B) | ||
| ABF0 | LD (IX+$1B),A | |||
| ABF3 | JR SCENE_TOOL_2 | |||
| Prev: AB1F | Up: Map | Next: ABF5 |