Move event data to data/events/

This commit is contained in:
Rangi
2018-01-25 22:19:24 -05:00
parent 87514598be
commit 6ebe45e41f
40 changed files with 242 additions and 205 deletions

View File

@@ -74,7 +74,7 @@ CheckBugContestContestantFlag: ; 139ed
ret
; 139fe
INCLUDE "data/bug_contest_flags.asm"
INCLUDE "data/events/bug_contest_flags.asm"
ContestDropOffMons: ; 13a12
ld hl, PartyMon1HP

View File

@@ -134,7 +134,7 @@ LoadContestantName: ; 13730
; 13783
INCLUDE "data/bug_contest_winners.asm"
INCLUDE "data/events/bug_contest_winners.asm"
; 13807

View File

@@ -229,4 +229,4 @@ FloorToString: ; 13575
ret
; 13583
INCLUDE "data/elevator_floors.asm"
INCLUDE "data/events/elevator_floors.asm"

View File

@@ -103,7 +103,7 @@ ChangeHappiness: ; 71c2
ret
INCLUDE "data/happiness_changes.asm"
INCLUDE "data/events/happiness_changes.asm"
StepHappiness:: ; 725a

View File

@@ -189,7 +189,7 @@ CalcMagikarpLength: ; fbbfc
.no
ld hl, .Lengths
ld hl, MagikarpLengths
ld a, 2
ld [wd265], a
@@ -308,26 +308,7 @@ CalcMagikarpLength: ; fbbfc
ret
; fbca8
.Lengths: ; fbca8
; [wMagikarpLength] = z * 100 + (bc - x) / y
; First argument is the bc threshold as well as x.
; Second argument is y.
; In reality, due to the bug at .BCLessThanDE, the threshold is determined by only register b.
dwb 110, 1 ; not used unless the bug is fixed
dwb 310, 2
dwb 710, 4
dwb 2710, 20
dwb 7710, 50
dwb 17710, 100
dwb 32710, 150
dwb 47710, 150
dwb 57710, 100
dwb 62710, 50
dwb 64710, 20
dwb 65210, 5
dwb 65410, 2
dwb 65510, 1 ; not used
; fbcd2
INCLUDE "data/events/magikarp_lengths.asm"

View File

@@ -93,4 +93,4 @@ _GiveOddEgg: ; 1fb4b6
.Odd:
db "ODD@@@@@@@@@"
INCLUDE "data/odd_eggs.asm"
INCLUDE "data/events/odd_eggs.asm"

View File

@@ -277,7 +277,7 @@ CheckOverworldTileArrays: ; c840
ret
INCLUDE "data/field_move_blocks.asm"
INCLUDE "data/events/field_move_blocks.asm"
OWFlash: ; c8ac

View File

@@ -98,27 +98,7 @@ endr
ld l, a
ret
OakRatings: ; 0x2667f
; if you caught at most this many, play this sound, load this text
dbww 9, SFX_DEX_FANFARE_LESS_THAN_20, OakRating01
dbww 19, SFX_DEX_FANFARE_LESS_THAN_20, OakRating02
dbww 34, SFX_DEX_FANFARE_20_49, OakRating03
dbww 49, SFX_DEX_FANFARE_20_49, OakRating04
dbww 64, SFX_DEX_FANFARE_50_79, OakRating05
dbww 79, SFX_DEX_FANFARE_50_79, OakRating06
dbww 94, SFX_DEX_FANFARE_80_109, OakRating07
dbww 109, SFX_DEX_FANFARE_80_109, OakRating08
dbww 124, SFX_CAUGHT_MON, OakRating09
dbww 139, SFX_CAUGHT_MON, OakRating10
dbww 154, SFX_DEX_FANFARE_140_169, OakRating11
dbww 169, SFX_DEX_FANFARE_140_169, OakRating12
dbww 184, SFX_DEX_FANFARE_170_199, OakRating13
dbww 199, SFX_DEX_FANFARE_170_199, OakRating14
dbww 214, SFX_DEX_FANFARE_200_229, OakRating15
dbww 229, SFX_DEX_FANFARE_200_229, OakRating16
dbww 239, SFX_DEX_FANFARE_230_PLUS, OakRating17
dbww 248, SFX_DEX_FANFARE_230_PLUS, OakRating18
dbww 255, SFX_DEX_FANFARE_230_PLUS, OakRating19
INCLUDE "data/events/pokedex_ratings.asm"
OakPCText1: ; 0x266de
text_jump _OakPCText1

View File

@@ -156,15 +156,15 @@ BillsGrandfather: ; 73f7
ret
YoungerHaircutBrother: ; 7413
ld hl, Data_YoungerHaircutBrother
ld hl, HappinessData_YoungerHaircutBrother
jr HaircutOrGrooming
OlderHaircutBrother: ; 7418
ld hl, Data_OlderHaircutBrother
ld hl, HappinessData_OlderHaircutBrother
jr HaircutOrGrooming
DaisysGrooming: ; 741d
ld hl, Data_DaisysGrooming
ld hl, HappinessData_DaisysGrooming
; fallthrough
HaircutOrGrooming: ; 7420
@@ -213,18 +213,7 @@ HaircutOrGrooming: ; 7420
ld [ScriptVar], a
ret
Data_YoungerHaircutBrother: ; 7459
db $4c, 2, HAPPINESS_YOUNGCUT1 ; 30% chance
db $80, 3, HAPPINESS_YOUNGCUT2 ; 20% chance
db $ff, 4, HAPPINESS_YOUNGCUT3 ; 50% chance
Data_OlderHaircutBrother: ; 7462
db $9a, 2, HAPPINESS_OLDERCUT1 ; 60% chance
db $4c, 3, HAPPINESS_OLDERCUT2 ; 10% chance
db $ff, 4, HAPPINESS_OLDERCUT3 ; 30% chance
Data_DaisysGrooming: ; 746b
db $ff, 2, HAPPINESS_GROOMING ; 99.6% chance
INCLUDE "data/events/happiness_chances.asm"
CopyPokemonName_Buffer1_Buffer3: ; 746e
ld hl, StringBuffer1

View File

@@ -23,7 +23,7 @@ CheckFacingTileForStdScript:: ; 1365b
xor a
ret
INCLUDE "data/collision_stdscripts.asm"
INCLUDE "data/events/collision_stdscripts.asm"
Script_JumpStdFromRAM: ; 0x1369a
jump wJumpStdScriptBuffer

View File

@@ -153,7 +153,7 @@ DisplayUnownWords: ; 8ae68
ret
; 8aebc
INCLUDE "data/unown_walls.asm"
INCLUDE "data/events/unown_walls.asm"
_DisplayUnownWords_FillAttr: ; 8aee9
ld a, [de]

View File

@@ -11,6 +11,7 @@ _ReceiveItem:: ; d1d5
ret
.Pockets: ; d1e9
; entries correspond to item types
dw .Item
dw .KeyItem
dw .Ball
@@ -51,6 +52,7 @@ _TossItem:: ; d20d
ret
.Pockets:
; entries correspond to item types
dw .Item
dw .KeyItem
dw .Ball
@@ -93,6 +95,7 @@ _CheckItem:: ; d244
ret
.Pockets:
; entries correspond to item types
dw .Item
dw .KeyItem
dw .Ball
@@ -492,7 +495,7 @@ _CheckTossableItem:: ; d427
; Return 1 in wItemAttributeParamBuffer and carry if CurItem can't be removed from the bag.
ld a, ITEMATTR_PERMISSIONS
call GetItemAttr
bit 7, a
bit CANT_TOSS_F, a
jr nz, ItemAttr_ReturnCarry
and a
ret
@@ -501,7 +504,7 @@ CheckSelectableItem: ; d432
; Return 1 in wItemAttributeParamBuffer and carry if CurItem can't be selected.
ld a, ITEMATTR_PERMISSIONS
call GetItemAttr
bit 6, a
bit CANT_SELECT_F, a
jr nz, ItemAttr_ReturnCarry
and a
ret

View File

@@ -401,7 +401,7 @@ GetTradeMonNames: ; fce1b
; fce58
INCLUDE "data/npc_trades.asm"
INCLUDE "data/events/npc_trades.asm"
PrintTradeText: ; fcf38

View File

@@ -60,14 +60,14 @@ RefreshSprites:: ; 14168
GetPlayerSprite: ; 14183
; Get Chris or Kris's sprite.
ld hl, .Chris
ld hl, ChrisStateSprites
ld a, [wPlayerSpriteSetupFlags]
bit PLAYERSPRITESETUP_FEMALE_TO_MALE_F, a
jr nz, .go
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .go
ld hl, .Kris
ld hl, KrisStateSprites
.go
ld a, [PlayerState]
@@ -95,20 +95,7 @@ GetPlayerSprite: ; 14183
ld [PlayerObjectSprite], a
ret
.Chris:
db PLAYER_NORMAL, SPRITE_CHRIS
db PLAYER_BIKE, SPRITE_CHRIS_BIKE
db PLAYER_SURF, SPRITE_SURF
db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
db -1 ; end
.Kris:
db PLAYER_NORMAL, SPRITE_KRIS
db PLAYER_BIKE, SPRITE_KRIS_BIKE
db PLAYER_SURF, SPRITE_SURF
db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
db -1 ; end
; 141c9
INCLUDE "data/sprites/player_sprites.asm"
AddMapSprites: ; 141c9

View File

@@ -839,6 +839,7 @@ PrintPartyMenuActionText: ; 50566
; 5057b
.MenuActionTexts: ; 5057b
; entries correspond to PARTYMENUTEXT_* constants
dw .Text_CuredOfPoison
dw .Text_BurnWasHealed
dw .Text_Defrosted

View File

@@ -704,21 +704,7 @@ GetCallerName: ; 903a9 (24:43a9)
ret
; 903d6 (24:43d6)
NonTrainerCallerNames: ; 903d6
dw .none
dw .mom
dw .bikeshop
dw .bill
dw .elm
dw .buena
.none db "----------@"
.mom db "MOM:@"
.bill db "BILL:@"
.elm db "PROF.ELM:@"
.bikeshop db "BIKE SHOP:@"
.buena db "BUENA:<LNBRK> DISC JOCKEY@"
; 90423
INCLUDE "data/phone/non_trainer_names.asm"
Phone_GetTrainerName: ; 90423 (24:4423)
push hl

View File

@@ -49,4 +49,4 @@ PrintUnownWord: ; fba2e (3e:7a2e)
; fba5a (3e:7a5a)
INCLUDE "data/unown_words.asm"
INCLUDE "data/pokemon/unown_words.asm"

View File

@@ -33,6 +33,7 @@ CheckRegisteredItem: ; 13345
ret
.Pockets:
; entries correspond to *_POCKET constants
dw .CheckItem
dw .CheckBall
dw .CheckKeyItem
@@ -127,6 +128,7 @@ UseRegisteredItem: ; 133c3
ret
.SwitchTo:
; entries correspond to ITEMMENU_* constants
dw .CantUse
dw .NoFunction
dw .NoFunction

View File

@@ -54,7 +54,7 @@ _GetVarAction:: ; 80648 (20:4648)
dwb MapGroup, RETVAR_STRBUF2
dwb MapNumber, RETVAR_STRBUF2
dwb .UnownCaught, RETVAR_EXECUTE
dwb wEnvironment, RETVAR_STRBUF2
dwb wEnvironment, RETVAR_STRBUF2
dwb .BoxFreeSpace, RETVAR_EXECUTE
dwb wBugContestMinsRemaining, RETVAR_STRBUF2
dwb XCoord, RETVAR_STRBUF2