Prev: B921 Up: Map Next: B9C2
B998: Simple Bitmap Blit
Used by the routines at Game_WinScreen and Game_MainMenu.
Input
DE Address of screen to blit to.
L Index of bitmap
Bitmap_SimpleBlit B998 PUSH DE
B999 CALL Bitmap_GetData
B99C POP DE
B99D LD C,(HL) Get width of bitmap
B99E RES 7,C Reset invert flag.
B9A0 DEC HL
B9A1 LD A,(HL) Get height in characters
B9A2 RLCA
B9A3 RLCA
B9A4 RLCA
B9A5 AND $F8
B9A7 LD B,A
B9A8 LD HL,(Bmp_DataBuffer) Get address of bitmap graphic.
Bitmap_SimpleBlit_0 B9AB PUSH BC Blit 1 scan of the bitmap
B9AC PUSH DE
B9AD LD B,$00
B9AF LDIR
B9B1 POP DE Next scan down on screen
B9B2 INC D
B9B3 LD A,D
B9B4 AND $07
B9B6 JR NZ,Bitmap_SimpleBlit_1
B9B8 LD BC,$F820
B9BB EX DE,HL
B9BC ADD HL,BC
B9BD EX DE,HL
Bitmap_SimpleBlit_1 B9BE POP BC Next bitmap scan
B9BF DJNZ Bitmap_SimpleBlit_0
B9C1 RET
Prev: B921 Up: Map Next: B9C2