![]() |
Routines |
| Prev: B39D | Up: Map | Next: B468 |
|
Used by the routine at ProcessDisplayPointer.
When the count is still set, swaps the two display pointers and reads the object flags.
|
||||
| SwapObjectDisplayPointers | B405 | AND A | Jump ahead to SwapObjectDisplayPointers_ExtractObjectAttributes if the count is zero. | |
| B406 | JR Z,SwapObjectDisplayPointers_ExtractObjectAttributes | |||
| B408 | LD HL,($B188) | Read the two pointers at B188 and ObjectTablePointer+0C. | ||
| B40B | LD DE,($B18A) | |||
| B40F | LD ($B188),DE | Store the pointer from DE at B188. | ||
| B413 | LD ($B18A),HL | Store the pointer from HL at B18A. | ||
|
Extract object attributes.
|
||||
| SwapObjectDisplayPointers_ExtractObjectAttributes | B416 | CALL ExtractObjectAttributes | Call ExtractObjectAttributes to read the object's flags. | |
| B419 | LD HL,$B188 | Jump ahead to SwapObjectDisplayPointers_TestStepObjectMatches when the saved display pointer at B188 is set. | ||
| B41C | LD A,(HL) | |||
| B41D | INC HL | |||
| B41E | OR (HL) | |||
| B41F | JR NZ,SwapObjectDisplayPointers_TestStepObjectMatches | |||
| B421 | LD A,($A01E) | Take the display flag and continue at SwapObjectDisplayPointers_RunDisplayPointer. | ||
| B424 | JR SwapObjectDisplayPointers_RunDisplayPointer | |||
|
Step back to the object id and see whether it matches the schedule.
|
||||
| SwapObjectDisplayPointers_TestStepObjectMatches | B426 | DEC HL | Jump ahead to SwapObjectDisplayPointers_0 if this id does not match the schedule entry. | |
| B427 | LD A,(HL) | |||
| B428 | CP (IY+$0E) | |||
| B42B | JR NZ,SwapObjectDisplayPointers_0 | |||
| B42D | INC HL | Jump ahead to SwapObjectDisplayPointers_ObjectAttributeContinue if this id matches the schedule entry. | ||
| B42E | LD A,(HL) | |||
| B42F | CP (IY+$0F) | |||
| B432 | JR Z,SwapObjectDisplayPointers_ObjectAttributeContinue | |||
| B434 | DEC HL | Step back one entry. | ||
| SwapObjectDisplayPointers_0 | B435 | LD A,(HL) | Go to SwapObjectDisplayPointers_ObjectAttributeContinue if this display byte does not match the schedule. | |
| B436 | CP (IY+$10) | |||
| B439 | JR NZ,SwapObjectDisplayPointers_ObjectAttributeContinue | |||
| B43B | INC HL | Read the next display byte and compare it with IY+11. | ||
| B43C | LD A,(HL) | |||
| B43D | CP (IY+$11) | |||
| SwapObjectDisplayPointers_ObjectAttributeContinue | B440 | LD A,($A01D) | Take the object attribute and continue at SwapObjectDisplayPointers_TestBitClear when the display byte does not match IY+11. | |
| B443 | JR NZ,SwapObjectDisplayPointers_TestBitClear | |||
| SwapObjectDisplayPointers_RunDisplayPointer | B445 | XOR $20 | Flip bit 5 of the value. | |
| SwapObjectDisplayPointers_TestBitClear | B447 | BIT 5,A | Jump ahead to SwapObjectDisplayPointers_ObjectTablePointer if bit 5 is clear. | |
| B449 | LD BC,$1208 | |||
| B44C | JR Z,SwapObjectDisplayPointers_ObjectTablePointer | |||
| B44E | LD BC,$0812 | Take 0812 for the display. | ||
| SwapObjectDisplayPointers_ObjectTablePointer | B451 | LD HL,$B182 | Use the object table pointer (ObjectTablePointer+04). | |
| B454 | LD (HL),B | |||
| B455 | INC HL | |||
| B456 | LD (HL),C | |||
| B457 | LD A,B | |||
| B458 | LD DE,$B172 | Take the display data pointer. | ||
| B45B | LD HL,$B16D | Point HL at the display flag at DisplayFlag and call CopySixDisplayBytes to copy six bytes. | ||
| B45E | CALL CopySixDisplayBytes | |||
| B461 | LD A,C | Take the attribute count and point at the second display flag. | ||
| B462 | LD DE,$B178 | |||
| B465 | LD HL,$B16E | |||
|
View the equivalent code in;
|
||||
| Prev: B39D | Up: Map | Next: B468 |