Merge pull request #309 from PikalaxALT/master

Wild data, save functions, fix missing include
This commit is contained in:
yenatch
2015-08-17 11:58:57 -04:00
458 changed files with 9949 additions and 9719 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 FarCallSwapTextboxPalettes
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 FarCallScrollBGMapPalettes
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 FarCallScrollBGMapPalettes
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 FarCallScrollBGMapPalettes
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 FarCallScrollBGMapPalettes
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

@@ -84,7 +84,7 @@ Function184a:: ; 184a
ret
; 1852
Function1852:: ; 1852
CheckOnWater:: ; 1852
ld a, [StandingTile]
call GetTileCollision
sub 1
@@ -147,7 +147,7 @@ Function1875:: ; 1875
ret
; 188e
Function188e:: ; 188e
CheckSuperTallGrassTile:: ; 188e
cp $14
ret z
cp $1c
@@ -549,7 +549,7 @@ Function1a71:: ; 1a71
ld d, 0
ld hl, ObjectStruct3_Data + 1
rept OBJECT_STRUCT_3_DATA_WIDTH
add hl,de
add hl, de
endr
ld b, h
ld c, l
@@ -623,7 +623,7 @@ ResetVramState_Bit0:: ; 1acc
; 1ad2
DrawOnMap:: ; 1ad2
UpdateSprites:: ; 1ad2
ld a, [VramState]
bit 0, a
ret z

View File

@@ -1,3 +1,14 @@
AddNTimes:: ; 0x30fe
; Add bc * a to hl.
and a
ret z
.loop
add hl, bc
dec a
jr nz, .loop
ret
; 0x3105
SimpleMultiply:: ; 3105
; Return a * c.
and a

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,23 +323,23 @@ Special_ReloadSpritesNoPalettes:: ; d91
; db1
Functiondb1:: ; db1
FarCallSwapTextboxPalettes:: ; db1
ld a, [hROMBank]
push af
ld a, BANK(Function4c000)
ld a, BANK(SwapTextboxPalettes)
rst Bankswitch
call Function4c000
call SwapTextboxPalettes
pop af
rst Bankswitch
ret
; dbd
Functiondbd:: ; dbd
FarCallScrollBGMapPalettes:: ; dbd
ld a, [hROMBank]
push af
ld a, BANK(Function4c03f)
ld a, BANK(ScrollBGMapPalettes)
rst Bankswitch
call Function4c03f
call ScrollBGMapPalettes
pop af
rst Bankswitch
ret

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