Various annotations

Annotated the SGB functions in predef/sgb.asm, and some of the map scripts.  Renamed several functions in home.  Renamed six WRAM addresses corresponding to party icon animations, and renamed several others relative to these.
This commit is contained in:
PikalaxALT
2015-07-22 15:57:02 -04:00
parent d5ddd9e54e
commit c8960dd2c8
43 changed files with 3252 additions and 3160 deletions

View File

@@ -312,7 +312,7 @@ BattleTextBox:: ; 3ac3
push hl
call SpeechTextBox
call MobileTextBorder
call DrawOnMap
call UpdateSprites
call Function321c
pop hl
call PrintTextBoxText

View File

@@ -97,7 +97,7 @@ GetMapTrigger:: ; 2147
Function2173:: ; 2173
call Function217a
call Functiondb1
call FarCallFunction4c000
ret
; 217a
@@ -110,7 +110,7 @@ Function217a:: ; 217a
call Function2198
ld a, $60
ld hl, TileMap
hlcoord 0, 0
ld bc, TileMapEnd - TileMap
call ByteFill
@@ -1143,7 +1143,7 @@ ObjectEvent:: ; 0x26ef
; 0x26f2
ObjectEventText::
TX_FAR _ObjectEventText
text_jump _ObjectEventText
db "@"
; 0x26f7
@@ -1200,11 +1200,11 @@ Function271e:: ; 271e
Function272a:: ; 272a
ld hl, TileMap
hlcoord 0, 0
ld de, BGMapBuffer
call Function27b7
ld c, $28
call Functiondbd
call FarCallFunction4c03f
ld a, [wd152]
ld e, a
ld a, [wd153]
@@ -1220,7 +1220,7 @@ Function2748:: ; 2748
ld de, BGMapBuffer
call Function27b7
ld c, $28
call Functiondbd
call FarCallFunction4c03f
ld a, [wd152]
ld l, a
ld a, [wd153]
@@ -1239,11 +1239,11 @@ Function2748:: ; 2748
; 2771
Function2771:: ; 2771
ld hl, TileMap
hlcoord 0, 0
ld de, BGMapBuffer
call Function27c0
ld c, $24
call Functiondbd
call FarCallFunction4c03f
ld a, [wd152]
ld e, a
ld a, [wd153]
@@ -1259,7 +1259,7 @@ Function278f:: ; 278f
ld de, BGMapBuffer
call Function27c0
ld c, $24
call Functiondbd
call FarCallFunction4c03f
ld a, [wd152]
ld e, a
and $e0
@@ -1966,7 +1966,7 @@ FadeToMenu:: ; 2b29
Function2b3c:: ; 2b3c
call WhiteBGMap
call Function2bae
call DrawOnMap
call UpdateSprites
call Function1d7d
call Functiond90
jr Function2b5c
@@ -1976,7 +1976,7 @@ Function2b4d:: ; 2b4d
call WhiteBGMap
call Function1d7d
call Function2bae
call DrawOnMap
call UpdateSprites
call Functiond90
; 2b5c
@@ -2003,7 +2003,7 @@ Function2b74:: ; 0x2b74
call TextBox
ld hl, VramState
set 0, [hl]
call DrawOnMap
call UpdateSprites
call Function3200
ld b, $9
call GetSGBLayout

View File

@@ -623,7 +623,7 @@ ResetVramState_Bit0:: ; 1acc
; 1ad2
DrawOnMap:: ; 1ad2
UpdateSprites:: ; 1ad2
ld a, [VramState]
bit 0, a
ret z

View File

@@ -75,7 +75,7 @@ InterpretMenu2:: ; 0x1d81
xor a
ld [hBGMapMode], a
call Function1cbb
call DrawOnMap
call UpdateSprites
call Function1c89
call Function321c
call Function1c66

View File

@@ -209,7 +209,7 @@ WriteBackup:: ; 0x1c17
push af
call ExitMenu
call Function321c
call DrawOnMap
call UpdateSprites
pop af
ret

View File

@@ -323,7 +323,7 @@ Special_ReloadSpritesNoPalettes:: ; d91
; db1
Functiondb1:: ; db1
FarCallFunction4c000:: ; db1
ld a, [hROMBank]
push af
ld a, BANK(Function4c000)
@@ -334,7 +334,7 @@ Functiondb1:: ; db1
ret
; dbd
Functiondbd:: ; dbd
FarCallFunction4c03f:: ; dbd
ld a, [hROMBank]
push af
ld a, BANK(Function4c03f)

View File

@@ -37,7 +37,7 @@ Functionfb8::
ClearTileMap:: ; fc8
; Fill TileMap with blank tiles.
ld hl, TileMap
hlcoord 0, 0
ld a, " "
ld bc, TileMapEnd - TileMap
call ByteFill
@@ -52,7 +52,7 @@ ClearTileMap:: ; fc8
ClearScreen:: ; fdb
ld a, TEXTBOX_PAL
ld hl, AttrMap
hlcoord 0, 0, AttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call ByteFill
jr ClearTileMap
@@ -163,7 +163,7 @@ TestText:: ; 1048
done
; 1052
Function1052:: ; 1052
RadioTerminator:: ; 1052
ld hl, .stop
ret
.stop db "@"
@@ -181,14 +181,14 @@ Function105a:: ; 105a
PrintTextBoxText:: ; 1065
bccoord TEXTBOX_INNERX, TEXTBOX_INNERY
call Function13e5
call PlaceWholeStringInBoxAtOnce
ret
; 106c
SetUpTextBox:: ; 106c
push hl
call SpeechTextBox
call DrawOnMap
call UpdateSprites
call Function321c
pop hl
ret
@@ -478,7 +478,7 @@ Char16:: ; 12b9
jr .asm_12c4
.asm_12d1
ld hl, TileMap
hlcoord 0, 0
ld de, SCREEN_WIDTH
ld a, c
.asm_12d8
@@ -697,7 +697,7 @@ Function13e0:: ; 13e0
; 13e5
Function13e5:: ; 13e5
PlaceWholeStringInBoxAtOnce:: ; 13e5
ld a, [TextBoxFrame + 1]
push af
set 1, a
@@ -780,7 +780,7 @@ Text_00:: ; 143e
; 1449
Text_01:: ; 1449
; TX_RAM
; text_from_ram
; write text from a ram address
; little endian
; [$01][addr]
@@ -798,7 +798,7 @@ Text_01:: ; 1449
; 1455
Text_16:: ; 1455
; TX_FAR
; text_jump
; write text from a different bank
; little endian
; [$16][addr][bank]

View File

@@ -186,7 +186,7 @@ endr
xor a
ld b, a
add hl, bc
ld bc, TileMap
bccoord 0, 0
add hl, bc
ret
; 1d19
@@ -216,7 +216,7 @@ endr
xor a
ld b, a
add hl, bc
ld bc, AttrMap
bccoord 0, 0, AttrMap
add hl, bc
ret
; 1d35

View File

@@ -169,7 +169,7 @@ UpdateBGMap:: ; 164c
ld a, 1
ld [rVBK], a
ld hl, AttrMap
hlcoord 0, 0, AttrMap
call .update
ld a, 0
@@ -178,7 +178,7 @@ UpdateBGMap:: ; 164c
.Tiles
ld hl, TileMap
hlcoord 0, 0
.update

View File

@@ -83,7 +83,7 @@ Function2e31:: ; 2e31
ld [hBGMapMode], a
ld a, $1
ld [hOAMUpdate], a
call DrawOnMap
call UpdateSprites
xor a
ld [hOAMUpdate], a
call DelayFrame