Prev: 57256 Up: Map Next: 57348
57266: Routine at DFB2
Used by the routines at FetchTileObject and 63489.
Input
A Item ID
57266 LD (58055),A Write A to *Item_ID.
57269 CP 1 Return if A is lower than 1.
57271 RET M
57272 CP 21 Return if A is greater than or equal to 21.
57274 RET P
57275 LD A,(55351) Jump to 57300 if *55351 is equal to 0.
57278 CP 0
57280 JR Z,57300
57282 LD HL,57326 HL=57326.
57285 LD B,0 B=0.
57287 LD C,A C=*55351.
57288 ADD HL,BC HL+=BC.
57289 LD C,(HL) C=*HL.
57290 LD HL,22678 HL=22678 (attribute buffer location).
57293 ADD HL,BC HL+=BC.
57294 LD A,(57347) A=*57347.
57297 CALL 57256 Call 57256.
57300 LD A,(58055) Write *Item_ID to *55351.
57303 LD (55351),A
57306 LD HL,57326 HL=57326.
57309 LD B,0 B=0.
57311 LD C,A C=*Item_ID.
57312 ADD HL,BC HL+=BC.
57313 LD C,(HL) C=*HL.
57314 LD HL,22678 HL=22678 (attribute buffer location).
57317 ADD HL,BC HL+=BC.
57318 LD A,(HL) Write *HL to *57347.
57319 LD (57347),A
57322 LD A,120 A=INK: BLACK, PAPER: WHITE (BRIGHT) .
57324 JP 57256 Jump to 57256.
57327 DEFB 0,2,4,6,8
57332 DEFB 64,66,68,70,72
57337 DEFB 128,130,132,134,136
57342 DEFB 192,194,196,198,200
57347 DEFB 0
Prev: 57256 Up: Map Next: 57348