All functions in main.asm have non-generic names

This commit is contained in:
pikalaxalt 2016-05-08 14:11:24 -04:00
parent bb58230ca7
commit e95d42e0af
34 changed files with 537 additions and 551 deletions

View File

@ -183,7 +183,7 @@ BattleTurn: ; 3c12f
call IsMobileBattle call IsMobileBattle
jr nz, .not_disconnected jr nz, .not_disconnected
callba Function100da5 callba Function100da5
callba Function100641 callba StartMobileInactivityTimer
callba Function100dd8 callba Function100dd8
jp c, .quit jp c, .quit
.not_disconnected .not_disconnected
@ -2503,8 +2503,8 @@ WinTrainerBattle: ; 3cfa4
call BattleWinSlideInEnemyTrainerFrontpic call BattleWinSlideInEnemyTrainerFrontpic
ld c, 40 ld c, 40
call DelayFrames call DelayFrames
ld c, $4 ld c, $4 ; win
callba Function4ea0a callba Mobile_PrintOpponentBattleMessage
ret ret
.battle_tower .battle_tower
@ -3176,8 +3176,8 @@ LostBattle: ; 3d38e
ld c, 40 ld c, 40
call DelayFrames call DelayFrames
ld c, $3 ld c, $3 ; lost
callba Function4ea0a callba Mobile_PrintOpponentBattleMessage
scf scf
ret ret
; 3d432 ; 3d432
@ -9621,8 +9621,8 @@ BattleStartMessage: ; 3fc8b
call IsMobileBattle2 call IsMobileBattle2
ret nz ret nz
ld c, $2 ld c, $2 ; start
callba Function4ea0a callba Mobile_PrintOpponentBattleMessage
ret ret
; 3fd26 ; 3fd26

View File

@ -518,39 +518,39 @@ const_value SET 1
; object struct ; object struct
const_def const_def
const OBJECT_SPRITE const OBJECT_SPRITE ; 00
const OBJECT_MAP_OBJECT_INDEX const OBJECT_MAP_OBJECT_INDEX ; 01
const OBJECT_SPRITE_TILE const OBJECT_SPRITE_TILE ; 02
const OBJECT_MOVEMENTTYPE const OBJECT_MOVEMENTTYPE ; 03
const OBJECT_FLAGS1 const OBJECT_FLAGS1 ; 04
const OBJECT_FLAGS2 const OBJECT_FLAGS2 ; 05
const OBJECT_PALETTE const OBJECT_PALETTE ; 06
const OBJECT_DIRECTION_WALKING const OBJECT_DIRECTION_WALKING ; 07
const OBJECT_FACING const OBJECT_FACING ; 08
const OBJECT_STEP_TYPE const OBJECT_STEP_TYPE ; 09
const OBJECT_STEP_DURATION const OBJECT_STEP_DURATION ; 0a
const OBJECT_ACTION const OBJECT_ACTION ; 0b
const OBJECT_STEP_FRAME const OBJECT_STEP_FRAME ; 0c
const OBJECT_FACING_STEP const OBJECT_FACING_STEP ; 0d
const OBJECT_NEXT_TILE const OBJECT_NEXT_TILE ; 0e
const OBJECT_STANDING_TILE const OBJECT_STANDING_TILE ; 0f
const OBJECT_NEXT_MAP_X const OBJECT_NEXT_MAP_X ; 10
const OBJECT_NEXT_MAP_Y const OBJECT_NEXT_MAP_Y ; 11
const OBJECT_MAP_X const OBJECT_MAP_X ; 12
const OBJECT_MAP_Y const OBJECT_MAP_Y ; 13
const OBJECT_INIT_X const OBJECT_INIT_X ; 14
const OBJECT_INIT_Y const OBJECT_INIT_Y ; 15
const OBJECT_RADIUS const OBJECT_RADIUS ; 16
const OBJECT_SPRITE_X const OBJECT_SPRITE_X ; 17
const OBJECT_SPRITE_Y const OBJECT_SPRITE_Y ; 18
const OBJECT_SPRITE_X_OFFSET const OBJECT_SPRITE_X_OFFSET ; 19
const OBJECT_SPRITE_Y_OFFSET const OBJECT_SPRITE_Y_OFFSET ; 1a
const OBJECT_MOVEMENT_BYTE_INDEX const OBJECT_MOVEMENT_BYTE_INDEX ; 1b
const OBJECT_28 const OBJECT_28 ; 1c
const OBJECT_29 const OBJECT_29 ; 1d
const OBJECT_30 const OBJECT_30 ; 1e
const OBJECT_31 const OBJECT_31 ; 1f
const OBJECT_RANGE const OBJECT_RANGE ; 20
; 33-39 are not used ; 33-39 are not used
; map object struct ; map object struct

View File

@ -25,20 +25,20 @@ endm
sprite_movement_data SPRITEMOVEFN_0E, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 12 sprite_movement_data SPRITEMOVEFN_0E, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 12
sprite_movement_data SPRITEMOVEFN_FOLLOW, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 13 sprite_movement_data SPRITEMOVEFN_FOLLOW, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 13
sprite_movement_data SPRITEMOVEFN_SCRIPTED, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 14 sprite_movement_data SPRITEMOVEFN_SCRIPTED, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 14
sprite_movement_data SPRITEMOVEFN_BIG_SNORLAX, DOWN, PERSON_ACTION_09, $2e, $01, %1100 ; 15 sprite_movement_data SPRITEMOVEFN_BIG_SNORLAX, DOWN, PERSON_ACTION_09, $2e, $01, %1100 ; 15
sprite_movement_data SPRITEMOVEFN_BOUNCE, DOWN, PERSON_ACTION_0A, $2e, $00, %0000 ; 16 sprite_movement_data SPRITEMOVEFN_BOUNCE, DOWN, PERSON_ACTION_0A, $2e, $00, %0000 ; 16
sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, PERSON_ACTION_STAND, $0c, $00, %0000 ; 17 sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, PERSON_ACTION_STAND, $0c, $00, %0000 ; 17
sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, PERSON_ACTION_STAND, $2e, $10, %0000 ; 18 sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, PERSON_ACTION_STAND, $2e, $10, %0000 ; 18
sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, PERSON_ACTION_STAND, $2e, $00, %0100 ; 19 sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, PERSON_ACTION_STAND, $2e, $00, %0100 ; 19
sprite_movement_data SPRITEMOVEFN_FOLLOWNOTEXACT, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 1a sprite_movement_data SPRITEMOVEFN_FOLLOWNOTEXACT, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 1a
sprite_movement_data SPRITEMOVEFN_SHADOW, DOWN, PERSON_ACTION_00, $8e, $01, %0000 ; 1b sprite_movement_data SPRITEMOVEFN_SHADOW, DOWN, PERSON_ACTION_00, $8e, $01, %0000 ; 1b
sprite_movement_data SPRITEMOVEFN_EMOTE, DOWN, PERSON_ACTION_EMOTE, $8e, $02, %0000 ; 1c sprite_movement_data SPRITEMOVEFN_EMOTE, DOWN, PERSON_ACTION_EMOTE, $8e, $02, %0000 ; 1c
sprite_movement_data SPRITEMOVEFN_SCREENSHAKE, DOWN, PERSON_ACTION_00, $82, $00, %0000 ; 1d sprite_movement_data SPRITEMOVEFN_SCREENSHAKE, DOWN, PERSON_ACTION_00, $82, $00, %0000 ; 1d
sprite_movement_data SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE, LEFT, PERSON_ACTION_STAND, $00, $00, %0000 ; 1e sprite_movement_data SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE, LEFT, PERSON_ACTION_STAND, $00, $00, %0000 ; 1e
sprite_movement_data SPRITEMOVEFN_SPIN_CLOCKWISE, RIGHT, PERSON_ACTION_STAND, $00, $00, %0000 ; 1f sprite_movement_data SPRITEMOVEFN_SPIN_CLOCKWISE, RIGHT, PERSON_ACTION_STAND, $00, $00, %0000 ; 1f
sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, PERSON_ACTION_0C, $2e, $01, %1100 ; 20 sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, PERSON_ACTION_0C, $2e, $01, %1100 ; 20
sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, PERSON_ACTION_0D, $2e, $01, %1100 ; 21 sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, PERSON_ACTION_0D, $2e, $01, %1100 ; 21
sprite_movement_data SPRITEMOVEFN_BOULDERDUST, DOWN, PERSON_ACTION_0E, $8e, $01, %0000 ; 22 sprite_movement_data SPRITEMOVEFN_BOULDERDUST, DOWN, PERSON_ACTION_0E, $8e, $01, %0000 ; 22
sprite_movement_data SPRITEMOVEFN_GRASS, DOWN, PERSON_ACTION_0F, $8e, $02, %0000 ; 23 sprite_movement_data SPRITEMOVEFN_GRASS, DOWN, PERSON_ACTION_0F, $8e, $02, %0000 ; 23
sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, PERSON_ACTION_STAND, $00, $00, %0010 ; 24 sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, PERSON_ACTION_STAND, $00, $00, %0010 ; 24
sprite_movement_data SPRITEMOVEFN_00, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 25 sprite_movement_data SPRITEMOVEFN_00, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 25

View File

@ -1159,10 +1159,10 @@ BillsPC_LoadMonStats: ; e2b6d (38:6b6d)
add [hl] add [hl]
ld e, a ld e, a
ld d, $0 ld d, $0
ld hl, wBillsPCPokemonList + 1 ld hl, wBillsPCPokemonList + 1 ; box number
rept 3 add hl, de
add hl, de
add hl, de add hl, de
endr
ld a, [hl] ld a, [hl]
and a and a
jr z, .party jr z, .party
@ -1274,9 +1274,9 @@ BillsPC_RefreshTextboxes: ; e2c2c (38:6c2c)
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, wBillsPCPokemonList ld hl, wBillsPCPokemonList
rept 3
add hl, de add hl, de
endr add hl, de
add hl, de
ld e, l ld e, l
ld d, h ld d, h
hlcoord 9, 4 hlcoord 9, 4
@ -1290,9 +1290,9 @@ endr
ld de, 2 * SCREEN_WIDTH ld de, 2 * SCREEN_WIDTH
add hl, de add hl, de
pop de pop de
rept 3
inc de inc de
endr inc de
inc de
pop af pop af
dec a dec a
jr nz, .loop jr nz, .loop
@ -1493,9 +1493,9 @@ BillsPC_GetSelectedPokemonSpecies: ; e2def (38:6def)
ld e, a ld e, a
ld d, $0 ld d, $0
ld hl, wBillsPCPokemonList ld hl, wBillsPCPokemonList
rept 3
add hl, de add hl, de
endr add hl, de
add hl, de
ld a, [hl] ld a, [hl]
ret ret
@ -2055,10 +2055,10 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
.PartyToBox: ; e3267 .PartyToBox: ; e3267
call .CopyFromParty call .CopyFromParty
ld a, $1 ld a, $1
ld [wc2cd], a ld [wGameLogicPaused], a
callba SaveGameData callba SaveGameData
xor a xor a
ld [wc2cd], a ld [wGameLogicPaused], a
call .CopyToBox call .CopyToBox
ret ret
; e327d ; e327d
@ -2211,9 +2211,9 @@ GetBoxPointer: ; e3396 (38:7396)
ld c, b ld c, b
ld b, 0 ld b, 0
ld hl, .boxes ld hl, .boxes
rept 3
add hl, bc add hl, bc
endr add hl, bc
add hl, bc
ld a, [hli] ld a, [hli]
ld b, a ld b, a
ld a, [hli] ld a, [hli]
@ -2429,9 +2429,9 @@ GetBoxCount: ; e366c (38:766c)
ld c, a ld c, a
ld b, 0 ld b, 0
ld hl, .boxbanks ld hl, .boxbanks
rept 3
add hl, bc add hl, bc
endr add hl, bc
add hl, bc
ld a, [hli] ld a, [hli]
ld b, a ld b, a
call GetSRAMBank call GetSRAMBank

View File

@ -495,7 +495,7 @@ LinkTimeout: ; 283b2
pop de pop de
pop hl pop hl
bccoord 1, 14 bccoord 1, 14
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
call RotateThreePalettesRight call RotateThreePalettesRight
call ClearScreen call ClearScreen
ld b, SCGB_08 ld b, SCGB_08
@ -1255,7 +1255,7 @@ LinkTradeOTPartymonMenuLoop: ; 28835
jr z, .not_a_button jr z, .not_a_button
ld a, $1 ld a, $1
ld [wd263], a ld [wd263], a
callab Function50db9 callab LoadAddrsForLinkMonStatsScreen
ld hl, OTPartyMon1Species ld hl, OTPartyMon1Species
callba LinkMonStatsScreen callba LinkMonStatsScreen
jp LinkTradePartiesMenuMasterLoop jp LinkTradePartiesMenuMasterLoop
@ -1448,7 +1448,7 @@ Function28926: ; 28926
ld [wMenuCursorY], a ld [wMenuCursorY], a
ld a, $4 ld a, $4
ld [wd263], a ld [wd263], a
callab Function50db9 callab LoadAddrsForLinkMonStatsScreen
callba LinkMonStatsScreen callba LinkMonStatsScreen
call Call_LoadTempTileMapToTileMap call Call_LoadTempTileMapToTileMap
hlcoord 6, 1 hlcoord 6, 1
@ -1490,7 +1490,7 @@ Function28926: ; 28926
callba Link_WaitBGMap callba Link_WaitBGMap
ld hl, .Text_CantTradeLastMon ld hl, .Text_CantTradeLastMon
bccoord 1, 14 bccoord 1, 14
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
jr .cancel_trade jr .cancel_trade
.abnormal .abnormal
@ -1512,7 +1512,7 @@ Function28926: ; 28926
callba Link_WaitBGMap callba Link_WaitBGMap
ld hl, .Text_Abnormal ld hl, .Text_Abnormal
bccoord 1, 14 bccoord 1, 14
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
.cancel_trade .cancel_trade
hlcoord 0, 12 hlcoord 0, 12
@ -1688,7 +1688,7 @@ LinkTrade: ; 28b87
call GetPokemonName call GetPokemonName
ld hl, UnknownText_0x28eb8 ld hl, UnknownText_0x28eb8
bccoord 1, 14 bccoord 1, 14
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
call LoadStandardMenuDataHeader call LoadStandardMenuDataHeader
hlcoord 10, 7 hlcoord 10, 7
ld b, 3 ld b, 3
@ -2030,7 +2030,7 @@ LoadTradeScreenBorder: ; 28ef8
; 28eff ; 28eff
Function28eff: ; 28eff Function28eff: ; 28eff
callba Function16d6a7 callba Function16d6a7 ; just a nested farcall; so wasteful
call SetPalettes call SetPalettes
ret ret
; 28f09 ; 28f09

View File

@ -137,7 +137,7 @@ Function437b: ; 437b
cp STEP_TYPE_SLEEP cp STEP_TYPE_SLEEP
ret z ret z
.ok3 .ok3
ld hl, Pointers4b45 ld hl, StepTypesJumptable
rst JumpTable rst JumpTable
ret ret
@ -1084,7 +1084,7 @@ SetRandomStepDuration: ; 4b2d
ret ret
; 4b45 ; 4b45
Pointers4b45: ; 4b45 StepTypesJumptable: ; 4b45
; These pointers use OBJECT_STEP_TYPE. See constants/sprite_constants.asm ; These pointers use OBJECT_STEP_TYPE. See constants/sprite_constants.asm
dw ObjectMovementReset ; 00 dw ObjectMovementReset ; 00
dw MapObjectMovementPattern ; unused dw MapObjectMovementPattern ; unused

View File

@ -319,7 +319,7 @@ Function241d5: ; 241d5
ret c ret c
ld c, 1 ld c, 1
ld b, 3 ld b, 3
call Function10062d ; BUG: This function is in another bank. call AdvanceMobileInactivityTimerAndCheckExpired ; BUG: This function is in another bank.
; Pointer in current bank (9) is bogus. ; Pointer in current bank (9) is bogus.
ret c ret c
callba Function100337 callba Function100337

View File

@ -823,7 +823,7 @@ Pokedex_UpdateUnownMode: ; 405df (10:45df)
call DelayFrame call DelayFrame
call Pokedex_CheckSGB call Pokedex_CheckSGB
jr nz, .decompress jr nz, .decompress
callba Function1ddf26 callba LoadSGBPokedexGFX2
jr .done jr .done
.decompress .decompress

View File

@ -516,7 +516,7 @@ Pokegear_UpdateClock: ; 90f86 (24:4f86)
callba PrintHoursMins callba PrintHoursMins
ld hl, .DayText ld hl, .DayText
bccoord 6, 6 bccoord 6, 6
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
; 90fa8 (24:4fa8) ; 90fa8 (24:4fa8)
@ -711,7 +711,7 @@ PokegearMap_UpdateLandmarkName: ; 910b4
push de push de
callba GetLandmarkName callba GetLandmarkName
pop de pop de
callba Function1de2c5 callba TownMap_ConvertLineBreakCharacters
hlcoord 8, 0 hlcoord 8, 0
ld [hl], $34 ld [hl], $34
ret ret

View File

@ -139,7 +139,7 @@ PrintRadioLine:
cp 2 cp 2
jr nz, .print jr nz, .print
bccoord 1, 16 bccoord 1, 16
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
jr .skip jr .skip
.print .print
call PrintTextBoxText call PrintTextBoxText

View File

@ -9,9 +9,9 @@ SaveMenu: ; 14a1a
jr nz, .refused jr nz, .refused
call AskOverwriteSaveFile call AskOverwriteSaveFile
jr c, .refused jr c, .refused
call SetWRAMStateForSave call PauseGameLogic
call _SavingDontTurnOffThePower call _SavingDontTurnOffThePower
call ClearWRAMStateAfterSave call ResumeGameLogic
call ExitMenu call ExitMenu
and a and a
ret ret
@ -24,7 +24,7 @@ SaveMenu: ; 14a1a
ret ret
Function14a58: ; 14a58 Function14a58: ; 14a58
call SetWRAMStateForSave call PauseGameLogic
callba StageRTCTimeForSave callba StageRTCTimeForSave
callba BackupMysteryGift callba BackupMysteryGift
call SavePokemonData call SavePokemonData
@ -33,7 +33,7 @@ Function14a58: ; 14a58
call SaveBackupChecksum call SaveBackupChecksum
callba BackupPartyMonMail callba BackupPartyMonMail
callba SaveRTC callba SaveRTC
call ClearWRAMStateAfterSave call ResumeGameLogic
ret ret
; 14a83 ; 14a83
@ -47,7 +47,7 @@ ChangeBoxSaveGame: ; 14a83 (5:4a83)
jr c, .refused jr c, .refused
call AskOverwriteSaveFile call AskOverwriteSaveFile
jr c, .refused jr c, .refused
call SetWRAMStateForSave call PauseGameLogic
call SavingDontTurnOffThePower call SavingDontTurnOffThePower
call SaveBox call SaveBox
pop de pop de
@ -55,7 +55,7 @@ ChangeBoxSaveGame: ; 14a83 (5:4a83)
ld [wCurBox], a ld [wCurBox], a
call LoadBox call LoadBox
call SavedTheGame call SavedTheGame
call ClearWRAMStateAfterSave call ResumeGameLogic
and a and a
ret ret
.refused .refused
@ -65,9 +65,9 @@ ChangeBoxSaveGame: ; 14a83 (5:4a83)
Link_SaveGame: ; 14ab2 Link_SaveGame: ; 14ab2
call AskOverwriteSaveFile call AskOverwriteSaveFile
jr c, .refused jr c, .refused
call SetWRAMStateForSave call PauseGameLogic
call _SavingDontTurnOffThePower call _SavingDontTurnOffThePower
call ClearWRAMStateAfterSave call ResumeGameLogic
and a and a
.refused .refused
@ -75,19 +75,19 @@ Link_SaveGame: ; 14ab2
; 14ac2 ; 14ac2
MovePkmnWOMail_SaveGame: ; 14ac2 MovePkmnWOMail_SaveGame: ; 14ac2
call SetWRAMStateForSave call PauseGameLogic
push de push de
call SaveBox call SaveBox
pop de pop de
ld a, e ld a, e
ld [wCurBox], a ld [wCurBox], a
call LoadBox call LoadBox
call ClearWRAMStateAfterSave call ResumeGameLogic
ret ret
; 14ad5 ; 14ad5
Function14ad5: ; 14ad5 Function14ad5: ; 14ad5
call SetWRAMStateForSave call PauseGameLogic
push de push de
call SaveBox call SaveBox
pop de pop de
@ -111,7 +111,7 @@ Function14ad5: ; 14ad5
callba BackupMobileEventIndex callba BackupMobileEventIndex
callba SaveRTC callba SaveRTC
call LoadBox call LoadBox
call ClearWRAMStateAfterSave call ResumeGameLogic
ld de, SFX_SAVE ld de, SFX_SAVE
call PlaySFX call PlaySFX
ld c, 24 ld c, 24
@ -127,9 +127,9 @@ StartMovePkmnWOMail_SaveGame: ; 14b34
jr c, .refused jr c, .refused
call AskOverwriteSaveFile call AskOverwriteSaveFile
jr c, .refused jr c, .refused
call SetWRAMStateForSave call PauseGameLogic
call _SavingDontTurnOffThePower call _SavingDontTurnOffThePower
call ClearWRAMStateAfterSave call ResumeGameLogic
and a and a
ret ret
@ -138,15 +138,15 @@ StartMovePkmnWOMail_SaveGame: ; 14b34
ret ret
; 14b54 ; 14b54
SetWRAMStateForSave: ; 14b54 PauseGameLogic: ; 14b54
ld a, $1 ld a, $1
ld [wc2cd], a ld [wGameLogicPaused], a
ret ret
; 14b5a ; 14b5a
ClearWRAMStateAfterSave: ; 14b5a ResumeGameLogic: ; 14b5a
xor a xor a
ld [wc2cd], a ld [wGameLogicPaused], a
ret ret
; 14b5f ; 14b5f

View File

@ -1762,7 +1762,7 @@ SetUpMoveScreenBG: ; 13172
call ClearSprites call ClearSprites
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
callba Functionfb571 callba LoadStatsScreenPageTilesGFX
callba ClearSpriteAnims2 callba ClearSpriteAnims2
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld e, a ld e, a

View File

@ -6,14 +6,14 @@ BattleStatsScreenInit: ; 4dc7b (13:5c7b)
ld a, [wBattleMode] ; wd22d (aliases: EnemyMonEnd) ld a, [wBattleMode] ; wd22d (aliases: EnemyMonEnd)
and a and a
jr z, StatsScreenInit jr z, StatsScreenInit
jr _BattleStatsScreenInit jr _MobileStatsScreenInit
StatsScreenInit: ; 4dc8a StatsScreenInit: ; 4dc8a
ld hl, StatsScreenMain ld hl, StatsScreenMain
jr StatsScreenInit_gotaddress jr StatsScreenInit_gotaddress
_BattleStatsScreenInit: ; 4dc8f _MobileStatsScreenInit: ; 4dc8f
ld hl, StatsScreenBattle ld hl, StatsScreenMobile
jr StatsScreenInit_gotaddress jr StatsScreenInit_gotaddress
StatsScreenInit_gotaddress: ; 4dc94 StatsScreenInit_gotaddress: ; 4dc94
@ -33,7 +33,7 @@ StatsScreenInit_gotaddress: ; 4dc94
call ClearBGPalettes call ClearBGPalettes
call ClearTileMap call ClearTileMap
call UpdateSprites call UpdateSprites
callba Functionfb53e callba StatsScreen_LoadFont
pop hl pop hl
call _hl_ call _hl_
call ClearBGPalettes call ClearBGPalettes
@ -73,7 +73,7 @@ StatsScreenMain: ; 0x4dcd2
ret ret
; 0x4dcf7 ; 0x4dcf7
StatsScreenBattle: ; 4dcf7 StatsScreenMobile: ; 4dcf7
xor a xor a
ld [wJumptableIndex], a ld [wJumptableIndex], a
; stupid interns ; stupid interns
@ -89,7 +89,7 @@ StatsScreenBattle: ; 4dcf7
ld hl, StatsScreenPointerTable ld hl, StatsScreenPointerTable
rst JumpTable rst JumpTable
call StatsScreen_WaitAnim call StatsScreen_WaitAnim
callba Function100dfd callba MobileComms_CheckInactivityTimer
jr c, .exit jr c, .exit
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
bit 7, a bit 7, a
@ -100,7 +100,6 @@ StatsScreenBattle: ; 4dcf7
; 4dd2a ; 4dd2a
StatsScreenPointerTable: ; 4dd2a StatsScreenPointerTable: ; 4dd2a
dw MonStatsInit ; regular pokémon dw MonStatsInit ; regular pokémon
dw EggStatsInit ; egg dw EggStatsInit ; egg
dw StatsScreenWaitCry dw StatsScreenWaitCry

View File

@ -577,7 +577,7 @@ Special_InitialSetDSTFlag: ; 90a54
lb bc, 3, 18 lb bc, 3, 18
call ClearBox call ClearBox
ld hl, .Text ld hl, .Text
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
; 90a6c ; 90a6c
@ -608,7 +608,7 @@ Special_InitialClearDSTFlag: ; 90a88
lb bc, 3, 18 lb bc, 3, 18
call ClearBox call ClearBox
ld hl, .Text ld hl, .Text
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
; 90aa0 ; 90aa0
@ -636,7 +636,7 @@ DebugDisplayTime: ; 90abc
lb bc, 3, SCREEN_WIDTH - 2 lb bc, 3, SCREEN_WIDTH - 2
call ClearBox call ClearBox
ld hl, .Text ld hl, .Text
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
; 90acc ; 90acc

View File

@ -3,7 +3,7 @@ HallOfFame:: ; 0x8640e
ld a, [StatusFlags] ld a, [StatusFlags]
push af push af
ld a, 1 ld a, 1
ld [wc2cd], a ld [wGameLogicPaused], a
call DisableSpriteUpdates call DisableSpriteUpdates
ld a, SPAWN_LANCE ld a, SPAWN_LANCE
ld [wSpawnAfterChampion], a ld [wSpawnAfterChampion], a
@ -25,7 +25,7 @@ HallOfFame:: ; 0x8640e
callba AddHallOfFameEntry callba AddHallOfFameEntry
xor a xor a
ld [wc2cd], a ld [wGameLogicPaused], a
call AnimateHallOfFame call AnimateHallOfFame
pop af pop af
ld b, a ld b, a
@ -44,7 +44,7 @@ RedCredits:: ; 86455
xor a xor a
ld [VramState], a ld [VramState], a
ld [hMapAnims], a ld [hMapAnims], a
callba Function4e8c2 callba InitDisplayForRedCredits
ld c, 8 ld c, 8
call DelayFrames call DelayFrames
call DisableSpriteUpdates call DisableSpriteUpdates
@ -67,7 +67,7 @@ HallOfFame_FadeOutMusic: ; 8648e
xor a xor a
ld [VramState], a ld [VramState], a
ld [hMapAnims], a ld [hMapAnims], a
callba Function4e881 callba InitDisplayForHallOfFame
ld c, 100 ld c, 100
jp DelayFrames jp DelayFrames
; 864b4 ; 864b4
@ -230,7 +230,7 @@ GetHallOfFameParty: ; 8653f
AnimateHOFMonEntrance: ; 865b5 AnimateHOFMonEntrance: ; 865b5
push hl push hl
call ClearBGPalettes call ClearBGPalettes
callba Function4e906 callba ResetDisplayBetweenHallOfFameMons
pop hl pop hl
ld a, [hli] ld a, [hli]
ld [TempMonSpecies], a ld [TempMonSpecies], a

View File

@ -321,13 +321,13 @@ DSTChecks: ; 16439
call .ClearBox call .ClearBox
bccoord 1, 14 bccoord 1, 14
ld hl, .Text_AdjustClock ld hl, .Text_AdjustClock
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
call YesNoBox call YesNoBox
ret c ret c
call .ClearBox call .ClearBox
bccoord 1, 14 bccoord 1, 14
ld hl, .Text_LostInstructionBooklet ld hl, .Text_LostInstructionBooklet
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
.loop .loop
@ -337,7 +337,7 @@ DSTChecks: ; 16439
bit 7, a bit 7, a
jr z, .SetDST jr z, .SetDST
ld hl, .Text_IsDSTOver ld hl, .Text_IsDSTOver
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
call YesNoBox call YesNoBox
ret c ret c
ld a, [wDST] ld a, [wDST]
@ -347,12 +347,12 @@ DSTChecks: ; 16439
call .ClearBox call .ClearBox
bccoord 1, 14 bccoord 1, 14
ld hl, .Text_SetClockBack ld hl, .Text_SetClockBack
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
.SetDST: .SetDST:
ld hl, .Text_SwitchToDST ld hl, .Text_SwitchToDST
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
call YesNoBox call YesNoBox
ret c ret c
ld a, [wDST] ld a, [wDST]
@ -362,7 +362,7 @@ DSTChecks: ; 16439
call .ClearBox call .ClearBox
bccoord 1, 14 bccoord 1, 14
ld hl, .Text_SetClockForward ld hl, .Text_SetClockForward
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
; 164b9 ; 164b9

View File

@ -132,7 +132,7 @@ UnownPrinter: ; 16be4
.UpdateUnownFrontpic: ; 16cc8 .UpdateUnownFrontpic: ; 16cc8
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
cp 26 cp 26
jr z, Function16d20 jr z, .vacant
inc a inc a
ld [UnownLetter], a ld [UnownLetter], a
ld a, UNOWN ld a, UNOWN
@ -141,18 +141,17 @@ UnownPrinter: ; 16be4
ld [wBoxAlignment], a ld [wBoxAlignment], a
ld de, VTiles2 ld de, VTiles2
predef GetFrontpic predef GetFrontpic
call Function16cff call .Load2bppToSRAM
hlcoord 1, 6 hlcoord 1, 6
xor a xor a
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef PlaceGraphic
ld de, VTiles2 tile $31 ld de, VTiles2 tile $31
callba Functione0000 callba RotateUnownFrontpic
ret ret
; 16cff
Function16cff: ; 16cff .Load2bppToSRAM: ; 16cff
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $6 ld a, $6
@ -171,9 +170,8 @@ Function16cff: ; 16cff
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ret ret
; 16d20
Function16d20: ; 16d20 .vacant
hlcoord 1, 6 hlcoord 1, 6
lb bc, 7, 7 lb bc, 7, 7
call ClearBox call ClearBox

View File

@ -21,14 +21,16 @@ INCBIN "gfx/frames/9.1bpp"
; TODO: Various misc graphics here. ; TODO: Various misc graphics here.
GFX_f89b0: ; f89b0 StatsScreenPageTilesGFX: ; f89b0
INCBIN "gfx/unknown/0f89b0.2bpp" INCBIN "gfx/unknown/0f89b0.2bpp"
; f8a90 ; f8a90
ShinyIcon: ; f8a90 ShinyIcon: ; f8a90
; also part of StatsScreenPageTilesGFX
INCBIN "gfx/stats/shiny.2bpp" INCBIN "gfx/stats/shiny.2bpp"
GFX_f8aa0: ; f8aa0 StatsScreenPageTilesGFX_Part2: ; f8aa0
; not referenced on its own, but part of StatsScreenPageTilesGFX
INCBIN "gfx/unknown/0f8aa0.2bpp" INCBIN "gfx/unknown/0f8aa0.2bpp"
; f8ac0 ; f8ac0
@ -48,7 +50,7 @@ TownMapGFX: ; f8ba0
INCBIN "gfx/misc/town_map.2bpp.lz" INCBIN "gfx/misc/town_map.2bpp.lz"
; f8ea4 ; f8ea4
GFX_f8ea4: ; unused GFX_f8ea4: ; unused kanji
INCBIN "gfx/unknown/0f8ea4.2bpp" INCBIN "gfx/unknown/0f8ea4.2bpp"
; f8f24 ; f8f24
@ -56,8 +58,8 @@ OverworldPhoneIconGFX: ; f8f24
INCBIN "gfx/mobile/overworld_phone_icon.2bpp" INCBIN "gfx/mobile/overworld_phone_icon.2bpp"
; f8f34 ; f8f34
GFX_f8f34: ; unused GFX_f8f34: ; unused bold letters + unown chars
INCBIN "gfx/unknown/0f8f34.2bpp" INCBIN "gfx/unknown/0f8f34.w64.1bpp"
; f9204 ; f9204
TextBoxSpaceGFX: ; f9204 TextBoxSpaceGFX: ; f9204
@ -72,7 +74,7 @@ MapEntryFrameGFX: ; f9344
INCBIN "gfx/frames/map_entry_sign.2bpp" INCBIN "gfx/frames/map_entry_sign.2bpp"
; f9424 ; f9424
GFX_f9424: ; f9424 FontsExtra2_UpArrowGFX: ; f9424
INCBIN "gfx/unknown/0f9424.2bpp" INCBIN "gfx/unknown/0f9424.2bpp"
; f9434 ; f9434
@ -81,6 +83,7 @@ INCBIN "gfx/misc/footprints.1bpp"
; fb434 ; fb434
; This and the following two functions are unreferenced. ; This and the following two functions are unreferenced.
; Debug, perhaps?
Unknown_fb434: Unknown_fb434:
db 0 db 0
@ -143,9 +146,9 @@ _LoadFontsExtra1:: ; fb48a
; fb4b0 ; fb4b0
_LoadFontsExtra2:: ; fb4b0 _LoadFontsExtra2:: ; fb4b0
ld de, GFX_f9424 ld de, FontsExtra2_UpArrowGFX
ld hl, VTiles2 tile $61 ld hl, VTiles2 tile $61
ld b, BANK(GFX_f9424) ld b, BANK(FontsExtra2_UpArrowGFX)
ld c, 1 ld c, 1
call Get2bpp_2 call Get2bpp_2
ret ret
@ -208,7 +211,7 @@ LoadHPBar: ; fb50d
ret ret
; fb53e ; fb53e
Functionfb53e: ; fb53e StatsScreen_LoadFont: ; fb53e
call _LoadFontsBattleExtra call _LoadFontsBattleExtra
ld de, EnemyHPBarBorderGFX ld de, EnemyHPBarBorderGFX
ld hl, VTiles2 tile $6c ld hl, VTiles2 tile $6c
@ -226,11 +229,10 @@ Functionfb53e: ; fb53e
ld hl, VTiles2 tile $55 ld hl, VTiles2 tile $55
lb bc, BANK(ExpBarGFX), 8 lb bc, BANK(ExpBarGFX), 8
call Get2bpp_2 call Get2bpp_2
LoadStatsScreenPageTilesGFX: ; fb571
Functionfb571: ; fb571 ld de, StatsScreenPageTilesGFX
ld de, GFX_f89b0
ld hl, VTiles2 tile $31 ld hl, VTiles2 tile $31
lb bc, BANK(GFX_f89b0), $11 lb bc, BANK(StatsScreenPageTilesGFX), $11
call Get2bpp_2 call Get2bpp_2
ret ret
; fb57e ; fb57e

View File

@ -33,7 +33,7 @@ UpdateGameTimer:: ; 20ad
; Don't update if game logic is paused. ; Don't update if game logic is paused.
ld a, [wc2cd] ld a, [wGameLogicPaused]
and a and a
ret nz ret nz

View File

@ -33,7 +33,7 @@ Joypad:: ; 935
ret nz ret nz
; If we're saving, input is disabled. ; If we're saving, input is disabled.
ld a, [wc2cd] ld a, [wGameLogicPaused]
and a and a
ret nz ret nz

View File

@ -8,8 +8,6 @@ InitName:: ; 2ef9
; Intended for names, so this function is limited to ten characters. ; Intended for names, so this function is limited to ten characters.
push hl push hl
ld c, 10 ld c, 10
; 2efc
_InitString:: ; 2efc _InitString:: ; 2efc
; if the string pointed to by hl is empty (defined as "zero or more spaces ; if the string pointed to by hl is empty (defined as "zero or more spaces
; followed by a null"), then initialize it to the string pointed to by de. ; followed by a null"), then initialize it to the string pointed to by de.
@ -31,6 +29,7 @@ _InitString:: ; 2efc
inc c inc c
call CopyBytes call CopyBytes
ret ret
.notblank .notblank
pop bc pop bc
pop hl pop hl

View File

@ -182,7 +182,7 @@ BuenaPrintText:: ; 105a
PrintTextBoxText:: ; 1065 PrintTextBoxText:: ; 1065
bccoord TEXTBOX_INNERX, TEXTBOX_INNERY bccoord TEXTBOX_INNERX, TEXTBOX_INNERY
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
; 106c ; 106c
@ -708,7 +708,7 @@ PokeFluteTerminatorCharacter:: ; 13e0
; 13e5 ; 13e5
PlaceWholeStringInBoxAtOnce:: ; 13e5 PlaceHLTextAtBC:: ; 13e5
ld a, [TextBoxFlags] ld a, [TextBoxFlags]
push af push af
set 1, a set 1, a

View File

@ -3287,7 +3287,7 @@ CatchTutorial:: ; 4e554
INCLUDE "engine/evolution_animation.asm" INCLUDE "engine/evolution_animation.asm"
Function4e881: ; 4e881 InitDisplayForHallOfFame: ; 4e881
call ClearBGPalettes call ClearBGPalettes
call ClearTileMap call ClearTileMap
call ClearSprites call ClearSprites
@ -3317,7 +3317,7 @@ Function4e881: ; 4e881
text_jump UnknownText_0x1bd39e text_jump UnknownText_0x1bd39e
db "@" db "@"
Function4e8c2: ; 4e8c2 InitDisplayForRedCredits: ; 4e8c2
call ClearBGPalettes call ClearBGPalettes
call ClearTileMap call ClearTileMap
call ClearSprites call ClearSprites
@ -3333,7 +3333,7 @@ Function4e8c2: ; 4e8c2
xor a xor a
call ByteFill call ByteFill
ld hl, wd000 ; UnknBGPals ld hl, wd000 ; UnknBGPals
ld c, 4 * $10 ld c, 4 tiles
.load_white_palettes .load_white_palettes
ld a, (palred 31 + palgreen 31 + palblue 31) % $100 ld a, (palred 31 + palgreen 31 + palblue 31) % $100
ld [hli], a ld [hli], a
@ -3349,7 +3349,7 @@ Function4e8c2: ; 4e8c2
call SetPalettes call SetPalettes
ret ret
Function4e906: ; 4e906 ResetDisplayBetweenHallOfFameMons: ; 4e906
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $6 ld a, $6
@ -3360,8 +3360,8 @@ Function4e906: ; 4e906
call ByteFill call ByteFill
hlbgcoord 0, 0 hlbgcoord 0, 0
ld de, wDecompressScratch ld de, wDecompressScratch
ld b, $0 ld b, 0
ld c, $40 ld c, 4 tiles
call Request2bpp call Request2bpp
pop af pop af
ld [rSVBK], a ld [rSVBK], a
@ -3455,7 +3455,7 @@ FemaleTrainersEnd:
INCLUDE "battle/sliding_intro.asm" INCLUDE "battle/sliding_intro.asm"
Function4ea0a: ; 4ea0a Mobile_PrintOpponentBattleMessage: ; 4ea0a
ld a, c ld a, c
push af push af
call SpeechTextBox call SpeechTextBox
@ -3463,11 +3463,11 @@ Function4ea0a: ; 4ea0a
pop af pop af
dec a dec a
ld bc, $c ld bc, $c
ld hl, w5_dc1a ld hl, w5_MobileOpponentBattleMessages
call AddNTimes call AddNTimes
ld de, wcd53 ld de, wMobileOpponentBattleMessage
ld bc, $c ld bc, $c
ld a, $5 ; BANK(w5_dc1a) ld a, $5 ; BANK(w5_MobileOpponentBattleMessages)
call FarCopyWRAM call FarCopyWRAM
ld a, [rSVBK] ld a, [rSVBK]
@ -3475,9 +3475,9 @@ Function4ea0a: ; 4ea0a
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
ld bc, wcd53 ld bc, wMobileOpponentBattleMessage
decoord 1, 14 decoord 1, 14
callba Function11c0c6 callba PrintFixedWordBattleMessage
pop af pop af
ld [rSVBK], a ld [rSVBK], a
@ -3679,7 +3679,8 @@ GetPkmnSpecies: ; 508d5
INCLUDE "text/types.asm" INCLUDE "text/types.asm"
Function50a28: ; 50a28 Function50a28: ; 50a28
ld hl, Strings50a42 ; XXX
ld hl, .Strings
ld a, [TrainerClass] ld a, [TrainerClass]
dec a dec a
ld c, a ld c, a
@ -3698,7 +3699,7 @@ Function50a28: ; 50a28
jr nz, .copy jr nz, .copy
ret ret
Strings50a42: ; 50a42 .Strings: ; 50a42
; Untranslated trainer class names from Red. ; Untranslated trainer class names from Red.
dw .Youngster dw .Youngster
dw .BugCatcher dw .BugCatcher
@ -4096,14 +4097,15 @@ endr
ret ret
Function50cd0: ; 50cd0 Function50cd0: ; 50cd0
.asm_50cd0 ; XXX
.loop
ld [hl], $32 ld [hl], $32
inc hl inc hl
ld [hl], $3e ld [hl], $3e
dec hl dec hl
add hl, de add hl, de
dec c dec c
jr nz, .asm_50cd0 jr nz, .loop
ret ret
Function50cdb: ; unreferenced predef Function50cdb: ; unreferenced predef
@ -4118,7 +4120,7 @@ Function50cdb: ; unreferenced predef
pop hl pop hl
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp EGG cp EGG
jr z, .asm_50d09 jr z, .egg
push hl push hl
ld bc, -12 ld bc, -12
add hl, bc add hl, bc
@ -4131,7 +4133,7 @@ Function50cdb: ; unreferenced predef
call PrintLevel call PrintLevel
pop de pop de
.asm_50d09 .egg
ret ret
PlaceStatusString: ; 50d0a PlaceStatusString: ; 50d0a
@ -4255,7 +4257,7 @@ ListMoves: ; 50d6f
.done .done
ret ret
Function50db9: ; 50db9 LoadAddrsForLinkMonStatsScreen: ; 50db9
ld a, [wd263] ld a, [wd263]
cp $1 cp $1
@ -4264,38 +4266,37 @@ Function50db9: ; 50db9
ld de, OTPartyMonOT ld de, OTPartyMonOT
ld a, ENEMY_OT_NAME ld a, ENEMY_OT_NAME
jr .done jr .done
.check_party_ot_name
.check_party_ot_name
cp $4 cp $4
jr nz, .check_mon_name jr nz, .check_mon_name
ld hl, PartyCount ld hl, PartyCount
ld de, PartyMonOT ld de, PartyMonOT
ld a, PARTY_OT_NAME ld a, PARTY_OT_NAME
jr .done jr .done
.check_mon_name
.check_mon_name
cp $5 cp $5
jr nz, .check_item_name jr nz, .check_item_name
ld hl, CurMart ld hl, CurMart
ld de, PokemonNames ld de, PokemonNames
ld a, PKMN_NAME ld a, PKMN_NAME
jr .done jr .done
.check_item_name
.check_item_name
cp $2 cp $2
jr nz, .check_ob_item_name jr nz, .check_ob_item_name
ld hl, NumItems ld hl, NumItems
ld de, ItemNames ld de, ItemNames
ld a, ITEM_NAME ld a, ITEM_NAME
jr .done jr .done
.check_ob_item_name
.check_ob_item_name
ld hl, CurMart ld hl, CurMart
ld de, ItemNames ld de, ItemNames
ld a, ITEM_NAME ld a, ITEM_NAME
.done .done
ld [wNamedObjectTypeBuffer], a ld [wNamedObjectTypeBuffer], a ; d265
ld a, l ld a, l
ld [wd100], a ld [wd100], a
ld a, h ld a, h
@ -4304,7 +4305,7 @@ Function50db9: ; 50db9
ld [wd102], a ld [wd102], a
ld a, d ld a, d
ld [wd103], a ld [wd103], a
ld bc, ItemAttributes ld bc, ItemAttributes ; ParseEnemyAction, HandleMapTimeAndJoypad, Music_LakeOfRage_Ch3, String_11a7c1 $67c1
ld a, c ld a, c
ld [wd104], a ld [wd104], a
ld a, b ld a, b
@ -4694,6 +4695,7 @@ SECTION "bank22", ROMX, BANK[$22]
INCLUDE "event/kurt.asm" INCLUDE "event/kurt.asm"
Function88248: ; 88248 Function88248: ; 88248
; XXX
ld c, CAL ld c, CAL
ld a, [PlayerGender] ld a, [PlayerGender]
bit 0, a bit 0, a
@ -4975,7 +4977,8 @@ Predef36:
INCLUDE "engine/timeofdaypals.asm" INCLUDE "engine/timeofdaypals.asm"
INCLUDE "engine/battle_start.asm" INCLUDE "engine/battle_start.asm"
Function8c7c9: ; unreferenced Function8c7c9:
; XXX
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
call WaitBGMap call WaitBGMap
@ -5320,7 +5323,7 @@ INCLUDE "tilesets/data_6.asm"
SECTION "bank38", ROMX, BANK[$38] SECTION "bank38", ROMX, BANK[$38]
Functione0000: ; e0000 RotateUnownFrontpic: ; e0000
; something to do with Unown printer ; something to do with Unown printer
push de push de
xor a xor a
@ -5333,8 +5336,8 @@ Functione0000: ; e0000
push bc push bc
ld de, wd002 ld de, wd002
call .Copy call .Copy
call .Decompress call .Rotate
ld hl, Unknown_e008b ld hl, UnownPrinter_OverworldMapRectangle
pop bc pop bc
add hl, bc add hl, bc
add hl, bc add hl, bc
@ -5349,7 +5352,7 @@ Functione0000: ; e0000
pop bc pop bc
inc c inc c
ld a, c ld a, c
cp $31 cp 7 * 7
jr c, .loop jr c, .loop
ld hl, OverworldMap ld hl, OverworldMap
@ -5375,7 +5378,7 @@ Functione0000: ; e0000
jr nz, .loop_copy jr nz, .loop_copy
ret ret
.Decompress: ; e0057 .Rotate: ; e0057
ld hl, wd012 ld hl, wd012
ld e, %10000000 ld e, %10000000
ld d, 8 ld d, 8
@ -5417,20 +5420,19 @@ Functione0000: ; e0000
jr nz, .loop_count jr nz, .loop_count
ret ret
overworldmaptile EQUS "dw OverworldMap + $10 *"
overworldmaprect: MACRO overworldmaprect: MACRO
y = 0 y = 0
rept \1 rept \1
x = \1 * (\2 +- 1) + y x = \1 * (\2 +- 1) + y
rept \2 rept \2
overworldmaptile x dw OverworldMap tile x
x = x +- \2 x = x +- \2
endr endr
y = y + 1 y = y + 1
endr endr
endm endm
Unknown_e008b: ; e008b UnownPrinter_OverworldMapRectangle: ; e008b
overworldmaprect 7, 7 overworldmaprect 7, 7
Unknown_e00ed: Unknown_e00ed:
@ -5590,6 +5592,7 @@ INCLUDE "tilesets/data_7.asm"
SECTION "bank77_2", ROMX, BANK[$77] SECTION "bank77_2", ROMX, BANK[$77]
Function1dd6a9: ; 1dd6a9 Function1dd6a9: ; 1dd6a9
; XXX
ld a, b ld a, b
ld b, c ld b, c
ld c, a ld c, a
@ -5661,7 +5664,7 @@ LoadSGBPokedexGFX: ; 1ddf1c
call Decompress call Decompress
ret ret
Function1ddf26: ; 1ddf26 (77:5f26) LoadSGBPokedexGFX2: ; 1ddf26 (77:5f26)
ld hl, LZ_1ddf33 ld hl, LZ_1ddf33
ld de, VTiles2 tile $31 ld de, VTiles2 tile $31
lb bc, BANK(LZ_1ddf33), $3a lb bc, BANK(LZ_1ddf33), $3a
@ -5861,7 +5864,7 @@ DudeAutoInput_DownA: ; 1de2af
db A_BUTTON, $00 db A_BUTTON, $00
db NO_INPUT, $ff ; end db NO_INPUT, $ff ; end
Function1de2c5: ; 1de2c5 TownMap_ConvertLineBreakCharacters: ; 1de2c5
ld hl, StringBuffer1 ld hl, StringBuffer1
.loop .loop
ld a, [hl] ld a, [hl]
@ -6033,42 +6036,44 @@ SECTION "bank7D", ROMX, BANK[$7D]
db $cc, $6b, $1e ; XXX db $cc, $6b, $1e ; XXX
Function1f4003: ; 1f4003 Function1f4003: ; 1f4003
; XXX
ld a, $6 ld a, $6
call GetSRAMBank call GetSRAMBank
ld hl, Unknown_1f4018 ld hl, .unknown_data
ld de, $a000 ld de, $a000
ld bc, $1000 ld bc, $1000
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
ret ret
Unknown_1f4018: .unknown_data
INCBIN "unknown/1f4018.bin" INCBIN "unknown/1f4018.bin"
Function1f4dbe: ; 1f4dbe Function1f4dbe: ; 1f4dbe
; XXX
ld a, $6 ld a, $6
call GetSRAMBank call GetSRAMBank
ld hl, Unknown_1f4dd3 ld hl, .unknown_data
ld de, $a000 ld de, $a000
ld bc, $1000 ld bc, $1000
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
ret ret
Unknown_1f4dd3: .unknown_data
INCBIN "unknown/1f4dd3.bin" INCBIN "unknown/1f4dd3.bin"
Function1f5d9f: ; 1f5d9f Function1f5d9f: ; 1f5d9f
ld a, $6 ld a, $6
call GetSRAMBank call GetSRAMBank
ld hl, Unknown_1f5db4 ld hl, .unknown_data
ld de, $a000 ld de, $a000
ld bc, $1000 ld bc, $1000
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
ret ret
Unknown_1f5db4: .unknown_data
INCBIN "unknown/1f5db4.bin" INCBIN "unknown/1f5db4.bin"
SECTION "bank7E", ROMX, BANK[$7E] SECTION "bank7E", ROMX, BANK[$7E]

View File

@ -81,7 +81,7 @@ ENDC
bccoord 1, 14 bccoord 1, 14
pop af pop af
ld [rSVBK], a ld [rSVBK], a
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
; 11c05d ; 11c05d

View File

@ -10,7 +10,7 @@ Function11c05d: ; 11c05d
cp $ff cp $ff
jr z, .asm_11c071 jr z, .asm_11c071
push hl push hl
call Function11c156 call CopyMobileFixedWordToC608
pop hl pop hl
call PlaceString call PlaceString
and a and a
@ -21,7 +21,6 @@ Function11c05d: ; 11c05d
ld b, h ld b, h
scf scf
ret ret
; 11c075 ; 11c075
Function11c075: ; 11c075 Function11c075: ; 11c075
@ -32,7 +31,6 @@ Function11c075: ; 11c075
ld bc, wcd36 ld bc, wcd36
call Function11c08f call Function11c08f
ret ret
; 11c082 ; 11c082
Function11c082: ; 11c082 Function11c082: ; 11c082
@ -41,9 +39,8 @@ Function11c082: ; 11c082
call Function11c254 call Function11c254
pop de pop de
ld bc, wcd36 ld bc, wcd36
call Function11c0c6 call PrintFixedWordBattleMessage
ret ret
; 11c08f ; 11c08f
Function11c08f: ; 11c08f Function11c08f: ; 11c08f
@ -96,123 +93,144 @@ Function11c08f: ; 11c08f
dec a dec a
jr nz, .asm_11c0b0 jr nz, .asm_11c0b0
ret ret
; 11c0c6 ; 11c0c6
PrintFixedWordBattleMessage: ; 11c0c6
Function11c0c6: ; 11c0c6 ; Use up to 6 words from bc to print text starting at de.
; Preserve $cf63, $cf64
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld l, a ld l, a
ld a, [wcf64] ld a, [wcf64]
ld h, a ld h, a
push hl push hl
ld hl, $c608 + 16 ; reset value at c618 (not preserved)
ld hl, $c618
ld a, $0 ld a, $0
ld [hli], a ld [hli], a
; preserve de
push de push de
; $cf63 keeps track of which line we're on (0, 1, or 2)
; $cf64 keeps track of how much room we have left in the current line
xor a xor a
ld [wJumptableIndex], a ld [wJumptableIndex], a
ld a, $12 ld a, 18
ld [wcf64], a ld [wcf64], a
ld a, $6 ld a, $6 ; up to 6 times
.asm_11c0e1 .loop
push af push af
; load the 2-byte word data pointed to by bc
ld a, [bc] ld a, [bc]
ld e, a ld e, a
inc bc inc bc
ld a, [bc] ld a, [bc]
ld d, a ld d, a
inc bc inc bc
; if $0000, we're done
or e or e
jr z, .asm_11c133 jr z, .done
; preserving hl and bc, get the length of the word
push hl push hl
push bc push bc
call Function11c156 call CopyMobileFixedWordToC608
call Function11c14a call GetLengthOfWordAtC608
ld e, c ld e, c
pop bc pop bc
pop hl pop hl
; if the functions return 0, we're done
ld a, e ld a, e
or a or a
jr z, .asm_11c133 jr z, .done
.asm_11c0fa .loop2
; e contains the length of the word
; add 1 for the space, unless we're at the start of the line
ld a, [wcf64] ld a, [wcf64]
cp $12 cp 18
jr z, .asm_11c102 jr z, .skip_inc
inc e inc e
.asm_11c102 .skip_inc
; if the word fits, put it on the same line
cp e cp e
jr nc, .asm_11c11c jr nc, .same_line
; otherwise, go to the next line
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
inc a inc a
ld [wJumptableIndex], a ld [wJumptableIndex], a
ld [hl], $4e ; if we're on line 2, insert "<NEXT>"
ld [hl], "<NEXT>"
rra rra
jr c, .asm_11c113 jr c, .got_line_terminator
ld [hl], $55 ; else, insert "<CONT>"
ld [hl], "<CONT>"
.asm_11c113 .got_line_terminator
inc hl inc hl
ld a, $12 ; init the next line, holding on to the same word
ld a, 18
ld [wcf64], a ld [wcf64], a
dec e dec e
jr .asm_11c0fa jr .loop2
.asm_11c11c .same_line
cp $12 ; add the space, unless we're at the start of the line
jr z, .asm_11c123 cp 18
ld [hl], $7f jr z, .skip_space
ld [hl], " "
inc hl inc hl
.asm_11c123 .skip_space
; deduct the length of the word
sub e sub e
ld [wcf64], a ld [wcf64], a
ld de, $c608 ld de, $c608
.asm_11c12a .place_string_loop
; load the string from de to hl
ld a, [de] ld a, [de]
cp $50 cp "@"
jr z, .asm_11c133 jr z, .done
inc de inc de
ld [hli], a ld [hli], a
jr .asm_11c12a jr .place_string_loop
.asm_11c133 .done
; next word?
pop af pop af
dec a dec a
jr nz, .asm_11c0e1 jr nz, .loop
ld [hl], $57 ; we're finished, place "<DONE>"
ld [hl], "<DONE>"
; now, let's place the string from c618 to bc
pop bc pop bc
ld hl, $c608 + 16 ld hl, $c618
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
; restore the original values of $cf63 and $cf64
pop hl pop hl
ld a, l ld a, l
ld [wJumptableIndex], a ld [wJumptableIndex], a
ld a, h ld a, h
ld [wcf64], a ld [wcf64], a
ret ret
; 11c14a ; 11c14a
Function11c14a: ; 11c14a GetLengthOfWordAtC608: ; 11c14a
ld c, $0 ld c, $0
ld hl, $c608 ld hl, $c608
.asm_11c14f .loop
ld a, [hli] ld a, [hli]
cp $50 cp "@"
ret z ret z
inc c inc c
jr .asm_11c14f jr .loop
; 11c156 ; 11c156
Function11c156: ; 11c156 CopyMobileFixedWordToC608: ; 11c156
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
ld a, $50 ld a, "@"
ld hl, $c608 ld hl, $c608
ld bc, $000b ld bc, NAME_LENGTH
call ByteFill call ByteFill
ld a, d ld a, d
and a and a
@ -239,7 +257,7 @@ Function11c156: ; 11c156
rl b rl b
add hl, bc add hl, bc
ld bc, 5 ; length of a string ld bc, 5 ; length of a string
.loop .copy_string
ld de, $c608 ld de, $c608
call CopyBytes call CopyBytes
ld de, $c608 ld de, $c608
@ -253,7 +271,7 @@ Function11c156: ; 11c156
call GetPokemonName call GetPokemonName
ld hl, StringBuffer1 ld hl, StringBuffer1
ld bc, PKMN_NAME_LENGTH - 1 ld bc, PKMN_NAME_LENGTH - 1
jr .loop jr .copy_string
; 11c1ab ; 11c1ab
Function11c1ab: ; 11c1ab Function11c1ab: ; 11c1ab
@ -265,7 +283,6 @@ Function11c1ab: ; 11c1ab
pop af pop af
ld [hInMenu], a ld [hInMenu], a
ret ret
; 11c1b9 ; 11c1b9
Function11c1b9: ; 11c1b9 Function11c1b9: ; 11c1b9
@ -278,7 +295,6 @@ Function11c1b9: ; 11c1b9
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ret ret
; 11c1ca ; 11c1ca
Function11c1ca: ; 11c1ca Function11c1ca: ; 11c1ca
@ -329,7 +345,6 @@ Function11c1ca: ; 11c1ca
call Function11d4aa call Function11d4aa
call Function11d3ba call Function11d3ba
ret ret
; 11c254 ; 11c254
Function11c254: ; 11c254 Function11c254: ; 11c254
@ -351,10 +366,8 @@ Function11c254: ; 11c254
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
ret ret
; 11c277 ; 11c277
Function11c277: ; 11c277 (47:4277) Function11c277: ; 11c277 (47:4277)
ld a, " " ld a, " "
hlcoord 0, 6 hlcoord 0, 6
@ -379,14 +392,12 @@ Function11c283: ; 11c283
callba ClearSpriteAnims callba ClearSpriteAnims
call ClearSprites call ClearSprites
ret ret
; 11c2ac ; 11c2ac
.DoJumptableFunction: ; 11c2ac .DoJumptableFunction: ; 11c2ac
jumptable .Jumptable, wJumptableIndex jumptable .Jumptable, wJumptableIndex
; 11c2bb ; 11c2bb
.Jumptable: ; 11c2bb (47:42bb) .Jumptable: ; 11c2bb (47:42bb)
dw Function11c2e9 ; 00 dw Function11c2e9 ; 00
dw Function11c346 ; 01 dw Function11c346 ; 01
@ -412,7 +423,6 @@ Function11c283: ; 11c283
dw Function11ce0b ; 15 dw Function11ce0b ; 15
dw Function11ce2b ; 16 dw Function11ce2b ; 16
Function11c2e9: ; 11c2e9 (47:42e9) Function11c2e9: ; 11c2e9 (47:42e9)
depixel 3, 1, 2, 5 depixel 3, 1, 2, 5
ld a, SPRITE_ANIM_INDEX_1D ld a, SPRITE_ANIM_INDEX_1D
@ -535,7 +545,6 @@ Function11c38a: ; 11c38a (47:438a)
dec a dec a
jr nz, .asm_11c392 jr nz, .asm_11c392
ret ret
; 11c3bc (47:43bc) ; 11c3bc (47:43bc)
String_11c3bc: ; 11c3bc String_11c3bc: ; 11c3bc
@ -705,7 +714,6 @@ Function11c4be: ; 11c4be (47:44be)
call ByteFill call ByteFill
callba ReloadMapPart callba ReloadMapPart
ret ret
; 11c4db (47:44db) ; 11c4db (47:44db)
String_11c4db: ; 11c4db String_11c4db: ; 11c4db
@ -865,7 +873,6 @@ Function11c53d: ; 11c53d (47:453d)
.asm_11c5ee .asm_11c5ee
ld [hl], a ld [hl], a
ret ret
; 11c5f0 ; 11c5f0
Function11c5f0: ; 11c5f0 (47:45f0) Function11c5f0: ; 11c5f0 (47:45f0)
@ -903,7 +910,6 @@ Function11c618: ; 11c618 (47:4618)
call ByteFill call ByteFill
callba ReloadMapPart callba ReloadMapPart
ret ret
; 11c62a (47:462a) ; 11c62a (47:462a)
String_11c62a: ; 11c62a String_11c62a: ; 11c62a
@ -1265,7 +1271,6 @@ Function11c7bc: ; 11c7bc (47:47bc)
pop hl pop hl
pop de pop de
ret ret
; 11c854 (47:4854) ; 11c854 (47:4854)
Unknown_11c854: ; 11c854 Unknown_11c854: ; 11c854
@ -1339,7 +1344,6 @@ Function11c86e: ; 11c86e (47:486e)
dec c dec c
jr nz, .asm_11c8c2 jr nz, .asm_11c8c2
ret ret
; 11c8c7 (47:48c7) ; 11c8c7 (47:48c7)
BCD2String: ; 11c8c7 BCD2String: ; 11c8c7
@ -1363,7 +1367,6 @@ BCD2String: ; 11c8c7
add "0" add "0"
ld [hli], a ld [hli], a
ret ret
; 11c8ec ; 11c8ec
MobileString_Page: ; 11c8ec MobileString_Page: ; 11c8ec
@ -1480,7 +1483,6 @@ Function11c95d: ; 11c95d (47:495d)
jr nz, .asm_11c980 jr nz, .asm_11c980
pop hl pop hl
ret ret
; 11c986 (47:4986) ; 11c986 (47:4986)
Unknown_11c986: Unknown_11c986:
@ -1606,7 +1608,6 @@ Function11ca19: ; 11ca19 (47:4a19)
jr nz, .asm_11ca22 jr nz, .asm_11ca22
callba ReloadMapPart callba ReloadMapPart
ret ret
; 11ca38 (47:4a38) ; 11ca38 (47:4a38)
String_11ca38: ; 11ca38 String_11ca38: ; 11ca38
@ -1736,7 +1737,6 @@ Function11cab3: ; 11cab3 (47:4ab3)
ret nz ret nz
inc [hl] inc [hl]
ret ret
; 11cb1c (47:4b1c) ; 11cb1c (47:4b1c)
String_11cb1c: ; 11cb1c String_11cb1c: ; 11cb1c
@ -1867,7 +1867,6 @@ Function11cbf5: ; 11cbf5 (47:4bf5)
dec hl dec hl
set 7, [hl] set 7, [hl]
ret ret
; 11cc01 (47:4c01) ; 11cc01 (47:4c01)
Unknown_11cc01: ; 11cc01 Unknown_11cc01: ; 11cc01
@ -1933,7 +1932,6 @@ Function11cd04: ; 11cd04 (47:4d04)
ld a, $4 ld a, $4
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
; 11cd10 (47:4d10) ; 11cd10 (47:4d10)
String_11cd10: ; 11cd10 String_11cd10: ; 11cd10
@ -2033,7 +2031,6 @@ Function11cdaa: ; 11cdaa (47:4daa)
call ByteFill call ByteFill
callba ReloadMapPart callba ReloadMapPart
ret ret
; 11cdc7 (47:4dc7) ; 11cdc7 (47:4dc7)
String_11cdc7: ; 11cdc7 String_11cdc7: ; 11cdc7
@ -2162,7 +2159,6 @@ Function11ce2b: ; 11ce2b (47:4e2b)
ret z ret z
ld [wcd22], a ld [wcd22], a
ret ret
; 11ceb9 (47:4eb9) ; 11ceb9 (47:4eb9)
Unknown_11ceb9: ; 11ceb9 Unknown_11ceb9: ; 11ceb9
@ -2278,7 +2274,6 @@ Function11cfb5: ; 11cfb5 (47:4fb5)
ld hl, wJumptableIndex ld hl, wJumptableIndex
inc [hl] inc [hl]
ret ret
; 11cfba (47:4fba) ; 11cfba (47:4fba)
Unknown_11cfba: Unknown_11cfba:
@ -2522,7 +2517,6 @@ Function11d0b6: ; 11d0b6 (47:50b6)
dw .nine dw .nine
dw .ten dw .ten
.zero ; 11d0dd (47:50dd) .zero ; 11d0dd (47:50dd)
ld a, [wcd20] ; wcd20 (aliases: CreditsPos) ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
sla a sla a
@ -2702,7 +2696,6 @@ Function11d0b6: ; 11d0b6 (47:50b6)
ld e, a ld e, a
call Function11d2ee call Function11d2ee
ret ret
; 11d208 (47:5208) ; 11d208 (47:5208)
Unknown_11d208: ; 11d208 Unknown_11d208: ; 11d208
@ -2887,7 +2880,6 @@ Function11d323: ; 11d323
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ret ret
; 11d33a ; 11d33a
Palette_11d33a: Palette_11d33a:
@ -2970,7 +2962,6 @@ Palette_11d33a:
RGB 00, 00, 00 RGB 00, 00, 00
RGB 00, 00, 00 RGB 00, 00, 00
RGB 00, 00, 00 RGB 00, 00, 00
; 11d3ba ; 11d3ba
Function11d3ba: ; 11d3ba Function11d3ba: ; 11d3ba
@ -3146,7 +3137,6 @@ Function11d3ba: ; 11d3ba
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ret ret
; 11d493 ; 11d493
.CheckSeenMon: ; 11d493 .CheckSeenMon: ; 11d493
@ -3165,7 +3155,6 @@ Function11d3ba: ; 11d3ba
pop bc pop bc
pop hl pop hl
ret ret
; 11d4aa ; 11d4aa
Function11d4aa: ; 11d4aa Function11d4aa: ; 11d4aa
@ -3226,10 +3215,8 @@ Function11d4aa: ; 11d4aa
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ret ret
; 11d4fe ; 11d4fe
SortedPokemon: SortedPokemon:
; Pokemon sorted by kana. ; Pokemon sorted by kana.
; Notably, Rhydon is missing. ; Notably, Rhydon is missing.

View File

@ -481,9 +481,11 @@ _Get2bpp:: ; 104284
ld a, b ; bank ld a, b ; bank
ld l, c ; number of tiles ld l, c ; number of tiles
ld h, $0 ld h, $0
rept 4 ; multiply by 16 (16 bytes of a 2bpp = 8 x 8 tile)
add hl, hl ; multiply by 16 (16 bytes of a 2bpp = 8 x 8 tile) add hl, hl
endr add hl, hl
add hl, hl
add hl, hl
ld b, h ld b, h
ld c, l ld c, l
ld h, d ; address ld h, d ; address

View File

@ -11,14 +11,14 @@ InitMobileProfile: ; 4802f (12:402f)
call Function48d3d call Function48d3d
ld a, [wd479] ld a, [wd479]
bit 1, a bit 1, a
jr z, .asm_4805a jr z, .not_yet_initialized
ld a, [wd003] ld a, [wd003]
set 0, a set 0, a
set 1, a set 1, a
set 2, a set 2, a
set 3, a set 3, a
ld [wd003], a ld [wd003], a
.asm_4805a .not_yet_initialized
call Function486bf call Function486bf
call LoadFontsExtra call LoadFontsExtra
ld de, GFX_488c3 ld de, GFX_488c3
@ -125,22 +125,22 @@ Function48157: ; 48157 (12:4157)
ld hl, wMenuCursorY ld hl, wMenuCursorY
ld b, [hl] ld b, [hl]
push bc push bc
asm_4815f: ; 4815f (12:415f) asm_4815f: ; 4815f (12:415f)
bit 0, a bit A_BUTTON_F, a
jp nz, Function4820d jp nz, Function4820d
ld b, a ld b, a
ld a, [wd002] ld a, [wd002]
bit 6, a bit 6, a
jr z, .asm_48177 jr z, .dont_check_b_button
ld hl, wd479 ld hl, wd479
bit 1, [hl] bit 1, [hl]
jr z, .asm_48177 jr z, .dont_check_b_button
bit 1, b bit B_BUTTON_F, b
jr nz, .asm_4817a jr nz, .b_button
.asm_48177 .dont_check_b_button
jp Function48272 jp Function48272
.asm_4817a
.b_button
call ClearBGPalettes call ClearBGPalettes
call Function48d30 call Function48d30
pop bc pop bc
@ -497,13 +497,14 @@ Function4840c: ; 4840c (12:440c)
ld [hl], b ld [hl], b
ld a, [wd002] ld a, [wd002]
bit 6, a bit 6, a
jr nz, .asm_48437 jr nz, .narrower_box
ld b, 9 ld b, 9
ld c, 1 ld c, 1
hlcoord 1, 4 hlcoord 1, 4
call ClearBox call ClearBox
jp Function48157 jp Function48157
.asm_48437
.narrower_box
ld b, 7 ld b, 7
ld c, 1 ld c, 1
hlcoord 1, 6 hlcoord 1, 6
@ -667,13 +668,13 @@ Function48689: ; 48689 (12:4689)
call GetMysteryGift_MobileAdapterLayout call GetMysteryGift_MobileAdapterLayout
call ClearBGPalettes call ClearBGPalettes
hlcoord 0, 0 hlcoord 0, 0
ld b, $4 ld b, 4
ld c, $14 ld c, SCREEN_WIDTH
call ClearBox call ClearBox
hlcoord 0, 2 hlcoord 0, 2
ld a, $c ld a, $c
ld [hl], a ld [hl], a
ld bc, $13 ld bc, SCREEN_WIDTH - 1
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ld de, MobileProfileString ld de, MobileProfileString
@ -689,121 +690,139 @@ Function486bf: ; 486bf (12:46bf)
ld hl, w2DMenuCursorInitY ld hl, w2DMenuCursorInitY
ld a, [wd002] ld a, [wd002]
bit 6, a bit 6, a
jr nz, .asm_486ce jr nz, .start_at_6
ld a, $4 ld a, 4
ld [hli], a ld [hli], a
jr .asm_486d1 jr .got_init_y
.asm_486ce
ld a, $6 .start_at_6
ld [hli], a ld a, 6
.asm_486d1
ld a, $1
ld [hli], a ld [hli], a
.got_init_y
ld a, 1
ld [hli], a ; init x
ld a, [wd002] ld a, [wd002]
bit 6, a bit 6, a
jr nz, .asm_486e7 jr nz, .check_wd479
call Function48725 call Function48725
ld a, $4 ld a, 4
jr nc, .asm_486e4 jr nc, .got_num_rows_1
ld a, $5 ld a, 5
.asm_486e4 .got_num_rows_1
ld [hli], a ld [hli], a
jr .asm_486fb jr .got_num_rows_2
.asm_486e7
.check_wd479
ld a, [wd479] ld a, [wd479]
bit 1, a bit 1, a
jr nz, .asm_486f8 jr nz, .four_rows
call Function48725 call Function48725
jr c, .asm_486f8 jr c, .four_rows
ld a, $3 ld a, 3
ld [hli], a ld [hli], a
jr .asm_486fb jr .got_num_rows_2
.asm_486f8
ld a, $4 .four_rows
ld a, 4
ld [hli], a ld [hli], a
.asm_486fb .got_num_rows_2
ld a, $1 ld a, 1
ld [hli], a ld [hli], a ; num cols
ld [hl], $0 ld [hl], $0 ; flags 1
set 5, [hl] set 5, [hl]
inc hl inc hl
xor a xor a
ld [hli], a ld [hli], a ; flags 2
ld a, $20 ld a, $20
ld [hli], a ld [hli], a ; cursor offsets
ld a, $1 ld a, A_BUTTON
add $40 add D_UP
add $80 add D_DOWN
push af push af
ld a, [wd002] ld a, [wd002]
bit 6, a bit 6, a
jr z, .asm_4871a jr z, .got_joypad_mask
pop af pop af
add $2 add B_BUTTON
push af push af
.asm_4871a .got_joypad_mask
pop af pop af
ld [hli], a ld [hli], a
ld a, $1 ld a, $1
ld [hli], a ld [hli], a ; cursor y
ld [hli], a ld [hli], a ; cursor x
xor a xor a
rept 3 ld [hli], a ; off char
ld [hli], a ld [hli], a ; cursor tile
endr ld [hli], a ; cursor tile + 1
ret ret
Function48725: ; 48725 (12:4725) Function48725: ; 48725 (12:4725)
; ld a, [wd003]
; and $f
; cp $f
; jr nz, .clear_carry
; scf
; ret
; .clear_carry
; and a
; ret
ld a, [wd003] ld a, [wd003]
bit 0, a bit 0, a
jr z, .asm_4873a jr z, .clear_carry
bit 1, a bit 1, a
jr z, .asm_4873a jr z, .clear_carry
bit 2, a bit 2, a
jr z, .asm_4873a jr z, .clear_carry
bit 3, a bit 3, a
jr z, .asm_4873a jr z, .clear_carry
scf scf
ret ret
.asm_4873a
.clear_carry
and a and a
ret ret
Function4873c: ; 4873c (12:473c) Function4873c: ; 4873c (12:473c)
ld hl, w2DMenuCursorInitY ld hl, w2DMenuCursorInitY
ld a, $4 ld a, 4
ld [hli], a ld [hli], a
ld a, $c ld a, 12
ld [hli], a ld [hli], a ; init x
ld a, $2 ld a, 2
ld [hli], a ld [hli], a ; num rows
ld a, $1 ld a, 1
ld [hli], a ld [hli], a ; num cols
ld [hl], $0 ld [hl], $0 ; flags 1
set 5, [hl] set 5, [hl]
inc hl inc hl
xor a xor a
ld [hli], a ld [hli], a ; flags 2
ld a, $20 ln a, 2, 0
ld [hli], a ld [hli], a ; cursor offsets
ld a, $1 ld a, A_BUTTON
add $2 add B_BUTTON
ld [hli], a ld [hli], a ; joypad filter
; ld a, [PlayerGender]
; xor 1
; inc a
ld a, [PlayerGender] ld a, [PlayerGender]
and a and a
jr z, .asm_48764 jr z, .male
ld a, $2 ld a, 2
jr .asm_48766 jr .okay_gender
.asm_48764
.male
ld a, 1
.okay_gender
ld [hli], a ; cursor y
ld a, $1 ld a, $1
.asm_48766 ld [hli], a ; cursor x
ld [hli], a
ld a, $1
ld [hli], a
xor a xor a
rept 3 ld [hli], a ; off char
ld [hli], a ld [hli], a ; cursor tile
endr ld [hli], a ; cursor tile + 1
ret ret
Function4876f: ; 4876f (12:476f) Function4876f: ; 4876f (12:476f)

View File

@ -1001,52 +1001,51 @@ Mobile_CommunicationStandby: ; 10060d
db "つうしんたいきちゅう!@" db "つうしんたいきちゅう!@"
; 10062d ; 10062d
Function10062d: ; 10062d AdvanceMobileInactivityTimerAndCheckExpired: ; 10062d
push bc push bc
call Function10064e call IncrementMobileInactivityTimerByCFrames
pop bc pop bc
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
cp b cp b
jr nc, .asm_10063a jr nc, .timed_out
and a and a
ret ret
.asm_10063a .timed_out
ld a, $fa ld a, $fa
ld [wcd2b], a ld [wcd2b], a
scf scf
ret ret
; 100641 ; 100641
Function100641: ; 100641 StartMobileInactivityTimer: ; 100641
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
ld [wcd46], a ld [wMobileInactivityTimerFrames], a
ret ret
; 10064c ; 10064c
Function10064c: ; 10064c IncrementMobileInactivityTimerBy1Frame: ; 10064c
ld c, 1 ld c, 1
IncrementMobileInactivityTimerByCFrames: ; 10064e
Function10064e: ; 10064e ld hl, wMobileInactivityTimerFrames ; timer?
ld hl, wcd46
ld a, [hl] ld a, [hl]
add c add c
cp $3c cp 60
jr c, .asm_100658 jr c, .seconds
xor a xor a
.asm_100658 .seconds
ld [hld], a ld [hld], a
ret c ret c
ld a, [hl] ld a, [hl]
inc a inc a
cp $3c cp 60
jr c, .asm_100661 jr c, .minutes
xor a xor a
.asm_100661 .minutes
ld [hld], a ld [hld], a
ret c ret c
inc [hl] inc [hl]
@ -1268,35 +1267,35 @@ Function100772: ; 100772
Function10079c: ; 10079c Function10079c: ; 10079c
ld a, [wcd21] ld a, [wcd21]
cp $01 cp $01
jr nz, .asm_1007f4 jr nz, .dont_quit
ld hl, wcd2a ld hl, wcd2a
bit 5, [hl] bit 5, [hl]
jr nz, .asm_1007f4 jr nz, .dont_quit
ld hl, wcd2a ld hl, wcd2a
bit 6, [hl] bit 6, [hl]
jr nz, .asm_1007f4 jr nz, .dont_quit
ld a, [wcd6a] ld a, [wcd6a]
add c add c
cp $3c cp 60
jr nc, .asm_1007be jr nc, .overflow
ld [wcd6a], a ld [wcd6a], a
and a and a
ret ret
.asm_1007be .overflow
sub $3c sub 60
ld [wcd6a], a ld [wcd6a], a
ld d, b ld d, b
push de push de
call Function1007f6 call Function1007f6
pop de pop de
jr c, .asm_1007e5 jr c, .quit
ld a, c ld a, c
and a and a
jr nz, .asm_1007e5 jr nz, .quit
ld a, b ld a, b
cp $0a cp 10
jr nc, .asm_1007e5 jr nc, .quit
ld a, d ld a, d
and a and a
ret z ret z
@ -1309,7 +1308,7 @@ Function10079c: ; 10079c
and a and a
ret ret
.asm_1007e5 .quit
call Function1008e0 call Function1008e0
ld hl, wcd2a ld hl, wcd2a
set 4, [hl] set 4, [hl]
@ -1318,7 +1317,7 @@ Function10079c: ; 10079c
scf scf
ret ret
.asm_1007f4 .dont_quit
and a and a
ret ret
; 1007f6 ; 1007f6
@ -1704,7 +1703,7 @@ _LinkBattleSendReceiveAction: ; 100a09
.MobileBattle_SendReceiveAction: ; 100a87 .MobileBattle_SendReceiveAction: ; 100a87
call Function100acf call Function100acf
call Function100641 call StartMobileInactivityTimer
ld a, 0 ld a, 0
ld [wcd27], a ld [wcd27], a
.asm_100a92 .asm_100a92
@ -1714,7 +1713,7 @@ _LinkBattleSendReceiveAction: ; 100a09
ld c, $01 ld c, $01
ld b, $03 ld b, $03
push bc push bc
call Function10062d call AdvanceMobileInactivityTimerAndCheckExpired
pop bc pop bc
jr c, .asm_100ac7 jr c, .asm_100ac7
ld b, $01 ld b, $01
@ -2019,7 +2018,7 @@ Mobile_PartyMenuSelect: ; 100cb5
push bc push bc
callba PlaySpriteAnimations callba PlaySpriteAnimations
callba HDMATransferTileMapToWRAMBank3 callba HDMATransferTileMapToWRAMBank3
call Function100dfd call MobileComms_CheckInactivityTimer
pop bc pop bc
jr c, .done jr c, .done
ld a, [wMenuJoypadFilter] ld a, [wMenuJoypadFilter]
@ -2073,7 +2072,7 @@ MobileBattleMonMenu: ; 100d22
push bc push bc
callba PlaySpriteAnimations callba PlaySpriteAnimations
callba HDMATransferTileMapToWRAMBank3 callba HDMATransferTileMapToWRAMBank3
call Function100dfd call MobileComms_CheckInactivityTimer
pop bc pop bc
jr c, .asm_100d54 jr c, .asm_100d54
ld a, [wMenuJoypadFilter] ld a, [wMenuJoypadFilter]
@ -2180,7 +2179,7 @@ Mobile_SetOverworldDelay: ; 100dd2
Function100dd8: ; 100dd8 Function100dd8: ; 100dd8
ld c, $01 ld c, $01
ld b, $03 ld b, $03
callba Function10062d callba AdvanceMobileInactivityTimerAndCheckExpired
jr c, .asm_100dfb jr c, .asm_100dfb
ld c, $3c ld c, $3c
ld b, $01 ld b, $01
@ -2198,7 +2197,7 @@ Function100dd8: ; 100dd8
ret ret
; 100dfd ; 100dfd
Function100dfd: ; 100dfd MobileComms_CheckInactivityTimer: ; 100dfd
ld a, [OverworldDelay] ld a, [OverworldDelay]
ld c, a ld c, a
ld a, 30 ld a, 30
@ -2206,22 +2205,22 @@ Function100dfd: ; 100dfd
ld c, a ld c, a
ld b, 3 ld b, 3
push bc push bc
callba Function10062d callba AdvanceMobileInactivityTimerAndCheckExpired ; useless to farcall
pop bc pop bc
jr c, .asm_100e2b jr c, .quit
ld b, 1 ld b, 1
call Function10079c call Function10079c
jr c, .asm_100e2b jr c, .quit
call Function1009f3 call Function1009f3
jr c, .asm_100e2b jr c, .quit
callba Function10032e callba Function10032e ; useless to farcall
ld a, [wcd2b] ld a, [wcd2b]
and a and a
jr nz, .asm_100e2b jr nz, .quit
xor a xor a
ret ret
.asm_100e2b .quit
scf scf
ret ret
; 100e2d ; 100e2d
@ -2234,7 +2233,7 @@ Function100e2d: ; 100e2d
ld c, a ld c, a
ld b, 3 ld b, 3
push bc push bc
callba Function10062d callba AdvanceMobileInactivityTimerAndCheckExpired
pop bc pop bc
jr c, .asm_100e61 jr c, .asm_100e61
ld b, 1 ld b, 1
@ -3277,7 +3276,7 @@ Function1014b7: ; 1014b7
Function1014ce: ; 1014ce Function1014ce: ; 1014ce
callba Function100720 callba Function100720
callba Function100641 callba StartMobileInactivityTimer
ld a, [wMobileCommsJumptableIndex] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wMobileCommsJumptableIndex], a ld [wMobileCommsJumptableIndex], a
@ -3345,7 +3344,7 @@ Function101537: ; 101537
; 101544 ; 101544
Function101544: ; 101544 Function101544: ; 101544
callba Function100641 callba StartMobileInactivityTimer
ld a, $12 ld a, $12
call Function3e32 call Function3e32
ld a, [wMobileCommsJumptableIndex] ld a, [wMobileCommsJumptableIndex]
@ -3355,7 +3354,7 @@ Function101544: ; 101544
; 101557 ; 101557
Function101557: ; 101557 Function101557: ; 101557
callba Function100641 callba StartMobileInactivityTimer
ld hl, wcd53 ld hl, wcd53
ld a, $08 ld a, $08
call Function3e32 call Function3e32
@ -3387,8 +3386,8 @@ Function101571: ; 101571
; 10158a ; 10158a
Function10158a: ; 10158a Function10158a: ; 10158a
callba Function10064c callba IncrementMobileInactivityTimerBy1Frame
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
cp $0a cp $0a
jr c, Function10156d jr c, Function10156d
ld a, $fb ld a, $fb
@ -3539,7 +3538,7 @@ Function10168e: ; 10168e
ret c ret c
ld c, $01 ld c, $01
ld b, $03 ld b, $03
callba Function10062d callba AdvanceMobileInactivityTimerAndCheckExpired
ret c ret c
ld a, [wcd26] ld a, [wcd26]
ld hl, Jumptable_1016c3 ld hl, Jumptable_1016c3
@ -3772,7 +3771,7 @@ Function1017f5: ; 1017f5
ret c ret c
ld c, $01 ld c, $01
ld b, $03 ld b, $03
callba Function10062d callba AdvanceMobileInactivityTimerAndCheckExpired
ret c ret c
callba Function100382 callba Function100382
ld a, [wcd27] ld a, [wcd27]
@ -5277,7 +5276,7 @@ Function1022d0: ; 1022d0
sub c sub c
ld c, a ld c, a
ld b, $03 ld b, $03
callba Function10062d callba AdvanceMobileInactivityTimerAndCheckExpired
jr c, .asm_1022f3 jr c, .asm_1022f3
xor a xor a
ret ret
@ -6153,7 +6152,7 @@ Function1028e8: ; 1028e8
ld hl, wcd4b ld hl, wcd4b
res 6, [hl] res 6, [hl]
ld [wcd50], a ld [wcd50], a
callba Function100641 callba StartMobileInactivityTimer
ld a, 0 ld a, 0
ld [wcd4a], a ld [wcd4a], a
ret ret
@ -6557,7 +6556,7 @@ Function102bac: ; 102bac
ld [CurPartyMon], a ld [CurPartyMon], a
call LowVolume call LowVolume
call ClearSprites call ClearSprites
callba _BattleStatsScreenInit callba _MobileStatsScreenInit
ld a, [CurPartyMon] ld a, [CurPartyMon]
inc a inc a
ld [wMenuCursorY], a ld [wMenuCursorY], a

View File

@ -983,9 +983,9 @@ Function106464:: ; 106464
ld hl, VTiles2 tile $60 ld hl, VTiles2 tile $60
lb bc, BANK(MobilePhoneTilesGFX), 1 lb bc, BANK(MobilePhoneTilesGFX), 1
call Get2bpp call Get2bpp
ld de, GFX_f9424 ld de, FontsExtra2_UpArrowGFX
ld hl, VTiles2 tile $61 ld hl, VTiles2 tile $61
lb bc, BANK(GFX_f9424), 1 lb bc, BANK(FontsExtra2_UpArrowGFX), 1
call Get2bpp call Get2bpp
ld de, GFX_106514 ld de, GFX_106514
ld hl, VTiles2 tile $62 ld hl, VTiles2 tile $62

View File

@ -1067,7 +1067,7 @@ asm_11886f
ld [wcd3c], a ld [wcd3c], a
call Function119e2e call Function119e2e
ld a, [wcd33] ld a, [wcd33]
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
Function118880: ; 118880 (46:4880) Function118880: ; 118880 (46:4880)
call Function119ed8 call Function119ed8
@ -1344,7 +1344,7 @@ Function118982:
ld a, $7 ld a, $7
ld [wcf66], a ld [wcf66], a
ld a, $0 ld a, $0
ld [wcd46], a ld [wMobileInactivityTimerFrames], a
ret ret
@ -1615,7 +1615,7 @@ Function118d80: ; 118d80
ld a, $9 ld a, $9
ld [wcd3c], a ld [wcd3c], a
ld a, $12 ld a, $12
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
call Function119e2e call Function119e2e
Function118d9b: Function118d9b:
@ -1830,9 +1830,9 @@ Function118ec6: ; 118ec6
ld a, $1d ld a, $1d
ld [wcd3c], a ld [wcd3c], a
ld a, $24 ld a, $24
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
ld a, $11 ld a, $11
ld [wcd46], a ld [wMobileInactivityTimerFrames], a
ld a, $1c ld a, $1c
ld [wcd47], a ld [wcd47], a
jp Function119e2e jp Function119e2e
@ -1871,9 +1871,9 @@ Function118f14:
ld a, $9 ld a, $9
ld [wcd3c], a ld [wcd3c], a
ld a, $24 ld a, $24
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
ld a, $13 ld a, $13
ld [wcd46], a ld [wMobileInactivityTimerFrames], a
ld a, $1c ld a, $1c
ld [wcd47], a ld [wcd47], a
jp Function119e2e jp Function119e2e
@ -2518,7 +2518,7 @@ Function119388: ; 119388
ld a, $9 ld a, $9
ld [wcd3c], a ld [wcd3c], a
ld a, $10 ld a, $10
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
call Function119e2e call Function119e2e
Function1193a0: Function1193a0:
@ -2565,7 +2565,7 @@ Function1193e3: ; 1193e3
ld a, $9 ld a, $9
ld [wcd3c], a ld [wcd3c], a
ld a, $11 ld a, $11
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
call Function119e2e call Function119e2e
Function1193fb: Function1193fb:
@ -2895,9 +2895,9 @@ Function1195f8: ; 1195f8 (46:55f8)
ld a, $11 ld a, $11
ld [wcd3c], a ld [wcd3c], a
ld a, $1c ld a, $1c
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
ld a, $f ld a, $f
ld [wcd46], a ld [wMobileInactivityTimerFrames], a
ld a, $14 ld a, $14
ld [wcd47], a ld [wcd47], a
call Function119e2e call Function119e2e
@ -2907,9 +2907,9 @@ Function119612: ; 119612 (46:5612)
ld a, $14 ld a, $14
ld [wcd3c], a ld [wcd3c], a
ld a, $1c ld a, $1c
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
ld a, $10 ld a, $10
ld [wcd46], a ld [wMobileInactivityTimerFrames], a
ld a, $14 ld a, $14
ld [wcd47], a ld [wcd47], a
jp Function119e2e jp Function119e2e
@ -2925,7 +2925,7 @@ Function119629: ; 119629 (46:5629)
ld a, $9 ld a, $9
ld [wcd3c], a ld [wcd3c], a
ld a, $1c ld a, $1c
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
ld a, $14 ld a, $14
ld [wcd47], a ld [wcd47], a
call Function119e2e call Function119e2e
@ -3219,7 +3219,7 @@ Function1197c9: ; 1197c9
ld a, $9 ld a, $9
ld [wcd3c], a ld [wcd3c], a
ld a, $12 ld a, $12
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
call Function119e2e call Function119e2e
Function1197dc: Function1197dc:
@ -3943,7 +3943,7 @@ Function119cdf:
Function119cec: Function119cec:
call Function119ed8 call Function119ed8
ret c ret c
ld a, [wcd46] ld a, [wMobileInactivityTimerFrames]
ld [wcf66], a ld [wcf66], a
ret ret
; 119cf7 ; 119cf7
@ -4301,16 +4301,16 @@ Function119f45: ; 119f45
ld de, String_11a661 ld de, String_11a661
call PlaceString call PlaceString
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 119f56 ; 119f56
Function119f56: ; 119f56 Function119f56: ; 119f56
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_119f62 jr z, .asm_119f62
dec a dec a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
scf scf
ret ret
@ -4320,16 +4320,16 @@ Function119f56: ; 119f56
ld de, String_11a6aa ld de, String_11a6aa
call PlaceString call PlaceString
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 119f76 ; 119f76
Function119f76: ; 119f76 Function119f76: ; 119f76
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_119f82 jr z, .asm_119f82
dec a dec a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
scf scf
ret ret
@ -4340,7 +4340,7 @@ Function119f76: ; 119f76
call PlaceString call PlaceString
call Function11a5f5 call Function11a5f5
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 119f98 ; 119f98
@ -4348,7 +4348,7 @@ Function119f98: ; 119f98
call Function11a536 call Function11a536
ret c ret c
call PlayClickSFX call PlayClickSFX
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr nz, .asm_119fef jr nz, .asm_119fef
call ExitMenu call ExitMenu
@ -4385,7 +4385,7 @@ Function119f98: ; 119f98
call ExitMenu call ExitMenu
call ExitMenu call ExitMenu
callba ReloadMapPart callba ReloadMapPart
ld a, [wcd45] ld a, [wMobileInactivityTimerSeconds]
ld [wcf66], a ld [wcf66], a
callba Function115dc3 callba Function115dc3
ld a, $a ld a, $a
@ -4504,12 +4504,12 @@ Function11a113: ; 11a113
Function11a129: ; 11a129 Function11a129: ; 11a129
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a131 ; 11a131
Function11a131: ; 11a131 Function11a131: ; 11a131
ld hl, wcd44 ld hl, wMobileInactivityTimerMinutes
dec [hl] dec [hl]
ret nz ret nz
ld a, [wcd3c] ld a, [wcd3c]
@ -4541,16 +4541,16 @@ Function11a14b: ; 11a14b
ld de, String_11a6f1 ld de, String_11a6f1
call PlaceString call PlaceString
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a16d ; 11a16d
Function11a16d: ; 11a16d Function11a16d: ; 11a16d
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_11a179 jr z, .asm_11a179
dec a dec a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
scf scf
ret ret
@ -4562,7 +4562,7 @@ Function11a16d: ; 11a16d
call PlaceString call PlaceString
call Function11a5f5 call Function11a5f5
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a192 ; 11a192
@ -4570,7 +4570,7 @@ Function11a192: ; 11a192
call Function11a536 call Function11a536
ret c ret c
call PlayClickSFX call PlayClickSFX
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr nz, .asm_11a1b6 jr nz, .asm_11a1b6
call ExitMenu call ExitMenu
@ -4585,7 +4585,7 @@ Function11a192: ; 11a192
.asm_11a1b6 .asm_11a1b6
call ExitMenu call ExitMenu
callba ReloadMapPart callba ReloadMapPart
ld a, [wcd45] ld a, [wMobileInactivityTimerSeconds]
ld [wcf66], a ld [wcf66], a
ld [wcd80], a ld [wcd80], a
call Function11a63c call Function11a63c
@ -4649,7 +4649,7 @@ Function11a207: ; 11a207
ld a, $ed ld a, $ed
ld [hl], a ld [hl], a
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a235 ; 11a235
@ -4676,11 +4676,11 @@ Function11a235: ; 11a235
xor a xor a
ld [wcd8a], a ld [wcd8a], a
ld [wcd8b], a ld [wcd8b], a
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_11a24c jr z, .asm_11a24c
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
hlcoord 15, 8 hlcoord 15, 8
ld a, $ed ld a, $ed
ld [hl], a ld [hl], a
@ -4693,11 +4693,11 @@ Function11a235: ; 11a235
xor a xor a
ld [wcd8a], a ld [wcd8a], a
ld [wcd8b], a ld [wcd8b], a
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr nz, .asm_11a24c jr nz, .asm_11a24c
inc a inc a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
hlcoord 15, 8 hlcoord 15, 8
ld a, $7f ld a, $7f
ld [hl], a ld [hl], a
@ -4711,12 +4711,12 @@ Function11a235: ; 11a235
ld [wcd8a], a ld [wcd8a], a
ld [wcd8b], a ld [wcd8b], a
call PlayClickSFX call PlayClickSFX
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr nz, .asm_11a2c4 jr nz, .asm_11a2c4
call ExitMenu call ExitMenu
callba ReloadMapPart callba ReloadMapPart
ld a, [wcd46] ld a, [wMobileInactivityTimerFrames]
cp $0 cp $0
jr z, .asm_11a2b4 jr z, .asm_11a2b4
ld a, [wcd47] ld a, [wcd47]
@ -4774,16 +4774,16 @@ Function11a2e6: ; 11a2e6
ld de, String_11a71e ld de, String_11a71e
call PlaceString call PlaceString
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a302 ; 11a302
Function11a302: ; 11a302 Function11a302: ; 11a302
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_11a30e jr z, .asm_11a30e
dec a dec a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
scf scf
ret ret
@ -4801,16 +4801,16 @@ Function11a302: ; 11a302
lb bc, PRINTNUM_LEADINGZEROS | 1, 2 lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum call PrintNum
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a33a ; 11a33a
Function11a33a: ; 11a33a Function11a33a: ; 11a33a
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_11a346 jr z, .asm_11a346
dec a dec a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
scf scf
ret ret
@ -4828,16 +4828,16 @@ Function11a357: ; 11a357
ld de, String_11a743 ld de, String_11a743
call PlaceString call PlaceString
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a36b ; 11a36b
Function11a36b: ; 11a36b Function11a36b: ; 11a36b
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_11a377 jr z, .asm_11a377
dec a dec a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
scf scf
ret ret
@ -4848,7 +4848,7 @@ Function11a36b: ; 11a36b
call PlaceString call PlaceString
call Function11a5f5 call Function11a5f5
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a38d ; 11a38d
@ -4856,7 +4856,7 @@ Function11a38d: ; 11a38d
call Function11a536 call Function11a536
ret c ret c
call PlayClickSFX call PlayClickSFX
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr nz, .asm_11a3b1 jr nz, .asm_11a3b1
call ExitMenu call ExitMenu
@ -4871,7 +4871,7 @@ Function11a38d: ; 11a38d
.asm_11a3b1 .asm_11a3b1
call ExitMenu call ExitMenu
callba ReloadMapPart callba ReloadMapPart
ld a, [wcd45] ld a, [wMobileInactivityTimerSeconds]
ld [wcf66], a ld [wcf66], a
ld [wcd80], a ld [wcd80], a
scf scf
@ -4884,16 +4884,16 @@ Function11a3c5: ; 11a3c5
ld de, String_11a762 ld de, String_11a762
call PlaceString call PlaceString
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a3d9 ; 11a3d9
Function11a3d9: ; 11a3d9 Function11a3d9: ; 11a3d9
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_11a3e5 jr z, .asm_11a3e5
dec a dec a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
scf scf
ret ret
@ -4903,16 +4903,16 @@ Function11a3d9: ; 11a3d9
ld de, String_11a779 ld de, String_11a779
call PlaceString call PlaceString
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a3f9 ; 11a3f9
Function11a3f9: ; 11a3f9 Function11a3f9: ; 11a3f9
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_11a405 jr z, .asm_11a405
dec a dec a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
scf scf
ret ret
@ -4923,7 +4923,7 @@ Function11a3f9: ; 11a3f9
call PlaceString call PlaceString
call Function11a5f5 call Function11a5f5
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a41b ; 11a41b
@ -4931,7 +4931,7 @@ Function11a41b: ; 11a41b
call Function11a536 call Function11a536
ret c ret c
call PlayClickSFX call PlayClickSFX
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr nz, .asm_11a43f jr nz, .asm_11a43f
call ExitMenu call ExitMenu
@ -4959,7 +4959,7 @@ Function11a452: ; 11a452
ld de, String_11a791 ld de, String_11a791
call PlaceString call PlaceString
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a466 ; 11a466
@ -4969,16 +4969,16 @@ Function11a466: ; 11a466
ld de, String_11a7c1 ld de, String_11a7c1
call PlaceString call PlaceString
ld a, $80 ld a, $80
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a47a ; 11a47a
Function11a47a: ; 11a47a Function11a47a: ; 11a47a
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_11a486 jr z, .asm_11a486
dec a dec a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
scf scf
ret ret
@ -4994,7 +4994,7 @@ Function11a488: ; 11a488
call PlaceString call PlaceString
call Function11a5f5 call Function11a5f5
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a49e ; 11a49e
@ -5002,7 +5002,7 @@ Function11a49e: ; 11a49e
call Function11a536 call Function11a536
ret c ret c
call PlayClickSFX call PlayClickSFX
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr nz, .asm_11a4c7 jr nz, .asm_11a4c7
call ExitMenu call ExitMenu
@ -5019,7 +5019,7 @@ Function11a49e: ; 11a49e
.asm_11a4c7 .asm_11a4c7
call ExitMenu call ExitMenu
callba ReloadMapPart callba ReloadMapPart
ld a, [wcd46] ld a, [wMobileInactivityTimerFrames]
ld [wcf66], a ld [wcf66], a
ld [wcd80], a ld [wcd80], a
scf scf
@ -5041,7 +5041,7 @@ Function11a4e8: ; 11a4e8
call PlaceString call PlaceString
call Function11a5f5 call Function11a5f5
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
jp Function11a5b0 jp Function11a5b0
; 11a4fe ; 11a4fe
@ -5049,7 +5049,7 @@ Function11a4fe: ; 11a4fe
call Function11a536 call Function11a536
ret c ret c
call PlayClickSFX call PlayClickSFX
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr nz, .asm_11a522 jr nz, .asm_11a522
call ExitMenu call ExitMenu
@ -5064,7 +5064,7 @@ Function11a4fe: ; 11a4fe
.asm_11a522 .asm_11a522
call ExitMenu call ExitMenu
callba ReloadMapPart callba ReloadMapPart
ld a, [wcd45] ld a, [wMobileInactivityTimerSeconds]
ld [wcf66], a ld [wcf66], a
ld [wcd80], a ld [wcd80], a
scf scf
@ -5102,11 +5102,11 @@ Function11a536: ; 11a536
xor a xor a
ld [wcd8a], a ld [wcd8a], a
ld [wcd8b], a ld [wcd8b], a
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr z, .asm_11a54d jr z, .asm_11a54d
xor a xor a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
hlcoord 15, 7 hlcoord 15, 7
ld a, $ed ld a, $ed
ld [hl], a ld [hl], a
@ -5119,11 +5119,11 @@ Function11a536: ; 11a536
xor a xor a
ld [wcd8a], a ld [wcd8a], a
ld [wcd8b], a ld [wcd8b], a
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
and a and a
jr nz, .asm_11a54d jr nz, .asm_11a54d
inc a inc a
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
hlcoord 15, 7 hlcoord 15, 7
ld a, $7f ld a, $7f
ld [hl], a ld [hl], a
@ -5134,7 +5134,7 @@ Function11a536: ; 11a536
.asm_11a5a2 .asm_11a5a2
ld a, $1 ld a, $1
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
.asm_11a5a7 .asm_11a5a7
xor a xor a
@ -5308,7 +5308,7 @@ String_11a7ac: ; 11a7ac
next "ちゅうし しますか?@" next "ちゅうし しますか?@"
; 11a7c1 ; 11a7c1
String_11a7c1: ; 11a7c1 String_11a7c1: ; 11a7c1 ; new news?
db "あたらしい ニュースは" db "あたらしい ニュースは"
next "ありません でした@" next "ありません でした@"
; 11a7d7 ; 11a7d7

View File

@ -230,45 +230,7 @@ INCBIN "gfx/unknown/16c633.tilemap"
INCBIN "gfx/unknown/16c79b.tilemap" INCBIN "gfx/unknown/16c79b.tilemap"
UnknownMobilePalettes_16c903: ; 16c903 UnknownMobilePalettes_16c903: ; 16c903
RGB 31, 31, 31 INCLUDE "gfx/unknown/16c903.pal"
RGB 04, 10, 20
RGB 16, 19, 25
RGB 25, 27, 29
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
; 16c943 ; 16c943

View File

@ -892,11 +892,11 @@ Function17d48d: ; 17d48d
ld a, [hli] ld a, [hli]
ld [wcd43], a ld [wcd43], a
ld a, [hli] ld a, [hli]
ld [wcd44], a ld [wMobileInactivityTimerMinutes], a
ld a, [hli] ld a, [hli]
ld [wcd45], a ld [wMobileInactivityTimerSeconds], a
ld a, [hli] ld a, [hli]
ld [wcd46], a ld [wMobileInactivityTimerFrames], a
ld a, [hli] ld a, [hli]
and a and a
jr z, .asm_17d58a jr z, .asm_17d58a
@ -2050,7 +2050,7 @@ Function17dd13: ; 17dd13
push hl push hl
pop bc pop bc
pop hl pop hl
call PlaceWholeStringInBoxAtOnce call PlaceHLTextAtBC
ret ret
; 17dd30 ; 17dd30
@ -3420,16 +3420,16 @@ Function17e5af: ; 17e5af
ret z ret z
ld a, [wcd43] ld a, [wcd43]
ld l, a ld l, a
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
ld h, a ld h, a
bccoord 0, 0 bccoord 0, 0
add hl, bc add hl, bc
ld bc, $ffec ld bc, $ffec
add hl, bc add hl, bc
ld a, [wcd45] ld a, [wMobileInactivityTimerSeconds]
ld c, a ld c, a
ld b, $0 ld b, $0
ld a, [wcd46] ld a, [wMobileInactivityTimerFrames]
call Function17e600 call Function17e600
ld a, [wcd2e] ld a, [wcd2e]
ld c, a ld c, a
@ -3453,7 +3453,7 @@ Function17e5af: ; 17e5af
pop de pop de
ld a, [wcd43] ld a, [wcd43]
ld l, a ld l, a
ld a, [wcd44] ld a, [wMobileInactivityTimerMinutes]
ld h, a ld h, a
bccoord 0, 0 bccoord 0, 0
add hl, bc add hl, bc

View File

@ -152,7 +152,7 @@ AutoInputLength:: ; c2cb
ds 1 ds 1
wMonStatusFlags:: ds 1 wMonStatusFlags:: ds 1
wc2cd:: ds 1 wGameLogicPaused:: ds 1 ; c2cd
wSpriteUpdatesEnabled:: ds 1 wSpriteUpdatesEnabled:: ds 1
wc2cf:: ds 1 wc2cf:: ds 1
wMapTimeOfDay:: ds 1 wMapTimeOfDay:: ds 1
@ -354,7 +354,9 @@ wBT_OTTemp:: battle_tower_struct wBT_OTTemp
wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2) wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2)
ds 10 ds 10
wc612:: wc612::
ds 10 ds 6
wc618::
ds 4
wInitHourBuffer:: ; c61c wInitHourBuffer:: ; c61c
ds 10 ds 10
wc626:: wc626::
@ -895,7 +897,7 @@ OverworldMap:: ; c800
OverworldMapEnd:: OverworldMapEnd::
ds OverworldMap - @ ds OverworldMap - @
wBillsPCPokemonList:: wBillsPCPokemonList:: ; c800
; Pokemon, box number, list index ; Pokemon, box number, list index
wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES) wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES)
@ -1131,8 +1133,12 @@ wcd32:: ds 1
wcd33:: ds 1 wcd33:: ds 1
wcd34:: ds 1 wcd34:: ds 1
wcd35:: ds 1 wcd35:: ds 1
wcd36:: ds 2
wcd38:: ds 1 ; current time for link/mobile?
wcd36:: ds 1 ; hours
wcd37:: ds 1 ; mins
wcd38:: ds 1 ; secs
wcd39:: ds 1 wcd39:: ds 1
wcd3a:: ds 1 wcd3a:: ds 1
wcd3b:: ds 1 wcd3b:: ds 1
@ -1144,9 +1150,12 @@ wcd40:: ds 1
wcd41:: ds 1 wcd41:: ds 1
wcd42:: ds 1 wcd42:: ds 1
wcd43:: ds 1 wcd43:: ds 1
wcd44:: ds 1
wcd45:: ds 1 ; some sort of timer in link battles
wcd46:: ds 1 wMobileInactivityTimerMinutes:: ds 1 ; mins
wMobileInactivityTimerSeconds:: ds 1 ; secs
wMobileInactivityTimerFrames:: ds 1 ; frames
wcd47:: ds 1 wcd47:: ds 1
BGMapPalBuffer:: ; cd48 BGMapPalBuffer:: ; cd48
@ -1163,6 +1172,7 @@ wcd4f:: ds 1
wcd50:: ds 1 wcd50:: ds 1
wcd51:: ds 1 wcd51:: ds 1
wcd52:: ds 1 wcd52:: ds 1
wMobileOpponentBattleMessage:: ; dc $c
wcd53:: ds 1 wcd53:: ds 1
wcd54:: ds 1 wcd54:: ds 1
wcd55:: ds 1 wcd55:: ds 1
@ -1231,10 +1241,14 @@ wcda1:: ds 8
wSGBPals:: ds 48 ; cda9 wSGBPals:: ds 48 ; cda9
AttrMap:: ; cdd9 AttrMap:: ; cdd9
; 20x18 grid of palettes for 8x8 tiles ; 20x18 grid of bg tile attributes for 8x8 tiles
; read horizontally from the top row ; read horizontally from the top row
; bit 3: vram bank ; bit 7: priority
; bit 0-2: palette id ; bit 6: y flip
; bit 5: x flip
; bit 4: pal # (non-cgb)
; bit 3: vram bank (cgb only)
; bit 2-0: pal # (cgb only)
ds SCREEN_WIDTH * SCREEN_HEIGHT ds SCREEN_WIDTH * SCREEN_HEIGHT
AttrMapEnd:: AttrMapEnd::
ds 1 ds 1
@ -3042,10 +3056,10 @@ w5_da00:: ds $200
w5_dc00:: ds $d w5_dc00:: ds $d
w5_dc0d:: ds 4 w5_dc0d:: ds 4
w5_dc11:: ds 9 w5_dc11:: ds 9
w5_dc1a:: ds $c w5_MobileOpponentBattleMessages:: ds $c ; dc1a
w5_dc26:: ds $c w5_MobileOpponentBattleStartMessage:: ds $c ; dc26
w5_dc32:: ds $c w5_MobileOpponentBattleWinMessage:: ds $c ; dc32
w5_dc3e:: ds $c w5_MobileOpponentBattleLossMessage:: ds $c ; dc3e
SECTION "WRAM 6", WRAMX, BANK [6] SECTION "WRAM 6", WRAMX, BANK [6]