You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Labeled every function in ROM0 that's referenced in the source
This commit is contained in:
@ -2489,9 +2489,9 @@ _PlayCryHeader:: ; e8b79
|
||||
|
||||
; 3-byte pointers (bank, address)
|
||||
ld hl, Cries
|
||||
rept 3
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
add hl, de
|
||||
|
||||
ld a, [hli]
|
||||
ld [MusicBank], a
|
||||
@ -2708,9 +2708,9 @@ PlayStereoSFX:: ; e8ca6
|
||||
|
||||
; get sfx ptr
|
||||
ld hl, SFX
|
||||
rept 3
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
add hl, de
|
||||
|
||||
; bank
|
||||
ld a, [hli]
|
||||
|
@ -196,9 +196,9 @@ AI_TryItem: ; 38105
|
||||
jr z, .has_item
|
||||
|
||||
dec de
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.has_item
|
||||
|
@ -19,9 +19,9 @@ AIChooseMove: ; 440ce
|
||||
; The default score is 20. Unusable moves are given a score of 80.
|
||||
ld a, 20
|
||||
ld hl, Buffer1
|
||||
rept 3
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
|
||||
; Don't pick disabled moves.
|
||||
|
@ -596,9 +596,9 @@ AI_Smart_Explosion: ; 388a6
|
||||
ret c
|
||||
|
||||
.asm_388c6
|
||||
rept 3
|
||||
inc [hl]
|
||||
endr
|
||||
inc [hl]
|
||||
inc [hl]
|
||||
ret
|
||||
; 388ca
|
||||
|
||||
@ -610,9 +610,9 @@ AI_Smart_DreamEater: ; 388ca
|
||||
call Random
|
||||
cp 25
|
||||
ret c
|
||||
rept 3
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
dec [hl]
|
||||
ret
|
||||
; 388d4
|
||||
|
||||
@ -1208,9 +1208,9 @@ AI_Smart_Fly: ; 38b12
|
||||
call AICompareSpeed
|
||||
ret nc
|
||||
|
||||
rept 3
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
dec [hl]
|
||||
ret
|
||||
; 38b20
|
||||
|
||||
@ -1515,9 +1515,9 @@ AI_Smart_Encore: ; 38c3b
|
||||
ret
|
||||
|
||||
.asm_38c81
|
||||
rept 3
|
||||
inc [hl]
|
||||
endr
|
||||
inc [hl]
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
.EncoreMoves:
|
||||
@ -1587,15 +1587,15 @@ AI_Smart_SleepTalk: ; 38cba
|
||||
cp $1
|
||||
jr z, .asm_38cc7
|
||||
|
||||
rept 3
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.asm_38cc7
|
||||
rept 3
|
||||
inc [hl]
|
||||
endr
|
||||
inc [hl]
|
||||
inc [hl]
|
||||
ret
|
||||
; 38ccb
|
||||
|
||||
@ -1607,9 +1607,9 @@ AI_Smart_DefrostOpponent: ; 38ccb
|
||||
ld a, [EnemyMonStatus]
|
||||
and $20
|
||||
ret z
|
||||
rept 3
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
dec [hl]
|
||||
ret
|
||||
; 38cd5
|
||||
|
||||
@ -1708,9 +1708,9 @@ AI_Smart_HealBell: ; 38d1f
|
||||
jr z, .next
|
||||
|
||||
; status
|
||||
rept 3
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
dec hl
|
||||
ld a, [hl]
|
||||
or c
|
||||
ld c, a
|
||||
@ -1774,9 +1774,9 @@ AI_Smart_PriorityHit: ; 38d5a
|
||||
ld a, [BattleMonHP]
|
||||
sbc b
|
||||
ret nc
|
||||
rept 3
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
dec [hl]
|
||||
ret
|
||||
; 38d93
|
||||
|
||||
@ -1900,9 +1900,9 @@ AI_Smart_MeanLook: ; 38dfb
|
||||
.asm_38e26
|
||||
call AI_80_20
|
||||
ret c
|
||||
rept 3
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
dec [hl]
|
||||
ret
|
||||
; 38e2e
|
||||
|
||||
@ -2233,9 +2233,9 @@ AI_Smart_Endure: ; 38fac
|
||||
call AI_80_20
|
||||
ret c
|
||||
|
||||
rept 3
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.asm_38fcb
|
||||
@ -2274,9 +2274,9 @@ AI_Smart_FuryCutter: ; 38fdb
|
||||
|
||||
cp 3
|
||||
jr c, .end
|
||||
rept 3
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
dec [hl]
|
||||
|
||||
.end
|
||||
|
||||
@ -2579,9 +2579,9 @@ AI_Smart_WeatherMove: ; 3910d
|
||||
; 3911e
|
||||
|
||||
AIBadWeatherType: ; 3911e
|
||||
rept 3
|
||||
inc [hl]
|
||||
endr
|
||||
inc [hl]
|
||||
inc [hl]
|
||||
ret
|
||||
; 39122
|
||||
|
||||
|
@ -108,7 +108,7 @@ RunBattleAnimScript: ; cc163
|
||||
call RunBattleAnimCommand
|
||||
call _ExecuteBGEffects
|
||||
call BattleAnim_UpdateOAM_All
|
||||
call Function3b0c
|
||||
call PushLYOverrides
|
||||
call BattleAnimRequestPals
|
||||
|
||||
; Speed up Rollout's animation.
|
||||
@ -265,9 +265,9 @@ BattleAnim_ClearCGB_OAMFlags: ; cc23d
|
||||
ld a, [hl]
|
||||
and $f0
|
||||
ld [hli], a
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
inc hl
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
@ -738,9 +738,9 @@ BattleBGEffect_RunPicResizeScript: ; c83ed (32:43ed)
|
||||
ld l, a
|
||||
ld a, [wBattleAnimTemp2]
|
||||
ld h, a
|
||||
rept 3
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
cp -1
|
||||
jr z, .end
|
||||
@ -805,9 +805,9 @@ endr
|
||||
ld e, [hl]
|
||||
ld d, 0
|
||||
ld hl, .BGSquares
|
||||
rept 3
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
and $f
|
||||
|
@ -4080,9 +4080,9 @@ InitBattleMon: ; 3da0d
|
||||
ld de, BattleMonDVs
|
||||
ld bc, MON_PKRUS - MON_DVS
|
||||
call CopyBytes
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
inc hl
|
||||
ld de, BattleMonLevel
|
||||
ld bc, PARTYMON_STRUCT_LENGTH - MON_LEVEL
|
||||
call CopyBytes
|
||||
@ -4172,9 +4172,9 @@ InitEnemyMon: ; 3dabd
|
||||
ld de, EnemyMonDVs
|
||||
ld bc, MON_PKRUS - MON_DVS
|
||||
call CopyBytes
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
inc hl
|
||||
ld de, EnemyMonLevel
|
||||
ld bc, PARTYMON_STRUCT_LENGTH - MON_LEVEL
|
||||
call CopyBytes
|
||||
@ -4302,9 +4302,9 @@ rept 4
|
||||
endr
|
||||
ld [hl], a
|
||||
ld hl, PlayerUsedMoves
|
||||
rept 3
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld [PlayerDisableCount], a
|
||||
ld [PlayerFuryCutterCount], a
|
||||
@ -6637,9 +6637,9 @@ LoadEnemyMon: ; 3e8eb
|
||||
xor a
|
||||
ld h, d
|
||||
ld l, e
|
||||
rept 3
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
; Make sure the predef knows this isn't a partymon
|
||||
ld [MagikarpLength], a
|
||||
|
@ -3402,9 +3402,9 @@ HitSelfInConfusion: ; 355dd
|
||||
sla c
|
||||
rl b
|
||||
.mimic_screen
|
||||
rept 3
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
dec hl
|
||||
ld a, [hli]
|
||||
ld l, [hl]
|
||||
ld h, a
|
||||
@ -3948,9 +3948,9 @@ BattleCommand_Encore: ; 35864
|
||||
set SUBSTATUS_ENCORED, [hl]
|
||||
call BattleRandom
|
||||
and $3
|
||||
rept 3
|
||||
inc a
|
||||
endr
|
||||
inc a
|
||||
inc a
|
||||
ld [de], a
|
||||
call CheckOpponentWentFirst
|
||||
jr nz, .finish_move
|
||||
@ -4089,12 +4089,12 @@ BattleCommand_PainSplit: ; 35926
|
||||
ld a, [CurDamage + 1]
|
||||
rr a
|
||||
ld [CurDamage + 1], a
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
rept 3
|
||||
inc hl
|
||||
inc hl
|
||||
inc de
|
||||
inc de
|
||||
inc de
|
||||
endr
|
||||
|
||||
.EnemyShareHP: ; 359ac
|
||||
ld c, [hl]
|
||||
@ -7442,9 +7442,9 @@ BattleCommand_TrapTarget: ; 36c2d
|
||||
ret nz
|
||||
call BattleRandom
|
||||
and 3
|
||||
rept 3
|
||||
inc a
|
||||
endr
|
||||
inc a
|
||||
inc a
|
||||
ld [hl], a
|
||||
ld a, BATTLE_VARS_MOVE_ANIM
|
||||
call GetBattleVar
|
||||
|
@ -81,9 +81,9 @@ StageBallTilesData: ; 2c059
|
||||
jr z, .fainted
|
||||
|
||||
.got_hp
|
||||
rept 3
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
dec hl
|
||||
ld a, [hl]
|
||||
and a
|
||||
ld b, $32 ; statused
|
||||
@ -92,9 +92,9 @@ endr
|
||||
jr .load
|
||||
|
||||
.fainted
|
||||
rept 3
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
dec hl
|
||||
|
||||
.load
|
||||
ld a, b
|
||||
|
@ -18,10 +18,12 @@ LV_CHAR EQU $6e
|
||||
; GetName types
|
||||
PKMN_NAME EQU 1
|
||||
MOVE_NAME EQU 2
|
||||
; dummied out EQU 3
|
||||
ITEM_NAME EQU 4
|
||||
PARTY_OT_NAME EQU 5
|
||||
ENEMY_OT_NAME EQU 6
|
||||
TRAINER_NAME EQU 7
|
||||
; broken ptr EQU 8
|
||||
|
||||
; hp
|
||||
HP_GREEN EQU 0
|
||||
|
@ -48,7 +48,7 @@ Toss_Sell_Loop: ; 24ff9
|
||||
; 2500e
|
||||
|
||||
BuySellToss_InterpretJoypad: ; 2500e
|
||||
call Function354b ; get joypad
|
||||
call JoyTextDelay_ForcehJoyDown ; get joypad
|
||||
bit B_BUTTON_F, c
|
||||
jr nz, .b
|
||||
bit A_BUTTON_F, c
|
||||
|
@ -121,7 +121,7 @@ RestartClock: ; 20021 (8:4021)
|
||||
; 0x200ba
|
||||
|
||||
.joy_loop
|
||||
call Function354b
|
||||
call JoyTextDelay_ForcehJoyDown
|
||||
ld c, a
|
||||
push af
|
||||
call .PrintTime
|
||||
|
@ -405,9 +405,9 @@ LoadStatsScreenPals:
|
||||
Function8cb4:
|
||||
ld l, e
|
||||
ld h, 0
|
||||
rept 3
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
add hl, hl
|
||||
ld de, Palettes_8d05
|
||||
add hl, de
|
||||
call CheckCGB
|
||||
@ -855,9 +855,9 @@ Function97e5:
|
||||
GetMonPalettePointer:
|
||||
ld l, a
|
||||
ld h, $0
|
||||
rept 3
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
add hl, hl
|
||||
ld bc, PokemonPalettes
|
||||
add hl, bc
|
||||
ret
|
||||
@ -1101,9 +1101,9 @@ endr
|
||||
call SGBDelayCycles
|
||||
ld a, $30
|
||||
ld [rJOYP], a
|
||||
rept 3
|
||||
ld a, [rJOYP]
|
||||
endr
|
||||
ld a, [rJOYP]
|
||||
ld a, [rJOYP]
|
||||
call SGBDelayCycles
|
||||
call SGBDelayCycles
|
||||
ld a, [rJOYP]
|
||||
@ -1946,9 +1946,9 @@ LoadMapPals:
|
||||
ld a, [MapGroup]
|
||||
ld l, a
|
||||
ld h, 0
|
||||
rept 3
|
||||
add hl,hl
|
||||
endr
|
||||
add hl,hl
|
||||
add hl,hl
|
||||
ld de, RoofPals
|
||||
add hl, de
|
||||
ld a, [TimeOfDayPal]
|
||||
|
@ -1655,9 +1655,9 @@ CrystalIntro_InitUnownAnim: ; e51dc (39:51dc)
|
||||
ret
|
||||
|
||||
CrystalIntro_UnownFade: ; e5223 (39:5223)
|
||||
rept 3
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
add a
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, BGPals
|
||||
@ -1777,9 +1777,9 @@ Intro_Scene20_AppearUnown: ; e5348 (39:5348)
|
||||
.got_pointer
|
||||
ld a, [wcf65]
|
||||
and $7
|
||||
rept 3
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
add a
|
||||
ld c, a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@ -1835,9 +1835,9 @@ endr
|
||||
; e539d
|
||||
|
||||
Intro_FadeUnownWordPals: ; e539d (39:539d)
|
||||
rept 3
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
add a
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, BGPals
|
||||
|
@ -573,9 +573,9 @@ Function81c33: ; 81c33
|
||||
; 81ca7
|
||||
|
||||
Function81ca7: ; 81ca7
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
inc hl
|
||||
ld a, [de]
|
||||
call Function81cbc
|
||||
ld a, [de]
|
||||
@ -1233,9 +1233,9 @@ Function8220f: ; 8220f
|
||||
ld a, [wcf64]
|
||||
ld l, a
|
||||
ld h, $0
|
||||
rept 3
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
add hl, hl
|
||||
ld de, UnknBGPals
|
||||
add hl, de
|
||||
ld de, wc608
|
||||
|
@ -1030,9 +1030,9 @@ DoPlayerEvent: ; 96beb
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, PlayerEventScriptPointers
|
||||
rept 3
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld [ScriptBank], a
|
||||
ld a, [hli]
|
||||
|
@ -459,9 +459,9 @@ HandleQueuedCommand: ; 97e79
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .Jumptable_ba
|
||||
rept 3
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
push af
|
||||
ld a, [hli]
|
||||
|
@ -704,9 +704,9 @@ SelectTreeMon: ; b841f
|
||||
.loop
|
||||
sub [hl]
|
||||
jr c, .ok
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.ok
|
||||
|
@ -353,9 +353,9 @@ EvolutionAnimation: ; 4e5e1
|
||||
ld a, [hl]
|
||||
or b
|
||||
ld [hli], a
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
inc hl
|
||||
dec c
|
||||
jr nz, .loop6
|
||||
pop bc
|
||||
|
@ -50,9 +50,9 @@ endr
|
||||
cp [hl]
|
||||
jr z, .ok
|
||||
jr c, .ok
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
inc hl
|
||||
jr .loop
|
||||
.ok
|
||||
inc hl
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user