Routines |
Prev: 32035 | Up: Map | Next: 32258 |
32194 | LD A,(65532) | If teleport-enabled flag is not set then... | ||
32197 | BIT 2,A | ... | ||
32199 | JP Z,27189 | ...jump into main game loop (process keyboard input and move Magic Knight, enter menus or execute other command) | ||
32202 | CALL 38075 | Play upward scale sound | ||
32205 | CALL 37654 | Display / update command summary window at bottom of screen | ||
32208 | LD DE,50346 | Point DE at "TELEPORT" text... | ||
32211 | CALL 38693 | ...and print in command summary window at bottom of screen | ||
32214 | CALL 38725 | Display execute / reject command window and return if execute chosen, else exit | ||
32217 | LD A,(25611) | Get current location (room) of Teleport Pad... | ||
32220 | CP 99 | ...and if this is set to 99... | ||
32222 | JP Z,34584 | ...display "IT IS NOT SAFE TO TELEPORT TRY AGAIN LATER" window and exit | ||
32225 | LD HL,25611 | Point HL to current position data of Teleport Pad | ||
32228 | LD A,(HL) | Load A with current location (room) of Teleport Pad... | ||
32229 | LD (65529),A | ...then update Magic Knight's current room to match | ||
32232 | INC HL | Advance HL to x-coordinate of Teleport Pad... | ||
32233 | LD A,(HL) | ...and load this into A | ||
32234 | ADD A,A | Multiply x-coordinate by eight... | ||
32235 | ADD A,A | ... | ||
32236 | ADD A,A | ... | ||
32237 | LD (25387),A | ...and update Magic Knight's current x-coordinate to match | ||
32240 | INC HL | Advance HL to y-coordinate of Teleport Pad... | ||
32241 | LD A,(HL) | ...and load this into A | ||
32242 | SUB 3 | Subtract three (because Magic Knight is four character blocks tall)... | ||
32244 | ADD A,A | ...then multiply by eight... | ||
32245 | ADD A,A | ... | ||
32246 | ADD A,A | ... | ||
32247 | LD (25388),A | ...then update Magic Knight's current y-coordinate to match | ||
32250 | LD A,1 | Set animate-Magic-Knight's-puff-of-smoke-appearance-on-next-room-redraw flag... | ||
32252 | LD (23505),A | ... | ||
32255 | JP 30428 | Reset Gimbal-white-out-safe flag, redraw current room and return to main game loop |
Prev: 32035 | Up: Map | Next: 32258 |