diff options
Diffstat (limited to 'home')
-rw-r--r-- | home/audio.asm | 28 | ||||
-rw-r--r-- | home/map.asm | 7 | ||||
-rw-r--r-- | home/menu.asm | 11 | ||||
-rw-r--r-- | home/sine.asm | 2 | ||||
-rw-r--r-- | home/text.asm | 6 | ||||
-rw-r--r-- | home/time.asm | 6 | ||||
-rw-r--r-- | home/vblank.asm | 4 | ||||
-rw-r--r-- | home/video.asm | 2 |
8 files changed, 31 insertions, 35 deletions
diff --git a/home/audio.asm b/home/audio.asm index facc7bb6c..f904e9599 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -319,7 +319,7 @@ Unused_FadeOutMusic:: ; 3ca8 ; 3cae FadeInMusic:: ; 3cae - ld a, 4 | 1 << 7 + ld a, 4 | (1 << MUSIC_FADE_IN_F) ld [MusicFade], a ret ; 3cb4 @@ -505,16 +505,16 @@ GetMapMusic:: ; 3d97 Unreferenced_Function3d9f:: ; 3d9f ; Places a BCD number at the ; upper center of the screen. - ld a, 4 * 8 - ld [Sprites + 38 * 4], a - ld [Sprites + 39 * 4], a - ld a, 10 * 8 - ld [Sprites + 38 * 4 + 1], a - ld a, 11 * 8 - ld [Sprites + 39 * 4 + 1], a + ld a, 4 * TILE_WIDTH + ld [Sprite39YCoord], a + ld [Sprite40YCoord], a + ld a, 10 * TILE_WIDTH + ld [Sprite39XCoord], a + ld a, 11 * TILE_WIDTH + ld [Sprite40XCoord], a xor a - ld [Sprites + 38 * 4 + 3], a - ld [Sprites + 39 * 4 + 3], a + ld [Sprite39Attributes], a + ld [Sprite40Attributes], a ld a, [wc296] cp 100 jr nc, .max @@ -524,17 +524,17 @@ Unreferenced_Function3d9f:: ; 3d9f swap a and $f add "0" - ld [Sprites + 38 * 4 + 2], a + ld [Sprite39TileID], a ld a, b and $f add "0" - ld [Sprites + 39 * 4 + 2], a + ld [Sprite40TileID], a ret .max ld a, "9" - ld [Sprites + 38 * 4 + 2], a - ld [Sprites + 39 * 4 + 2], a + ld [Sprite39TileID], a + ld [Sprite40TileID], a ret ; 3dde diff --git a/home/map.asm b/home/map.asm index 2e04a34a3..919f162bb 100644 --- a/home/map.asm +++ b/home/map.asm @@ -1371,7 +1371,7 @@ UpdateBGMapColumn:: ; 27f8 inc d ; cap d at HIGH(vBGMap0) ld a, d - and $3 + and %11 or HIGH(vBGMap0) ld d, a @@ -1429,6 +1429,7 @@ LoadTilesetGFX:: ; 2821 pop af ld [rSVBK], a +; These tilesets support dynamic per-mapgroup roof tiles. ld a, [wTileset] cp TILESET_JOHTO_1 jr z, .load_roof @@ -2105,11 +2106,11 @@ GetMapHeaderMember:: ; 0x2c04 ; Extract data from the current map's header. ; inputs: -; de = offset of desired data within the mapheader +; de = offset of desired data within the mapheader (a MAPHEADER_* constant) ; outputs: ; bc = data from the current map's header -; (e.g., de = $0003 would return a pointer to the secondary map header) +; (e.g., de = MAPHEADER_MAPHEADER2 would return a pointer to the secondary map header) ld a, [MapGroup] ld b, a diff --git a/home/menu.asm b/home/menu.asm index 57277acd5..6ef1ba7f3 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -40,8 +40,7 @@ LoadMenuTextBox:: ; 1d58 .MenuDataHeader: ; 1d5f db $40 ; tile backup - db 12, 0 ; start coords - db 17, 19 ; end coords + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw vTiles0 db 0 ; default option ; 1d67 @@ -60,8 +59,7 @@ LoadStandardMenuDataHeader:: ; 1d6e .MenuDataHeader: ; 1d75 db $40 ; tile backup - db 0, 0 ; start coords - db 17, 19 ; end coords + menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw 0 db 1 ; default option ; 1d7d @@ -183,8 +181,7 @@ InterpretTwoOptionMenu:: ; 1dfe YesNoMenuDataHeader:: ; 1e1d db $40 ; tile backup - db 5, 10 ; start coords - db 9, 15 ; end coords + menu_coords 10, 5, 15, 9 dw .MenuData2 db 1 ; default option ; 1e25 @@ -515,7 +512,7 @@ ClearWindowData:: ; 1fbf ; 1ff0 .bytefill ; 1ff0 - ld bc, $0010 + ld bc, $10 xor a call ByteFill ret diff --git a/home/sine.asm b/home/sine.asm index 810845860..eff5ed299 100644 --- a/home/sine.asm +++ b/home/sine.asm @@ -1,6 +1,6 @@ Cosine:: ; 1b0f ; Return d * cos(a) in hl - add $10 ; 90 degrees + add %010000 ; 90 degrees Sine:: ; 1b11 ; Return d * sin(a) in hl diff --git a/home/text.asm b/home/text.asm index c2e08762a..a89f39eb2 100644 --- a/home/text.asm +++ b/home/text.asm @@ -47,10 +47,8 @@ ClearScreen:: ; fdb TextBox:: ; fe8 -; Draw a text box at hl with room for -; b lines of c characters each. -; Places a border around the textbox, -; then switches the palette to the +; Draw a text box at hl with room for b lines of c characters each. +; Places a border around the textbox, then switches the palette to the ; text black-and-white scheme. push bc push hl diff --git a/home/time.asm b/home/time.asm index 9ed703686..be141a066 100644 --- a/home/time.asm +++ b/home/time.asm @@ -48,17 +48,17 @@ GetClock:: ; 5b7 ld [hl], RTC_S ld a, [de] - maskbits 60 + maskbits 60 - 1 ld [hRTCSeconds], a ld [hl], RTC_M ld a, [de] - maskbits 60 + maskbits 60 - 1 ld [hRTCMinutes], a ld [hl], RTC_H ld a, [de] - maskbits 24 + maskbits 24 - 1 ld [hRTCHours], a ld [hl], RTC_DL diff --git a/home/vblank.asm b/home/vblank.asm index cb8c5ba56..5afecdad0 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -190,7 +190,7 @@ VBlank1:: ; 337 jr c, .done call UpdateBGMap - call Serve2bppRequest@VBlank + call Serve2bppRequest_VBlank call hPushOAM .done @@ -280,7 +280,7 @@ VBlank3:: ; 396 jr c, .done call UpdateBGMap - call Serve2bppRequest@VBlank + call Serve2bppRequest_VBlank call hPushOAM .done diff --git a/home/video.asm b/home/video.asm index 8f14dfeee..7b7440e2b 100644 --- a/home/video.asm +++ b/home/video.asm @@ -379,7 +379,7 @@ Serve2bppRequest:: ; 1769 jr _Serve2bppRequest -Serve2bppRequest@VBlank:: ; 1778 +Serve2bppRequest_VBlank:: ; 1778 ld a, [Requested2bpp] and a |