![]() |
Routines |
| Prev: 59466 | Up: Map | Next: 59708 |
|
Used by the routine at Initialise_Game.
Runs the game until *Frame_Done is set, then clears frame state and returns.
|
||||
| Update_Frame | 59500 | CALL Prepare_Frame | Call Prepare_Frame. | |
| Update_Frame_0 | 59503 | CALL Reset_Phase | Call Reset_Phase. | |
| Update_Frame_1 | 59506 | LD A,(61050) | Jump to Update_Frame_6 if *Timeout_Flag is not zero. | |
| 59509 | AND A | |||
| 59510 | JR NZ,Update_Frame_6 | |||
|
This entry point is used by the routine at Update_Heading.
Count down *Countdown.
|
||||
| Update_Frame_2 | 59512 | LD BC,(61323) | Decrease *Countdown by one. | |
| 59516 | DEC BC | |||
| 59517 | LD (61323),BC | |||
| 59521 | LD A,B | Jump to Update_Frame_3 if *Countdown is not zero. | ||
| 59522 | OR C | |||
| 59523 | JR NZ,Update_Frame_3 | |||
| 59525 | LD A,1 | Write 1 to *Timeout_Flag. | ||
| 59527 | LD (61050),A | |||
| Update_Frame_3 | 59530 | CALL Select_Target | Call Select_Target. | |
| 59533 | CALL Update_Phase | Call Update_Phase. | ||
| 59536 | CALL Update_Heading | Call Update_Heading. | ||
| 59539 | CALL Dispatch_Phase | Call Dispatch_Phase. | ||
| Update_Frame_4 | 59542 | LD A,(61310) | Jump to Update_Frame_1 if *Frame_Done is zero. | |
| 59545 | AND A | |||
| 59546 | JR Z,Update_Frame_1 | |||
| Update_Frame_5 | 59548 | CALL Clear_Flags | Call Clear_Flags. | |
| 59551 | RET | Return. | ||
|
*Timeout_Flag is not zero.
|
||||
| Update_Frame_6 | 59552 | CALL Test_Object_Slots | Call Test_Object_Slots. | |
| 59555 | JR NZ,Update_Frame_3 | Jump to Update_Frame_3 if a slot is occupied. | ||
| 59557 | XOR A | Write 0 to *Gauge_A. | ||
| 59558 | LD (61311),A | |||
| 59561 | LD A,(61268) | Fetch *Phase. | ||
| 59564 | INC A | Increment the phase. | ||
| 59565 | LD (61268),A | Write the phase to *Phase. | ||
| 59568 | DEC A | Jump to Update_Frame_7 if the original value was not zero. | ||
| 59569 | JR NZ,Update_Frame_7 | |||
|
*Phase was 0.
|
||||
| 59571 | CALL Set_Phase_One | Call Set_Phase_One. | ||
| 59574 | LD A,1 | A=1. | ||
| 59576 | CALL Pause_Transition | Call Pause_Transition. | ||
| 59579 | JR Update_Frame_1 | Jump to Update_Frame_1. | ||
|
*Phase was 1.
|
||||
| Update_Frame_7 | 59581 | DEC A | Jump to Update_Frame_9 if *Phase was not 1. | |
| 59582 | JR NZ,Update_Frame_9 | |||
| 59584 | LD A,(61321) | Jump to Update_Frame_8 if *Menu_Choice is zero. | ||
| 59587 | AND A | |||
| 59588 | JR Z,Update_Frame_8 | |||
| 59590 | LD HL,61313 | Point HL at Occupied_Copy. | ||
| 59593 | LD A,(61316) | Jump to Update_Frame_8 if *Status_Value is zero. | ||
| 59596 | AND A | |||
| 59597 | JR Z,Update_Frame_8 | |||
| 59599 | CP (HL) | Jump to Update_Frame_8 if *Status_Value is not *Occupied_Copy. | ||
| 59600 | JR NZ,Update_Frame_8 | |||
| 59602 | CALL Print_Status_Pair | Call Print_Status_Pair. | ||
| Update_Frame_8 | 59605 | LD A,2 | A=2. | |
| 59607 | CALL Pause_Transition | Call Pause_Transition. | ||
| 59610 | CALL Reprint_Status | Call Reprint_Status. | ||
| 59613 | CALL Set_Phase_Two | Call Set_Phase_Two. | ||
| 59616 | JR Update_Frame_1 | Jump to Update_Frame_1. | ||
|
*Phase was 2 or higher.
|
||||
| Update_Frame_9 | 59618 | LD A,3 | A=3. | |
| 59620 | CALL Pause_Transition | Call Pause_Transition. | ||
| 59623 | CALL Run_Other_Phase_20 | Call Run_Other_Phase_20. | ||
| 59626 | LD A,(61310) | Jump to Update_Frame_5 if *Frame_Done is not zero. | ||
| 59629 | AND A | |||
| 59630 | JR NZ,Update_Frame_5 | |||
| 59632 | LD A,(61438) | Jump to Update_Frame_12 if *Other_Phase_Flag is not zero. | ||
| 59635 | AND A | |||
| 59636 | JR NZ,Update_Frame_12 | |||
| 59638 | LD A,(57838) | Fetch *Control_Choice. | ||
| 59641 | LD B,A | Copy *Control_Choice to B. | ||
| 59642 | LD A,(61321) | Fetch *Menu_Choice. | ||
| 59645 | CP B | Jump to Update_Frame_10 if *Menu_Choice matches *Control_Choice. | ||
| 59646 | JR Z,Update_Frame_10 | |||
| 59648 | XOR A | Clear A. | ||
| Update_Frame_10 | 59649 | CALL Print_Status_Pair_0 | Call Print_Status_Pair_0. | |
| 59652 | LD A,(57721) | Fetch *Status_Addend. | ||
| 59655 | LD HL,61390 | Point HL at Gauge_Source_A. | ||
| 59658 | ADD A,(HL) | Add *Gauge_Source_A. | ||
| 59659 | CP 164 | Jump to Update_Frame_11 if the result is less than 164. | ||
| 59661 | JR C,Update_Frame_11 | |||
| 59663 | LD A,163 | Set the result to 163. | ||
| Update_Frame_11 | 59665 | LD (HL),A | Write the result to *Gauge_Source_A. | |
| 59666 | XOR A | Write 0 to *Gauge_Copy. | ||
| 59667 | LD (61392),A | |||
| 59670 | LD A,4 | A=4. | ||
| 59672 | CALL Pause_Transition | Call Pause_Transition. | ||
| 59675 | CALL Reprint_Status | Call Reprint_Status. | ||
| 59678 | CALL Clear_Flags | Call Clear_Flags. | ||
| 59681 | CALL Clear_Object_Slots | Call Clear_Object_Slots. | ||
| 59684 | CALL Initialise_Next_Phase | Call Initialise_Next_Phase. | ||
| 59687 | CALL Set_Flag | Call Set_Flag. | ||
| 59690 | LD HL,61321 | Point HL at Menu_Choice. | ||
| 59693 | INC (HL) | Increment *Menu_Choice by one. | ||
| 59694 | JP Update_Frame_0 | Jump to Update_Frame_0. | ||
|
*Other_Phase_Flag is not zero.
|
||||
| Update_Frame_12 | 59697 | LD A,5 | A=5. | |
| 59699 | CALL Pause_Transition | Call Pause_Transition. | ||
| 59702 | CALL Set_Phase_Two | Call Set_Phase_Two. | ||
| 59705 | JP Update_Frame_4 | Jump to Update_Frame_4. | ||
| Prev: 59466 | Up: Map | Next: 59708 |