mystery gift, credits

This commit is contained in:
PikalaxALT 2015-12-14 20:06:41 -05:00
parent c635e30777
commit 6e257bc7cd
17 changed files with 528 additions and 486 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ EvolutionAnimation: ; 4e5e1
ld a, [BaseDexNo] ld a, [BaseDexNo]
push af push af
call _EvolutionAnimation call .EvolutionAnimation
pop af pop af
ld [BaseDexNo], a ld [BaseDexNo], a
@ -29,7 +29,7 @@ EvolutionAnimation: ; 4e5e1
ret ret
; 4e607 ; 4e607
_EvolutionAnimation: ; 4e607 .EvolutionAnimation: ; 4e607
ld a, $e4 ld a, $e4
ld [rOBP0], a ld [rOBP0], a
@ -38,9 +38,9 @@ _EvolutionAnimation: ; 4e607
callba ClearSpriteAnims callba ClearSpriteAnims
ld de, EvolutionGFX ld de, .GFX
ld hl, VTiles0 ld hl, VTiles0
lb bc, BANK(EvolutionGFX), 8 lb bc, BANK(.GFX), 8
call Request2bpp call Request2bpp
xor a xor a
@ -76,7 +76,7 @@ _EvolutionAnimation: ; 4e607
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
call Function4e794 call .check_statused
jr c, .skip_cry jr c, .skip_cry
ld a, [Buffer1] ld a, [Buffer1]
@ -106,10 +106,10 @@ _EvolutionAnimation: ; 4e607
ld c, $0 ld c, $0
call .GetSGBLayout call .GetSGBLayout
call Function4e7a6 call .PlayEvolvedSFX
callba ClearSpriteAnims callba ClearSpriteAnims
call Function4e794 call .check_statused
jr c, .asm_4e6de jr c, .no_anim
ld a, [wc2c6] ld a, [wc2c6]
push af push af
@ -131,7 +131,7 @@ _EvolutionAnimation: ; 4e607
ld [wc2c6], a ld [wc2c6], a
ret ret
.asm_4e6de .no_anim
ret ret
.cancel_evo .cancel_evo
@ -143,9 +143,9 @@ _EvolutionAnimation: ; 4e607
ld c, $0 ld c, $0
call .GetSGBLayout call .GetSGBLayout
call Function4e7a6 call .PlayEvolvedSFX
callba ClearSpriteAnims callba ClearSpriteAnims
call Function4e794 call .check_statused
ret c ret c
ld a, [PlayerHPPal] ld a, [PlayerHPPal]
@ -259,7 +259,7 @@ endr
ret ret
; 4e794 ; 4e794
Function4e794: ; 4e794 .check_statused: ; 4e794
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld hl, PartyMon1Species ld hl, PartyMon1Species
call GetPartyLocation call GetPartyLocation
@ -269,7 +269,7 @@ Function4e794: ; 4e794
ret ret
; 4e7a6 ; 4e7a6
Function4e7a6: ; 4e7a6 .PlayEvolvedSFX: ; 4e7a6
ld a, [Buffer4] ld a, [Buffer4]
and a and a
ret nz ret nz
@ -279,24 +279,24 @@ Function4e7a6: ; 4e7a6
ld a, [hl] ld a, [hl]
push af push af
ld [hl], $0 ld [hl], $0
.loop .loop4
call Function4e7cf call .balls_of_light
jr nc, .done jr nc, .done
call Function4e80c call .AnimateBallsOfLight
jr .loop jr .loop4
.done .done
ld c, 32 ld c, 32
.loop2 .loop5
call Function4e80c call .AnimateBallsOfLight
dec c dec c
jr nz, .loop2 jr nz, .loop5
pop af pop af
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
; 4e7cf ; 4e7cf
Function4e7cf: ; 4e7cf .balls_of_light: ; 4e7cf
ld hl, wJumptableIndex ld hl, wJumptableIndex
ld a, [hl] ld a, [hl]
cp 32 cp 32
@ -304,45 +304,45 @@ Function4e7cf: ; 4e7cf
ld d, a ld d, a
inc [hl] inc [hl]
and $1 and $1
jr nz, .asm_4e7e6 jr nz, .done_balls
ld e, $0 ld e, $0
call Function4e7e8 call .GenerateBallOfLight
ld e, $10 ld e, $10
call Function4e7e8 call .GenerateBallOfLight
.asm_4e7e6 .done_balls
scf scf
ret ret
; 4e7e8 ; 4e7e8
Function4e7e8: ; 4e7e8 .GenerateBallOfLight: ; 4e7e8
push de push de
depixel 9, 11 depixel 9, 11
ld a, SPRITE_ANIM_INDEX_13 ld a, SPRITE_ANIM_INDEX_13
call _InitSpriteAnimStruct call _InitSpriteAnimStruct
ld hl, $b ld hl, SPRITEANIMSTRUCT_0B
add hl, bc add hl, bc
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
and $e and %1110
sla a sla a
pop de pop de
add e add e
ld [hl], a ld [hl], a
ld hl, $3 ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
ld hl, $c ld hl, SPRITEANIMSTRUCT_0C
add hl, bc add hl, bc
ld [hl], $10 ld [hl], $10
ret ret
; 4e80c ; 4e80c
Function4e80c: ; 4e80c .AnimateBallsOfLight: ; 4e80c
push bc push bc
callab PlaySpriteAnimations callab PlaySpriteAnimations
; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES ; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES
ld a, [hVBlankCounter] ld a, [hVBlankCounter]
and $e and %1110
srl a srl a
rept 2 rept 2
inc a inc a
@ -351,7 +351,7 @@ endr
ld b, a ld b, a
ld hl, Sprites + 3 ; attributes ld hl, Sprites + 3 ; attributes
ld c, 40 ld c, 40
.loop .loop6
ld a, [hl] ld a, [hl]
or b or b
ld [hli], a ld [hli], a
@ -359,13 +359,13 @@ rept 3
inc hl inc hl
endr endr
dec c dec c
jr nz, .loop jr nz, .loop6
pop bc pop bc
call DelayFrame call DelayFrame
ret ret
; 4e831 ; 4e831
EvolutionGFX: .GFX:
INCBIN "gfx/evo/bubble_large.2bpp" INCBIN "gfx/evo/bubble_large.2bpp"
INCBIN "gfx/evo/bubble.2bpp" INCBIN "gfx/evo/bubble.2bpp"

115
engine/init_gender.asm Executable file
View File

@ -0,0 +1,115 @@
InitCrystalData: ; 48000
ld a, $1
ld [wd474], a
xor a
ld [wd473], a
ld [PlayerGender], a
ld [wd475], a
ld [wd476], a
ld [wd477], a
ld [wd478], a
ld [wd002], a
ld [wd003], a
; could have done "ld a, [wd479] \ and %11111100", saved four operations
ld a, [wd479]
res 0, a
ld [wd479], a
ld a, [wd479]
res 1, a
ld [wd479], a
ret
; 4802f
INCLUDE "misc/mobile_12.asm"
InitGender: ; 48dcb (12:4dcb)
call InitGenderScreen
call LoadGenderScreenPal
call LoadGenderScreenLightBlueTile
call WaitBGMap2
call SetPalettes
ld hl, TextJump_AreYouABoyOrAreYouAGirl
call PrintText
ld hl, .MenuDataHeader
call LoadMenuDataHeader
call WaitBGMap2
call InterpretMenu2
call WriteBackup
ld a, [MenuSelection2]
dec a
ld [PlayerGender], a
ld c, 10
call DelayFrames
ret
; 48dfc (12:4dfc)
.MenuDataHeader: ; 0x48dfc
db $40 ; flags
db 04, 06 ; start coords
db 09, 12 ; end coords
dw .MenuData2
db 1 ; default option
; 0x48e04
.MenuData2: ; 0x48e04
db $a1 ; flags
db 2 ; items
db "Boy@"
db "Girl@"
; 0x48e0f
TextJump_AreYouABoyOrAreYouAGirl: ; 0x48e0f
; Are you a boy? Or are you a girl?
text_jump Text_AreYouABoyOrAreYouAGirl
db "@"
; 0x48e14
InitGenderScreen: ; 48e14 (12:4e14)
ld a, $10
ld [MusicFade], a
ld a, $0
ld [MusicFadeIDLo], a
ld a, $0
ld [MusicFadeIDHi], a
ld c, 8
call DelayFrames
call ClearBGPalettes
call InitCrystalData
call LoadFontsExtra
hlcoord 0, 0
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
ld a, $0
call ByteFill
hlcoord 0, 0, AttrMap
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
xor a
call ByteFill
ret
LoadGenderScreenPal: ; 48e47 (12:4e47)
ld hl, .Palette
ld de, UnknBGPals
ld bc, 1 palettes
ld a, $5
call FarCopyWRAM
callba Function96a4
ret
; 48e5c (12:4e5c)
.Palette: ; 48e5c
RGB 31, 31, 31
RGB 09, 30, 31
RGB 01, 11, 31
RGB 00, 00, 00
; 48e64
LoadGenderScreenLightBlueTile: ; 48e64 (12:4e64)
ld de, .LightBlueTile
ld hl, VTiles2 tile $00
lb bc, BANK(.LightBlueTile), 1
call Get2bpp
ret
; 48e71 (12:4e71)
.LightBlueTile: ; 48e71
INCBIN "gfx/intro/gender_screen.2bpp"

View File

@ -353,7 +353,7 @@ LoadOrRegenerateLuckyIDNumber: ; 5d33
Continue: ; 5d65 Continue: ; 5d65
callba TryLoadSaveFile callba TryLoadSaveFile
jr c, .FailToLoad jr c, .FailToLoad
callba Function150b9 callba _LoadData
call LoadStandardMenuDataHeader call LoadStandardMenuDataHeader
call DisplaySaveInfoOnContinue call DisplaySaveInfoOnContinue
ld a, $1 ld a, $1

View File

@ -556,7 +556,7 @@ Function4a0c2: ; 4a0c2 (12:60c2)
ld bc, $6 ld bc, $6
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
callba Function150b9 callba _LoadData
ld c, 2 ld c, 2
call DelayFrames call DelayFrames
ld c, $1 ld c, $1

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
Function2c642: ; 2c642 (b:4642) Function2c642: ; 2c642 (b:4642)
ld de, wc800 ld de, wMysteryGiftStaging
ld a, $1 ld a, $1
ld [de], a ld [de], a
inc de inc de ; wc801
ld a, BANK(sGameData) ld a, BANK(sGameData)
call GetSRAMBank call GetSRAMBank
ld hl, sPlayerData + PlayerID - wPlayerData ld hl, sPlayerData + PlayerID - wPlayerData
@ -13,34 +13,34 @@ Function2c642: ; 2c642 (b:4642)
ld a, [hl] ld a, [hl]
ld [de], a ld [de], a
ld c, a ld c, a
inc de inc de ; wc803
push bc push bc
ld hl, sPlayerData + PlayerName - wPlayerData ld hl, sPlayerData + PlayerName - wPlayerData
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyBytes call CopyBytes
push de push de ; wc80e
ld hl, sPokemonData + PokedexCaught - wPokemonData ld hl, sPokemonData + PokedexCaught - wPokemonData
ld b, (NUM_POKEMON + 7) / 8 ld b, EndPokedexCaught - PokedexCaught
call CountSetBits call CountSetBits
pop de pop de
pop bc pop bc
ld a, [wd265] ld a, [wd265]
ld [de], a ld [de], a
inc de inc de ; wc80f
call CloseSRAM call CloseSRAM
call Random call Random
and $1 and $1
ld [de], a ld [de], a
inc de inc de ; wc810
call Function2c6ac call .RandomSample
ld [de], a ld [de], a
inc de inc de ; wc811
ld a, c ld a, c
ld c, b ld c, b
ld b, a ld b, a
call Function2c6ac call .RandomSample
ld [de], a ld [de], a
inc de inc de ; wc812
ld a, BANK(sBackupMysteryGiftItem) ld a, BANK(sBackupMysteryGiftItem)
call GetSRAMBank call GetSRAMBank
ld a, [sBackupMysteryGiftItem] ld a, [sBackupMysteryGiftItem]
@ -51,12 +51,12 @@ Function2c642: ; 2c642 (b:4642)
ld a, $14 ld a, $14
ld [wca00], a ld [wca00], a
call CloseSRAM call CloseSRAM
ld hl, wc800 ld hl, wMysteryGiftStaging
ld de, wc950 ld de, wMysteryGiftPlayerData
ld bc, $14 ld bc, wMysteryGiftPlayerDataEnd - wMysteryGiftPlayerData
jp CopyBytes jp CopyBytes
Function2c6ac: ; 2c6ac (b:46ac) .RandomSample: ; 2c6ac (b:46ac)
push de push de
call Random call Random
cp $19 ; 10 percent cp $19 ; 10 percent
@ -124,8 +124,8 @@ Function2c6ac: ; 2c6ac (b:46ac)
MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708) MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708)
ld a, c ld a, c
cp $25 ; 37 cp $25 ; 37
jr nc, Function2c722 jr nc, MysteryGiftFallbackItem
ld hl, Unknown_2c725 ld hl, MysteryGiftItems
ld b, 0 ld b, 0
add hl, bc add hl, bc
ld c, [hl] ld c, [hl]
@ -134,20 +134,19 @@ MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708)
MysteryGiftGetDecoration: ; 2c715 (b:4715) MysteryGiftGetDecoration: ; 2c715 (b:4715)
ld a, c ld a, c
cp $25 ; 37 cp $25 ; 37
jr nc, Function2c722 jr nc, MysteryGiftFallbackItem
ld hl, Unknown_2c74a ld hl, MysteryGiftDecos
ld b, 0 ld b, 0
add hl, bc add hl, bc
ld c, [hl] ld c, [hl]
ret ret
Function2c722: ; 2c722 (b:4722) MysteryGiftFallbackItem: ; 2c722 (b:4722)
ld c, DECO_POLKADOT_BED ; GREAT_BALL ld c, DECO_POLKADOT_BED ; GREAT_BALL
ret ret
; 2c725 (b:4725) ; 2c725 (b:4725)
Unknown_2c725: ; 2c725 MysteryGiftItems: ; 2c725
; May or may not be items.
db BERRY db BERRY
db PRZCUREBERRY db PRZCUREBERRY
db MINT_BERRY db MINT_BERRY
@ -187,8 +186,7 @@ Unknown_2c725: ; 2c725
db MIRAGE_MAIL db MIRAGE_MAIL
; 2c74a ; 2c74a
Unknown_2c74a: ; 2c74a MysteryGiftDecos: ; 2c74a
; May or may not be items.
db DECO_SNES db DECO_SNES
db DECO_BIG_SNORLAX_DOLL db DECO_BIG_SNORLAX_DOLL
db DECO_BIG_ONIX_DOLL db DECO_BIG_ONIX_DOLL

View File

@ -892,7 +892,7 @@ _SaveData: ; 1509a
jp CloseSRAM jp CloseSRAM
Function150b9: ; 150b9 _LoadData: ; 150b9
ld a, BANK(sCrystalData) ld a, BANK(sCrystalData)
call GetSRAMBank call GetSRAMBank
ld hl, sCrystalData ld hl, sCrystalData
@ -938,8 +938,11 @@ endr
; 150f9 ; 150f9
SaveBoxAddress: ; 150f9 SaveBoxAddress: ; 150f9
; Save box via wMisc.
; We do this in three steps because the size of wMisc is less than
; the size of sBox.
push hl push hl
; Load the first part of the active box.
push af push af
push de push de
ld a, BANK(sBox) ld a, BANK(sBox)
@ -951,7 +954,7 @@ SaveBoxAddress: ; 150f9
call CloseSRAM call CloseSRAM
pop de pop de
pop af pop af
; Save it to the target box.
push af push af
push de push de
call GetSRAMBank call GetSRAMBank
@ -959,6 +962,8 @@ SaveBoxAddress: ; 150f9
ld bc, (wMiscEnd - wMisc) ld bc, (wMiscEnd - wMisc)
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
; Load the second part of the active box.
ld a, BANK(sBox) ld a, BANK(sBox)
call GetSRAMBank call GetSRAMBank
ld hl, sBox + (wMiscEnd - wMisc) ld hl, sBox + (wMiscEnd - wMisc)
@ -973,7 +978,7 @@ SaveBoxAddress: ; 150f9
add hl, de add hl, de
ld e, l ld e, l
ld d, h ld d, h
; Save it to the next part of the target box.
push af push af
push de push de
call GetSRAMBank call GetSRAMBank
@ -981,6 +986,8 @@ SaveBoxAddress: ; 150f9
ld bc, (wMiscEnd - wMisc) ld bc, (wMiscEnd - wMisc)
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
; Load the third and final part of the active box.
ld a, BANK(sBox) ld a, BANK(sBox)
call GetSRAMBank call GetSRAMBank
ld hl, sBox + (wMiscEnd - wMisc) * 2 ld hl, sBox + (wMiscEnd - wMisc) * 2
@ -995,7 +1002,7 @@ SaveBoxAddress: ; 150f9
add hl, de add hl, de
ld e, l ld e, l
ld d, h ld d, h
; Save it to the final part of the target box.
call GetSRAMBank call GetSRAMBank
ld hl, wMisc ld hl, wMisc
ld bc, sBoxEnd - (sBox + (wMiscEnd - wMisc) * 2) ; $8e ld bc, sBoxEnd - (sBox + (wMiscEnd - wMisc) * 2) ; $8e
@ -1008,10 +1015,13 @@ SaveBoxAddress: ; 150f9
LoadBoxAddress: ; 1517d (5:517d) LoadBoxAddress: ; 1517d (5:517d)
; Load box via wMisc.
; We do this in three steps because the size of wMisc is less than
; the size of sBox.
push hl push hl
ld l, e ld l, e
ld h, d ld h, d
; Load part 1
push af push af
push hl push hl
call GetSRAMBank call GetSRAMBank
@ -1031,7 +1041,7 @@ LoadBoxAddress: ; 1517d (5:517d)
ld de, (wMiscEnd - wMisc) ld de, (wMiscEnd - wMisc)
add hl, de add hl, de
; Load part 2
push af push af
push hl push hl
call GetSRAMBank call GetSRAMBank
@ -1048,7 +1058,7 @@ LoadBoxAddress: ; 1517d (5:517d)
call CloseSRAM call CloseSRAM
pop hl pop hl
pop af pop af
; Load part 3
ld de, (wMiscEnd - wMisc) ld de, (wMiscEnd - wMisc)
add hl, de add hl, de
call GetSRAMBank call GetSRAMBank

View File

@ -3211,14 +3211,14 @@ Script_halloffame: ; 97bd5
callba HallOfFame callba HallOfFame
ld hl, GameTimerPause ld hl, GameTimerPause
set 0, [hl] set 0, [hl]
jr DisplayCredits jr ReturnFromCredits
; 97bf3 ; 97bf3
Script_credits: ; 97bf3 Script_credits: ; 97bf3
; script command 0xa2 ; script command 0xa2
callba RedCredits callba RedCredits
DisplayCredits: ReturnFromCredits:
call Script_end_all call Script_end_all
ld a, $3 ld a, $3
call LoadMapStatus call LoadMapStatus

View File

@ -125,7 +125,7 @@ FadeInPalettes:: ; 8c079
; 8c084 ; 8c084
FadeOutPalettes:: ; 8c084 FadeOutPalettes:: ; 8c084
call Function8c0c1 call FillWhiteBGColor
ld c, $9 ld c, $9
call GetTimePalFade call GetTimePalFade
ld b, $4 ld b, $4
@ -134,7 +134,7 @@ FadeOutPalettes:: ; 8c084
; 8c092 ; 8c092
Special_BattleTowerFade: ; 8c092 Special_BattleTowerFade: ; 8c092
call Function8c0c1 call FillWhiteBGColor
ld c, $9 ld c, $9
call GetTimePalFade call GetTimePalFade
ld b, $4 ld b, $4
@ -167,19 +167,20 @@ Special_FadeBlackQuickly: ; 8c0b6
; 8c0c1 ; 8c0c1
Function8c0c1: ; 8c0c1 FillWhiteBGColor: ; 8c0c1
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, UnknBGPals ld hl, UnknBGPals
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hli] ld a, [hli]
ld d, a ld d, a
ld hl, UnknBGPals + 8 ld hl, UnknBGPals + 1 palettes
ld c, $6 ld c, 6
.asm_8c0d4 .loop
ld a, e ld a, e
ld [hli], a ld [hli], a
ld a, d ld a, d
@ -188,7 +189,8 @@ rept 6
inc hl inc hl
endr endr
dec c dec c
jr nz, .asm_8c0d4 jr nz, .loop
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ret ret
@ -200,7 +202,7 @@ ENDM
ReplaceTimeOfDayPals: ; 8c0e5 ReplaceTimeOfDayPals: ; 8c0e5
ld hl, .BrightnessLevels ld hl, .BrightnessLevels
ld a, [wc2d0] ld a, [wMapTimeOfDay]
cp $4 ; Dark cave, needs Flash cp $4 ; Dark cave, needs Flash
jr z, .DarkCave jr z, .DarkCave
and $7 and $7
@ -306,7 +308,7 @@ ConvertTimePalsIncHL: ; 8c15e
rept 3 rept 3
inc hl inc hl
endr endr
ld c, $2 ld c, 2
call DelayFrames call DelayFrames
dec b dec b
jr nz, .loop jr nz, .loop
@ -319,7 +321,7 @@ ConvertTimePalsDecHL: ; 8c16d
rept 3 rept 3
dec hl dec hl
endr endr
ld c, $2 ld c, 2
call DelayFrames call DelayFrames
dec b dec b
jr nz, .loop jr nz, .loop

View File

@ -7,13 +7,12 @@ RunCallback_05_03: ; 1045b0
call ResetBikeFlags call ResetBikeFlags
ld a, $5 ld a, $5
call RunMapCallback call RunMapCallback
RunCallback_03: ; 1045c4 RunCallback_03: ; 1045c4
callba ClearCmdQueue callba ClearCmdQueue
ld a, $3 ld a, $3
call RunMapCallback call RunMapCallback
call GetMapHeaderTimeOfDayNybble call GetMapHeaderTimeOfDayNybble
ld [wc2d0], a ld [wMapTimeOfDay], a
ret ret

125
main.asm
View File

@ -10788,123 +10788,9 @@ INCLUDE "data/pokedex/entry_pointers.asm"
INCLUDE "engine/mail.asm" INCLUDE "engine/mail.asm"
SECTION "bank12", ROMX, BANK[$12] SECTION "Crystal Unique", ROMX, BANK[$12]
Function48000: ; 48000 INCLUDE "engine/init_gender.asm"
ld a, $1
ld [wd474], a
xor a
ld [wd473], a
ld [PlayerGender], a
ld [wd475], a
ld [wd476], a
ld [wd477], a
ld [wd478], a
ld [wd002], a
ld [wd003], a
; could have done "ld a, [wd479] \ and %11111100", saved four operations
ld a, [wd479]
res 0, a
ld [wd479], a
ld a, [wd479]
res 1, a
ld [wd479], a
ret
; 4802f
INCLUDE "misc/mobile_12.asm"
InitGender: ; 48dcb (12:4dcb)
call Function48e14
call Function48e47
call Function48e64
call WaitBGMap2
call SetPalettes
ld hl, TextJump_AreYouABoyOrAreYouAGirl
call PrintText
ld hl, .MenuDataHeader
call LoadMenuDataHeader
call WaitBGMap2
call InterpretMenu2
call WriteBackup
ld a, [MenuSelection2]
dec a
ld [PlayerGender], a
ld c, 10
call DelayFrames
ret
; 48dfc (12:4dfc)
.MenuDataHeader: ; 0x48dfc
db $40 ; flags
db 04, 06 ; start coords
db 09, 12 ; end coords
dw .MenuData2
db 1 ; default option
; 0x48e04
.MenuData2: ; 0x48e04
db $a1 ; flags
db 2 ; items
db "Boy@"
db "Girl@"
; 0x48e0f
TextJump_AreYouABoyOrAreYouAGirl: ; 0x48e0f
; Are you a boy? Or are you a girl?
text_jump Text_AreYouABoyOrAreYouAGirl
db "@"
; 0x48e14
Function48e14: ; 48e14 (12:4e14)
ld a, $10
ld [MusicFade], a
ld a, $0
ld [MusicFadeIDLo], a
ld a, $0
ld [MusicFadeIDHi], a
ld c, 8
call DelayFrames
call ClearBGPalettes
call Function48000
call LoadFontsExtra
hlcoord 0, 0
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
ld a, $0
call ByteFill
hlcoord 0, 0, AttrMap
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
xor a
call ByteFill
ret
Function48e47: ; 48e47 (12:4e47)
ld hl, Palette_48e5c
ld de, UnknBGPals
ld bc, $8
ld a, $5
call FarCopyWRAM
callba Function96a4
ret
; 48e5c (12:4e5c)
Palette_48e5c: ; 48e5c
RGB 31, 31, 31
RGB 09, 30, 31
RGB 01, 11, 31
RGB 00, 00, 00
; 48e64
Function48e64: ; 48e64 (12:4e64)
ld de, GFX_48e71
ld hl, VTiles2 tile $00
lb bc, BANK(GFX_48e71), 1
call Get2bpp
ret
; 48e71 (12:4e71)
GFX_48e71: ; 48e71
INCBIN "gfx/unknown/048e71.2bpp"
DrawKrisPackGFX: ; 48e81 DrawKrisPackGFX: ; 48e81
ld hl, PackFGFXPointers ld hl, PackFGFXPointers
@ -11064,9 +10950,10 @@ Function4930f: ; 4930f (mobile)
; 49330 (12:5330) ; 49330 (12:5330)
.jumptable: ; 49330 .jumptable: ; 49330
dw Function4936e jumptable_start
dw Function4942f jumptable Function4936e
dw Function49706 jumptable Function4942f
jumptable Function49706
; 49336 ; 49336
Function49336: ; 49336 Function49336: ; 49336

View File

@ -6,7 +6,7 @@ InitMobileProfile: ; 4802f (12:402f)
set 0, [hl] set 0, [hl]
ld a, c ld a, c
and a and a
call z, Function48000 call z, InitCrystalData
call ClearBGPalettes call ClearBGPalettes
call Function48d3d call Function48d3d
ld a, [wd479] ld a, [wd479]

View File

@ -214,7 +214,7 @@ Function89240: ; 89240
Function89245: ; 89245 (22:5245) Function89245: ; 89245 (22:5245)
callba TryLoadSaveFile callba TryLoadSaveFile
ret c ret c
callba Function150b9 callba _LoadData
and a and a
ret ret

View File

@ -294,7 +294,7 @@ UnknownText_0x1c04fa: ; 1c04fa
text_from_ram StringBuffer1 text_from_ram StringBuffer1
text "" text ""
cont "to @" cont "to @"
text_from_ram wc950 + 3 text_from_ram wMysteryGiftPlayerName
text "'s home." text "'s home."
prompt prompt
; 1c051a ; 1c051a

View File

@ -334,7 +334,8 @@ wc2cc:: ds 1
wc2cd:: ds 1 wc2cd:: ds 1
wSpriteUpdatesEnabled:: ds 1 wSpriteUpdatesEnabled:: ds 1
wc2cf:: ds 1 wc2cf:: ds 1
wc2d0:: ds 4 wMapTimeOfDay:: ds 1
ds 3
wc2d4:: ds 1 wc2d4:: ds 1
wc2d5:: ds 1 wc2d5:: ds 1
wLastDexEntry:: ds 1 wLastDexEntry:: ds 1
@ -1128,18 +1129,18 @@ OverworldMap:: ; c800
OverworldMapEnd:: OverworldMapEnd::
ds OverworldMap - @ ds OverworldMap - @
wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES)
wMysteryGiftStaging::
wc800:: ds 1 wc800:: ds 1
wMysteryGiftPlayerID::
wc801:: ds 1 wc801:: ds 1
wc802:: ds 1 wc802:: ds 1
wMysteryGiftPlayerName::
wc803:: ds 4 wc803:: ds 4
wc807:: ds 7 wc807:: ds 7
wMysteryGiftPlayerDexCaught:: ds 1 wc80e:: ds 1
wc80f:: ds 1 wc80f:: ds 1
wc810:: ds 1 wc810:: ds 1
wc811:: ds 1 wc811:: ds 1
wMysteryGiftPlayerBackupItem::
wc812:: ds 1 wc812:: ds 1
wc813:: ds 1 wc813:: ds 1
wc814:: ds 4 wc814:: ds 4
@ -1162,20 +1163,33 @@ wc8c0:: ds 16
wc8d0:: ds 16 wc8d0:: ds 16
wc8e0:: ds 16 wc8e0:: ds 16
wc8f0:: ds 16 wc8f0:: ds 16
wMysteryGiftPartnerData::
wc900:: ds 1 wc900:: ds 1
wMysteryGiftPartnerID:: ds 2 wMysteryGiftPartnerID:: ds 2
wMysteryGiftPartnerName:: ds NAME_LENGTH wMysteryGiftPartnerName:: ds NAME_LENGTH
wc90e:: ds 1 wMysteryGiftPartnerDexCaught:: ds 1
wc90f:: ds 1 wc90f::
wc910:: ds 1 wMysteryGiftPartnerSentDeco:: ds 1
wc911:: ds 1 wMysteryGiftPartnerWhichItem:: ds 1
wc912:: ds 14 wMysteryGiftPartnerWhichDeco:: ds 1
wc912:: ds 2
wMysteryGiftPartnerDataEnd::
ds 12
wc920:: ds 16 wc920:: ds 16
wc930:: ds 16 wc930:: ds 16
wc940:: ds 16 wc940:: ds 16
wc950:: ds 16 wMysteryGiftPlayerData::
wc960:: ds 2 wc950:: ds 1
wc962:: ds 2 wMysteryGiftPlayerID:: ds 2
wMysteryGiftPlayerName:: ds NAME_LENGTH
wMysteryGiftPlayerDexCaught:: ds 1
wMysteryGiftPlayerSentDeco:: ds 1
wMysteryGiftPlayerWhichItem:: ds 1
wMysteryGiftPlayerWhichDeco:: ds 1
wMysteryGiftPlayerBackupItem:: ds 2
wMysteryGiftPlayerDataEnd::
wc964:: ds 12 wc964:: ds 12
wc970:: ds 16 wc970:: ds 16
wc980:: ds 16 wc980:: ds 16
@ -1188,6 +1202,8 @@ wc9e0:: ds 16
wc9f0:: ds 4 wc9f0:: ds 4
wc9f4:: ds 5 wc9f4:: ds 5
wc9f9:: ds 7 wc9f9:: ds 7
wCreditsFaux2bpp::
wca00:: ds 1 wca00:: ds 1
wca01:: ds 1 wca01:: ds 1
wca02:: ds 14 wca02:: ds 14