Prev: 46315 Up: Map Next: 46380
46326: Set Magic Knight's available action flags (additional)
Used by the routine at 46183.
Input
IY 23610
46326 SET 1,(IY+89) Set pull-lever-enabled menu command flag
This entry point is used by the routine at 46183.
46330 LD A,4 Load A with attribute flags and can-be-smelled flags of all Magic Knight's carried objects, OR-ed together...
46332 CALL 46380 ...
46335 LD A,C ...
46336 AND 240 Reset all but bits 4, 5, 6 and 7 (the four can-be-smelled flags)...
46338 JR Z,46344 ...and if these flags are all reset then skip ahead to 46344
46340 SET 2,(IY+89) Set smell-something-enabled menu command flag
46344 LD A,(23365) If wish-pending flag is reset...
46347 OR A ...
46348 JR Z,46361 ...then skip ahead to 46361
46350 LD A,(23702) If Magic Knight's current room is not 14...
46353 CP 14 ...
46355 JR NZ,46361 ...then skip ahead to 46361
46357 SET 3,(IY+89) Set have-a-wish-enabled menu command flag
46361 LD A,17 If Magic Knight is carrying the Bottle of Liquid (17)...
46363 CALL 45510 ...
46366 JR Z,46375 ...then skip ahead to 46375
46368 LD A,18 If Magic Knight is not carrying the Bottle of Liquid (18)...
46370 CALL 45510 ...
46373 JR NZ,46379 ...then skip ahead to 46379
46375 SET 4,(IY+89) Set have-a-drink-enabled menu command flag
46379 RET Return
Prev: 46315 Up: Map Next: 46380