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

This commit is contained in:
Rangi 2020-10-28 13:35:26 -04:00
parent 9483cf47dd
commit b47bfbd813
33 changed files with 179 additions and 145 deletions

View File

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

View File

@ -60,8 +60,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 FadeBlackQuickly
add_special FadeInPalettes
@ -69,21 +69,21 @@ SpecialsPointers::
add_special ReloadSpritesNoPalettes, 2
add_special ClearBGPalettes
add_special UpdateTimePals
add_special ClearTilemap
add_special ClearTilemap ; unused as special
add_special UpdateSprites
add_special UpdatePlayerSprite
add_special GameCornerPrizeMonCheckDex
add_special UnusedSetSeenMon
add_special UnusedSetSeenMon ; unused
add_special WaitSFX, 3
add_special PlayMapMusic
add_special RestartMapMusic
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
@ -127,4 +127,4 @@ SpecialsPointers::
add_special InitialSetDSTFlag
add_special InitialClearDSTFlag
add_special MrChrono
add_special DummySpecial_c389
add_special UnusedDummySpecial ; unused

View File

@ -208,7 +208,7 @@ StartTrainerBattle_NextScene:
StartTrainerBattle_SetUpBGMap:
call StartTrainerBattle_NextScene
xor a
ld [wce64], a
ld [wBattleTransitionCounter], a
ldh [hBGMapMode], a
ret
@ -222,7 +222,7 @@ StartTrainerBattle_Flash:
ld a, [wTimeOfDayPalset]
cp DARKNESS_PALSET
jr z, .done
ld hl, wce64
ld hl, wBattleTransitionCounter
ld a, [hl]
inc [hl]
srl a
@ -240,7 +240,7 @@ StartTrainerBattle_Flash:
.done
xor a
ld [wce64], a
ld [wBattleTransitionCounter], a
scf
ret
@ -271,12 +271,12 @@ StartTrainerBattle_SetUpForWavyOutro:
ld a, $90
ldh [hLYOverrideEnd], a
xor a
ld [wce64], a
ld [wce65], a
ld [wBattleTransitionCounter], a
ld [wBattleTransitionSineWaveOffset], a
ret
StartTrainerBattle_SineWave:
ld a, [wce64]
ld a, [wBattleTransitionCounter]
cp $60
jr nc, .end
call .DoSineWave
@ -288,10 +288,10 @@ StartTrainerBattle_SineWave:
ret
.DoSineWave:
ld hl, wce65
ld hl, wBattleTransitionSineWaveOffset
ld a, [hl]
inc [hl]
ld hl, wce64
ld hl, wBattleTransitionCounter
ld d, [hl]
add [hl]
ld [hl], a
@ -319,13 +319,13 @@ StartTrainerBattle_SetUpForSpinOutro:
farcall RespawnPlayerAndOpponent
call StartTrainerBattle_NextScene
xor a
ld [wce64], a
ld [wBattleTransitionCounter], a
ret
StartTrainerBattle_SpinToBlack:
xor a
ldh [hBGMapMode], a
ld a, [wce64]
ld a, [wBattleTransitionCounter]
ld e, a
ld d, 0
ld hl, .spin_quadrants
@ -335,13 +335,13 @@ endr
ld a, [hli]
cp -1
jr z, .end
ld [wce65], a
ld [wBattleTransitionSpinQuadrant], a
call .load
ld a, 1
ldh [hBGMapMode], a
call DelayFrame
call DelayFrame
ld hl, wce64
ld hl, wBattleTransitionCounter
inc [hl]
ret
@ -411,7 +411,7 @@ ENDM
inc de
.loop1
ld [hl], BATTLETRANSITION_BLACK
ld a, [wce65]
ld a, [wBattleTransitionSpinQuadrant]
bit RIGHT_QUADRANT_F, a
jr z, .leftside
inc hl
@ -422,7 +422,7 @@ ENDM
dec c
jr nz, .loop1
pop hl
ld a, [wce65]
ld a, [wBattleTransitionSpinQuadrant]
bit LOWER_QUADRANT_F, a
ld bc, SCREEN_WIDTH
jr z, .upper
@ -437,7 +437,7 @@ ENDM
jr z, .loop
ld c, a
.loop2
ld a, [wce65]
ld a, [wBattleTransitionSpinQuadrant]
bit RIGHT_QUADRANT_F, a
jr z, .leftside2
dec hl
@ -459,13 +459,13 @@ StartTrainerBattle_SetUpForRandomScatterOutro:
farcall RespawnPlayerAndOpponent
call StartTrainerBattle_NextScene
ld a, $10
ld [wce64], a
ld [wBattleTransitionCounter], a
ld a, 1
ldh [hBGMapMode], a
ret
StartTrainerBattle_SpeckleToBlack:
ld hl, wce64
ld hl, wBattleTransitionCounter
ld a, [hl]
and a
jr z, .done

View File

@ -2817,10 +2817,11 @@ PlayerMonFaintedAnimation:
jp MonFaintedAnimation
MonFaintedAnimation:
ld a, [wd8ba]
ld a, [wJoypadDisable]
push af
set 6, a
ld [wd8ba], a
set JOYPAD_DISABLE_MON_FAINT_F, a
ld [wJoypadDisable], a
ld b, 7
.OuterLoop:
@ -2863,7 +2864,7 @@ MonFaintedAnimation:
jr nz, .OuterLoop
pop af
ld [wd8ba], a
ld [wJoypadDisable], a
ret
.Spaces:
@ -4403,7 +4404,7 @@ CheckDanger:
PrintPlayerHUD:
ld de, wBattleMonNick
hlcoord 10, 7
call ret_3df99
call Battle_DummyFunction
call PlaceString
push bc
@ -4489,7 +4490,7 @@ DrawEnemyHUD:
call GetBaseData
ld de, wEnemyMonNick
hlcoord 1, 0
call ret_3df99
call Battle_DummyFunction
call PlaceString
ld h, b
ld l, c
@ -4618,7 +4619,8 @@ UpdateHPPal:
ret z
jp FinishBattleAnim
ret_3df99:
Battle_DummyFunction:
; called before placing either battler's nickname in the HUD
ret
BattleMenu:

View File

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

View File

@ -421,7 +421,7 @@ FlyFunction_FrameTimer:
ret
.SpawnLeaf:
ld hl, wce65
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, [wce64]
; wTradeDialog aliases wFrameCounter, which TradeAnimation uses
ld a, [wTradeDialog]
push af
predef TradeAnimation
pop af
ld [wce64], 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 [wce64], a
ld [wTradeDialog], a
ret
DoNPCTrade:
@ -366,7 +367,7 @@ PrintTradeText:
rept 6
add hl, de
endr
ld a, [wce64]
ld a, [wTradeDialog]
ld e, a
add hl, de
add hl, de

View File

@ -9,7 +9,7 @@ RotateUnownFrontpic:
push bc
push hl
push bc
ld de, wceed
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, wcefd
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, wcefd
ld hl, wPrintedUnownTileDest
ld e, %10000000
ld d, 8
.loop_decompress
push hl
ld hl, wceed
ld hl, wPrintedUnownTileSource
call .CountSetBit
pop hl
ld a, b

View File

@ -15,7 +15,7 @@ Special::
INCLUDE "data/events/special_pointers.asm"
DummySpecial_c389:
UnusedDummySpecial:
ret
GameCornerPrizeMonCheckDex:
@ -205,7 +205,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 [wce64], a
ld [wDummyGameCardChoice], a
ld hl, wJumptableIndex
inc [hl]
.PickCard1:
ld a, [wce64]
ld a, [wDummyGameCardChoice]
and a
ret z
dec a
@ -155,13 +155,13 @@ endr
call DummyGame_Card2Coord
call DummyGame_PlaceCard
xor a
ld [wce64], a
ld [wDummyGameCardChoice], a
ld hl, wJumptableIndex
inc [hl]
ret
.PickCard2:
ld a, [wce64]
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 [wce64], a
ld [wDummyGameCardChoice], a
ret
.pressed_left

View File

@ -248,7 +248,7 @@ DebugPrintSlotBias: ; unreferenced
AnimateSlotReelIcons: ; unreferenced
; This animation was present in pokegold-spaceworld.
ld hl, wce66
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
dw _CGB_Pokedex_5x5
_CGB_BattleGrayscale:
@ -303,7 +303,7 @@ _CGB_BillsPC:
ldh [hCGBPalUpdate], a
ret
Function95a0: ; unreferenced
_CGB_Unknown: ; unreferenced
ld hl, BillsPCOrangePalette
call LoadHLPaletteIntoDE
jr .GotPalette
@ -568,7 +568,7 @@ _CGB_GSTitleScreen:
ldh [hCGBPalUpdate], a
ret
_CGB0d:
_CGB_Unused0D:
ld hl, PalPacket_Diploma + 1
call CopyFourPalettes
call WipeAttrmap
@ -831,7 +831,7 @@ _CGB_PlayerOrMonFrontpicPals:
call ApplyPals
ret
_CGB1e:
_CGB_Unused1E:
ld de, wBGPals1
ld a, [wCurPartySpecies]
call GetMonPalettePointer

View File

@ -144,6 +144,7 @@ SGB_ApplyPartyMenuHPPals:
Intro_LoadMagikarpPalettes:
call CheckCGB
ret z
; CGB only
ld hl, .BGPal
ld de, wBGPals1
@ -715,13 +716,13 @@ endr
ret
PushSGBPals:
ld a, [wd8ba]
ld a, [wJoypadDisable]
push af
set 7, a
ld [wd8ba], a
set JOYPAD_DISABLE_SGB_TRANSFER_F, a
ld [wJoypadDisable], a
call _PushSGBPals
pop af
ld [wd8ba], a
ld [wJoypadDisable], a
ret
_PushSGBPals:
@ -767,12 +768,14 @@ _PushSGBPals:
InitSGBBorder:
call CheckCGB
ret nz
; SGB/DMG only
di
ld a, [wd8ba]
ld a, [wJoypadDisable]
push af
set 7, a
ld [wd8ba], a
set JOYPAD_DISABLE_SGB_TRANSFER_F, a
ld [wJoypadDisable], a
xor a
ldh [rJOYP], a
ldh [hSGB], a
@ -792,13 +795,14 @@ InitSGBBorder:
.skip
pop af
ld [wd8ba], a
ld [wJoypadDisable], a
ei
ret
InitCGBPals::
call CheckCGB
ret z
; CGB only
ld a, BANK(vTiles3)
ldh [rVBK], a

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
dw .SGB_Pokedex_5x5
.SGB_BattleGrayscale:
@ -403,7 +403,7 @@ endr
ld de, BlkPacket_AllPal0
ret
.SGB0d:
.SGB_Unused0D:
.SGB_TrainerCard:
ld hl, PalPacket_Diploma
ld de, BlkPacket_AllPal0
@ -443,7 +443,7 @@ endr
ld de, wSGBPals + PALPACKET_LENGTH
ret
.SGB1e:
.SGB_Unused1E:
ld hl, PalPacket_Pal01
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@ -456,7 +456,7 @@ endr
add hl, hl
ld de, PokemonPalettes
add hl, de
ld a, [wce65]
ld a, [wUnusedSGB1eColorOffset]
and 3
sla a
sla a

View File

@ -1066,7 +1066,7 @@ AnimSeq_SlotsGolem:
AnimSeq_SlotsChansey:
callfar Slots_AnimateChansey
ld hl, wce64
ld hl, wSlotsDelay
ld a, [hl]
cp $2
ret nz
@ -1091,7 +1091,7 @@ AnimSeq_SlotsChanseyEgg:
jr c, .move_right
call DeinitializeSprite
ld a, $4
ld [wce64], a
ld [wSlotsDelay], a
ld de, SFX_PLACE_PUZZLE_PIECE_DOWN
call PlaySFX
ret

View File

@ -44,9 +44,9 @@ InitList:
ld a, h
ld [wListPointer + 1], a
ld a, e
ld [wUnusedCFFE], a
ld [wUnusedNamesPointer], a
ld a, d
ld [wUnusedCFFE + 1], a
ld [wUnusedNamesPointer + 1], a
ld bc, ItemAttributes
ld a, c
ld [wItemAttributesPtr], a

View File

@ -82,9 +82,9 @@ Gen2ToGen1LinkComms:
call Serial_ExchangeBytes
ld a, SERIAL_NO_DATA_BYTE
ld [de], a
ld hl, wLink_c508
ld hl, wc508
ld de, wTrademons
ld bc, wTrademons - wLink_c508
ld bc, wTrademons - wc508
call Serial_ExchangeBytes
xor a
ldh [rIF], a
@ -163,9 +163,9 @@ Gen2ToGen1LinkComms:
ld hl, wTimeCapsulePlayerData
call Link_ConvertPartyStruct1to2
ld a, LOW(wOTPartyMonOT)
ld [wUnusedCFFE], a
ld [wUnusedNamesPointer], a
ld a, HIGH(wOTPartyMonOT)
ld [wUnusedCFFE + 1], a
ld [wUnusedNamesPointer + 1], a
ld de, MUSIC_NONE
call PlayMusic
ldh a, [hSerialConnectionStatus]
@ -226,9 +226,9 @@ Gen2ToGen2LinkComms:
call Serial_ExchangeBytes
ld a, SERIAL_NO_DATA_BYTE
ld [de], a
ld hl, wLink_c508
ld hl, wc508
ld de, wTrademons
ld bc, wTrademons - wLink_c508
ld bc, wTrademons - wc508
call Serial_ExchangeBytes
ld a, [wLinkMode]
cp LINK_TRADECENTER
@ -377,9 +377,9 @@ Gen2ToGen2LinkComms:
ld bc, wOTPartyDataEnd - wOTPartyMons
call CopyBytes
ld a, LOW(wOTPartyMonOT)
ld [wUnusedCFFE], a
ld [wUnusedNamesPointer], a
ld a, HIGH(wOTPartyMonOT)
ld [wUnusedCFFE + 1], a
ld [wUnusedNamesPointer + 1], a
ld de, MUSIC_NONE
call PlayMusic
ldh a, [hSerialConnectionStatus]
@ -514,7 +514,7 @@ FixDataForLinkTransfer:
ld [hli], a
dec b
jr nz, .loop2
ld hl, wLink_c508
ld hl, wc508
ld a, SERIAL_PREAMBLE_BYTE
ld [hli], a
ld [hli], a

View File

@ -344,8 +344,8 @@ FinishContinueFunction:
.loop
xor a
ld [wDontPlayMapMusicOnReload], a
ld hl, wGameTimerPause
set GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
ld hl, wGameTimerPaused
set GAME_TIMER_PAUSED_F, [hl]
farcall OverworldLoop
ld a, [wSpawnAfterChampion]
cp SPAWN_RED

View File

@ -28,8 +28,8 @@ MainMenu:
call ClearTilemapEtc
ld b, SCGB_DIPLOMA
call GetSGBLayout
ld hl, wGameTimerPause
res GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
ld hl, wGameTimerPaused
res GAME_TIMER_PAUSED_F, [hl]
call MainMenu_GetWhichMenu
ld [wWhichIndexSet], a
call MainMenu_PrintCurrentTimeAndDay

View File

@ -212,7 +212,7 @@ DoTradeAnimation:
jr nz, .finished
call .DoTradeAnimCommand
callfar PlaySpriteAnimations
ld hl, wce65
ld hl, wFrameCounter2
inc [hl]
call DelayFrame
and a
@ -1269,7 +1269,7 @@ LinkTradeAnim_LoadTradeMonSpecies:
ret
TradeAnim_FlashBGPals:
ld a, [wce65]
ld a, [wFrameCounter2]
and $7
ret nz
ldh a, [rBGP]

View File

@ -800,7 +800,7 @@ PlayerMovement:
CheckMenuOW:
xor a
ldh [hMenuReturn], a
ldh [hUnusedFFA3], a
ldh [hUnusedByte], a
ldh a, [hJoyPressed]
bit SELECT_F, a

View File

@ -119,7 +119,7 @@ AddOutdoorSprites:
dec c
jr nz, .loop
ld a, [wUnusedD05A]
ld a, [wUnusedAddOutdoorSpritesReturnValue]
ld c, a
ret

View File

@ -432,11 +432,11 @@ Script_verbosegiveitem:
ld de, GiveItemScript
jp ScriptCall
ret_96e71:
GiveItemScript_DummyFunction:
ret
GiveItemScript:
callasm ret_96e71
callasm GiveItemScript_DummyFunction
writetext .ReceivedItemText
iffalse .Full
waitsfx
@ -2206,11 +2206,11 @@ Script_endall:
ret
Script_halloffame:
ld hl, wGameTimerPause
res GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
ld hl, wGameTimerPaused
res GAME_TIMER_PAUSED_F, [hl]
farcall HallOfFame
ld hl, wGameTimerPause
set GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
ld hl, wGameTimerPaused
set GAME_TIMER_PAUSED_F, [hl]
jr ReturnFromCredits
Script_credits:

View File

@ -91,7 +91,7 @@ InitPokedex:
ld [wJumptableIndex], a
ld [wPrevDexEntryJumptableIndex], a
ld [wPrevDexEntryBackup], a
ld [wce66], a
ld [wUnusedPokedexByte], a
call Pokedex_CheckUnlockedUnownMode

View File

@ -92,7 +92,7 @@ PokeGear:
ld [wJumptableIndex], a ; POKEGEARSTATE_CLOCKINIT
ld [wPokegearCard], a ; POKEGEARCARD_CLOCK
ld [wPokegearMapRegion], a ; JOHTO_REGION
ld [wce66], a
ld [wUnusedPokegearByte], a
ld [wPokegearPhoneScrollPosition], a
ld [wPokegearPhoneCursorPosition], a
ld [wPokegearPhoneSelectedPerson], a
@ -1989,7 +1989,7 @@ _FlyMap:
lb bc, BANK(FlyMapLabelBorderGFX), 6
call Request1bpp
call FlyMap
call ret_91bfd
call Pokegear_DummyFunction
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
@ -2194,7 +2194,7 @@ HasVisitedSpawn:
INCLUDE "data/maps/flypoints.asm"
ret_91bfd:
Pokegear_DummyFunction:
ret
FlyMap:

View File

@ -767,9 +767,9 @@ BillsPC_InitRAM:
call ByteFill
xor a
ld [wJumptableIndex], a
ld [wce64], a
ld [wce65], a
ld [wce66], a
ld [wUnusedBillsPCData], a
ld [wUnusedBillsPCData+1], a
ld [wUnusedBillsPCData+2], a
ld [wBillsPC_CursorPosition], a
ld [wBillsPC_ScrollPosition], a
ret

View File

@ -443,9 +443,11 @@ CheckCancelPrint:
ret
.pressed_b
ld a, [wc980]
ld a, [wUnusedGameboyPrinterSafeCancelFlag]
cp $0c
jr nz, .cancel
; wait for printer activity to finish before canceling?
.loop
ld a, [wPrinterOpcode]
and a

View File

@ -20,8 +20,8 @@ GameTimer::
ret nz
; Is the timer paused?
ld hl, wGameTimerPause
bit GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
ld hl, wGameTimerPaused
bit GAME_TIMER_PAUSED_F, [hl]
ret z
; Is the timer already capped?

View File

@ -5,8 +5,8 @@ Reset::
call ClearPalettes
ei
ld hl, wd8ba
set 7, [hl]
ld hl, wJoypadDisable
set JOYPAD_DISABLE_SGB_TRANSFER_F, [hl]
ld c, 32
call DelayFrames
@ -43,7 +43,7 @@ Init::
ldh [rOBP1], a
ldh [rTMA], a
ldh [rTAC], a
ld [wceeb], a
ld [wUnusedInitializedToZero], a
ld a, %100 ; Start timer at 4096Hz
ldh [rTAC], a

View File

@ -27,8 +27,8 @@ UpdateJoypad::
; hJoypadSum: pressed so far
; Any of these three bits can be used to disable input.
ld a, [wd8ba]
and %11010000
ld a, [wJoypadDisable]
and (1 << JOYPAD_DISABLE_MON_FAINT_F) | (1 << JOYPAD_DISABLE_SGB_TRANSFER_F) | (1 << 4)
ret nz
; If we're saving, input is disabled.

View File

@ -56,9 +56,9 @@ GetName::
.done
ld a, e
ld [wUnusedCFFE], a
ld [wUnusedNamesPointer], a
ld a, d
ld [wUnusedCFFE + 1], a
ld [wUnusedNamesPointer + 1], a
pop de
pop bc

View File

@ -27,7 +27,7 @@ hVBlank:: db
hMapEntryMethod:: db
hMenuReturn:: db
hUnusedFFA3:: db
hUnusedByte:: db
hJoypadReleased:: db
hJoypadPressed:: db

View File

@ -299,7 +299,7 @@ wHallOfFameTemp:: hall_of_fame wHallOfFameTemp
NEXTU
; link engine data
wLink_c508:: ds 10
wc508:: ds 10
wc512:: ds 10
NEXTU
@ -467,7 +467,7 @@ NEXTU
wGameboyPrinterRAM::
wGameboyPrinter2bppSource:: ds 40 tiles
wGameboyPrinter2bppSourceEnd::
wc980:: db
wUnusedGameboyPrinterSafeCancelFlag:: db
wPrinterRowIndex:: db
; Printer data
@ -1085,12 +1085,6 @@ wNamedObjectTypeBuffer:: db
wJumptableIndex:: db
UNION
; unidentified
wce64:: db
wce65:: db
wce66:: db
NEXTU
; intro data
wIntroSceneFrameCounter:: db
wIntroSceneTimer:: db
@ -1111,11 +1105,13 @@ NEXTU
wPrevDexEntryJumptableIndex:: db
wPrevDexEntryBackup::
wPokedexStatus:: db
wUnusedPokedexByte:: db
NEXTU
; pokegear
wPokegearCard:: db
wPokegearMapRegion:: db
wUnusedPokegearByte:: db
NEXTU
; pack
@ -1130,11 +1126,21 @@ wTrainerCardBadgeTileID:: db
wTrainerCardBadgeAttributes:: db
NEXTU
; card flip data
; slot machine
wSlotsDelay:: db
ds 1
wUnusedSlotReelIconDelay:: db
NEXTU
; card flip
wCardFlipCursorY:: db
wCardFlipCursorX:: db
wCardFlipWhichCard:: db
NEXTU
; dummy game
wDummyGameCardChoice:: db
NEXTU
; magnet train
wMagnetTrainOffset:: db
@ -1147,6 +1153,16 @@ wHoldingUnownPuzzlePiece:: db
wUnownPuzzleCursorPosition:: db
wUnownPuzzleHeldPiece:: db
NEXTU
; battle transitions
wBattleTransitionCounter:: db
wBattleTransitionSineWaveOffset::
wBattleTransitionSpinQuadrant:: db
NEXTU
; bill's pc
wUnusedBillsPCData:: ds 3
NEXTU
; debug mon color picker
wDebugColorRGBJumptableIndex:: db
@ -1165,9 +1181,12 @@ wFrameCounter::
wMomBankDigitCursorPosition::
wNamingScreenLetterCase::
wHallOfFameMonCounter::
wSlotsDelay::
wTradeDialog::
db
wFrameCounter2::
wPrinterQueueLength::
wUnusedSGB1eColorOffset::
db
wPrinterQueueLength:: db
ENDU
wRequested2bppSize:: db
@ -1317,7 +1336,7 @@ wOverworldDelay:: db
wTextDelayFrames:: db
wVBlankOccurred:: db
wceeb:: db
wUnusedInitializedToZero:: db
wDefaultSpawnpoint:: db
@ -1414,6 +1433,11 @@ wAddrOfBoxToPrint:: dw
wBankOfBoxToPrint:: db
wWhichBoxToPrint:: db
NEXTU
; Unown printing
wPrintedUnownTileSource:: ds 1 tiles
wPrintedUnownTileDest:: ds 1 tiles
NEXTU
; trainer HUD data
ds 1
@ -1469,11 +1493,7 @@ wceed:: db
wceee:: db
wceef:: db
ds 13
wcefd:: ds 1
ds 43
ds 57
UNION
; trainer data
@ -1706,7 +1726,7 @@ wMailboxItems:: ds MAILBOX_CAPACITY
ENDU
wListPointer:: dw
wUnusedCFFE:: dw
wUnusedNamesPointer:: dw
SECTION "WRAM 1", WRAMX
@ -1774,7 +1794,7 @@ wPrevMapNumber:: db
ds 17
wUnusedD05A:: db
wUnusedAddOutdoorSpritesReturnValue:: db
wBGMapAnchor:: dw
@ -1857,9 +1877,8 @@ wEvolutionPicOffset:: db
wEvolutionCanceled:: db
NEXTU
; link
ds 9
wd0dc:: ds 1
NEXTU
@ -2328,15 +2347,17 @@ wEventFlags:: flag_array NUM_EVENTS
wd8b7:: db
wGameTimerPause:: db
wGameTimerPaused::
; bit 7: game timer paused
db
ds 1
wd8ba::
wJoypadDisable::
; bits 4, 6, or 7 can be used to disable joypad input
; bit 4
; bit 6: mon fainted?
; bit 7: SGB flag?
; bit 6: ongoing mon faint animation
; bit 7: ongoing sgb data transfer
db
ds 1