Prev: 30940 Up: Map Next: 31041
30968: Process command to read an object
Used by the routine at 55726.
30968 LD IX,25164 Point IX at Magic Knight's current inventory (carrying)
30972 LD B,5 Load B with 5 (five inventory slots)
30974 LD HL,40943 Point HL at "READ WHICH OBJECT ?" text
30977 LD DE,40956 Point DE at "READ THE " text
30980 CALL 33952 Show list of objects in Magic Knight's inventory (carrying) as a menu and load A with selected item index
30983 LD HL,25164 Point HL at start of characters' current inventories table
30986 CALL 33911 Print name of object in inventory slot A of inventory data at HL in command summary window
30989 CALL 55115 Display execute / reject command window and return here if execute chosen, else exit to main game loop
30992 LD A,(29526) Load A with index of Current Object
30995 CP 24 If Current Object is the Starfleet Manual (24)...
30997 JP Z,31029 ...then skip ahead to 31029
31000 CP 7 If Current Object is the Gadget X (07)...
31002 JP Z,31035 ...then skip ahead to 31035
31005 LD E,0 Point HL at start of record for object with index A in object properties table...
31007 CALL 33525 ...
31010 BIT 5,(HL) If can-be-read flag is reset...
31012 JP Z,55282 ...then display "THERE IS NO WRITING FOR ME TO READ" window (12) and return to game
31015 INC HL Advance HL to read-text index for object...
31016 INC HL ...
31017 INC HL ...
31018 LD A,(HL) ...and load into A
31019 AND 31 Clear bits 5, 6 and 7...
31021 LD B,A ...and load index into B
31022 CALL 54251 Point HL at start of B-th entry in list of read-texts of readable objects
31025 CALL 55364 Display window 2 with object's read-text and return to game...
31028 DEFB 2 ...
31029 CALL 26926 Display instructions windows
31032 JP 29482 Set Magic Knight's available action flags, validate I.D. Card if appropriate and jump to start of main game loop
31035 CALL 26745 Display and handle Gadget X menu
31038 JP 29482 Set Magic Knight's available action flags, validate I.D. Card if appropriate and jump to start of main game loop
Prev: 30940 Up: Map Next: 31041