You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Pokegear
This commit is contained in:
@@ -4142,7 +4142,7 @@ GetEnemyMonDVs: ; 3da97
|
||||
ld a, [EnemySubStatus5]
|
||||
bit SUBSTATUS_TRANSFORMED, a
|
||||
ret z
|
||||
ld hl, wc6f2
|
||||
ld hl, wEnemyBackupDVs
|
||||
ld a, [wBattleMode]
|
||||
dec a
|
||||
ret z
|
||||
@@ -5009,7 +5009,7 @@ DrawEnemyHUD: ; 3e043
|
||||
ld a, [EnemySubStatus5]
|
||||
bit SUBSTATUS_TRANSFORMED, a
|
||||
jr z, .ok
|
||||
ld hl, wc6f2
|
||||
ld hl, wEnemyBackupDVs
|
||||
.ok
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
@@ -6336,7 +6336,7 @@ LoadEnemyMon: ; 3e8eb
|
||||
jr z, .InitDVs
|
||||
|
||||
; Unknown
|
||||
ld hl, wc6f2
|
||||
ld hl, wEnemyBackupDVs
|
||||
ld de, EnemyMonDVs
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
|
||||
@@ -477,14 +477,14 @@ MAX_OUTDOOR_SPRITES EQU 23
|
||||
const SPRITE_ANIM_INDEX_02
|
||||
const SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
|
||||
const SPRITE_ANIM_INDEX_04
|
||||
const SPRITE_ANIM_INDEX_05
|
||||
const SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR
|
||||
const SPRITE_ANIM_INDEX_SLOT_GOLEM
|
||||
const SPRITE_ANIM_INDEX_SLOTS_CHANSEY
|
||||
const SPRITE_ANIM_INDEX_SLOTS_EGG
|
||||
const SPRITE_ANIM_INDEX_09
|
||||
const SPRITE_ANIM_INDEX_RED_WALK
|
||||
const SPRITE_ANIM_INDEX_0B
|
||||
const SPRITE_ANIM_INDEX_0C
|
||||
const SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR
|
||||
const SPRITE_ANIM_INDEX_0D
|
||||
const SPRITE_ANIM_INDEX_0E
|
||||
const SPRITE_ANIM_INDEX_0F
|
||||
|
||||
@@ -109,7 +109,7 @@ endr
|
||||
|
||||
.spawn_object
|
||||
depixel 6, 3, 4, 4
|
||||
ld a, SPRITE_ANIM_INDEX_0C
|
||||
ld a, SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR
|
||||
call _InitSpriteAnimStruct
|
||||
ld a, 5
|
||||
ld [wDummyGameNumberTriesRemaining], a
|
||||
|
||||
@@ -19,7 +19,7 @@ HealMachineAnim: ; 12324
|
||||
|
||||
.DoJumptableFunctions: ; 1233e
|
||||
xor a
|
||||
ld [wd1ec], a
|
||||
ld [Buffer3], a
|
||||
.jumpable_loop
|
||||
ld a, [Buffer1]
|
||||
ld e, a
|
||||
@@ -31,10 +31,10 @@ endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld a, [wd1ec]
|
||||
ld a, [Buffer3]
|
||||
ld e, a
|
||||
inc a
|
||||
ld [wd1ec], a
|
||||
ld [Buffer3], a
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
cp 5
|
||||
@@ -81,14 +81,14 @@ endr
|
||||
|
||||
.PC_LoadBallsOntoMachine: ; 12393
|
||||
ld hl, Sprites + $80
|
||||
ld de, .PC_ElmsLab_TileMap
|
||||
ld de, .PC_ElmsLab_OAM
|
||||
call .PlaceHealingMachineTile
|
||||
call .PlaceHealingMachineTile
|
||||
jr .LoadBallsOntoMachine
|
||||
|
||||
.HOF_LoadBallsOntoMachine: ; 123a1
|
||||
ld hl, Sprites + $80
|
||||
ld de, .HOF_TileMap
|
||||
ld de, .HOF_OAM
|
||||
|
||||
.LoadBallsOntoMachine: ; 123a7
|
||||
ld a, [PartyCount]
|
||||
@@ -126,28 +126,28 @@ endr
|
||||
ret
|
||||
; 123dc
|
||||
|
||||
.PC_ElmsLab_TileMap: ; 123dc
|
||||
db $20, $22, $7c, $16
|
||||
db $20, $26, $7c, $16
|
||||
db $26, $20, $7d, $16
|
||||
db $26, $28, $7d, $36
|
||||
db $2b, $20, $7d, $16
|
||||
db $2b, $28, $7d, $36
|
||||
db $30, $20, $7d, $16
|
||||
db $30, $28, $7d, $36
|
||||
.PC_ElmsLab_OAM: ; 123dc
|
||||
dsprite 4, 0, 4, 2, $7c, $16
|
||||
dsprite 4, 0, 4, 6, $7c, $16
|
||||
dsprite 4, 6, 4, 0, $7d, $16
|
||||
dsprite 4, 6, 5, 0, $7d, $36 ; xflip
|
||||
dsprite 5, 3, 4, 0, $7d, $16
|
||||
dsprite 5, 3, 5, 0, $7d, $36 ; xflip
|
||||
dsprite 6, 0, 4, 0, $7d, $16
|
||||
dsprite 6, 0, 5, 0, $7d, $36 ; xflip
|
||||
; 123fc
|
||||
|
||||
.HealMachineGFX: ; 123fc
|
||||
INCBIN "gfx/unknown/0123fc.2bpp"
|
||||
; 1241c
|
||||
|
||||
.HOF_TileMap: ; 1241c
|
||||
db $3c, $51, $7d, $16
|
||||
db $3c, $56, $7d, $16
|
||||
db $3b, $4d, $7d, $16
|
||||
db $3b, $5a, $7d, $16
|
||||
db $39, $49, $7d, $16
|
||||
db $39, $5d, $7d, $16
|
||||
.HOF_OAM: ; 1241c
|
||||
dsprite 7, 4, 10, 1, $7d, $16
|
||||
dsprite 7, 4, 10, 6, $7d, $16
|
||||
dsprite 7, 3, 9, 5, $7d, $16
|
||||
dsprite 7, 3, 11, 2, $7d, $16
|
||||
dsprite 7, 1, 9, 1, $7d, $16
|
||||
dsprite 7, 1, 11, 5, $7d, $16
|
||||
; 12434
|
||||
|
||||
.LoadPalettes: ; 12434
|
||||
@@ -241,10 +241,10 @@ endr
|
||||
.PlaceHealingMachineTile: ; 124a3
|
||||
push bc
|
||||
ld a, [Buffer1]
|
||||
lb bc, $10, $20
|
||||
bcpixel 2, 4
|
||||
cp $1 ; ElmsLab
|
||||
jr z, .okay
|
||||
lb bc, $00, $00
|
||||
bcpixel 0, 0
|
||||
|
||||
.okay
|
||||
ld a, [de]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
219
engine/prof_oaks_pc.asm
Executable file
219
engine/prof_oaks_pc.asm
Executable file
@@ -0,0 +1,219 @@
|
||||
|
||||
ProfOaksPC: ; 0x265d3
|
||||
ld hl, OakPCText1
|
||||
call MenuTextBox
|
||||
call YesNoBox
|
||||
jr c, .shutdown
|
||||
call ProfOaksPCBoot ; player chose "yes"?
|
||||
.shutdown
|
||||
ld hl, OakPCText4
|
||||
call PrintText
|
||||
call JoyWaitAorB
|
||||
call ExitMenu
|
||||
ret
|
||||
|
||||
ProfOaksPCBoot ; 0x265ee
|
||||
ld hl, OakPCText2
|
||||
call PrintText
|
||||
call Rate
|
||||
call PlaySFX ; sfx loaded by previous Rate function call
|
||||
call JoyWaitAorB
|
||||
call WaitSFX
|
||||
ret
|
||||
|
||||
ProfOaksPCRating: ; 0x26601
|
||||
call Rate
|
||||
push de
|
||||
ld de, MUSIC_NONE
|
||||
call PlayMusic
|
||||
pop de
|
||||
call PlaySFX
|
||||
call JoyWaitAorB
|
||||
call WaitSFX
|
||||
ret
|
||||
|
||||
Rate: ; 0x26616
|
||||
; calculate Seen/Owned
|
||||
ld hl, PokedexSeen
|
||||
ld b, EndPokedexSeen - PokedexSeen
|
||||
call CountSetBits
|
||||
ld [wd002], a
|
||||
ld hl, PokedexCaught
|
||||
ld b, EndPokedexCaught - PokedexCaught
|
||||
call CountSetBits
|
||||
ld [wd003], a
|
||||
|
||||
; print appropriate rating
|
||||
call .UpdateRatingBuffers
|
||||
ld hl, OakPCText3
|
||||
call PrintText
|
||||
call JoyWaitAorB
|
||||
ld a, [wd003]
|
||||
ld hl, OakRatings
|
||||
call FindOakRating
|
||||
push de
|
||||
call PrintText
|
||||
pop de
|
||||
ret
|
||||
|
||||
.UpdateRatingBuffers: ; 0x26647
|
||||
ld hl, StringBuffer3
|
||||
ld de, wd002
|
||||
call .UpdateRatingBuffer
|
||||
ld hl, StringBuffer4
|
||||
ld de, wd003
|
||||
call .UpdateRatingBuffer
|
||||
ret
|
||||
|
||||
.UpdateRatingBuffer: ; 0x2665a
|
||||
push hl
|
||||
ld a, "@"
|
||||
ld bc, ITEM_NAME_LENGTH
|
||||
call ByteFill
|
||||
pop hl
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
|
||||
call PrintNum
|
||||
ret
|
||||
|
||||
FindOakRating: ; 0x2666b
|
||||
; return sound effect in de
|
||||
; return text pointer in hl
|
||||
nop
|
||||
ld c, a
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp c
|
||||
jr nc, .match
|
||||
rept 4
|
||||
inc hl
|
||||
endr
|
||||
jr .loop
|
||||
|
||||
.match
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ret
|
||||
|
||||
OakRatings: ; 0x2667f
|
||||
oakrating: MACRO
|
||||
db \1
|
||||
dw \2, \3
|
||||
endm
|
||||
|
||||
; if you caught at most this many, play this sound, load this text
|
||||
oakrating 9, SFX_DEX_FANFARE_LESS_THAN_20, OakRating01
|
||||
oakrating 19, SFX_DEX_FANFARE_LESS_THAN_20, OakRating02
|
||||
oakrating 34, SFX_DEX_FANFARE_20_49, OakRating03
|
||||
oakrating 49, SFX_DEX_FANFARE_20_49, OakRating04
|
||||
oakrating 64, SFX_DEX_FANFARE_50_79, OakRating05
|
||||
oakrating 79, SFX_DEX_FANFARE_50_79, OakRating06
|
||||
oakrating 94, SFX_DEX_FANFARE_80_109, OakRating07
|
||||
oakrating 109, SFX_DEX_FANFARE_80_109, OakRating08
|
||||
oakrating 124, SFX_CAUGHT_MON, OakRating09
|
||||
oakrating 139, SFX_CAUGHT_MON, OakRating10
|
||||
oakrating 154, SFX_DEX_FANFARE_140_169, OakRating11
|
||||
oakrating 169, SFX_DEX_FANFARE_140_169, OakRating12
|
||||
oakrating 184, SFX_DEX_FANFARE_170_199, OakRating13
|
||||
oakrating 199, SFX_DEX_FANFARE_170_199, OakRating14
|
||||
oakrating 214, SFX_DEX_FANFARE_200_229, OakRating15
|
||||
oakrating 229, SFX_DEX_FANFARE_200_229, OakRating16
|
||||
oakrating 239, SFX_DEX_FANFARE_230_PLUS, OakRating17
|
||||
oakrating 248, SFX_DEX_FANFARE_230_PLUS, OakRating18
|
||||
oakrating 255, SFX_DEX_FANFARE_230_PLUS, OakRating19
|
||||
|
||||
OakPCText1: ; 0x266de
|
||||
text_jump _OakPCText1
|
||||
db "@"
|
||||
|
||||
OakPCText2: ; 0x266e3
|
||||
text_jump _OakPCText2
|
||||
db "@"
|
||||
|
||||
OakPCText3: ; 0x266e8
|
||||
text_jump _OakPCText3
|
||||
db "@"
|
||||
|
||||
OakRating01:
|
||||
text_jump _OakRating01
|
||||
db "@"
|
||||
|
||||
OakRating02:
|
||||
text_jump _OakRating02
|
||||
db "@"
|
||||
|
||||
OakRating03:
|
||||
text_jump _OakRating03
|
||||
db "@"
|
||||
|
||||
OakRating04:
|
||||
text_jump _OakRating04
|
||||
db "@"
|
||||
|
||||
OakRating05:
|
||||
text_jump _OakRating05
|
||||
db "@"
|
||||
|
||||
OakRating06:
|
||||
text_jump _OakRating06
|
||||
db "@"
|
||||
|
||||
OakRating07:
|
||||
text_jump _OakRating07
|
||||
db "@"
|
||||
|
||||
OakRating08:
|
||||
text_jump _OakRating08
|
||||
db "@"
|
||||
|
||||
OakRating09:
|
||||
text_jump _OakRating09
|
||||
db "@"
|
||||
|
||||
OakRating10:
|
||||
text_jump _OakRating10
|
||||
db "@"
|
||||
|
||||
OakRating11:
|
||||
text_jump _OakRating11
|
||||
db "@"
|
||||
|
||||
OakRating12:
|
||||
text_jump _OakRating12
|
||||
db "@"
|
||||
|
||||
OakRating13:
|
||||
text_jump _OakRating13
|
||||
db "@"
|
||||
|
||||
OakRating14:
|
||||
text_jump _OakRating14
|
||||
db "@"
|
||||
|
||||
OakRating15:
|
||||
text_jump _OakRating15
|
||||
db "@"
|
||||
|
||||
OakRating16:
|
||||
text_jump _OakRating16
|
||||
db "@"
|
||||
|
||||
OakRating17:
|
||||
text_jump _OakRating17
|
||||
db "@"
|
||||
|
||||
OakRating18:
|
||||
text_jump _OakRating18
|
||||
db "@"
|
||||
|
||||
OakRating19:
|
||||
text_jump _OakRating19
|
||||
db "@"
|
||||
|
||||
OakPCText4: ; 0x2674c
|
||||
text_jump _OakPCText4
|
||||
db "@"
|
||||
@@ -19,14 +19,14 @@ DoAnimFrame: ; 8d24b
|
||||
dw .two ; bouncing mon icon, selected
|
||||
dw .three ; bouncing mon icon, menu open
|
||||
dw .four
|
||||
dw .five
|
||||
dw .namingscreencursor
|
||||
dw .GameFreakLogo ; Game Freak logo
|
||||
dw .seven
|
||||
dw .eight
|
||||
dw .SlotsGolem ; Something to do with slots
|
||||
dw .SlotsChansey ; Something to do with slots
|
||||
dw .SlotsChanseyEgg ; Something to do with slots
|
||||
dw .twelve ; blinking cursor
|
||||
dw .mailcompositioncursor ; blinking cursor
|
||||
dw .thirteen
|
||||
dw .fourteen
|
||||
dw .fifteen
|
||||
@@ -217,11 +217,11 @@ DoAnimFrame: ; 8d24b
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.five: ; 8d36c (23:536c)
|
||||
.namingscreencursor: ; 8d36c (23:536c)
|
||||
callab NamingScreen_AnimateCursor
|
||||
ret
|
||||
|
||||
.twelve: ; 8d373 (23:5373)
|
||||
.mailcompositioncursor: ; 8d373 (23:5373)
|
||||
callab ComposeMail_AnimateCursor
|
||||
ret
|
||||
|
||||
@@ -409,7 +409,7 @@ DoAnimFrame: ; 8d24b
|
||||
ret
|
||||
|
||||
.fifteen: ; 8d475 (23:5475)
|
||||
callab Function90d41
|
||||
callab AnimatePokegearModeIndicatorArrow
|
||||
ret
|
||||
|
||||
.fourteen: ; 8d47c (23:547c)
|
||||
|
||||
@@ -393,7 +393,7 @@ endr
|
||||
ld hl, StatusFlags2
|
||||
bit 2, [hl] ; bug catching contest
|
||||
ret z
|
||||
callba Function24bdc
|
||||
callba StartMenu_DrawBugContestStatusBox
|
||||
ret
|
||||
; 128de
|
||||
|
||||
@@ -403,7 +403,7 @@ endr
|
||||
jr nz, .contest
|
||||
ret
|
||||
.contest
|
||||
callba Function24be7
|
||||
callba StartMenu_PrintBugContestStatus
|
||||
ret
|
||||
; 128ed
|
||||
|
||||
|
||||
@@ -200,11 +200,9 @@ CheckPokerusTick:: ; 114e7
|
||||
call CalcDaysSince
|
||||
call GetDaysSince
|
||||
and a
|
||||
jr z, .done
|
||||
|
||||
jr z, .done ; not even a day has passed since game start
|
||||
ld b, a
|
||||
callba ApplyPokerusTick
|
||||
|
||||
.done
|
||||
xor a
|
||||
ret
|
||||
@@ -229,13 +227,13 @@ CheckUnusedTwoDayTimer: ; 1150c
|
||||
ret
|
||||
; 1151c
|
||||
|
||||
Function1151c: ; unreferenced
|
||||
; XXX
|
||||
ld hl, DailyFlags
|
||||
set 2, [hl]
|
||||
ret
|
||||
; 11522
|
||||
|
||||
Function11522: ; unreferenced
|
||||
; XXX
|
||||
and a
|
||||
ld hl, DailyFlags
|
||||
bit 2, [hl]
|
||||
|
||||
@@ -61,8 +61,8 @@ endr
|
||||
inc a
|
||||
dec c
|
||||
jr nz, .OAMloop
|
||||
ld hl, Sprites + $10
|
||||
ld bc, $90
|
||||
ld hl, Sprites + 4 * 4
|
||||
ld bc, 36 * 4
|
||||
xor a
|
||||
call ByteFill
|
||||
ret
|
||||
|
||||
@@ -140,7 +140,7 @@ Kurt_SelectQuantity: ; 880c2
|
||||
call .PlaceApricornName
|
||||
call PlaceApricornQuantity
|
||||
call ApplyTilemap
|
||||
callba Function27a28
|
||||
callba Kurt_SelectQuantity_InterpretJoypad
|
||||
jr nc, .loop
|
||||
|
||||
push bc
|
||||
|
||||
@@ -452,23 +452,23 @@ endr
|
||||
push af
|
||||
set SUBSTATUS_TRANSFORMED, [hl]
|
||||
bit SUBSTATUS_TRANSFORMED, a
|
||||
jr nz, .asm_ea13
|
||||
jr .asm_ea1a
|
||||
jr nz, .ditto
|
||||
jr .not_ditto
|
||||
|
||||
.asm_ea13
|
||||
.ditto
|
||||
ld a, DITTO
|
||||
ld [TempEnemyMonSpecies], a
|
||||
jr .asm_ea27
|
||||
jr .load_data
|
||||
|
||||
.asm_ea1a
|
||||
set 3, [hl]
|
||||
ld hl, wc6f2
|
||||
.not_ditto
|
||||
set SUBSTATUS_TRANSFORMED, [hl]
|
||||
ld hl, wEnemyBackupDVs
|
||||
ld a, [EnemyMonDVs]
|
||||
ld [hli], a
|
||||
ld a, [EnemyMonDVs + 1]
|
||||
ld [hl], a
|
||||
|
||||
.asm_ea27
|
||||
.load_data
|
||||
ld a, [TempEnemyMonSpecies]
|
||||
ld [CurPartySpecies], a
|
||||
ld a, [EnemyMonLevel]
|
||||
|
||||
283
main.asm
283
main.asm
@@ -5279,29 +5279,27 @@ Script_JumpStdFromRAM: ; 0x1369a
|
||||
|
||||
INCLUDE "event/bug_contest_judging.asm"
|
||||
|
||||
; decreases all pokemon's pokerus counter by b. if the lower nybble reaches zero, the pokerus is cured.
|
||||
ApplyPokerusTick: ; 13988
|
||||
; decreases all pokemon's pokerus counter by b. if the lower nybble reaches zero, the pokerus is cured.
|
||||
ld hl, PartyMon1PokerusStatus ; PartyMon1 + MON_PKRS
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
ret z
|
||||
ret z ; make sure it's not wasting time on an empty party
|
||||
ld c, a
|
||||
.loop
|
||||
ld a, [hl]
|
||||
and $f
|
||||
jr z, .does_not_have_pokerus
|
||||
sub b
|
||||
jr nc, .ok
|
||||
and $f ; lower nybble is the number of days remaining
|
||||
jr z, .next ; if already 0, skip
|
||||
sub b ; subtract the number of days
|
||||
jr nc, .ok ; max(result, 0)
|
||||
xor a
|
||||
|
||||
.ok
|
||||
ld d, a
|
||||
ld d, a ; back up this value because we need to preserve the strain (upper nybble)
|
||||
ld a, [hl]
|
||||
and $f0
|
||||
add d
|
||||
ld [hl], a
|
||||
|
||||
.does_not_have_pokerus
|
||||
ld [hl], a ; this prevents a cured pokemon from recontracting pokerus
|
||||
.next
|
||||
ld de, PARTYMON_STRUCT_LENGTH
|
||||
add hl, de
|
||||
dec c
|
||||
@@ -5678,44 +5676,44 @@ Function24b8f: ; 24b8f
|
||||
.booru_ko: ; 24bd4
|
||||
db "ボール こ@"
|
||||
|
||||
Function24bdc: ; 24bdc
|
||||
StartMenu_DrawBugContestStatusBox: ; 24bdc
|
||||
hlcoord 0, 0
|
||||
ld b, $5
|
||||
ld c, $11
|
||||
ld b, 5
|
||||
ld c, 17
|
||||
call TextBox
|
||||
ret
|
||||
|
||||
Function24be7: ; 24be7
|
||||
StartMenu_PrintBugContestStatus: ; 24be7
|
||||
ld hl, Options
|
||||
ld a, [hl]
|
||||
push af
|
||||
set 4, [hl]
|
||||
call Function24bdc
|
||||
set NO_TEXT_SCROLL, [hl]
|
||||
call StartMenu_DrawBugContestStatusBox
|
||||
hlcoord 1, 5
|
||||
ld de, String24c52
|
||||
ld de, .Balls_EN
|
||||
call PlaceString
|
||||
hlcoord 8, 5
|
||||
ld de, wSafariBallsRemaining
|
||||
ld de, wParkBallsRemaining
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
|
||||
call PrintNum
|
||||
hlcoord 1, 1
|
||||
ld de, String24c4b
|
||||
ld de, .CAUGHT
|
||||
call PlaceString
|
||||
ld a, [wContestMon]
|
||||
and a
|
||||
ld de, String24c59
|
||||
jr z, .asm_24c1e
|
||||
ld de, .None
|
||||
jr z, .no_contest_mon
|
||||
ld [wd265], a
|
||||
call GetPokemonName
|
||||
|
||||
.asm_24c1e
|
||||
.no_contest_mon
|
||||
hlcoord 8, 1
|
||||
call PlaceString
|
||||
ld a, [wContestMon]
|
||||
and a
|
||||
jr z, .asm_24c3e
|
||||
jr z, .skip_level
|
||||
hlcoord 1, 3
|
||||
ld de, String24c5e
|
||||
ld de, .LEVEL
|
||||
call PlaceString
|
||||
ld a, [wContestMonLevel]
|
||||
ld h, b
|
||||
@@ -5724,20 +5722,20 @@ Function24be7: ; 24be7
|
||||
ld c, $3
|
||||
call Function3842
|
||||
|
||||
.asm_24c3e
|
||||
.skip_level
|
||||
pop af
|
||||
ld [Options], a
|
||||
ret
|
||||
|
||||
String24c43: ; 24c43
|
||||
.Balls_JP: ; 24c43
|
||||
db "ボール こ@"
|
||||
String24c4b: ; 24c4b
|
||||
.CAUGHT: ; 24c4b
|
||||
db "CAUGHT@"
|
||||
String24c52: ; 24c52
|
||||
.Balls_EN: ; 24c52
|
||||
db "BALLS:@"
|
||||
String24c59: ; 24c59
|
||||
.None: ; 24c59
|
||||
db "None@"
|
||||
String24c5e: ; 24c5e
|
||||
.LEVEL: ; 24c5e
|
||||
db "LEVEL@"
|
||||
|
||||
FindApricornsInBag: ; 24c64
|
||||
@@ -5799,226 +5797,7 @@ INCLUDE "engine/mon_menu.asm"
|
||||
INCLUDE "battle/menu.asm"
|
||||
INCLUDE "engine/buy_sell_toss.asm"
|
||||
INCLUDE "engine/trainer_card.asm"
|
||||
|
||||
ProfOaksPC: ; 0x265d3
|
||||
ld hl, OakPCText1
|
||||
call MenuTextBox
|
||||
call YesNoBox
|
||||
jr c, .shutdown
|
||||
call ProfOaksPCBoot ; player chose "yes"?
|
||||
.shutdown
|
||||
ld hl, OakPCText4
|
||||
call PrintText
|
||||
call JoyWaitAorB
|
||||
call ExitMenu
|
||||
ret
|
||||
|
||||
ProfOaksPCBoot ; 0x265ee
|
||||
ld hl, OakPCText2
|
||||
call PrintText
|
||||
call Rate
|
||||
call PlaySFX ; sfx loaded by previous Rate function call
|
||||
call JoyWaitAorB
|
||||
call WaitSFX
|
||||
ret
|
||||
|
||||
ProfOaksPCRating: ; 0x26601
|
||||
call Rate
|
||||
push de
|
||||
ld de, MUSIC_NONE
|
||||
call PlayMusic
|
||||
pop de
|
||||
call PlaySFX
|
||||
call JoyWaitAorB
|
||||
call WaitSFX
|
||||
ret
|
||||
|
||||
Rate: ; 0x26616
|
||||
; calculate Seen/Owned
|
||||
ld hl, PokedexSeen
|
||||
ld b, EndPokedexSeen - PokedexSeen
|
||||
call CountSetBits
|
||||
ld [wd002], a
|
||||
ld hl, PokedexCaught
|
||||
ld b, EndPokedexCaught - PokedexCaught
|
||||
call CountSetBits
|
||||
ld [wd003], a
|
||||
|
||||
; print appropriate rating
|
||||
call .UpdateRatingBuffers
|
||||
ld hl, OakPCText3
|
||||
call PrintText
|
||||
call JoyWaitAorB
|
||||
ld a, [wd003]
|
||||
ld hl, OakRatings
|
||||
call FindOakRating
|
||||
push de
|
||||
call PrintText
|
||||
pop de
|
||||
ret
|
||||
|
||||
.UpdateRatingBuffers: ; 0x26647
|
||||
ld hl, StringBuffer3
|
||||
ld de, wd002
|
||||
call .UpdateRatingBuffer
|
||||
ld hl, StringBuffer4
|
||||
ld de, wd003
|
||||
call .UpdateRatingBuffer
|
||||
ret
|
||||
|
||||
.UpdateRatingBuffer: ; 0x2665a
|
||||
push hl
|
||||
ld a, "@"
|
||||
ld bc, ITEM_NAME_LENGTH
|
||||
call ByteFill
|
||||
pop hl
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
|
||||
call PrintNum
|
||||
ret
|
||||
|
||||
FindOakRating: ; 0x2666b
|
||||
; return sound effect in de
|
||||
; return text pointer in hl
|
||||
nop
|
||||
ld c, a
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp c
|
||||
jr nc, .match
|
||||
rept 4
|
||||
inc hl
|
||||
endr
|
||||
jr .loop
|
||||
|
||||
.match
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ret
|
||||
|
||||
OakRatings: ; 0x2667f
|
||||
oakrating: MACRO
|
||||
db \1
|
||||
dw \2, \3
|
||||
endm
|
||||
|
||||
; if you caught at most this many, play this sound, load this text
|
||||
oakrating 9, SFX_DEX_FANFARE_LESS_THAN_20, OakRating01
|
||||
oakrating 19, SFX_DEX_FANFARE_LESS_THAN_20, OakRating02
|
||||
oakrating 34, SFX_DEX_FANFARE_20_49, OakRating03
|
||||
oakrating 49, SFX_DEX_FANFARE_20_49, OakRating04
|
||||
oakrating 64, SFX_DEX_FANFARE_50_79, OakRating05
|
||||
oakrating 79, SFX_DEX_FANFARE_50_79, OakRating06
|
||||
oakrating 94, SFX_DEX_FANFARE_80_109, OakRating07
|
||||
oakrating 109, SFX_DEX_FANFARE_80_109, OakRating08
|
||||
oakrating 124, SFX_CAUGHT_MON, OakRating09
|
||||
oakrating 139, SFX_CAUGHT_MON, OakRating10
|
||||
oakrating 154, SFX_DEX_FANFARE_140_169, OakRating11
|
||||
oakrating 169, SFX_DEX_FANFARE_140_169, OakRating12
|
||||
oakrating 184, SFX_DEX_FANFARE_170_199, OakRating13
|
||||
oakrating 199, SFX_DEX_FANFARE_170_199, OakRating14
|
||||
oakrating 214, SFX_DEX_FANFARE_200_229, OakRating15
|
||||
oakrating 229, SFX_DEX_FANFARE_200_229, OakRating16
|
||||
oakrating 239, SFX_DEX_FANFARE_230_PLUS, OakRating17
|
||||
oakrating 248, SFX_DEX_FANFARE_230_PLUS, OakRating18
|
||||
oakrating 255, SFX_DEX_FANFARE_230_PLUS, OakRating19
|
||||
|
||||
OakPCText1: ; 0x266de
|
||||
text_jump _OakPCText1
|
||||
db "@"
|
||||
|
||||
OakPCText2: ; 0x266e3
|
||||
text_jump _OakPCText2
|
||||
db "@"
|
||||
|
||||
OakPCText3: ; 0x266e8
|
||||
text_jump _OakPCText3
|
||||
db "@"
|
||||
|
||||
OakRating01:
|
||||
text_jump _OakRating01
|
||||
db "@"
|
||||
|
||||
OakRating02:
|
||||
text_jump _OakRating02
|
||||
db "@"
|
||||
|
||||
OakRating03:
|
||||
text_jump _OakRating03
|
||||
db "@"
|
||||
|
||||
OakRating04:
|
||||
text_jump _OakRating04
|
||||
db "@"
|
||||
|
||||
OakRating05:
|
||||
text_jump _OakRating05
|
||||
db "@"
|
||||
|
||||
OakRating06:
|
||||
text_jump _OakRating06
|
||||
db "@"
|
||||
|
||||
OakRating07:
|
||||
text_jump _OakRating07
|
||||
db "@"
|
||||
|
||||
OakRating08:
|
||||
text_jump _OakRating08
|
||||
db "@"
|
||||
|
||||
OakRating09:
|
||||
text_jump _OakRating09
|
||||
db "@"
|
||||
|
||||
OakRating10:
|
||||
text_jump _OakRating10
|
||||
db "@"
|
||||
|
||||
OakRating11:
|
||||
text_jump _OakRating11
|
||||
db "@"
|
||||
|
||||
OakRating12:
|
||||
text_jump _OakRating12
|
||||
db "@"
|
||||
|
||||
OakRating13:
|
||||
text_jump _OakRating13
|
||||
db "@"
|
||||
|
||||
OakRating14:
|
||||
text_jump _OakRating14
|
||||
db "@"
|
||||
|
||||
OakRating15:
|
||||
text_jump _OakRating15
|
||||
db "@"
|
||||
|
||||
OakRating16:
|
||||
text_jump _OakRating16
|
||||
db "@"
|
||||
|
||||
OakRating17:
|
||||
text_jump _OakRating17
|
||||
db "@"
|
||||
|
||||
OakRating18:
|
||||
text_jump _OakRating18
|
||||
db "@"
|
||||
|
||||
OakRating19:
|
||||
text_jump _OakRating19
|
||||
db "@"
|
||||
|
||||
OakPCText4: ; 0x2674c
|
||||
text_jump _OakPCText4
|
||||
db "@"
|
||||
|
||||
INCLUDE "engine/prof_oaks_pc.asm"
|
||||
INCLUDE "engine/decorations.asm"
|
||||
|
||||
PadCoords_de: ; 27092
|
||||
@@ -6161,7 +5940,7 @@ INCLUDE "battle/moves/move_effects_pointers.asm"
|
||||
MoveEffects: ; 2732e
|
||||
INCLUDE "battle/moves/move_effects.asm"
|
||||
|
||||
Function27a28: ; 27a28
|
||||
Kurt_SelectQuantity_InterpretJoypad: ; 27a28
|
||||
call BuySellToss_InterpretJoypad
|
||||
ld b, a
|
||||
ret
|
||||
|
||||
1031
misc/mobile_45.asm
1031
misc/mobile_45.asm
File diff suppressed because it is too large
Load Diff
923
misc/mobile_45_sprite_engine.asm
Executable file
923
misc/mobile_45_sprite_engine.asm
Executable file
File diff suppressed because it is too large
Load Diff
32
wram.asm
32
wram.asm
@@ -308,7 +308,7 @@ wGlobalAnimYOffset:: ds 1
|
||||
wGlobalAnimXOffset:: ds 1
|
||||
wSpriteAnimsEnd::
|
||||
|
||||
wc3c1:: ds 11
|
||||
ds 11
|
||||
wc3cc:: ds 1
|
||||
wc3cd:: ds 31
|
||||
wc3ec:: ds 1
|
||||
@@ -373,19 +373,21 @@ wBT_OTTemp:: battle_tower_struct wBT_OTTemp
|
||||
wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2)
|
||||
wBattle::
|
||||
wc608::
|
||||
ds 7
|
||||
wc60f::
|
||||
ds 3
|
||||
wc612::
|
||||
ds 10
|
||||
wInitHourBuffer:: ; c61c
|
||||
ds 10
|
||||
wc626::
|
||||
ds wc608 - @
|
||||
|
||||
wEnemyMoveStruct:: move_struct wEnemyMoveStruct
|
||||
wc60f::
|
||||
wPlayerMoveStruct:: move_struct wPlayerMoveStruct
|
||||
wc616::
|
||||
ds -4
|
||||
wc612:: ds 4
|
||||
|
||||
EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616
|
||||
ds -5
|
||||
wInitHourBuffer:: ds 5
|
||||
BattleMonNick:: ds PKMN_NAME_LENGTH ; c621
|
||||
ds -6
|
||||
wc626:: ds 6
|
||||
|
||||
BattleMon:: battle_struct BattleMon ; c62c
|
||||
|
||||
@@ -637,10 +639,9 @@ wc6eb:: ds 1
|
||||
wPayDayMoney:: ds 3 ; c6ec
|
||||
|
||||
wSafariMonAngerCount:: ds 1
|
||||
wSafariMonEating::
|
||||
wc6f0:: ds 2
|
||||
wSafariMonEating:: ds 2
|
||||
wEnemyBackupDVs:: ; used when enemy is transformed
|
||||
wc6f2:: ds 2
|
||||
ds 2
|
||||
AlreadyDisobeyed:: ; c6f4
|
||||
ds 1
|
||||
|
||||
@@ -2763,15 +2764,12 @@ wdc0d:: ds 1
|
||||
wdc0e:: ds 1
|
||||
|
||||
; Sprite id of each decoration
|
||||
wdc0f::
|
||||
Bed:: ; dc0f
|
||||
ds 1
|
||||
Carpet:: ; dc10
|
||||
ds 1
|
||||
wdc11::
|
||||
Plant:: ; dc11
|
||||
ds 1
|
||||
wdc12::
|
||||
Poster:: ; dc12
|
||||
ds 1
|
||||
Console:: ; dc13
|
||||
@@ -2810,8 +2808,8 @@ FruitTreeFlags:: ; dc27
|
||||
|
||||
wLuckyNumberDayBuffer:: ds 2
|
||||
ds 2
|
||||
wSpecialPhoneCallID:: ds 2
|
||||
wdc33:: ds 2
|
||||
wSpecialPhoneCallID:: ds 1
|
||||
ds 3
|
||||
wBugContestStartTime:: ds 4 ; day, hour, min, sec
|
||||
wdc39:: ds 1
|
||||
wUnusedTwoDayTimer:: ds 1
|
||||
|
||||
Reference in New Issue
Block a user