Routines |
Prev: 33140 | Up: Map | Next: 33290 |
Used by the routine at 55726.
|
||||
33170 | LD A,(29632) | Load A with index of Current Character... | ||
33173 | LD (23434),A | ...and store at 23434 (see trivia) | ||
33176 | LD A,3 | If Magic Knight is wearing the Valid I.D. Card (03)... | ||
33178 | CALL 33640 | ... | ||
33181 | JP Z,55252 | ...then display "[Character] CANNOT HELP YOU" window (29) and return to game | ||
33184 | LD A,(23451) | If I.D.-card-validated flag is reset... | ||
33187 | BIT 4,A | ... | ||
33189 | JP Z,33195 | ...then skip ahead to 33195 | ||
33192 | JP 55252 | Display "[Character] CANNOT HELP YOU" window (29) and return to game | ||
33195 | LD E,8 | If Current Character is not carrying the Camera (8)... | ||
33197 | CALL 33896 | ... | ||
33200 | JP NZ,55252 | ...then display "[Character] CANNOT HELP YOU" window (29) and return to game | ||
33203 | LD E,4 | If Current Character is not carrying the Instant Film (4)... | ||
33205 | CALL 33896 | ... | ||
33208 | JP NZ,55252 | ...then display "[Character] CANNOT HELP YOU" window (29) and return to game | ||
33211 | LD A,(29632) | Load BC with five times index of Current Character... | ||
33214 | LD C,A | ... | ||
33215 | ADD A,A | ... | ||
33216 | ADD A,A | ... | ||
33217 | ADD A,C | ... | ||
33218 | LD C,A | ... | ||
33219 | LD B,0 | ... | ||
33221 | LD IX,25174 | Point IX at start of characters' current inventories table... | ||
33225 | ADD IX,BC | ...and add BC as offset to point to start of Current Character's inventory | ||
33227 | LD A,(IX+4) | If this character has no free inventory slots... | ||
33230 | OR A | ... | ||
33231 | JP NZ,55252 | ...then display "[Character] CANNOT HELP YOU" window (29) and return to game | ||
33234 | LD (33282),IX | Modify operand of the instruction at 33281 to address of start of Current Character's current inventory | ||
33238 | LD A,1 | If Magic Knight is not wearing the Cloak of Invisibility (01)... | ||
33240 | CALL 33640 | ... | ||
33243 | JR NZ,33259 | ...then skip ahead to 33259 | ||
33245 | LD A,(23451) | If photograph-of-inside-of-starship-taken flag is set... | ||
33248 | BIT 1,A | ... | ||
33250 | JP NZ,55252 | ...then display "[Character] CANNOT HELP YOU" window (29) and return to game | ||
33253 | LD B,2 | Load B with 2 (as photograph-of-inside-of-starship-taken flag is in bit 1) | ||
33255 | LD A,9 | Load A with 9 (index of Photograph of inside of starship) | ||
33257 | JR 33271 | Skip ahead to 33271 | ||
33259 | LD A,(23451) | If photograph-of-Magic-Knight-taken flag is set... | ||
33262 | BIT 2,A | ... | ||
33264 | JP NZ,55252 | ...then display "[Character] CANNOT HELP YOU" window (29) and return to game | ||
33267 | LD B,4 | Load B with 4 (as photograph-of-Magic-Knight-taken flag is in bit 2) | ||
33269 | LD A,5 | Load A with 5 (index of Photograph of Magic Knight) | ||
33271 | LD C,A | Load C with object index from A | ||
33272 | LD A,(23451) | Load A with current score progress flags | ||
33275 | OR B | Set flag(s) according to value in B... | ||
33276 | LD (23451),A | ... | ||
33279 | LD B,5 | Load B with 5 (five inventory slots) | ||
The operand of the instruction at 33281 represents the address of the start of the current inventory of the Current Character. This is modified by the instruction at 33234.
|
||||
33281 | LD HL,0 | Point HL at start of Current Character's current inventory as stored previously | ||
33284 | CALL 33516 | Load object C into the first empty inventory slot of Current Character | ||
33287 | JP 55339 | Display "[Character] HAS TAKEN YOUR PHOTO" window (10) and return to game |
Prev: 33140 | Up: Map | Next: 33290 |