Routines |
Prev: 28064 | Up: Map | Next: 28272 |
Used by the routine at 27865.
|
||||||||||||
28092 | CALL 28272 | Print Magic Knight's current room name to top of screen | ||||||||||
28095 | LD A,15 | Prepare to draw window 15 (window at bottom of screen) | ||||||||||
28097 | HALT | Wait for interrupt | ||||||||||
28098 | CALL 36987 | Draw window 15 | ||||||||||
28101 | LD HL,43136 | Point HL to "SPELLBOUND COPYRIGHT..." text | ||||||||||
28104 | PUSH HL | Store HL | ||||||||||
28105 | LD A,35 | Load A with object index of 35 (Mirror) | ||||||||||
28107 | CALL 34256 | Set zero flag if Magic Knight is carrying the Mirror | ||||||||||
28110 | POP HL | Restore HL | ||||||||||
28111 | JR NZ,28116 | If Magic Knight is not carrying the Mirror, then skip to 28116 | ||||||||||
28113 | LD HL,43913 | Point to " * STRENGTH * 1 2 3 4 5" text | ||||||||||
28116 | CALL 36725 | Print text at HL to screen | ||||||||||
28119 | CALL 36215 | Draw health bar at bottom of screen | ||||||||||
28122 | CALL 36275 | Draw objects in Magic Knight's inventory to bottom of screen if he is carrying Mirror | ||||||||||
28125 | CALL 29446 | Set Magic Knight's action flags and prepare to execute room-specific routine for his current room | ||||||||||
28128 | CALL 38512 | Set terrain interaction data for, and draw, all objects in Magic Knight's current room | ||||||||||
28131 | CALL 30129 | Draw lift doors if Magic Knight is at lift entrance on a different floor to the lift | ||||||||||
28134 | XOR A | Set Magic Knight's current frame to erase to zero (frame 0 is blank graphic data) so Magic Knight is drawn but not erased... | ||||||||||
28135 | LD (25389),A | ... | ||||||||||
28138 | CALL 34821 | Update Magic Knight's current frame based on x-coordinate | ||||||||||
28141 | LD (65528),A | Store frame number at 65528 | ||||||||||
28144 | LD (25390),A | Set Magic Knight's current frame | ||||||||||
28147 | XOR A | Set A to zero (Magic Knight) and... | ||||||||||
28148 | CALL 39224 | ...draw Magic Knight (erase old frame and draw new frame) | ||||||||||
28151 | CALL 29576 | Draw all characters in current room and animate arrival of any new character | ||||||||||
28154 | LD A,71 | Store 71 (white INK, black PAPER, BRIGHT) at 23695... | ||||||||||
28156 | LD (23695),A | ... | ||||||||||
28159 | RES 1,(IY+65) | Reset disable-in-game-glow flag | ||||||||||
28163 | RES 2,(IY+65) | Reset characters-can't-move flag | ||||||||||
28167 | LD A,(23505) | If animate-Magic-Knight's-puff-of-smoke-appearance-on-next-room-redraw flag is reset... | ||||||||||
28170 | OR A | ... | ||||||||||
28171 | JR Z,28264 | ...then jump ahead to 28264 | ||||||||||
28173 | LD A,(25390) | Load Magic Knight's current frame number into A | ||||||||||
28176 | PUSH AF | Store AF (A = Magic Knight's current frame number) | ||||||||||
28177 | XOR A | Set Magic Knight's current frame number to zero... | ||||||||||
28178 | LD (25390),A | ... | ||||||||||
28181 | CALL 39224 | ...draw Magic Knight (erase old frame and draw new frame) | ||||||||||
28184 | LD A,(25393) | Store Magic Knight's current attribute at 23695... | ||||||||||
28187 | LD (23695),A | ... | ||||||||||
28190 | LD A,(25387) | Load Magic Knight's current x-coordinate into A | ||||||||||
28193 | RRCA | Divide x-coordinate by eight, rounding down to nearest integer... | ||||||||||
28194 | RRCA | ... | ||||||||||
28195 | RRCA | ... | ||||||||||
28196 | AND 31 | ... | ||||||||||
28198 | LD C,A | Copy x-coordinate (characters) into C | ||||||||||
28199 | LD A,(25388) | Load Magic Knight's current y-coordinate into A | ||||||||||
28202 | RRCA | Divide y-coordinate by eight, rounding down to nearest integer... | ||||||||||
28203 | RRCA | ... | ||||||||||
28204 | RRCA | ... | ||||||||||
28205 | AND 31 | ... | ||||||||||
28207 | LD B,A | Copy y-coordinate (characters) into B | ||||||||||
28208 | LD E,63 | Load E with 63 (index of puff of smoke frame 1) | ||||||||||
28210 | PUSH DE | Store DE (E = index of current puff of smoke animation frame) | ||||||||||
28211 | PUSH BC | Store BC (Magic Knight's x- and y-coordinates in characters) | ||||||||||
28212 | LD A,E | Copy index of first puff of smoke animation frame into A | ||||||||||
28213 | CALL 29950 | Draw puff of smoke frame 1 in XOR mode | ||||||||||
28216 | POP BC | Restore BC (Magic Knight's x- and y-coordinates in characters) | ||||||||||
28217 | POP DE | Restore DE (E = index of current puff of smoke animation frame) | ||||||||||
28218 | LD D,5 | Load D with 5 (as there are five frames of the puff of smoke animation to draw) | ||||||||||
28220 | HALT | Wait for interrupts (delay between frames)... | ||||||||||
28221 | HALT | ... | ||||||||||
28222 | HALT | ... | ||||||||||
28223 | HALT | ... | ||||||||||
28224 | HALT | ... | ||||||||||
28225 | HALT | ... | ||||||||||
28226 | PUSH DE | Store DE (D = count of frames to draw, E = graphic lookup index) | ||||||||||
28227 | PUSH BC | Store BC (Magic Knight's x- and y-coordinates in characters) | ||||||||||
28228 | LD A,E | Copy E into A (index of current frame of puff of smoke animation) | ||||||||||
28229 | CALL 29950 | Redraw current frame of puff of smoke animation in XOR mode, erasing it | ||||||||||
28232 | POP BC | Restore BC (Magic Knight's x- and y-coordinates in characters) | ||||||||||
28233 | POP DE | Restore DE (D = count of frames to draw, E = graphic lookup index) | ||||||||||
28234 | INC E | Advance index E to next puff of smoke frame | ||||||||||
28235 | PUSH DE | Store DE (D = count of frames to draw, E = graphic lookup index) | ||||||||||
28236 | PUSH BC | Store BC (Magic Knight's x- and y-coordinates in characters) | ||||||||||
28237 | LD A,E | Copy E into A (index of current frame of puff of smoke animation) | ||||||||||
28238 | CALL 29950 | Draw current frame of puff of smoke animation in XOR mode | ||||||||||
28241 | POP BC | Restore BC (Magic Knight's x- and y-coordinates in characters) | ||||||||||
28242 | POP DE | Restore DE (D = count of frames to draw, E = graphic lookup index) | ||||||||||
28243 | DEC D | Decrease D (count of frames to draw) | ||||||||||
28244 | JR NZ,28220 | Loop back to draw next frame if there are any remaining | ||||||||||
28246 | HALT | Wait for interrupts... | ||||||||||
28247 | HALT | ... | ||||||||||
28248 | HALT | ... | ||||||||||
28249 | HALT | ... | ||||||||||
28250 | HALT | ... | ||||||||||
28251 | HALT | ... | ||||||||||
28252 | LD A,E | Draw final frame in XOR mode, erasing it... | ||||||||||
28253 | CALL 29950 | ... | ||||||||||
28256 | POP AF | Restore AF (A = Magic Knight's current frame number) | ||||||||||
28257 | LD (25390),A | Restore Magic Knight's current frame number | ||||||||||
28260 | XOR A | Set A to zero (Magic Knight) and... | ||||||||||
28261 | CALL 39224 | ...draw Magic Knight (erase old frame and draw new frame) | ||||||||||
28264 | XOR A | Reset animate-Magic-Knight's-puff-of-smoke-appearance-on-next-room-redraw flag... | ||||||||||
28265 | LD (23505),A | ... | ||||||||||
28268 | LD A,(65529) | Load Magic Knight's current room into A | ||||||||||
28271 | RET | Return |
Prev: 28064 | Up: Map | Next: 28272 |