Prev: 36215 Up: Map Next: 36327
36275: Draw objects in Magic Knight's inventory to bottom of screen if he is carrying the Mirror
Used by the routine at 28092.
36275 LD A,35 Load A with index of object 35 (Mirror)
36277 CALL 34256 Check whether Magic Knight is carrying the Mirror...
36280 RET NZ ...and if not, return
36281 LD HL,25395 Point HL to Magic Knight's inventory
36284 LD B,5 Set counter to 5 (as inventory has 5 slots)
36286 LD DE,5392 Load DE with x- and y-coordinates respectively to start drawing object graphics (D, or x = 21, E, or y = 16)
36289 PUSH BC Store BC, HL and DE...
36290 PUSH HL ...
36291 PUSH DE ...
36292 LD A,(HL) Load index of object at current slot in Magic Knight's inventory into A
36293 OR A If this is zero...
36294 JR Z,36323 ...then return
36296 LD E,6 Load 6 into E
36298 CALL 34160 Point HL to property 6 (attribute) of this object in properties table...
36301 LD A,(HL) ...and load value of property into A...
36302 LD (23695),A ...then into 23695
36305 INC HL Advance HL to point to graphic index property...
36306 LD A,(HL) ...and load into A
36307 POP BC Restore BC...
36308 PUSH BC ...and store again
36309 CALL 29960 Draw the object at the current inventory slot
36312 POP DE Restore coordinates
36313 LD A,E Advance right by three characters (i.e. add three to x-coordinate in E)...
36314 ADD A,3 ...
36316 LD E,A ...
36317 POP HL Advance to next inventory slot...
36318 INC HL ...
36319 POP BC ...
36320 DJNZ 36289 Repeat loop for next inventory slot
36322 RET Return
36323 POP DE Restore BC, HL and DE...
36324 POP HL ...
36325 POP BC ...
36326 RET Return
Prev: 36215 Up: Map Next: 36327