Identify more WRAM labels, and start a <X>_DummyFunction label convention

This commit is contained in:
Rangi 2020-10-28 13:35:39 -04:00
parent 6d333bed5f
commit ea426a8879
42 changed files with 255 additions and 208 deletions

View File

@ -184,7 +184,7 @@ Sfx_Tingle_Ch5:
duty_cycle 1
transpose 0, 11
note_type 1, 11, 1
Sfx_Tingle_branch_17996c:
.loop1:
octave 5
note C_, 3
octave 6
@ -192,7 +192,7 @@ Sfx_Tingle_branch_17996c:
octave 5
note C_, 3
rest 2
sound_loop 2, Sfx_Tingle_branch_17996c
sound_loop 2, .loop1
note C_, 2
volume_envelope 10, 1
note G_, 13

View File

@ -115,7 +115,7 @@
; wSwarmFlags
const ENGINE_BUENAS_PASSWORD_2
const ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
; wGameTimerPause
; wGameTimerPaused
const ENGINE_62
; wPlayerGender
const ENGINE_PLAYER_IS_FEMALE

View File

@ -21,9 +21,13 @@ AUTO_INPUT EQU $ff
const TEMPMON ; 3
const WILDMON ; 4
; wGameTimerPause::
GAMETIMERPAUSE_TIMER_PAUSED_F EQU 0
GAMETIMERPAUSE_MOBILE_7_F EQU 7
; wGameTimerPaused::
GAME_TIMER_PAUSED_F EQU 0
GAME_TIMER_MOBILE_F EQU 7
; wJoypadDisable::
JOYPAD_DISABLE_MON_FAINT_F EQU 6
JOYPAD_DISABLE_SGB_TRANSFER_F EQU 7
; wOptions::
TEXT_DELAY_MASK EQU %111

View File

@ -125,7 +125,7 @@ EngineFlags:
engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F
engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F
engine_flag wGameTimerPause, GAMETIMERPAUSE_MOBILE_7_F
engine_flag wGameTimerPaused, GAME_TIMER_MOBILE_F
engine_flag wPlayerGender, PLAYERGENDER_FEMALE_F

View File

@ -55,8 +55,8 @@ SpecialsPointers::
add_special UnownPuzzle
add_special SlotMachine
add_special CardFlip
add_special DummyNonfunctionalGameCornerGame
add_special ClearBGPalettesBufferScreen
add_special UnusedDummyGame ; unused
add_special ClearBGPalettesBufferScreen ; unused
add_special FadeOutPalettes
add_special BattleTowerFade
add_special FadeBlackQuickly
@ -65,21 +65,21 @@ SpecialsPointers::
add_special ReloadSpritesNoPalettes ; bank 0
add_special ClearBGPalettes ; bank 0
add_special UpdateTimePals ; bank 0
add_special ClearTilemap ; bank 0
add_special ClearTilemap ; bank 0; unused as special
add_special UpdateSprites ; bank 0
add_special UpdatePlayerSprite ; bank 0
add_special GameCornerPrizeMonCheckDex
add_special UnusedSetSeenMon
add_special UnusedSetSeenMon ; unused
add_special WaitSFX ; bank 0
add_special PlayMapMusic ; bank 0
add_special RestartMapMusic ; bank 0
add_special HealMachineAnim
add_special SurfStartStep
add_special FindPartyMonAboveLevel
add_special FindPartyMonAtLeastThatHappy
add_special FindPartyMonAboveLevel ; unused
add_special FindPartyMonAtLeastThatHappy ; unused
add_special FindPartyMonThatSpecies
add_special FindPartyMonThatSpeciesYourTrainerID
add_special UnusedCheckUnusedTwoDayTimer
add_special UnusedCheckUnusedTwoDayTimer ; unused
add_special DayCareMon1
add_special DayCareMon2
add_special SelectRandomBugContestContestants
@ -134,7 +134,7 @@ SpecialsPointers::
add_special Function170114
add_special BattleTowerBattle
add_special Function1704e1
add_special DummySpecial_17021d
add_special UnusedBattleTowerDummySpecial1
add_special LoadOpponentTrainerAndPokemonWithOTSprite
add_special Function11ba38
add_special CheckForBattleTowerRules
@ -166,7 +166,7 @@ SpecialsPointers::
add_special BeastsCheck
add_special MonCheck
add_special SetPlayerPalette
add_special DummySpecial_170bd2
add_special UnusedBattleTowerDummySpecial2
add_special Mobile_SelectThreeMons
add_special Function1037eb
add_special Function10383c
@ -181,4 +181,4 @@ SpecialsPointers::
add_special UnusedFindItemInPCOrBag
add_special InitialSetDSTFlag
add_special InitialClearDSTFlag
add_special DummySpecial_c224
add_special UnusedDummySpecial ; unused

View File

@ -258,7 +258,7 @@ StartTrainerBattle_NextScene:
StartTrainerBattle_SetUpBGMap:
call StartTrainerBattle_NextScene
xor a
ld [wcf64], a
ld [wBattleTransitionCounter], a
ldh [hBGMapMode], a
ret
@ -272,7 +272,7 @@ StartTrainerBattle_Flash:
ld a, [wTimeOfDayPalset]
cp DARKNESS_PALSET
jr z, .done
ld hl, wcf64
ld hl, wBattleTransitionCounter
ld a, [hl]
inc [hl]
srl a
@ -290,7 +290,7 @@ StartTrainerBattle_Flash:
.done
xor a
ld [wcf64], a
ld [wBattleTransitionCounter], a
scf
ret
@ -322,12 +322,12 @@ StartTrainerBattle_SetUpForWavyOutro:
ld a, $90
ldh [hLYOverrideEnd], a
xor a
ld [wcf64], a
ld [wcf65], a
ld [wBattleTransitionCounter], a
ld [wBattleTransitionSineWaveOffset], a
ret
StartTrainerBattle_SineWave:
ld a, [wcf64]
ld a, [wBattleTransitionCounter]
cp $60
jr nc, .end
call .DoSineWave
@ -339,10 +339,10 @@ StartTrainerBattle_SineWave:
ret
.DoSineWave:
ld hl, wcf65
ld hl, wBattleTransitionSineWaveOffset
ld a, [hl]
inc [hl]
ld hl, wcf64
ld hl, wBattleTransitionCounter
ld d, [hl]
add [hl]
ld [hl], a
@ -372,13 +372,13 @@ StartTrainerBattle_SetUpForSpinOutro:
ldh [rSVBK], a
call StartTrainerBattle_NextScene
xor a
ld [wcf64], a
ld [wBattleTransitionCounter], a
ret
StartTrainerBattle_SpinToBlack:
xor a
ldh [hBGMapMode], a
ld a, [wcf64]
ld a, [wBattleTransitionCounter]
ld e, a
ld d, 0
ld hl, .spin_quadrants
@ -388,13 +388,13 @@ endr
ld a, [hli]
cp -1
jr z, .end
ld [wcf65], a
ld [wBattleTransitionSineWaveOffset], a
call .load
ld a, 1
ldh [hBGMapMode], a
call DelayFrame
call DelayFrame
ld hl, wcf64
ld hl, wBattleTransitionCounter
inc [hl]
ret
@ -464,7 +464,7 @@ ENDM
inc de
.loop1
ld [hl], BATTLETRANSITION_BLACK
ld a, [wcf65]
ld a, [wBattleTransitionSineWaveOffset]
bit RIGHT_QUADRANT_F, a
jr z, .leftside
inc hl
@ -475,7 +475,7 @@ ENDM
dec c
jr nz, .loop1
pop hl
ld a, [wcf65]
ld a, [wBattleTransitionSineWaveOffset]
bit LOWER_QUADRANT_F, a
ld bc, SCREEN_WIDTH
jr z, .upper
@ -490,7 +490,7 @@ ENDM
jr z, .loop
ld c, a
.loop2
ld a, [wcf65]
ld a, [wBattleTransitionSineWaveOffset]
bit RIGHT_QUADRANT_F, a
jr z, .leftside2
dec hl
@ -514,13 +514,13 @@ StartTrainerBattle_SetUpForRandomScatterOutro:
ldh [rSVBK], a
call StartTrainerBattle_NextScene
ld a, $10
ld [wcf64], a
ld [wBattleTransitionCounter], a
ld a, 1
ldh [hBGMapMode], a
ret
StartTrainerBattle_SpeckleToBlack:
ld hl, wcf64
ld hl, wBattleTransitionCounter
ld a, [hl]
and a
jr z, .done

View File

@ -3006,10 +3006,11 @@ PlayerMonFaintedAnimation:
jp MonFaintedAnimation
MonFaintedAnimation:
ld a, [wcfbe]
ld a, [wJoypadDisable]
push af
set 6, a
ld [wcfbe], a
set JOYPAD_DISABLE_MON_FAINT_F, a
ld [wJoypadDisable], a
ld b, 7
.OuterLoop:
@ -3052,7 +3053,7 @@ MonFaintedAnimation:
jr nz, .OuterLoop
pop af
ld [wcfbe], a
ld [wJoypadDisable], a
ret
.Spaces:
@ -4639,7 +4640,7 @@ CheckDanger:
PrintPlayerHUD:
ld de, wBattleMonNick
hlcoord 10, 7
call ret_3e138
call Battle_DummyFunction
call PlaceString
push bc
@ -4725,7 +4726,7 @@ DrawEnemyHUD:
call GetBaseData
ld de, wEnemyMonNick
hlcoord 1, 0
call ret_3e138
call Battle_DummyFunction
call PlaceString
ld h, b
ld l, c
@ -4854,7 +4855,8 @@ UpdateHPPal:
ret z
jp FinishBattleAnim
ret_3e138:
Battle_DummyFunction:
; called before placing either battler's nickname in the HUD
ret
BattleMenu:

View File

@ -929,13 +929,13 @@ DebugColor_FillBoxWithByte:
ret
DebugColor_PushSGBPals:
ld a, [wcfbe]
ld a, [wJoypadDisable]
push af
set 7, a
ld [wcfbe], a
set JOYPAD_DISABLE_SGB_TRANSFER_F, a
ld [wJoypadDisable], a
call _DebugColor_PushSGBPals
pop af
ld [wcfbe], a
ld [wJoypadDisable], a
ret
_DebugColor_PushSGBPals:

View File

@ -183,7 +183,7 @@ BattleTowerBattle:
call _BattleTowerBattle
ret
DummySpecial_17021d:
UnusedBattleTowerDummySpecial1:
ret
InitBattleTowerChallengeRAM:
@ -1008,11 +1008,11 @@ BattleTowerAction_SetExplanationRead:
BattleTowerAction_SetByteToQuickSaveChallenge:
ld c, BATTLETOWER_SAVED_AND_LEFT
jr asm_17079f
jr SetBattleTowerChallengeState
BattleTowerAction_SetByteToCancelChallenge:
ld c, BATTLETOWER_NO_CHALLENGE
asm_17079f:
SetBattleTowerChallengeState:
ld a, BANK(sBattleTowerChallengeState)
call OpenSRAM
ld a, c
@ -1447,11 +1447,11 @@ Function1709bb: ; BattleTowerAction $10
Function170a9c:
ld c, FALSE
jr asm_170aa2
jr Set_s5_aa8d
Function170aa0:
ld c, TRUE
asm_170aa2:
Set_s5_aa8d:
ld a, BANK(s5_aa8d)
call OpenSRAM
ld a, c
@ -1576,7 +1576,7 @@ LoadOpponentTrainerAndPokemonWithOTSprite:
INCLUDE "data/trainers/sprites.asm"
DummySpecial_170bd2:
UnusedBattleTowerDummySpecial2:
ret
CheckForBattleTowerRules:

View File

@ -100,7 +100,7 @@ CelebiEvent_CountDown:
ret
CelebiEvent_SpawnLeaf: ; unreferenced
ld hl, wcf65
ld hl, wFrameCounter2
ld a, [hl]
inc [hl]
and $7

View File

@ -426,7 +426,7 @@ FlyFunction_FrameTimer:
ret
.SpawnLeaf:
ld hl, wcf65
ld hl, wFrameCounter2
ld a, [hl]
inc [hl]
and $7

View File

@ -56,11 +56,12 @@ NPCTrade::
call DisableSpriteUpdates
ld a, [wJumptableIndex]
push af
ld a, [wcf64]
; wTradeDialog aliases wFrameCounter, which TradeAnimation uses
ld a, [wTradeDialog]
push af
predef TradeAnimation
pop af
ld [wcf64], a
ld [wTradeDialog], a
pop af
ld [wJumptableIndex], a
call ReturnToMapWithSpeechTextbox
@ -107,7 +108,7 @@ Trade_GetDialog:
ld e, NPCTRADE_DIALOG
call GetTradeAttribute
ld a, [hl]
ld [wcf64], a
ld [wTradeDialog], a
ret
DoNPCTrade:
@ -392,7 +393,7 @@ PrintTradeText:
ld bc, 2 * 4
ld hl, TradeTexts
call AddNTimes
ld a, [wcf64]
ld a, [wTradeDialog]
ld c, a
add hl, bc
add hl, bc

View File

@ -9,7 +9,7 @@ RotateUnownFrontpic:
push bc
push hl
push bc
ld de, wd002
ld de, wPrintedUnownTileSource
call .Copy
call .Rotate
ld hl, UnownPrinter_GBPrinterRectangle
@ -19,10 +19,10 @@ RotateUnownFrontpic:
ld a, [hli]
ld e, a
ld d, [hl]
ld hl, wd012
ld hl, wPrintedUnownTileDest
call .Copy
pop hl
ld bc, $10
ld bc, LEN_2BPP_TILE
add hl, bc
pop bc
inc c
@ -44,7 +44,7 @@ RotateUnownFrontpic:
ret
.Copy:
ld c, $10
ld c, LEN_2BPP_TILE
.loop_copy
ld a, [hli]
ld [de], a
@ -54,12 +54,12 @@ RotateUnownFrontpic:
ret
.Rotate:
ld hl, wd012
ld hl, wPrintedUnownTileDest
ld e, %10000000
ld d, 8
.loop_decompress
push hl
ld hl, wd002
ld hl, wPrintedUnownTileSource
call .CountSetBit
pop hl
ld a, b

View File

@ -15,7 +15,7 @@ Special::
INCLUDE "data/events/special_pointers.asm"
DummySpecial_c224:
UnusedDummySpecial:
ret
SetPlayerPalette:
@ -207,7 +207,7 @@ CardFlip:
call StartGameCornerGame
ret
DummyNonfunctionalGameCornerGame:
UnusedDummyGame:
call CheckCoinsAndCoinCase
ret c
ld a, BANK(_DummyGame)

View File

@ -133,11 +133,11 @@ endr
.next_try
dec [hl]
xor a
ld [wcf64], a
ld [wDummyGameCardChoice], a
ld hl, wJumptableIndex
inc [hl]
.PickCard1:
ld a, [wcf64]
ld a, [wDummyGameCardChoice]
and a
ret z
dec a
@ -155,13 +155,13 @@ endr
call DummyGame_Card2Coord
call DummyGame_PlaceCard
xor a
ld [wcf64], a
ld [wDummyGameCardChoice], a
ld hl, wJumptableIndex
inc [hl]
ret
.PickCard2:
ld a, [wcf64]
ld a, [wDummyGameCardChoice]
and a
ret z
dec a
@ -527,7 +527,7 @@ DummyGame_InterpretJoypad_AnimateCursor:
add hl, bc
ld a, [hl]
inc a
ld [wcf64], a
ld [wDummyGameCardChoice], a
ret
.pressed_left

View File

@ -249,7 +249,7 @@ DebugPrintSlotBias: ; unreferenced
AnimateSlotReelIcons: ; unreferenced
; This animation was present in pokegold-spaceworld.
ld hl, wcf66
ld hl, wUnusedSlotReelIconDelay
ld a, [hl]
inc [hl]
and $7

View File

@ -43,7 +43,7 @@ LoadSGBLayoutCGB:
dw _CGB_PartyMenu
dw _CGB_Evolution
dw _CGB_GSTitleScreen
dw _CGB0d
dw _CGB_Unused0D
dw _CGB_MoveList
dw _CGB_BetaPikachuMinigame
dw _CGB_PokedexSearchOption
@ -60,7 +60,7 @@ LoadSGBLayoutCGB:
dw _CGB_TradeTube
dw _CGB_TrainerOrMonFrontpicPals
dw _CGB_MysteryGift
dw _CGB1e
dw _CGB_Unused1E
_CGB_BattleGrayscale:
ld hl, PalPacket_BattleGrayscale + 1
@ -321,7 +321,7 @@ _CGB_BillsPC:
ldh [hCGBPalUpdate], a
ret
Function9009: ; unreferenced
_CGB_Unknown: ; unreferenced
ld hl, BillsPCOrangePalette
call LoadHLPaletteIntoDE
jr .GotPalette
@ -595,7 +595,7 @@ _CGB_GSTitleScreen:
ldh [hCGBPalUpdate], a
ret
_CGB0d:
_CGB_Unused0D:
ld hl, PalPacket_Diploma + 1
call CopyFourPalettes
call WipeAttrmap
@ -911,7 +911,7 @@ _CGB_PlayerOrMonFrontpicPals:
call ApplyPals
ret
_CGB1e:
_CGB_Unused1E:
ld de, wBGPals1
ld a, [wCurPartySpecies]
call GetMonPalettePointer

View File

@ -136,6 +136,7 @@ SGB_ApplyPartyMenuHPPals:
Intro_LoadMagikarpPalettes: ; unreferenced
call CheckCGB
ret z
; CGB only
ld hl, .BGPal
ld de, wBGPals1
@ -789,13 +790,13 @@ endr
ret
PushSGBPals:
ld a, [wcfbe]
ld a, [wJoypadDisable]
push af
set 7, a
ld [wcfbe], a
set JOYPAD_DISABLE_SGB_TRANSFER_F, a
ld [wJoypadDisable], a
call _PushSGBPals
pop af
ld [wcfbe], a
ld [wJoypadDisable], a
ret
_PushSGBPals:
@ -841,12 +842,14 @@ _PushSGBPals:
InitSGBBorder:
call CheckCGB
ret nz
; SGB/DMG only
di
ld a, [wcfbe]
ld a, [wJoypadDisable]
push af
set 7, a
ld [wcfbe], a
set JOYPAD_DISABLE_SGB_TRANSFER_F, a
ld [wJoypadDisable], a
xor a
ldh [rJOYP], a
ldh [hSGB], a
@ -866,13 +869,14 @@ InitSGBBorder:
.skip
pop af
ld [wcfbe], a
ld [wJoypadDisable], a
ei
ret
InitCGBPals::
call CheckCGB
ret z
; CGB only
ld a, BANK(vTiles3)
ldh [rVBK], a

View File

@ -132,7 +132,7 @@ Function49420::
MG_Mobile_Layout01:
call MG_Mobile_Layout_LoadPals
ld de, wBGPals1 palette PAL_BG_TEXT
ld hl, .Palette_49478
ld hl, .TextPalette
ld bc, 1 palettes
ld a, BANK(wBGPals1)
call FarCopyWRAM
@ -149,19 +149,18 @@ MG_Mobile_Layout01:
bit 6, a
jr z, .asm_49464
call Function49480
jr .asm_49467
jr .done
.asm_49464
call Function49496
.asm_49467
.done
farcall ApplyAttrmap
farcall ApplyPals
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
.Palette_49478:
.TextPalette:
RGB 31, 31, 31
RGB 26, 31, 00
RGB 20, 16, 03
@ -194,7 +193,7 @@ Function49496:
INCLUDE "engine/tilesets/tileset_palettes.asm"
MG_Mobile_Layout02:
ld hl, .Palette_49732
ld hl, .BGPalette
ld de, wBGPals1
ld bc, 1 palettes
ld a, BANK(wBGPals1)
@ -202,20 +201,20 @@ MG_Mobile_Layout02:
farcall ApplyPals
call MG_Mobile_Layout_WipeAttrmap
farcall ApplyAttrmap
ld hl, .Palette_4973a
ld hl, .OBPalette
ld de, wOBPals1
ld bc, 1 palettes
ld a, BANK(wOBPals1)
call FarCopyWRAM
ret
.Palette_49732:
.BGPalette:
RGB 31, 31, 31
RGB 23, 16, 07
RGB 23, 07, 07
RGB 03, 07, 20
.Palette_4973a:
.OBPalette:
RGB 00, 00, 00
RGB 07, 05, 31
RGB 14, 18, 31

View File

@ -35,7 +35,7 @@ LoadSGBLayout:
dw .SGB_PartyMenu
dw .SGB_Evolution
dw .SGB_GSTitleScreen
dw .SGB0d
dw .SGB_Unused0D
dw .SGB_MoveList
dw .SGB_BetaPikachuMinigame
dw .SGB_PokedexSearchOption
@ -52,7 +52,7 @@ LoadSGBLayout:
dw .SGB_TradeTube
dw .SGB_TrainerOrMonFrontpicPals
dw .SGB_MysteryGift
dw .SGB1e
dw .SGB_Unused1E
.SGB_BattleGrayscale:
ld hl, PalPacket_BattleGrayscale
@ -397,7 +397,7 @@ endr
ld de, BlkPacket_AllPal0
ret
.SGB0d:
.SGB_Unused0D:
.SGB_TrainerCard:
ld hl, PalPacket_Diploma
ld de, BlkPacket_AllPal0
@ -437,7 +437,7 @@ endr
ld de, wSGBPals + PALPACKET_LENGTH
ret
.SGB1e:
.SGB_Unused1E:
ld hl, PalPacket_Pal01
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@ -450,7 +450,7 @@ endr
add hl, hl
ld de, PokemonPalettes
add hl, de
ld a, [wcf65]
ld a, [wUnusedSGB1eColorOffset]
and 3
sla a
sla a

Some files were not shown because too many files have changed in this diff Show More