Routines |
Prev: 47822 | Up: Map | Next: 47934 |
Used by the routines at Demo_Start and GameLoop.
|
||||
Game_Initialisation | 47832 | LD IY,48231 | IY=FrameId_Wally. | |
47836 | LD (45213),IY | Write IY to CurrentCharacter. | ||
47840 | LD HL,47934 | HL=47934. | ||
47843 | LD DE,48361 | DE=Items_TownSquare. | ||
47846 | LD B,31 | B=31 (counter). | ||
Game_Initialisation_0 | 47848 | PUSH BC | Stash BC on the stack. | |
Game_Initialisation_1 | 47849 | LD A,(DE) | A=*DE. | |
47850 | CP 255 | If A is not the terminator (255) jump to Game_Initialisation_2. | ||
47852 | JR NZ,Game_Initialisation_2 | |||
47854 | INC DE | Increment DE by one. | ||
47855 | JR Game_Initialisation_1 | Jump to Game_Initialisation_1. | ||
Game_Initialisation_2 | 47857 | LDI | ||
47859 | INC DE | Increment DE by two. | ||
47860 | INC DE | |||
47861 | LDI | |||
47863 | POP BC | Restore BC from the stack. | ||
47864 | DJNZ Game_Initialisation_0 | Decrease counter by one and loop back to Game_Initialisation_0 until counter is zero. | ||
47866 | LD BC,175 | BC=0175. | ||
47869 | LD HL,47996 | HL=47996. | ||
47872 | LD DE,48176 | DE=48176. | ||
47875 | LDIR | |||
47877 | XOR A | Write 0 to: | ||
47878 | LD (60661),A | |||
47881 | LD (60670),A | |||
47884 | LD (60671),A | |||
47887 | INC A | Write 1 to 60869. | ||
47888 | LD (60869),A | |||
47891 | LD A,20 | Write 20 to 63988. | ||
47893 | LD (63988),A | |||
47896 | LD A,40 | Write 40 to 62910. | ||
47898 | LD (62910),A | |||
47901 | LD A,60 | Write 60 to 62914. | ||
47903 | LD (62914),A | |||
47906 | LD A,32 | Write 32 to 62918. | ||
47908 | LD (62918),A | |||
47911 | LD HL,60508 | HL=60508. | ||
47914 | LD B,32 | B=32 (counter). | ||
Game_Initialisation_3 | 47916 | LD (HL),0 | Write 0 to *HL. | |
47918 | INC HL | Increment HL by three. | ||
47919 | INC HL | |||
47920 | INC HL | |||
47921 | DJNZ Game_Initialisation_3 | Decrease counter by one and loop back to Game_Initialisation_3 until counter is zero. | ||
47923 | LD HL,60431 | HL=Flag_Bottle_Full. | ||
47926 | LD B,14 | B=14. | ||
Game_Initialisation_4 | 47928 | LD (HL),0 | Write 0 to *HL. | |
47930 | INC HL | Increment HL by one. | ||
47931 | DJNZ Game_Initialisation_4 | Decrease counter by one and loop back to Game_Initialisation_4 until counter is zero. | ||
47933 | RET | Return. |
Prev: 47822 | Up: Map | Next: 47934 |