Routines |
Prev: 96C9 | Up: Map | Next: 98D2 |
Used by the routine at DrawRoom.
|
||||
GameComplete | 96EC | LD HL,$EA90 | HL=Player. | |
96EF | CALL $95CC | |||
96F2 | LD HL,$BE4C | Write MainFont to FontPointer. | ||
96F5 | LD ($5E01),HL | |||
Handle printing "CONGRATULATIONS".
|
||||
96F8 | LD HL,$2040 | HL=2040 (screen buffer location). | ||
96FB | LD DE,$9710 | DE=9710. | ||
96FE | CALL PrintStringColour | Call PrintStringColour. | ||
Handle printing "YOU HAVE ESCAPED".
|
||||
9701 | LD HL,$3040 | HL=3040 (screen buffer location). | ||
9704 | LD DE,$9720 | DE=9720. | ||
9707 | CALL PrintStringColour | Call PrintStringColour. | ||
Show the game statistics.
|
||||
970A | CALL GameStats | Call GameStats. | ||
Disappointingly cut into the "normal" game over routine.
|
||||
970D | JP GameOverDelay | Jump to GameOverDelay. | ||
Congratulations messaging.
|
||||
9710 | DEFM $47 | Attribute: 47 + "CONGRATULATIONS". | ||
9711 | DEFM "CONGRATULATION","S"+$80 | |||
9720 | DEFM $47 | Attribute: 47 + "YOU HAVE ESCAPED". | ||
9721 | DEFM "YOU HAVE ESCAPE","D"+$80 | |||
This entry point is used by the routine at HandlerTrapOpen.
|
||||
GameComplete_0 | 9731 | LD BC,$1818 | ||
9734 | CALL ApplyMovement_22 | |||
9737 | JP NC,HandlerRoomItem | |||
973A | CALL ClearPlayArea | |||
973D | LD A,$96 | |||
973F | PUSH IX | |||
9741 | CALL DrawRoomFrame_0 | |||
9744 | POP IX | |||
9746 | LD B,$80 | |||
GameComplete_1 | 9748 | LD A,($5C78) | ||
974B | LD C,A | |||
GameComplete_2 | 974C | PUSH BC | ||
974D | LD A,B | |||
974E | CPL | |||
974F | LD B,A | |||
9750 | CALL SoundsClick | |||
9753 | POP BC | |||
9754 | LD A,($5C78) | |||
9757 | CP C | |||
9758 | JR Z,GameComplete_2 | |||
975A | AND $07 | |||
975C | LD A,$00 | |||
975E | JR NZ,GameComplete_3 | |||
9760 | LD A,$47 | |||
GameComplete_3 | 9762 | LD L,A | ||
9763 | LD H,A | |||
9764 | LD ($596B),HL | |||
9767 | LD ($598B),HL | |||
976A | PUSH BC | |||
976B | CALL GameComplete_4 | |||
976E | POP BC | |||
976F | DJNZ GameComplete_1 | |||
9771 | JP ApplyMovement_28 | |||
GameComplete_4 | 9774 | LD BC,$170B | ||
9777 | LD HL,$5AE0 | |||
977A | LD DE,$0020 | |||
GameComplete_5 | 977D | PUSH HL | ||
977E | AND A | |||
977F | SBC HL,DE | |||
9781 | INC L | |||
9782 | LD A,(HL) | |||
9783 | POP HL | |||
9784 | PUSH BC | |||
GameComplete_6 | 9785 | LD (HL),A | ||
9786 | INC L | |||
9787 | DJNZ GameComplete_6 | |||
9789 | POP BC | |||
978A | PUSH BC | |||
GameComplete_7 | 978B | LD (HL),A | ||
978C | AND A | |||
978D | SBC HL,DE | |||
978F | DJNZ GameComplete_7 | |||
9791 | POP BC | |||
9792 | PUSH BC | |||
GameComplete_8 | 9793 | LD (HL),A | ||
9794 | DEC L | |||
9795 | DJNZ GameComplete_8 | |||
9797 | POP BC | |||
9798 | PUSH BC | |||
GameComplete_9 | 9799 | LD (HL),A | ||
979A | ADD HL,DE | |||
979B | DJNZ GameComplete_9 | |||
979D | LD (HL),A | |||
979E | AND A | |||
979F | SBC HL,DE | |||
97A1 | INC L | |||
97A2 | POP BC | |||
97A3 | DEC B | |||
97A4 | DEC B | |||
97A5 | DEC C | |||
97A6 | JR NZ,GameComplete_5 | |||
97A8 | RET | |||
97A9 | LD E,H | |||
97AA | LD H,E | |||
97AB | LD H,E | |||
97AC | LD H,E | |||
97AD | LD H,E | |||
97AE | LD E,H | |||
97AF | LD E,H | |||
97B0 | LD E,H | |||
97B1 | LD D,H | |||
97B2 | LD L,E | |||
97B3 | LD L,E | |||
97B4 | LD L,E | |||
97B5 | LD L,E | |||
97B6 | LD D,H | |||
97B7 | LD D,H | |||
97B8 | LD D,H | |||
97B9 | LD C,H | |||
97BA | LD (HL),E | |||
97BB | LD (HL),E | |||
97BC | LD (HL),E | |||
97BD | LD (HL),E | |||
97BE | LD C,H | |||
97BF | LD C,H | |||
97C0 | LD C,H | |||
97C1 | LD B,H | |||
97C2 | LD A,E | |||
97C3 | LD A,E | |||
97C4 | LD A,E | |||
97C5 | LD A,E | |||
97C6 | LD B,H | |||
97C7 | LD B,H | |||
97C8 | LD B,H | |||
97C9 | INC A | |||
97CA | ADD A,E | |||
97CB | ADD A,E | |||
97CC | ADD A,E | |||
97CD | ADD A,E | |||
97CE | INC A | |||
97CF | INC A | |||
97D0 | INC A | |||
97D1 | INC (HL) | |||
97D2 | ADC A,E | |||
97D3 | ADC A,E | |||
97D4 | ADC A,E | |||
97D5 | ADC A,E | |||
97D6 | INC (HL) | |||
97D7 | INC (HL) | |||
97D8 | INC (HL) | |||
97D9 | INC L | |||
97DA | SUB E | |||
97DB | SUB E | |||
97DC | SUB E | |||
97DD | SUB E | |||
97DE | INC L | |||
97DF | INC L | |||
97E0 | INC L | |||
97E1 | INC H | |||
97E2 | SBC A,E | |||
97E3 | SBC A,E | |||
97E4 | SBC A,E | |||
97E5 | SBC A,E | |||
97E6 | INC H | |||
97E7 | INC H | |||
97E8 | INC H | |||
97E9 | INC E | |||
97EA | AND E | |||
97EB | AND E | |||
97EC | AND E | |||
97ED | AND E | |||
97EE | INC E | |||
97EF | INC E | |||
97F0 | INC E | |||
97F1 | INC D | |||
97F2 | XOR E | |||
97F3 | XOR E | |||
97F4 | XOR E | |||
97F5 | XOR E | |||
97F6 | INC D | |||
97F7 | INC D | |||
97F8 | INC D | |||
97F9 | INC C | |||
97FA | OR E | |||
97FB | OR E | |||
97FC | OR E | |||
97FD | OR E | |||
97FE | INC C | |||
97FF | INC C | |||
9800 | INC C | |||
9801 | INC B | |||
9802 | CP E | |||
9803 | CP E | |||
9804 | CP E | |||
9805 | CP E | |||
9806 | INC B | |||
9807 | INC B | |||
9808 | INC B | |||
9809 | NOP | |||
980A | LD BC,$FF03 | |||
980D | LD (BC),A | |||
980E | LD BC,$FF03 | |||
9811 | INC B | |||
9812 | DEC B | |||
9813 | RLCA | |||
9814 | RST $38 | |||
9815 | LD B,$05 | |||
9817 | RLCA | |||
9818 | RST $38 | |||
9819 | EX AF,AF' | |||
981A | ADD HL,BC | |||
981B | DEC BC | |||
981C | RST $38 | |||
981D | LD A,(BC) | |||
981E | ADD HL,BC | |||
981F | DEC BC | |||
9820 | RST $38 | |||
9821 | INC C | |||
9822 | DEC C | |||
9823 | RRCA | |||
9824 | RST $38 | |||
9825 | LD C,$0D | |||
9827 | RRCA | |||
9828 | RST $38 | |||
9829 | DJNZ GameComplete_10 | |||
982B | INC DE | |||
982C | RST $38 | |||
982D | LD (DE),A | |||
982E | LD DE,$FF13 | |||
9831 | INC D | |||
9832 | DEC D | |||
9833 | RLA | |||
9834 | RST $38 | |||
9835 | LD D,$15 | |||
9837 | RLA | |||
9838 | RST $38 | |||
9839 | JR GameComplete_11 | |||
983B | DEC DE | |||
GameComplete_10 | 983C | RST $38 | ||
983D | LD A,(DE) | |||
983E | ADD HL,DE | |||
983F | DEC DE | |||
9840 | RST $38 | |||
9841 | INC E | |||
9842 | DEC E | |||
9843 | RRA | |||
9844 | RST $38 | |||
9845 | LD E,$1D | |||
9847 | RRA | |||
9848 | RST $38 | |||
9849 | JR NZ,$986C | |||
984B | INC HL | |||
984C | RST $38 | |||
984D | LD ($2321),HL | |||
9850 | RST $38 | |||
9851 | INC H | |||
9852 | DEC H | |||
9853 | DAA | |||
GameComplete_11 | 9854 | RST $38 | ||
9855 | LD H,$25 | |||
9857 | DAA | |||
9858 | RST $38 | |||
9859 | JR Z,GameComplete_13 | |||
985B | DEC HL | |||
985C | RST $38 | |||
985D | LD HL,($2B29) | |||
9860 | RST $38 | |||
9861 | INC L | |||
9862 | DEC L | |||
9863 | CPL | |||
9864 | RST $38 | |||
9865 | LD L,$2D | |||
9867 | CPL | |||
9868 | RST $38 | |||
9869 | RST $38 | |||
This entry point is used by the routine at ApplyMovement.
|
||||
GameComplete_12 | 986A | LD A,(IX+$05) | ||
986D | RLCA | |||
986E | RLCA | |||
986F | RLCA | |||
9870 | AND $06 | |||
9872 | LD C,A | |||
9873 | LD B,$00 | |||
9875 | LD HL,$9883 | |||
9878 | ADD HL,BC | |||
9879 | LD A,(HL) | |||
987A | INC HL | |||
987B | LD ($EA96),A | |||
987E | LD A,(HL) | |||
987F | LD ($EA97),A | |||
9882 | RET | |||
9883 | NOP | |||
GameComplete_13 | 9884 | JR NZ,$9866 | ||
9886 | NOP | |||
9887 | NOP | |||
9888 | RET PO | |||
9889 | JR NZ,GameComplete_14 | |||
GameComplete_14 | 988B | CALL StoreEntity | ||
988E | CALL ApplyMovement_25 | |||
9891 | JR C,GameComplete_17 | |||
GameComplete_15 | 9893 | LD A,($5E12) | ||
9896 | CPL | |||
9897 | AND $03 | |||
9899 | JR NZ,GameComplete_16 | |||
989B | INC (IX+$06) | |||
GameComplete_16 | 989E | LD A,(IX+$06) | ||
98A1 | AND $03 | |||
98A3 | LD C,A | |||
98A4 | LD B,$00 | |||
98A6 | LD HL,$98C4 | |||
98A9 | ADD HL,BC | |||
98AA | LD A,(HL) | |||
98AB | LD (IX+$05),A | |||
98AE | JP HandlerCaveDoorLocked_12 | |||
GameComplete_17 | 98B1 | LD A,($5E28) | ||
98B4 | DEC A | |||
98B5 | LD ($5E28),A | |||
98B8 | JP Z,GameComplete_18 | |||
98BB | CALL DrawChicken | |||
98BE | CALL SoundsTouching | |||
98C1 | JP GameComplete_15 | |||
98C4 | LD B,D | |||
98C5 | LD B,E | |||
98C6 | LD B,(HL) | |||
98C7 | LD B,E | |||
GameComplete_18 | 98C8 | CALL RemoveEntity | ||
98CB | LD (IX+$00),$00 | |||
98CF | JP HandlerKnight_8 |
Prev: 96C9 | Up: Map | Next: 98D2 |