Prev: 55843 Up: Map Next: 55899
55853: Draw Dialogue Character
Used by the routine at Continue_Bad_Tempered_Thing_Dialogue.
Draw one ROM/charset glyph for Bad Tempered Thing dialogue. HL is the destination attribute-file address; E holds the character code Thickens the bitmap (byte OR byte>>1) and points Boney's graphic layout at GraphicLayoutScript_BoneyActions while the line is shown.
Input
HL Attribute-file address for the glyph
E Character code to draw
Stash callers' registers and paint the glyph attribute.
Draw_DialogueCharacter 55853 PUSH DE Stash DE, HL and BC on the stack.
55854 PUSH HL
55855 PUSH BC
55856 LD A,71 Set the dialogue glyph attribute to bright white on black (71).
55858 LD (HL),A
Convert the attribute address into a screen-bitmap address and locate the glyph.
55859 LD A,H Multiply the attribute address high byte by 8.
55860 ADD A,A
55861 ADD A,A
55862 ADD A,A
55863 AND %01011011 Keep only the screen-bitmap high bits (mask 91).
55865 LD H,A Write the result back to H.
55866 PUSH HL Stash HL on the stack.
55867 EX DE,HL Swap the character code into HL, multiply it by 8, and add the character-set base at Pointer_CurrentCharacterSet to get the glyph address.
55868 ADD HL,HL
55869 ADD HL,HL
55870 ADD HL,HL
55871 LD DE,(29433)
55875 ADD HL,DE
55876 POP DE Restore DE from the stack.
Copy eight thickened glyph rows to the screen.
55877 LD B,8 There are 8 pixel rows in a character.
Copy one thickened glyph row (byte OR byte>>1) and point Berk at talking layout GraphicLayoutScript_BoneyActions.
Draw_DialogueCharacter_CopyThickRow 55879 LD A,(HL) Copy one thickened glyph row (byte OR byte>>1) to the screen and advance.
55880 LD C,A
55881 SRL C
55883 OR C
55884 LD (DE),A
55885 INC D
55886 INC HL
55887 DJNZ Draw_DialogueCharacter_CopyThickRow
55889 LD HL,40074 Point Boney's graphic layout pointer (Pointer_BoneyGraphicLayout) at GraphicLayoutScript_BoneyActions.
55892 LD (36595),HL
55895 POP BC Restore BC, HL and DE from the stack.
55896 POP HL
55897 POP DE
55898 RET Return.
Prev: 55843 Up: Map Next: 55899