summaryrefslogtreecommitdiff
path: root/engine/events
diff options
context:
space:
mode:
Diffstat (limited to 'engine/events')
-rw-r--r--engine/events/battle_tower/battle_tower.asm22
-rw-r--r--engine/events/battle_tower/load_trainer.asm2
-rw-r--r--engine/events/bug_contest/caught_mon.asm4
-rw-r--r--engine/events/bug_contest/contest_2.asm3
-rw-r--r--engine/events/bug_contest/display_stats.asm2
-rw-r--r--engine/events/bug_contest/judging.asm6
-rw-r--r--engine/events/celebi.asm2
-rw-r--r--engine/events/daycare.asm2
-rw-r--r--engine/events/field_moves.asm42
-rw-r--r--engine/events/fish.asm4
-rw-r--r--engine/events/fishing_gfx.asm2
-rw-r--r--engine/events/fruit_trees.asm8
-rw-r--r--engine/events/halloffame.asm8
-rw-r--r--engine/events/happiness_egg.asm12
-rw-r--r--engine/events/lucky_number.asm18
-rw-r--r--engine/events/magikarp.asm10
-rw-r--r--engine/events/move_deleter.asm2
-rw-r--r--engine/events/move_tutor.asm2
-rw-r--r--engine/events/name_rater.asm2
-rw-r--r--engine/events/npc_trade.asm2
-rw-r--r--engine/events/odd_egg.asm2
-rw-r--r--engine/events/pokecenter_pc.asm8
-rw-r--r--engine/events/shuckle.asm4
-rw-r--r--engine/events/specials.asm4
24 files changed, 87 insertions, 86 deletions
diff --git a/engine/events/battle_tower/battle_tower.asm b/engine/events/battle_tower/battle_tower.asm
index e51080ae0..534e2c331 100644
--- a/engine/events/battle_tower/battle_tower.asm
+++ b/engine/events/battle_tower/battle_tower.asm
@@ -270,7 +270,7 @@ ReadBTTrainerParty:
; Check the nicknames for illegal characters, and replace bad nicknames
; with their species names.
- ld de, wBT_OTTempMon1Name ; $c643
+ ld de, wBT_OTTempMon1Name
ld c, MON_NAME_LENGTH
farcall CheckStringForErrors
jr nc, .skip_mon_1
@@ -280,44 +280,44 @@ ReadBTTrainerParty:
call GetPokemonName
ld l, e
ld h, d
- ld de, wBT_OTTempMon1Name ; $c643
+ ld de, wBT_OTTempMon1Name
ld bc, MON_NAME_LENGTH
call CopyBytes
.skip_mon_1
- ld de, wBT_OTTempMon2Name ; $c67e
+ ld de, wBT_OTTempMon2Name
ld c, MON_NAME_LENGTH
farcall CheckStringForErrors
jr nc, .skip_mon_2
- ld a, [wBT_OTTempMon2] ; [$c64e]
+ ld a, [wBT_OTTempMon2]
ld [wNamedObjectIndexBuffer], a
call GetPokemonName
ld l, e
ld h, d
- ld de, wBT_OTTempMon2Name ; $c67e
+ ld de, wBT_OTTempMon2Name
ld bc, MON_NAME_LENGTH
call CopyBytes
.skip_mon_2
- ld de, wBT_OTTempMon3Name ; $c686 + 51 = $c6b9
+ ld de, wBT_OTTempMon3Name
ld c, MON_NAME_LENGTH
farcall CheckStringForErrors
jr nc, .skip_mon_3
- ld a, [wBT_OTTempMon3] ; [$c689]
+ ld a, [wBT_OTTempMon3]
ld [wNamedObjectIndexBuffer], a
call GetPokemonName
ld l, e
ld h, d
- ld de, wBT_OTTempMon3Name ; $c686 + 51 = $c6b9
+ ld de, wBT_OTTempMon3Name
ld bc, MON_NAME_LENGTH
call CopyBytes
.skip_mon_3
; Add the terminator character to each of these names
ld a, "@"
- ld [wBT_OTTempMon1NameEnd - 1], a ; $c64d
- ld [wBT_OTTempMon2NameEnd - 1], a ; $c688
- ld [wBT_OTTempMon3NameEnd - 1], a ; $c68a + 57 = $c6c3
+ ld [wBT_OTTempMon1NameEnd - 1], a
+ ld [wBT_OTTempMon2NameEnd - 1], a
+ ld [wBT_OTTempMon3NameEnd - 1], a
; Fix errors in the movesets
call CheckBTMonMovesForErrors
; Repair the trainer name if needed, then copy it to wOTPlayerName
diff --git a/engine/events/battle_tower/load_trainer.asm b/engine/events/battle_tower/load_trainer.asm
index 2f34950b6..f9be02b28 100644
--- a/engine/events/battle_tower/load_trainer.asm
+++ b/engine/events/battle_tower/load_trainer.asm
@@ -104,7 +104,7 @@ Function_LoadRandomBattleTowerMon:
ld a, [wBTChoiceOfLvlGroup]
dec a
ld hl, BattleTowerMons
- ld bc, BattleTowerMons2 - BattleTowerMons1
+ ld bc, BattleTowerMons2 - BattleTowerMons1 ; size of one level group
call AddNTimes
ld a, [hRandomAdd]
diff --git a/engine/events/bug_contest/caught_mon.asm b/engine/events/bug_contest/caught_mon.asm
index 45212ae3e..fc170cf28 100644
--- a/engine/events/bug_contest/caught_mon.asm
+++ b/engine/events/bug_contest/caught_mon.asm
@@ -2,7 +2,7 @@ BugContest_SetCaughtContestMon:
ld a, [wContestMon]
and a
jr z, .firstcatch
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
farcall DisplayAlreadyCaughtText
farcall DisplayCaughtContestMonStats
lb bc, 14, 7
@@ -12,7 +12,7 @@ BugContest_SetCaughtContestMon:
.firstcatch
call .generatestats
ld a, [wTempEnemyMonSpecies]
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
call GetPokemonName
ld hl, .caughttext
call PrintText
diff --git a/engine/events/bug_contest/contest_2.asm b/engine/events/bug_contest/contest_2.asm
index 9cf70a03e..ddfad8644 100644
--- a/engine/events/bug_contest/contest_2.asm
+++ b/engine/events/bug_contest/contest_2.asm
@@ -58,9 +58,6 @@ SelectRandomBugContestContestants:
CheckBugContestContestantFlag:
; Checks the flag of the Bug Catching Contestant whose index is loaded in a.
-; Bug: If a >= NUM_BUG_CONTESTANTS when this is called,
-; it will read beyond the table.
-
ld hl, BugCatchingContestantEventFlagTable
ld e, a
ld d, 0
diff --git a/engine/events/bug_contest/display_stats.asm b/engine/events/bug_contest/display_stats.asm
index 94a5e9511..9d92f8fe3 100644
--- a/engine/events/bug_contest/display_stats.asm
+++ b/engine/events/bug_contest/display_stats.asm
@@ -36,7 +36,7 @@ DisplayCaughtContestMonStats:
call PlaceString
ld a, [wContestMon]
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
call GetPokemonName
ld de, wStringBuffer1
hlcoord 1, 2
diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm
index d8f9d7657..a6ec3baf6 100644
--- a/engine/events/bug_contest/judging.asm
+++ b/engine/events/bug_contest/judging.asm
@@ -171,7 +171,7 @@ DetermineContestWinners:
ld de, wBugContestTempScore
ld hl, wBugContestFirstPlaceScore
ld c, 2
- call StringCmp
+ call CompareBytes
jr c, .not_first_place
ld hl, wBugContestSecondPlaceWinnerID
ld de, wBugContestThirdPlaceWinnerID
@@ -189,7 +189,7 @@ DetermineContestWinners:
ld de, wBugContestTempScore
ld hl, wBugContestSecondPlaceScore
ld c, 2
- call StringCmp
+ call CompareBytes
jr c, .not_second_place
ld hl, wBugContestSecondPlaceWinnerID
ld de, wBugContestThirdPlaceWinnerID
@@ -203,7 +203,7 @@ DetermineContestWinners:
ld de, wBugContestTempScore
ld hl, wBugContestThirdPlaceScore
ld c, 2
- call StringCmp
+ call CompareBytes
jr c, .done
ld hl, wBugContestThirdPlaceWinnerID
call CopyTempContestant
diff --git a/engine/events/celebi.asm b/engine/events/celebi.asm
index 76bdbaa76..a34f3935a 100644
--- a/engine/events/celebi.asm
+++ b/engine/events/celebi.asm
@@ -31,7 +31,7 @@ CelebiShrineEvent:
call GetCelebiSpriteTile
inc d
push de
- ld a, $90
+ ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
farcall DoNextFrameForAllSprites
call CelebiEvent_CountDown
diff --git a/engine/events/daycare.asm b/engine/events/daycare.asm
index 5904a476d..4e98c5382 100644
--- a/engine/events/daycare.asm
+++ b/engine/events/daycare.asm
@@ -558,7 +558,7 @@ DayCare_InitBreeding:
bit DAYCAREMAN_HAS_MON_F, a
ret z
callfar CheckBreedmonCompatibility
- ld a, [wd265]
+ ld a, [wBreedingCompatibility]
and a
ret z
inc a
diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm
index f5ad049f2..a6edbc08c 100644
--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -1,3 +1,7 @@
+FIELDMOVE_GRASS EQU $80
+FIELDMOVE_TREE EQU $84
+FIELDMOVE_FLY EQU $84
+
PlayWhirlpoolSound:
call WaitSFX
ld de, SFX_SURF
@@ -20,11 +24,11 @@ BlindingFlash:
ShakeHeadbuttTree:
farcall ClearSpriteAnims
ld de, CutGrassGFX
- ld hl, vTiles1 tile $00
+ ld hl, vTiles0 tile FIELDMOVE_GRASS
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld de, HeadbuttTreeGFX
- ld hl, vTiles1 tile $04
+ ld hl, vTiles0 tile FIELDMOVE_TREE
lb bc, BANK(HeadbuttTreeGFX), 8
call Request2bpp
call Cut_Headbutt_GetPixelFacing
@@ -32,8 +36,8 @@ ShakeHeadbuttTree:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $84
- ld a, 36 * 4
+ ld [hl], FIELDMOVE_TREE
+ ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
farcall DoNextFrameForAllSprites
call HideHeadbuttTree
@@ -48,7 +52,7 @@ ShakeHeadbuttTree:
and a
jr z, .done
dec [hl]
- ld a, 36 * 4
+ ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
farcall DoNextFrameForAllSprites
call DelayFrame
@@ -111,7 +115,7 @@ OWCutAnimation:
; 0: Split tree in half
; 1: Mow the lawn
ld a, e
- and $1
+ and 1
ld [wJumptableIndex], a
call .LoadCutGFX
call WaitSFX
@@ -121,7 +125,7 @@ OWCutAnimation:
ld a, [wJumptableIndex]
bit 7, a
jr nz, .finish
- ld a, 36 * 4
+ ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
callfar DoNextFrameForAllSprites
call OWCutJumptable
@@ -134,11 +138,11 @@ OWCutAnimation:
.LoadCutGFX:
callfar ClearSpriteAnims ; pointless to farcall
ld de, CutGrassGFX
- ld hl, vTiles1 tile $00
+ ld hl, vTiles0 tile FIELDMOVE_GRASS
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld de, CutTreeGFX
- ld hl, vTiles1 tile $04
+ ld hl, vTiles0 tile FIELDMOVE_TREE
lb bc, BANK(CutTreeGFX), 4
call Request2bpp
ret
@@ -173,7 +177,7 @@ Cut_SpawnAnimateTree:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $84
+ ld [hl], FIELDMOVE_TREE
ld a, 32
ld [wFrameCounter], a
; Cut_StartWaiting
@@ -226,7 +230,7 @@ Cut_SpawnLeaf:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $80
+ ld [hl], FIELDMOVE_GRASS
ld hl, SPRITEANIMSTRUCT_0E
add hl, bc
ld [hl], $4
@@ -313,7 +317,7 @@ FlyFromAnim:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $84
+ ld [hl], FIELDMOVE_FLY
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_FLY_FROM
@@ -323,7 +327,7 @@ FlyFromAnim:
ld a, [wJumptableIndex]
bit 7, a
jr nz, .exit
- ld a, 0 * 4
+ ld a, 0 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
callfar DoNextFrameForAllSprites
call FlyFunction_FrameTimer
@@ -347,7 +351,7 @@ FlyToAnim:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $84
+ ld [hl], FIELDMOVE_FLY
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_FLY_TO
@@ -360,7 +364,7 @@ FlyToAnim:
ld a, [wJumptableIndex]
bit 7, a
jr nz, .exit
- ld a, 0 * 4
+ ld a, 0 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
callfar DoNextFrameForAllSprites
call FlyFunction_FrameTimer
@@ -394,7 +398,7 @@ endr
FlyFunction_InitGFX:
callfar ClearSpriteAnims
ld de, CutGrassGFX
- ld hl, vTiles1 tile $00
+ ld hl, vTiles0 tile FIELDMOVE_GRASS
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld a, [wCurPartyMon]
@@ -403,8 +407,8 @@ FlyFunction_InitGFX:
ld d, 0
add hl, de
ld a, [hl]
- ld [wd265], a
- ld e, $84
+ ld [wTempIconSpecies], a
+ ld e, FIELDMOVE_FLY
farcall FlyFunction_GetMonIcon
xor a
ld [wJumptableIndex], a
@@ -446,5 +450,5 @@ FlyFunction_FrameTimer:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $80
+ ld [hl], FIELDMOVE_GRASS
ret
diff --git a/engine/events/fish.asm b/engine/events/fish.asm
index a1df536bb..c1dde87d8 100644
--- a/engine/events/fish.asm
+++ b/engine/events/fish.asm
@@ -93,8 +93,8 @@ GetFishGroupIndex:
; Return the index of fishgroup d in de.
push hl
- ld hl, wDailyFlags
- bit DAILYFLAGS_FISH_SWARM_F, [hl]
+ ld hl, wDailyFlags1
+ bit DAILYFLAGS1_FISH_SWARM_F, [hl]
pop hl
jr z, .done
diff --git a/engine/events/fishing_gfx.asm b/engine/events/fishing_gfx.asm
index 25d1ee77a..159f0022d 100644
--- a/engine/events/fishing_gfx.asm
+++ b/engine/events/fishing_gfx.asm
@@ -17,7 +17,7 @@ LoadFishingGFX:
call .LoadGFX
ld hl, vTiles0 tile $0a
call .LoadGFX
- ld hl, vTiles1 tile $7c
+ ld hl, vTiles0 tile $fc
call .LoadGFX
pop af
diff --git a/engine/events/fruit_trees.asm b/engine/events/fruit_trees.asm
index 6d5ca6a1d..15fa4f80f 100644
--- a/engine/events/fruit_trees.asm
+++ b/engine/events/fruit_trees.asm
@@ -41,8 +41,8 @@ GetCurTreeFruit:
ret
TryResetFruitTrees:
- ld hl, wDailyFlags
- bit DAILYFLAGS_ALL_FRUIT_TREES_F, [hl]
+ ld hl, wDailyFlags1
+ bit DAILYFLAGS1_ALL_FRUIT_TREES_F, [hl]
ret nz
jp ResetFruitTrees
@@ -65,8 +65,8 @@ ResetFruitTrees:
ld [hli], a
ld [hli], a
ld [hl], a
- ld hl, wDailyFlags
- set DAILYFLAGS_ALL_FRUIT_TREES_F, [hl]
+ ld hl, wDailyFlags1
+ set DAILYFLAGS1_ALL_FRUIT_TREES_F, [hl]
ret
GetFruitTreeFlag:
diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm
index 6cbc749d5..752ec965b 100644
--- a/engine/events/halloffame.asm
+++ b/engine/events/halloffame.asm
@@ -124,7 +124,7 @@ AnimateHallOfFame:
call PlaceString
call WaitBGMap
decoord 6, 5
- ld c, $6
+ ld c, ANIM_MON_HOF
predef HOF_AnimateFrontpic
ld c, 60
call DelayFrames
@@ -390,7 +390,7 @@ _HallOfFamePC:
call GetSGBLayout
call SetPalettes
decoord 6, 5
- ld c, $6
+ ld c, ANIM_MON_HOF
predef HOF_AnimateFrontpic
and a
ret
@@ -462,7 +462,7 @@ DisplayHOFMon:
call TextBox
ld a, [wTempMonSpecies]
ld [wCurPartySpecies], a
- ld [wd265], a
+ ld [wDeciramBuffer], a
ld hl, wTempMonDVs
predef GetUnownLetter
xor a
@@ -477,7 +477,7 @@ DisplayHOFMon:
ld [hli], a
ld [hl], "<DOT>"
hlcoord 3, 13
- ld de, wd265
+ ld de, wDeciramBuffer
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
call GetBasePokemonName
diff --git a/engine/events/happiness_egg.asm b/engine/events/happiness_egg.asm
index 41f9a4411..1d33edb74 100644
--- a/engine/events/happiness_egg.asm
+++ b/engine/events/happiness_egg.asm
@@ -11,7 +11,7 @@ GetFirstPokemonHappiness:
jr .loop
.done
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
ld a, [hl]
ld [wScriptVar], a
call GetPokemonName
@@ -19,9 +19,9 @@ GetFirstPokemonHappiness:
CheckFirstMonIsEgg:
ld a, [wPartySpecies]
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
cp EGG
- ld a, 1
+ ld a, TRUE
jr z, .egg
xor a
@@ -196,15 +196,15 @@ DayCareStep::
call Random
ld [hl], a
callfar CheckBreedmonCompatibility
- ld a, [wd265]
+ ld a, [wBreedingCompatibility]
cp 230
ld b, 32 percent - 1
jr nc, .okay
- ld a, [wd265]
+ ld a, [wBreedingCompatibility]
cp 170
ld b, 16 percent
jr nc, .okay
- ld a, [wd265]
+ ld a, [wBreedingCompatibility]
cp 110
ld b, 12 percent
jr nc, .okay
diff --git a/engine/events/lucky_number.asm b/engine/events/lucky_number.asm
index c5d6d18e0..1c3a8dc02 100644
--- a/engine/events/lucky_number.asm
+++ b/engine/events/lucky_number.asm
@@ -1,7 +1,7 @@
CheckForLuckyNumberWinners:
xor a
ld [wScriptVar], a
- ld [wFoundMatchingIDInParty], a
+ ld [wTempByteValue], a
ld a, [wPartyCount]
and a
ret z
@@ -34,8 +34,8 @@ CheckForLuckyNumberWinners:
jr z, .SkipOpenBoxMon
call .CompareLuckyNumberToMonID
jr nc, .SkipOpenBoxMon
- ld a, 1
- ld [wFoundMatchingIDInParty], a
+ ld a, TRUE
+ ld [wTempByteValue], a
.SkipOpenBoxMon:
push bc
@@ -81,8 +81,8 @@ CheckForLuckyNumberWinners:
call .CompareLuckyNumberToMonID ; sets wScriptVar and wCurPartySpecies appropriately
jr nc, .SkipBoxMon
- ld a, 1
- ld [wFoundMatchingIDInParty], a
+ ld a, TRUE
+ ld [wTempByteValue], a
.SkipBoxMon:
push bc
@@ -104,7 +104,7 @@ CheckForLuckyNumberWinners:
and a
ret z ; found nothing
farcall StubbedTrainerRankings_LuckyNumberShow
- ld a, [wFoundMatchingIDInParty]
+ ld a, [wTempByteValue]
and a
push af
ld a, [wCurPartySpecies]
@@ -127,14 +127,14 @@ CheckForLuckyNumberWinners:
ld hl, wBuffer1
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
call PrintNum
- ld hl, wLuckyNumberDigit1Buffer
+ ld hl, wLuckyNumberDigitsBuffer
ld de, wLuckyIDNumber
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
call PrintNum
ld b, 5
ld c, 0
- ld hl, wLuckyNumberDigit5Buffer
- ld de, wBuffer5
+ ld hl, wLuckyNumberDigitsBuffer + 4
+ ld de, wBuffer1 + 4
.loop
ld a, [de]
cp [hl]
diff --git a/engine/events/magikarp.asm b/engine/events/magikarp.asm
index 7fe8adba7..db415c65e 100644
--- a/engine/events/magikarp.asm
+++ b/engine/events/magikarp.asm
@@ -36,7 +36,7 @@ CheckMagikarpLength:
ld hl, wMagikarpLength
ld de, wBestMagikarpLengthFeet
ld c, 2
- call StringCmp
+ call CompareBytes
jr nc, .not_long_enough
; NEW RECORD!!! Let's save that.
@@ -185,7 +185,7 @@ CalcMagikarpLength:
ld hl, MagikarpLengths
ld a, 2
- ld [wd265], a
+ ld [wTempByteValue], a
.read
ld a, [hli]
@@ -214,7 +214,7 @@ CalcMagikarpLength:
ld [hMultiplicand + 1], a
ld a, 100
ld [hMultiplicand + 2], a
- ld a, [wd265]
+ ld a, [wTempByteValue]
ld [hMultiplier], a
call Multiply
ld b, 0
@@ -228,9 +228,9 @@ CalcMagikarpLength:
.next
inc hl ; align to next triplet
- ld a, [wd265]
+ ld a, [wTempByteValue]
inc a
- ld [wd265], a
+ ld [wTempByteValue], a
cp 16
jr c, .read
diff --git a/engine/events/move_deleter.asm b/engine/events/move_deleter.asm
index f2b827227..2f0df5162 100644
--- a/engine/events/move_deleter.asm
+++ b/engine/events/move_deleter.asm
@@ -28,7 +28,7 @@ MoveDeletion:
ld a, [wMenuCursorY]
push af
ld a, [wCurSpecies]
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
call GetMoveName
ld hl, .ConfirmDeleteText
call PrintText
diff --git a/engine/events/move_tutor.asm b/engine/events/move_tutor.asm
index 67d0ca528..681dc6adc 100644
--- a/engine/events/move_tutor.asm
+++ b/engine/events/move_tutor.asm
@@ -8,7 +8,7 @@ MoveTutor:
xor a
ld [wItemAttributeParamBuffer], a
call .GetMoveTutorMove
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
ld [wPutativeTMHMMove], a
call GetMoveName
call CopyName1
diff --git a/engine/events/name_rater.asm b/engine/events/name_rater.asm
index 593d51c69..2cdff4bdd 100644
--- a/engine/events/name_rater.asm
+++ b/engine/events/name_rater.asm
@@ -29,7 +29,7 @@ _NameRater:
xor a ; PARTYMON
ld [wMonType], a
ld a, [wCurPartySpecies]
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
ld [wCurSpecies], a
call GetBaseData
ld b, 0
diff --git a/engine/events/npc_trade.asm b/engine/events/npc_trade.asm
index 9cff40a2b..bb71941ed 100644
--- a/engine/events/npc_trade.asm
+++ b/engine/events/npc_trade.asm
@@ -301,7 +301,7 @@ Trade_GetAttributeOfLastPartymon:
GetTradeMonName:
push de
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
call GetBasePokemonName
ld hl, wStringBuffer1
pop de
diff --git a/engine/events/odd_egg.asm b/engine/events/odd_egg.asm
index 10d7cf9aa..a6b244b1d 100644
--- a/engine/events/odd_egg.asm
+++ b/engine/events/odd_egg.asm
@@ -39,7 +39,7 @@ _GiveOddEgg:
.done
ld hl, OddEggs
- ld a, OddEgg2 - OddEgg1
+ ld a, OddEgg1End - OddEgg1
call AddNTimes
ld de, wOddEggSpecies
diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm
index f1a593b5a..8f73fc41e 100644
--- a/engine/events/pokecenter_pc.asm
+++ b/engine/events/pokecenter_pc.asm
@@ -478,21 +478,21 @@ PlayerDepositItemMenu:
push af
ld a, [wBuffer2]
push af
- call .DepositItem_
+ call .DepositItem
pop af
ld [wBuffer2], a
pop af
ld [wBuffer1], a
ret
-.DepositItem_:
+.DepositItem:
farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr z, .AskQuantity
ld a, $1
ld [wItemQuantityChangeBuffer], a
- jr .DepositItem
+ jr .ContinueDeposit
.AskQuantity:
ld hl, .HowManyText
@@ -504,7 +504,7 @@ PlayerDepositItemMenu:
pop af
jr c, .DeclinedToDeposit
-.DepositItem:
+.ContinueDeposit:
ld a, [wItemQuantityChangeBuffer]
ld [wBuffer1], a
ld a, [wCurItemQuantity]
diff --git a/engine/events/shuckle.asm b/engine/events/shuckle.asm
index c6d909afe..b1c87f53a 100644
--- a/engine/events/shuckle.asm
+++ b/engine/events/shuckle.asm
@@ -54,8 +54,8 @@ GiveShuckle:
call CopyName2
; Engine flag for this event.
- ld hl, wDailyFlags
- set DAILYFLAGS_GOT_SHUCKIE_TODAY_F, [hl]
+ ld hl, wDailyFlags1
+ set DAILYFLAGS1_GOT_SHUCKIE_TODAY_F, [hl]
ld a, 1
ld [wScriptVar], a
ret
diff --git a/engine/events/specials.asm b/engine/events/specials.asm
index 35d32dde6..be554f1bc 100644
--- a/engine/events/specials.asm
+++ b/engine/events/specials.asm
@@ -34,7 +34,7 @@ GameCornerPrizeMonCheckDex:
call SetSeenAndCaughtMon
call FadeToMenu
ld a, [wScriptVar]
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
farcall NewPokedexEntry
call ExitAllMenus
ret
@@ -153,7 +153,7 @@ GetMysteryGiftItem:
ld [sMysteryGiftItem], a
call CloseSRAM
ld a, [wCurItem]
- ld [wd265], a
+ ld [wNamedObjectIndexBuffer], a
call GetItemName
ld hl, .ReceiveItemText
call PrintText