From 32b02147925566bac93bf71b002860335583574c Mon Sep 17 00:00:00 2001 From: ElectroDeoxys Date: Thu, 9 Sep 2021 08:51:12 +0100 Subject: Split home bank --- src/home/empty_screen.asm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/home/empty_screen.asm (limited to 'src/home/empty_screen.asm') diff --git a/src/home/empty_screen.asm b/src/home/empty_screen.asm new file mode 100644 index 0000000..060f19e --- /dev/null +++ b/src/home/empty_screen.asm @@ -0,0 +1,39 @@ +; initialize the screen by emptying the tilemap. used during screen transitions +EmptyScreen: ; 04a2 (0:04a2) + call DisableLCD + call FillTileMap + xor a + ld [wDuelDisplayedScreen], a + ld a, [wConsole] + cp CONSOLE_SGB + ret nz + call EnableLCD + ld hl, AttrBlkPacket_EmptyScreen + call SendSGB + call DisableLCD + ret + +AttrBlkPacket_EmptyScreen: ; 04bf (0:04bf) + sgb ATTR_BLK, 1 ; sgb_command, length + db 1 ; number of data sets + ; Control Code, Color Palette Designation, X1, Y1, X2, Y2 + db ATTR_BLK_CTRL_INSIDE + ATTR_BLK_CTRL_LINE, 0 << 0 + 0 << 2, 0, 0, 19, 17 ; data set 1 + ds 6 ; data set 2 + ds 2 ; data set 3 + +; returns v*BGMap0 + BG_MAP_WIDTH * c + b in de. +; used to map coordinates at bc to a BGMap0 address. +BCCoordToBGMap0Address: ; 04cf (0:04cf) + ld l, c + ld h, $0 + add hl, hl + add hl, hl + add hl, hl + add hl, hl + add hl, hl + ld c, b + ld b, HIGH(v0BGMap0) + add hl, bc + ld e, l + ld d, h + ret -- cgit v1.2.3 From 0017fc2d171c87d7bab4c9be90e1069ae95a8071 Mon Sep 17 00:00:00 2001 From: ElectroDeoxys Date: Thu, 9 Sep 2021 08:54:29 +0100 Subject: Remove home bank address comments --- src/home/empty_screen.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/home/empty_screen.asm') diff --git a/src/home/empty_screen.asm b/src/home/empty_screen.asm index 060f19e..6eeea50 100644 --- a/src/home/empty_screen.asm +++ b/src/home/empty_screen.asm @@ -1,5 +1,5 @@ ; initialize the screen by emptying the tilemap. used during screen transitions -EmptyScreen: ; 04a2 (0:04a2) +EmptyScreen: call DisableLCD call FillTileMap xor a @@ -13,7 +13,7 @@ EmptyScreen: ; 04a2 (0:04a2) call DisableLCD ret -AttrBlkPacket_EmptyScreen: ; 04bf (0:04bf) +AttrBlkPacket_EmptyScreen: sgb ATTR_BLK, 1 ; sgb_command, length db 1 ; number of data sets ; Control Code, Color Palette Designation, X1, Y1, X2, Y2 @@ -23,7 +23,7 @@ AttrBlkPacket_EmptyScreen: ; 04bf (0:04bf) ; returns v*BGMap0 + BG_MAP_WIDTH * c + b in de. ; used to map coordinates at bc to a BGMap0 address. -BCCoordToBGMap0Address: ; 04cf (0:04cf) +BCCoordToBGMap0Address: ld l, c ld h, $0 add hl, hl -- cgit v1.2.3