Prev: 28364 Up: Map Next: 28432
28390: Draw a character
Used by the routine at 28364.
Input
C A character index
IX That character's entry in table of characters' current positions at 25244
28390 PUSH BC Store BC
28391 PUSH IX Store IX
28393 LD A,C Load A with character's index...
28394 LD E,4 ...and point HL at this character's magic level / attribute value (in characters' current stats table)...
28396 CALL 33541 ...
28399 LD A,(HL) Load character's magic level / attribute into A...
28400 LD (28442),A ...and modify instruction at 28441 with this value
28403 INC HL Advance HL to character graphic index...
28404 LD A,(HL) ...and load value into A
28405 OR A If this is zero...
28406 JR Z,28428 ...then skip ahead to 28428 (i.e. don't draw the character)
28408 LD C,(IX+1) Load C with character's x-coordinate (characters)
28411 LD B,(IX+2) Load B with character's y-coordinate (characters)
28414 PUSH IX Store IX (pointer to character's entry in table of characters' current positions)
28416 CALL 54411 Draw the graphic with lookup index A at character coordinates (C, B) with width 2 and height 4
28419 POP IX Restore IX (pointer to character's entry in table of characters' current positions)
28421 LD A,(23705) If player-attribute-update flag is set (player attribute update mode)...
28424 OR A ...
28425 CALL NZ,28432 ...then paint the character's attributes
28428 POP IX Restore IX
28430 POP BC Restore BC
28431 RET Return
Prev: 28364 Up: Map Next: 28432