![]() |
Routines |
| Prev: 39317 | Up: Map | Next: 39369 |
|
Used by the routines at SetAttributes_Upright, SetAttributes_Mirrored, SetAttributes_RotatedLeft, SetAttributes_Transposed, SetAttributes_Flipped, SetAttributes_RotatedHalf, SetAttributes_TransposedFlipped and SetAttributes_RotatedRight.
This is the same as GetGraphicDetails but for the attributes of a graphic, from the table at GraphicsAttributesTable, and the position gives the address in the attribute buffer (see AttributeAddress).
|
||||||||||||||||||||
| GetGraphicAttributeDetails | 39343 | LD HL,42574 | Point HL at the graphics attributes table at GraphicsAttributesTable. | |||||||||||||||||
| 39346 | DEC C | Decrease the graphic ID by one. | ||||||||||||||||||
| 39347 | LD B,0 | Clear the high byte of the graphic ID. | ||||||||||||||||||
| 39349 | SLA C | Shift C left. | ||||||||||||||||||
| 39351 | RL B | Rotate B left (so BC=BC * 2). | ||||||||||||||||||
| 39353 | ADD HL,BC | Find the entry for the graphic in the table. | ||||||||||||||||||
| 39354 | LD A,(HL) | Fetch the low byte of the address of the attributes. | ||||||||||||||||||
| 39355 | INC HL | Move HL on to the high byte. | ||||||||||||||||||
| 39356 | LD H,(HL) | Fetch the high byte of the address of the attributes. | ||||||||||||||||||
| 39357 | LD L,A | Keep the low byte of the address of the attributes in L. | ||||||||||||||||||
| 39358 | EX DE,HL | Switch DE and HL. | ||||||||||||||||||
| 39359 | CALL AttributeAddress | Call AttributeAddress to get the attribute buffer address of the position. | ||||||||||||||||||
| 39362 | LD A,(DE) | Fetch the width. | ||||||||||||||||||
| 39363 | LD B,A | Keep the width in B. | ||||||||||||||||||
| 39364 | INC DE | Move DE on to the next byte. | ||||||||||||||||||
| 39365 | LD A,(DE) | Fetch the height. | ||||||||||||||||||
| 39366 | LD C,A | Keep the height in C. | ||||||||||||||||||
| 39367 | INC DE | Move DE on to the next byte. | ||||||||||||||||||
| 39368 | RET | Return. | ||||||||||||||||||
| Prev: 39317 | Up: Map | Next: 39369 |