mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Fix snake_case filenames
Renamed a bunch of files, most of them one-off functions, to better fit the general snake_case naming scheme. Also renamed some awfully long filenames.
This commit is contained in:
parent
81fff9bb80
commit
d3cc861d33
82
engine/events/haircut.asm
Normal file
82
engine/events/haircut.asm
Normal file
@ -0,0 +1,82 @@
|
||||
BillsGrandfather: ; 73f7
|
||||
farcall SelectMonFromParty
|
||||
jr c, .cancel
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wScriptVar], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
jp CopyPokemonName_Buffer1_Buffer3
|
||||
|
||||
.cancel
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
YoungerHaircutBrother: ; 7413
|
||||
ld hl, HappinessData_YoungerHaircutBrother
|
||||
jr HaircutOrGrooming
|
||||
|
||||
OlderHaircutBrother: ; 7418
|
||||
ld hl, HappinessData_OlderHaircutBrother
|
||||
jr HaircutOrGrooming
|
||||
|
||||
DaisysGrooming: ; 741d
|
||||
ld hl, HappinessData_DaisysGrooming
|
||||
; fallthrough
|
||||
|
||||
HaircutOrGrooming: ; 7420
|
||||
push hl
|
||||
farcall SelectMonFromParty
|
||||
pop hl
|
||||
jr c, .nope
|
||||
ld a, [wCurPartySpecies]
|
||||
cp EGG
|
||||
jr z, .egg
|
||||
push hl
|
||||
call GetCurNick
|
||||
call CopyPokemonName_Buffer1_Buffer3
|
||||
pop hl
|
||||
call Random
|
||||
; Bug: Subtracting $ff from $ff fails to set c.
|
||||
; This can result in overflow into the next data array.
|
||||
; In the case of getting a grooming from Daisy, we bleed
|
||||
; into CopyPokemonName_Buffer1_Buffer3, which passes
|
||||
; $d0 to ChangeHappiness and returns $73 to the script.
|
||||
; The end result is that there is a 0.4% chance your
|
||||
; Pokemon's happiness will not change at all.
|
||||
.loop
|
||||
sub [hl]
|
||||
jr c, .ok
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.ok
|
||||
inc hl
|
||||
ld a, [hli]
|
||||
ld [wScriptVar], a
|
||||
ld c, [hl]
|
||||
call ChangeHappiness
|
||||
ret
|
||||
|
||||
.nope
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
.egg
|
||||
ld a, 1
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
INCLUDE "data/events/happiness_probabilities.asm"
|
||||
|
||||
CopyPokemonName_Buffer1_Buffer3: ; 746e
|
||||
ld hl, wStringBuffer1
|
||||
ld de, wStringBuffer3
|
||||
ld bc, MON_NAME_LENGTH
|
||||
jp CopyBytes
|
||||
|
||||
DummyPredef1: ; 747a
|
||||
ret
|
@ -140,86 +140,3 @@ ReturnShuckle: ; 737e
|
||||
ld a, SHUCKIE_FAINTED
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
BillsGrandfather: ; 73f7
|
||||
farcall SelectMonFromParty
|
||||
jr c, .cancel
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wScriptVar], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
jp CopyPokemonName_Buffer1_Buffer3
|
||||
|
||||
.cancel
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
YoungerHaircutBrother: ; 7413
|
||||
ld hl, HappinessData_YoungerHaircutBrother
|
||||
jr HaircutOrGrooming
|
||||
|
||||
OlderHaircutBrother: ; 7418
|
||||
ld hl, HappinessData_OlderHaircutBrother
|
||||
jr HaircutOrGrooming
|
||||
|
||||
DaisysGrooming: ; 741d
|
||||
ld hl, HappinessData_DaisysGrooming
|
||||
; fallthrough
|
||||
|
||||
HaircutOrGrooming: ; 7420
|
||||
push hl
|
||||
farcall SelectMonFromParty
|
||||
pop hl
|
||||
jr c, .nope
|
||||
ld a, [wCurPartySpecies]
|
||||
cp EGG
|
||||
jr z, .egg
|
||||
push hl
|
||||
call GetCurNick
|
||||
call CopyPokemonName_Buffer1_Buffer3
|
||||
pop hl
|
||||
call Random
|
||||
; Bug: Subtracting $ff from $ff fails to set c.
|
||||
; This can result in overflow into the next data array.
|
||||
; In the case of getting a grooming from Daisy, we bleed
|
||||
; into CopyPokemonName_Buffer1_Buffer3, which passes
|
||||
; $d0 to ChangeHappiness and returns $73 to the script.
|
||||
; The end result is that there is a 0.4% chance your
|
||||
; Pokemon's happiness will not change at all.
|
||||
.loop
|
||||
sub [hl]
|
||||
jr c, .ok
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.ok
|
||||
inc hl
|
||||
ld a, [hli]
|
||||
ld [wScriptVar], a
|
||||
ld c, [hl]
|
||||
call ChangeHappiness
|
||||
ret
|
||||
|
||||
.nope
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
.egg
|
||||
ld a, 1
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
INCLUDE "data/events/happiness_probabilities.asm"
|
||||
|
||||
CopyPokemonName_Buffer1_Buffer3: ; 746e
|
||||
ld hl, wStringBuffer1
|
||||
ld de, wStringBuffer3
|
||||
ld bc, MON_NAME_LENGTH
|
||||
jp CopyBytes
|
||||
|
||||
DummyPredef1: ; 747a
|
||||
ret
|
@ -1,4 +1,4 @@
|
||||
Unreferenced_CorrectErrorsInPlayerParty:
|
||||
Unreferenced_CorrectPartyErrors:
|
||||
ld hl, wPartyCount
|
||||
ld a, [hl]
|
||||
and a
|
61
main.asm
61
main.asm
@ -3,18 +3,19 @@ INCLUDE "constants.asm"
|
||||
|
||||
SECTION "bank1", ROMX
|
||||
|
||||
INCLUDE "engine/link/placewaitingtext.asm"
|
||||
INCLUDE "engine/gfx/loadpushoam.asm"
|
||||
INCLUDE "engine/link/place_waiting_text.asm"
|
||||
INCLUDE "engine/gfx/load_push_oam.asm"
|
||||
INCLUDE "engine/overworld/map_objects.asm"
|
||||
INCLUDE "engine/menus/intro_menu.asm"
|
||||
INCLUDE "engine/overworld/init_map.asm"
|
||||
INCLUDE "engine/pokemon/learn.asm"
|
||||
INCLUDE "engine/pokemon/checknickerrors.asm"
|
||||
INCLUDE "engine/pokemon/check_nick_errors.asm"
|
||||
INCLUDE "engine/math/math.asm"
|
||||
INCLUDE "data/items/attributes.asm"
|
||||
INCLUDE "engine/overworld/npc_movement.asm"
|
||||
INCLUDE "engine/events/happiness_egg.asm"
|
||||
INCLUDE "engine/events/specials_2.asm"
|
||||
INCLUDE "engine/events/shuckle.asm"
|
||||
INCLUDE "engine/events/haircut.asm"
|
||||
|
||||
|
||||
SECTION "bank2", ROMX
|
||||
@ -29,19 +30,19 @@ SECTION "bank3", ROMX
|
||||
|
||||
INCLUDE "engine/events/checktime.asm"
|
||||
INCLUDE "engine/events/specials.asm"
|
||||
INCLUDE "engine/math/printnum.asm"
|
||||
INCLUDE "engine/math/print_num.asm"
|
||||
INCLUDE "engine/pokemon/health.asm"
|
||||
INCLUDE "engine/events/overworld.asm"
|
||||
INCLUDE "engine/items/items.asm"
|
||||
INCLUDE "engine/overworld/player_step.asm"
|
||||
INCLUDE "engine/battle/anim_hp_bar.asm"
|
||||
INCLUDE "engine/pokemon/move_mon.asm"
|
||||
INCLUDE "engine/pokemon/billspctop.asm"
|
||||
INCLUDE "engine/pokemon/getbreedmonlevelgrowth.asm"
|
||||
INCLUDE "engine/pokemon/bills_pc_top.asm"
|
||||
INCLUDE "engine/pokemon/breedmon_level_growth.asm"
|
||||
INCLUDE "engine/events/bug_contest/caught_mon.asm"
|
||||
INCLUDE "engine/items/item_effects.asm"
|
||||
INCLUDE "engine/battle_anims/getpokeballwobble.asm"
|
||||
INCLUDE "engine/pokemon/knowsmove.asm"
|
||||
INCLUDE "engine/battle_anims/pokeball_wobble.asm"
|
||||
INCLUDE "engine/pokemon/knows_move.asm"
|
||||
|
||||
|
||||
SECTION "bank4", ROMX
|
||||
@ -64,8 +65,8 @@ INCLUDE "engine/events/std_collision.asm"
|
||||
INCLUDE "engine/events/bug_contest/judging.asm"
|
||||
INCLUDE "engine/events/pokerus/apply_pokerus_tick.asm"
|
||||
INCLUDE "engine/events/bug_contest/contest_2.asm"
|
||||
INCLUDE "engine/pokemon/correcterrorsinplayerparty.asm"
|
||||
INCLUDE "engine/math/getsquareroot.asm"
|
||||
INCLUDE "engine/pokemon/correct_party_errors.asm"
|
||||
INCLUDE "engine/math/get_square_root.asm"
|
||||
|
||||
|
||||
SECTION "bank5", ROMX
|
||||
@ -102,7 +103,7 @@ SECTION "bank9", ROMX
|
||||
|
||||
INCLUDE "data/text_buffers.asm"
|
||||
INCLUDE "engine/menus/menu.asm"
|
||||
INCLUDE "engine/items/updateitemdescription.asm"
|
||||
INCLUDE "engine/items/update_item_description.asm"
|
||||
INCLUDE "engine/events/pokepic.asm"
|
||||
INCLUDE "engine/overworld/map_objects_2.asm"
|
||||
INCLUDE "engine/menus/scrolling_menu.asm"
|
||||
@ -114,11 +115,11 @@ INCLUDE "engine/items/buy_sell_toss.asm"
|
||||
INCLUDE "engine/menus/trainer_card.asm"
|
||||
INCLUDE "engine/events/prof_oaks_pc.asm"
|
||||
INCLUDE "engine/overworld/decorations.asm"
|
||||
INCLUDE "engine/pokemon/leveluphappinessmod.asm"
|
||||
INCLUDE "engine/pokemon/level_up_happiness.asm"
|
||||
INCLUDE "engine/battle/read_trainer_dvs.asm"
|
||||
INCLUDE "data/trainers/dvs.asm"
|
||||
INCLUDE "engine/battle/returntobattle_useball.asm"
|
||||
INCLUDE "engine/battle/consumehelditem.asm"
|
||||
INCLUDE "engine/battle/consume_held_item.asm"
|
||||
INCLUDE "data/moves/effects_pointers.asm"
|
||||
INCLUDE "data/moves/effects.asm"
|
||||
INCLUDE "engine/events/kurt_selectquantity_interpretjoypad.asm"
|
||||
@ -148,7 +149,7 @@ INCLUDE "engine/items/tmhm.asm"
|
||||
INCLUDE "data/moves/descriptions.asm"
|
||||
INCLUDE "engine/events/pokerus/pokerus.asm"
|
||||
INCLUDE "engine/battle/start_battle.asm"
|
||||
INCLUDE "engine/gfx/placegraphic.asm"
|
||||
INCLUDE "engine/gfx/place_graphic.asm"
|
||||
|
||||
|
||||
SECTION "Effect Commands", ROMX
|
||||
@ -192,7 +193,7 @@ INCLUDE "engine/pokemon/mail.asm"
|
||||
SECTION "Crystal Features 1", ROMX
|
||||
|
||||
INCLUDE "engine/menus/init_gender.asm"
|
||||
INCLUDE "engine/gfx/drawkrispackgfx.asm"
|
||||
INCLUDE "engine/items/pack_kris.asm"
|
||||
INCLUDE "engine/events/move_tutor.asm"
|
||||
INCLUDE "engine/gfx/crystal_layouts.asm"
|
||||
INCLUDE "engine/events/celebi.asm"
|
||||
@ -208,11 +209,11 @@ SECTION "bank13", ROMX
|
||||
INCLUDE "engine/tilesets/map_palettes.asm"
|
||||
INCLUDE "gfx/tileset_palette_maps.asm"
|
||||
INCLUDE "data/collision_permissions.asm"
|
||||
INCLUDE "engine/menus/emptyallsrambanks.asm"
|
||||
INCLUDE "engine/menus/empty_sram.asm"
|
||||
INCLUDE "engine/menus/savemenu_copytilemapatonce.asm"
|
||||
INCLUDE "engine/events/checksave.asm"
|
||||
INCLUDE "data/maps/scenes.asm"
|
||||
INCLUDE "engine/overworld/loadmappart.asm"
|
||||
INCLUDE "engine/overworld/load_map_part.asm"
|
||||
INCLUDE "engine/phone/phonering_copytilemapatonce.asm"
|
||||
|
||||
Shrink1Pic: ; 4d249
|
||||
@ -226,7 +227,7 @@ INCLUDE "engine/rtc/reset_password.asm"
|
||||
INCLUDE "engine/menus/delete_save.asm"
|
||||
INCLUDE "data/tilesets.asm"
|
||||
INCLUDE "engine/smallflag.asm"
|
||||
INCLUDE "engine/gfx/trademonfrontpic.asm"
|
||||
INCLUDE "engine/gfx/trademon_frontpic.asm"
|
||||
INCLUDE "engine/events/pokerus/check_pokerus.asm"
|
||||
INCLUDE "engine/events/lucky_number.asm"
|
||||
INCLUDE "engine/pokemon/caught_data.asm"
|
||||
@ -238,7 +239,7 @@ INCLUDE "engine/movie/init_hof_credits.asm"
|
||||
INCLUDE "engine/events/battle_tower/get_trainer_class.asm"
|
||||
INCLUDE "engine/battle/sliding_intro.asm"
|
||||
INCLUDE "mobile/print_opp_message.asm"
|
||||
INCLUDE "engine/battle/checkbattlescene.asm"
|
||||
INCLUDE "engine/battle/check_battle_scene.asm"
|
||||
INCLUDE "engine/movie/gbc_only.asm"
|
||||
INCLUDE "engine/events/poke_seer.asm"
|
||||
|
||||
@ -256,7 +257,7 @@ INCLUDE "engine/pokemon/tempmon.asm"
|
||||
INCLUDE "engine/pokemon/types.asm"
|
||||
INCLUDE "engine/battle/unreferenced_getgen1trainerclassname.asm"
|
||||
INCLUDE "engine/pokemon/mon_stats.asm"
|
||||
INCLUDE "engine/link/initlist.asm"
|
||||
INCLUDE "engine/link/init_list.asm"
|
||||
INCLUDE "engine/pokemon/experience.asm"
|
||||
INCLUDE "engine/pokemon/switchpartymons.asm"
|
||||
INCLUDE "engine/gfx/load_pics.asm"
|
||||
@ -305,7 +306,7 @@ INCLUDE "mobile/mobile_22_2.asm"
|
||||
|
||||
SECTION "bank23", ROMX
|
||||
|
||||
INCLUDE "engine/tilesets/timeofdaypals.asm"
|
||||
INCLUDE "engine/tilesets/timeofday_pals.asm"
|
||||
INCLUDE "engine/battle/battle_transition.asm"
|
||||
INCLUDE "engine/events/field_moves.asm"
|
||||
INCLUDE "engine/events/magnet_train.asm"
|
||||
@ -356,7 +357,7 @@ SECTION "bank2E", ROMX
|
||||
INCLUDE "engine/events/map_name_sign.asm"
|
||||
INCLUDE "engine/events/checkforhiddenitems.asm"
|
||||
INCLUDE "engine/events/treemons.asm"
|
||||
INCLUDE "engine/events/loadfishinggfx.asm"
|
||||
INCLUDE "engine/events/fishing_gfx.asm"
|
||||
INCLUDE "engine/pokegear/radio.asm"
|
||||
INCLUDE "engine/pokemon/mail_2.asm"
|
||||
|
||||
@ -434,7 +435,7 @@ INCLUDE "engine/events/print_unown_2.asm"
|
||||
INCLUDE "engine/games/card_flip.asm"
|
||||
INCLUDE "engine/games/unown_puzzle.asm"
|
||||
INCLUDE "engine/games/dummy_game.asm"
|
||||
INCLUDE "engine/pokemon/billspc.asm"
|
||||
INCLUDE "engine/pokemon/bills_pc.asm"
|
||||
|
||||
|
||||
SECTION "bank39", ROMX
|
||||
@ -451,8 +452,8 @@ SECTION "bank3E", ROMX
|
||||
INCLUDE "engine/gfx/load_font.asm"
|
||||
INCLUDE "engine/link/time_capsule.asm"
|
||||
INCLUDE "engine/events/name_rater.asm"
|
||||
INCLUDE "engine/events/playslowcry.asm"
|
||||
INCLUDE "engine/pokedex/newpokedexentry.asm"
|
||||
INCLUDE "engine/events/play_slow_cry.asm"
|
||||
INCLUDE "engine/pokedex/new_pokedex_entry.asm"
|
||||
INCLUDE "engine/link/time_capsule_2.asm"
|
||||
INCLUDE "engine/pokedex/unown_dex.asm"
|
||||
INCLUDE "engine/events/magikarp.asm"
|
||||
@ -478,7 +479,7 @@ INCLUDE "engine/overworld/warp_connection.asm"
|
||||
INCLUDE "engine/link/mystery_gift.asm"
|
||||
INCLUDE "engine/battle/used_move_text.asm"
|
||||
INCLUDE "mobile/mobile_41.asm"
|
||||
INCLUDE "engine/gfx/loadoverworldfont.asm"
|
||||
INCLUDE "engine/gfx/load_overworld_font.asm"
|
||||
|
||||
|
||||
SECTION "Mobile 42", ROMX
|
||||
@ -527,7 +528,7 @@ INCLUDE "data/phone/text/extra2.asm"
|
||||
|
||||
SECTION "UpdateBattleHUDs", ROMX
|
||||
|
||||
INCLUDE "engine/battle/updatebattlehuds.asm"
|
||||
INCLUDE "engine/battle/update_battle_huds.asm"
|
||||
|
||||
|
||||
SECTION "Mobile 5E", ROMX
|
||||
@ -567,7 +568,7 @@ INCLUDE "data/phone/text/trainers.asm"
|
||||
SECTION "Miscellaneous Text", ROMX
|
||||
|
||||
INCLUDE "data/items/names.asm"
|
||||
INCLUDE "engine/items/printitemdescription.asm"
|
||||
INCLUDE "engine/items/print_item_description.asm"
|
||||
INCLUDE "data/items/descriptions.asm"
|
||||
INCLUDE "data/moves/names.asm"
|
||||
INCLUDE "engine/overworld/landmarks.asm"
|
||||
@ -583,7 +584,7 @@ INCLUDE "engine/printer/print_party.asm"
|
||||
|
||||
SECTION "bank77_2", ROMX
|
||||
|
||||
INCLUDE "engine/rtc/printhoursmins.asm"
|
||||
INCLUDE "engine/rtc/print_hours_mins.asm"
|
||||
INCLUDE "engine/events/diploma.asm"
|
||||
INCLUDE "engine/pokedex/pokedex_3.asm"
|
||||
INCLUDE "engine/events/catch_tutorial_input.asm"
|
||||
|
Loading…
Reference in New Issue
Block a user