Prev: 29067 Up: Map Next: 29324
29203: Draw Shape When Object Is Here
Used by the routine at DispatchShape.
Opcode 248 names an object. The following shape is drawn only when that object is in the current room, and the object id is planted in the low address byte (24337) of LD (Continuation),A at 24336. When the object is absent that byte is cleared again.
ShapeIfPresent 29203 INC IX
29205 LD A,(IX+0)
29208 LD HL,24010
29211 LD C,A
29212 LD B,0
29214 ADD HL,BC
29215 LD A,(23943)
29218 CP (HL)
29219 JR NZ,ShapeIfPresent_0
29221 LD A,(IX+0)
29224 LD (24337),A
29227 INC IX
29229 LD A,(IX+0)
29232 JP PlotShape
ShapeIfPresent_0 29235 INC IX
29237 INC IX
29239 INC IX
29241 INC IX
29243 XOR A
29244 LD (24337),A
29247 JP PictureRecord
This entry point is used by the routine at PatchShift.
ShapeIfPresent_1 29250 PUSH BC
29251 CALL PixelRow
29254 PUSH HL
29255 LD DE,0
29258 LD B,8
29260 ADD HL,DE
29261 DEC HL
29262 POP DE
ShapeIfPresent_2 29263 PUSH HL
29264 PUSH DE
29265 PUSH BC
29266 LD B,0
ShapeIfPresent_3 29268 LD A,(DE)
29269 LD C,128
ShapeIfPresent_4 29271 RL A
29273 RR C
29275 JR NC,ShapeIfPresent_4
29277 LD (HL),C
29278 INC DE
29279 DEC HL
29280 DJNZ ShapeIfPresent_3
29282 POP BC
29283 POP DE
29284 POP HL
29285 INC D
29286 INC H
29287 DJNZ ShapeIfPresent_2
29289 POP BC
29290 INC B
29291 LD A,0
29293 CP B
29294 JR NZ,ShapeIfPresent_1
29296 RET
This entry point is used by the routine at PatchShift.
ShapeIfPresent_5 29297 PUSH BC
29298 CALL ResetOrigin_0
29301 LD DE,0
29304 PUSH HL
29305 ADD HL,DE
29306 DEC HL
29307 POP DE
29308 LD B,0
ShapeIfPresent_6 29310 LD A,(DE)
29311 LD (HL),A
29312 INC DE
29313 DEC HL
29314 DJNZ ShapeIfPresent_6
29316 POP BC
29317 INC B
29318 LD A,0
29320 CP B
29321 JR NZ,ShapeIfPresent_5
29323 RET
Prev: 29067 Up: Map Next: 29324