mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
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:
parent
d5ddd9e54e
commit
c8960dd2c8
@ -8824,9 +8824,9 @@ Function3f836: ; 3f836
|
||||
call GetSRAMBank
|
||||
call Function3f85f
|
||||
call CloseSRAM
|
||||
ld hl, AttrMap
|
||||
hlcoord 0, 0, AttrMap
|
||||
xor a
|
||||
ld bc, $0168
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
call ByteFill
|
||||
call Function3200
|
||||
ld b, $8
|
||||
|
@ -6448,7 +6448,7 @@ BattleCommand8c: ; 363b8
|
||||
jp BattleTextBox
|
||||
|
||||
.stat
|
||||
TX_FAR UnknownText_0x1c0cc6
|
||||
text_jump UnknownText_0x1c0cc6
|
||||
start_asm
|
||||
|
||||
ld hl, .up
|
||||
@ -6459,11 +6459,11 @@ BattleCommand8c: ; 363b8
|
||||
ret
|
||||
|
||||
.wayup
|
||||
TX_FAR UnknownText_0x1c0cd0
|
||||
text_jump UnknownText_0x1c0cd0
|
||||
db "@"
|
||||
|
||||
.up
|
||||
TX_FAR UnknownText_0x1c0ce0
|
||||
text_jump UnknownText_0x1c0ce0
|
||||
db "@"
|
||||
|
||||
; 363e9
|
||||
@ -6482,7 +6482,7 @@ BattleCommand8d: ; 363e9
|
||||
jp BattleTextBox
|
||||
|
||||
.stat
|
||||
TX_FAR UnknownText_0x1c0ceb
|
||||
text_jump UnknownText_0x1c0ceb
|
||||
start_asm
|
||||
|
||||
ld hl, .fell
|
||||
@ -6493,10 +6493,10 @@ BattleCommand8d: ; 363e9
|
||||
ret
|
||||
|
||||
.sharplyfell
|
||||
TX_FAR UnknownText_0x1c0cf5
|
||||
text_jump UnknownText_0x1c0cf5
|
||||
db "@"
|
||||
.fell
|
||||
TX_FAR UnknownText_0x1c0d06
|
||||
text_jump UnknownText_0x1c0d06
|
||||
db "@"
|
||||
|
||||
; 3641a
|
||||
@ -7804,7 +7804,7 @@ BattleCommand39: ; 36b4d
|
||||
jp EndMoveEffect
|
||||
|
||||
.UsedText
|
||||
TX_FAR UnknownText_0x1c0d0e ; "[USER]"
|
||||
text_jump UnknownText_0x1c0d0e ; "[USER]"
|
||||
start_asm
|
||||
|
||||
ld a, BATTLE_VARS_MOVE_ANIM
|
||||
@ -7837,32 +7837,32 @@ BattleCommand39: ; 36b4d
|
||||
|
||||
.RazorWind
|
||||
; 'made a whirlwind!'
|
||||
TX_FAR UnknownText_0x1c0d12
|
||||
text_jump UnknownText_0x1c0d12
|
||||
db "@"
|
||||
|
||||
.Solarbeam
|
||||
; 'took in sunlight!'
|
||||
TX_FAR UnknownText_0x1c0d26
|
||||
text_jump UnknownText_0x1c0d26
|
||||
db "@"
|
||||
|
||||
.SkullBash
|
||||
; 'lowered its head!'
|
||||
TX_FAR UnknownText_0x1c0d3a
|
||||
text_jump UnknownText_0x1c0d3a
|
||||
db "@"
|
||||
|
||||
.SkyAttack
|
||||
; 'is glowing!'
|
||||
TX_FAR UnknownText_0x1c0d4e
|
||||
text_jump UnknownText_0x1c0d4e
|
||||
db "@"
|
||||
|
||||
.Fly
|
||||
; 'flew up high!'
|
||||
TX_FAR UnknownText_0x1c0d5c
|
||||
text_jump UnknownText_0x1c0d5c
|
||||
db "@"
|
||||
|
||||
.Dig
|
||||
; 'dug a hole!'
|
||||
TX_FAR UnknownText_0x1c0d6c
|
||||
text_jump UnknownText_0x1c0d6c
|
||||
db "@"
|
||||
; 36c2c
|
||||
|
||||
|
@ -25,3 +25,4 @@ INCLUDE "constants/pokemon_data_constants.asm"
|
||||
INCLUDE "constants/misc_constants.asm"
|
||||
INCLUDE "constants/std_constants.asm"
|
||||
INCLUDE "constants/deco_constants.asm"
|
||||
INCLUDE "constants/radio_constants.asm"
|
||||
|
@ -297,7 +297,7 @@ Function8bec: ; 8bec
|
||||
ld a, [EnemyLightScreenCount]
|
||||
ld c, a
|
||||
ld a, [EnemyReflectCount]
|
||||
ld hl, AttrMap
|
||||
hlcoord 0, 0, AttrMap
|
||||
ld de, $0014
|
||||
.asm_8c04
|
||||
and a
|
||||
@ -661,8 +661,8 @@ endr
|
||||
|
||||
|
||||
Function9699: ; 9699
|
||||
ld hl, AttrMap
|
||||
ld bc, $0168
|
||||
hlcoord 0, 0, AttrMap
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
xor a
|
||||
call ByteFill
|
||||
ret
|
||||
@ -694,7 +694,7 @@ Function96b3: ; 96b3
|
||||
ret
|
||||
|
||||
.asm_96d0
|
||||
ld hl, AttrMap
|
||||
hlcoord 0, 0, AttrMap
|
||||
ld de, VBGMap0
|
||||
ld b, $12
|
||||
ld a, $1
|
||||
|
@ -527,7 +527,7 @@ Function109a95: ; 109a95 (42:5a95)
|
||||
ld a, $c
|
||||
ld [hBGMapAddress], a ; $ff00+$d6
|
||||
ld a, $28
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
ld bc, $168
|
||||
call ByteFill
|
||||
ld a, $7f
|
||||
@ -540,7 +540,7 @@ Function109a95: ; 109a95 (42:5a95)
|
||||
hlcoord 0, 17
|
||||
ld a, $20
|
||||
call Function109b1d
|
||||
ld hl, AttrMap
|
||||
hlcoord 0, 0, AttrMap
|
||||
ld bc, $50
|
||||
xor a
|
||||
call ByteFill
|
||||
@ -560,7 +560,7 @@ Function109a95: ; 109a95 (42:5a95)
|
||||
xor a
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
ld [hBGMapAddress], a ; $ff00+$d6
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
call Function109aff
|
||||
call Function3200
|
||||
ret
|
||||
|
@ -14,8 +14,8 @@ Function1dd709: ; 1dd709
|
||||
ld de, VTiles2
|
||||
call Decompress
|
||||
ld hl, Tilemap_1ddc4b
|
||||
ld de, TileMap
|
||||
ld bc, $0168
|
||||
decoord 0, 0
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
call CopyBytes
|
||||
ld de, String_1dd760
|
||||
hlcoord 2, 5
|
||||
@ -54,13 +54,13 @@ String_1dd768:
|
||||
; 1dd7ae
|
||||
|
||||
Function1dd7ae: ; 1dd7ae
|
||||
ld hl, TileMap
|
||||
ld bc, $0168
|
||||
hlcoord 0, 0
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
ld a, $7f
|
||||
call ByteFill
|
||||
ld hl, Tilemap_1dddb3
|
||||
ld de, TileMap
|
||||
ld bc, $0168
|
||||
decoord 0, 0
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
call CopyBytes
|
||||
ld de, String_1dd7fa
|
||||
hlcoord 8, 0
|
||||
|
@ -29,9 +29,9 @@
|
||||
dwb StatusFlags, %01000000 ; credits skip
|
||||
dwb StatusFlags, %10000000 ; bug contest on ; $10
|
||||
dwb StatusFlags2, %00000100 ; bug contest timer
|
||||
dwb StatusFlags2, %00000010 ; rockets in radio tower
|
||||
dwb StatusFlags2, %00000001 ; bike shop call enabled (1024 bike steps reqd)
|
||||
dwb StatusFlags2, %00010000
|
||||
dwb StatusFlags2, %00000010
|
||||
dwb StatusFlags2, %00000001 ; rockets in radio tower
|
||||
dwb StatusFlags2, %00010000 ; bike shop call enabled (1024 bike steps reqd)
|
||||
dwb StatusFlags2, %00100000 ; give pokerus; berry -> berry juice when trading?
|
||||
dwb StatusFlags2, %01000000
|
||||
dwb StatusFlags2, %10000000 ; rockets in mahogany
|
||||
|
@ -1404,7 +1404,7 @@ Function10955: ; 10955
|
||||
hlcoord 5, 1
|
||||
lb bc, 11, 15
|
||||
call ClearBox
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
ld a, $28
|
||||
ld c, $14
|
||||
.asm_1098a
|
||||
@ -1489,8 +1489,8 @@ Function10a1d: ; 10a1d
|
||||
; 10a2a
|
||||
|
||||
Function10a2a: ; 10a2a
|
||||
ld hl, TileMap
|
||||
ld bc, $0168
|
||||
hlcoord 0, 0
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
ld a, $7f
|
||||
call ByteFill
|
||||
ret
|
||||
|
@ -212,7 +212,7 @@ Function4013c: ; 4013c (10:413c)
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
call ClearSprites
|
||||
xor a
|
||||
ld hl, AttrMap
|
||||
hlcoord 0, 0, AttrMap
|
||||
ld bc, $168
|
||||
call ByteFill
|
||||
callba Function1de171
|
||||
@ -725,7 +725,7 @@ Function4050a: ; 4050a (10:450a)
|
||||
xor a
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
xor a
|
||||
ld hl, AttrMap
|
||||
hlcoord 0, 0, AttrMap
|
||||
ld bc, $168
|
||||
call ByteFill
|
||||
call Function41ae1
|
||||
@ -1071,10 +1071,10 @@ Function4074c: ; 4074c (10:474c)
|
||||
ld de, Unknown_407f2
|
||||
call Function40acd
|
||||
ld a, $32
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
ld bc, $168
|
||||
call ByteFill
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
lb bc, 7, 7
|
||||
call Function40ad5
|
||||
hlcoord 0, 9
|
||||
@ -1135,7 +1135,7 @@ Unknown_407f2: ; 407f2
|
||||
|
||||
Function407fd: ; 407fd
|
||||
call Function40aa6
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
ld bc, $0f12
|
||||
call Function40ad5
|
||||
hlcoord 19, 0
|
||||
@ -1259,7 +1259,7 @@ String_4094c: ; 4094c
|
||||
|
||||
Function40962: ; 40962 (10:4962)
|
||||
call Function40aa6
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
lb bc, 7, 7
|
||||
call Function40ad5
|
||||
hlcoord 0, 11
|
||||
@ -1387,9 +1387,9 @@ Unknown_40a3e: ; 40a3e
|
||||
; 40aa6
|
||||
|
||||
Function40aa6: ; 40aa6
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
ld a, $32
|
||||
ld bc, $0168
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
call ByteFill
|
||||
ret
|
||||
; 40ab2
|
||||
|
@ -79,7 +79,7 @@ PredefPointers:: ; 856b
|
||||
add_predef Functioncbcdd
|
||||
add_predef Predef2F
|
||||
add_predef Function9853 ; $30
|
||||
add_predef Function864c
|
||||
add_predef Predef_LoadSGBLayout
|
||||
add_predef Function91d11
|
||||
add_predef CheckContestMon
|
||||
add_predef Function8c20f
|
||||
|
4256
engine/radio.asm
4256
engine/radio.asm
File diff suppressed because it is too large
Load Diff
@ -475,7 +475,7 @@ Script_loadmenudata: ; 0x96efa
|
||||
ld de, LoadMenuDataHeader
|
||||
ld a, [ScriptBank]
|
||||
call Call_a_de
|
||||
call DrawOnMap
|
||||
call UpdateSprites
|
||||
ret
|
||||
; 0x96f0f
|
||||
|
||||
@ -483,7 +483,7 @@ Script_writebackup: ; 0x96f0f
|
||||
; script command 0x50
|
||||
|
||||
call WriteBackup
|
||||
call DrawOnMap
|
||||
call UpdateSprites
|
||||
ret
|
||||
; 0x96f16
|
||||
|
||||
@ -1212,7 +1212,7 @@ ApplyPersonFacing: ; 0x9728b
|
||||
jr nz, .asm_972b5 ; 0x972b0 $3
|
||||
call Function972bc
|
||||
.asm_972b5
|
||||
call DrawOnMap
|
||||
call UpdateSprites
|
||||
ret
|
||||
.not_visible
|
||||
pop de
|
||||
@ -1222,8 +1222,8 @@ ApplyPersonFacing: ; 0x9728b
|
||||
|
||||
Function972bc: ; 0x972bc
|
||||
call Function217a
|
||||
ld hl, TileMap
|
||||
ld bc, $0168
|
||||
hlcoord 0, 0
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
.asm_972c5
|
||||
res 7, [hl]
|
||||
inc hl
|
||||
@ -2970,7 +2970,7 @@ Script_reloadmappart:: ; 0x97ae3
|
||||
call Function2173
|
||||
call Function2914
|
||||
callba Function104061
|
||||
call DrawOnMap
|
||||
call UpdateSprites
|
||||
ret
|
||||
; 0x97af6
|
||||
|
||||
|
@ -75,7 +75,7 @@ SpecialsPointers:: ; c029
|
||||
add_special WhiteBGMap
|
||||
add_special UpdateTimePals
|
||||
add_special ClearTileMap
|
||||
add_special DrawOnMap
|
||||
add_special UpdateSprites
|
||||
add_special Special_ReplaceKrisSprite
|
||||
add_special Special_GameCornerPrizeMonCheckDex
|
||||
add_special SpecialSeenMon
|
||||
@ -110,7 +110,7 @@ SpecialsPointers:: ; c029
|
||||
add_special SpecialNameRater
|
||||
add_special Functionc2da
|
||||
add_special GetFirstPokemonHappiness
|
||||
add_special Function71ac
|
||||
add_special CheckFirstMonIsEgg
|
||||
add_special Function2a4ab
|
||||
add_special Function2a51f
|
||||
add_special RandomPhoneMon
|
||||
|
16
home.asm
16
home.asm
@ -217,7 +217,7 @@ Function309d:: ; 309d
|
||||
push af
|
||||
ld a, 2
|
||||
ld [rSVBK], a
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
ld de, w2_d000
|
||||
ld bc, TileMapEnd - TileMap
|
||||
call CopyBytes
|
||||
@ -241,7 +241,7 @@ Function30bf:: ; 30bf
|
||||
ld a, 2
|
||||
ld [rSVBK], a
|
||||
ld hl, w2_d000
|
||||
ld de, TileMap
|
||||
decoord 0, 0
|
||||
ld bc, TileMapEnd - TileMap
|
||||
call CopyBytes
|
||||
pop af
|
||||
@ -271,7 +271,7 @@ IsInArray:: ; 30e1
|
||||
ld c, a
|
||||
.loop
|
||||
ld a, [hl]
|
||||
cp $ff
|
||||
cp -1
|
||||
jr z, .NotInArray
|
||||
cp c
|
||||
jr z, .InArray
|
||||
@ -626,11 +626,11 @@ Function3246:: ; 3246
|
||||
di
|
||||
ld a, $1
|
||||
ld [rVBK], a
|
||||
ld hl, AttrMap
|
||||
hlcoord 0, 0, AttrMap
|
||||
call Function327b
|
||||
ld a, $0
|
||||
ld [rVBK], a
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
call Function327b
|
||||
.wait2
|
||||
ld a, [rLY]
|
||||
@ -761,7 +761,7 @@ GetSGBLayout:: ; 3340
|
||||
ret z
|
||||
|
||||
.sgb
|
||||
predef_jump Function864c ; LoadSGBLayout
|
||||
predef_jump Predef_LoadSGBLayout ; LoadSGBLayout
|
||||
; 334e
|
||||
|
||||
|
||||
@ -2153,11 +2153,11 @@ endr
|
||||
; 3f20
|
||||
|
||||
Function3f20:: ; 3f20
|
||||
ld hl, AttrMap
|
||||
hlcoord 0, 0, AttrMap
|
||||
ld b, $6
|
||||
ld c, $14
|
||||
call Function3f35
|
||||
ld hl, TileMap
|
||||
hlcoord 0, 0
|
||||
ld b, $4
|
||||
ld c, $12
|
||||
call Function3f47
|
||||
|
@ -312,7 +312,7 @@ BattleTextBox:: ; 3ac3
|
||||
push hl
|
||||
call SpeechTextBox
|
||||
call MobileTextBorder
|
||||
call DrawOnMap
|
||||
call UpdateSprites
|
||||
call Function321c
|
||||
pop hl
|
||||
call PrintTextBoxText
|
||||
|
24
home/map.asm
24
home/map.asm
@ -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
|
||||
|
@ -623,7 +623,7 @@ ResetVramState_Bit0:: ; 1acc
|
||||
; 1ad2
|
||||
|
||||
|
||||
DrawOnMap:: ; 1ad2
|
||||
UpdateSprites:: ; 1ad2
|
||||
ld a, [VramState]
|
||||
bit 0, a
|
||||
ret z
|
||||
|
@ -75,7 +75,7 @@ InterpretMenu2:: ; 0x1d81
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
call Function1cbb
|
||||
call DrawOnMap
|
||||
call UpdateSprites
|
||||
call Function1c89
|
||||
call Function321c
|
||||
call Function1c66
|
||||
|
@ -209,7 +209,7 @@ WriteBackup:: ; 0x1c17
|
||||
push af
|
||||
call ExitMenu
|
||||
call Function321c
|
||||
call DrawOnMap
|
||||
call UpdateSprites
|
||||
pop af
|
||||
ret
|
||||
|
||||
|
@ -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)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user