aboutsummaryrefslogtreecommitdiffstats
path: root/engine
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2023-04-25 19:52:12 -0500
committerdannye <33dannye@gmail.com>2023-04-25 19:52:12 -0500
commit667f1febbe59355b1ffea68619e5e5486fd3c408 (patch)
tree9a3ca97fea7cb54d1db9c23ac8c2a405a13f6f5c /engine
parentFix trainer parties' comments (#104) (diff)
parentUpdate `EndBug` to v9. (diff)
downloadpokeyellow-667f1febbe59355b1ffea68619e5e5486fd3c408.tar.gz
pokeyellow-667f1febbe59355b1ffea68619e5e5486fd3c408.tar.xz
pokeyellow-667f1febbe59355b1ffea68619e5e5486fd3c408.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/core.asm4
-rw-r--r--engine/battle/effects.asm22
-rw-r--r--engine/battle/trainer_ai.asm2
-rw-r--r--engine/debug/debug_menu.asm10
-rw-r--r--engine/menus/main_menu.asm1
-rw-r--r--engine/movie/oak_speech/oak_speech.asm10
-rw-r--r--engine/movie/title.asm23
7 files changed, 41 insertions, 31 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 8618cced..addff324 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -3496,7 +3496,7 @@ CheckPlayerStatusConditions:
; fast asleep
xor a
ld [wAnimationType], a
- ld a, SLP_ANIM - 1
+ ld a, SLP_PLAYER_ANIM
call PlayMoveAnimation
ld hl, FastAsleepText
call PrintText
@@ -3580,7 +3580,7 @@ CheckPlayerStatusConditions:
call PrintText
xor a
ld [wAnimationType], a
- ld a, CONF_ANIM - 1
+ ld a, CONF_PLAYER_ANIM
call PlayMoveAnimation
call BattleRandom
cp 50 percent + 1 ; chance to hurt itself
diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm
index f2e2590c..f13d679c 100644
--- a/engine/battle/effects.asm
+++ b/engine/battle/effects.asm
@@ -133,12 +133,12 @@ PoisonEffect:
dec de
ldh a, [hWhoseTurn]
and a
- ld b, ANIM_C7
+ ld b, SHAKE_SCREEN_ANIM
ld hl, wPlayerBattleStatus3
ld a, [de]
ld de, wPlayerToxicCounter
jr nz, .ok
- ld b, ANIM_A9
+ ld b, ENEMY_HUD_SHAKE_ANIM
ld hl, wEnemyBattleStatus3
ld de, wEnemyToxicCounter
.ok
@@ -252,14 +252,14 @@ FreezeBurnParalyzeEffect:
ld a, 1 << PAR
ld [wEnemyMonStatus], a
call QuarterSpeedDueToParalysis ; quarter speed of affected mon
- ld a, ANIM_A9
+ ld a, ENEMY_HUD_SHAKE_ANIM
call PlayBattleAnimation
jp PrintMayNotAttackText ; print paralysis text
.burn1
ld a, 1 << BRN
ld [wEnemyMonStatus], a
call HalveAttackDueToBurn ; halve attack of affected mon
- ld a, ANIM_A9
+ ld a, ENEMY_HUD_SHAKE_ANIM
call PlayBattleAnimation
ld hl, BurnedText
jp PrintText
@@ -267,7 +267,7 @@ FreezeBurnParalyzeEffect:
call ClearHyperBeam ; resets hyper beam (recharge) condition from target
ld a, 1 << FRZ
ld [wEnemyMonStatus], a
- ld a, ANIM_A9
+ ld a, ENEMY_HUD_SHAKE_ANIM
call PlayBattleAnimation
ld hl, FrozenText
jp PrintText
@@ -315,14 +315,14 @@ FreezeBurnParalyzeEffect:
ld a, 1 << PAR
ld [wBattleMonStatus], a
call QuarterSpeedDueToParalysis
- ld a, ANIM_C7
+ ld a, SHAKE_SCREEN_ANIM
call PlayBattleAnimation2
jp PrintMayNotAttackText
.burn2
ld a, 1 << BRN
ld [wBattleMonStatus], a
call HalveAttackDueToBurn
- ld a, ANIM_C7
+ ld a, SHAKE_SCREEN_ANIM
call PlayBattleAnimation2
ld hl, BurnedText
jp PrintText
@@ -330,7 +330,7 @@ FreezeBurnParalyzeEffect:
; hyper beam bits aren't reseted for opponent's side
ld a, 1 << FRZ
ld [wBattleMonStatus], a
- ld a, ANIM_C7
+ ld a, SHAKE_SCREEN_ANIM
call PlayBattleAnimation2
ld hl, FrozenText
jp PrintText
@@ -838,7 +838,7 @@ ThrashPetalDanceEffect:
inc a
ld [de], a ; set thrash/petal dance counter to 2 or 3 at random
ldh a, [hWhoseTurn]
- add ANIM_B0
+ add SHRINKING_SQUARE_ANIM
jp PlayBattleAnimation2
SwitchAndTeleportEffect:
@@ -1041,7 +1041,7 @@ ChargeEffect:
jr z, .chargeEffect
ld hl, wEnemyBattleStatus1
ld de, wEnemyMoveEffect
- ld b, ANIM_AF
+ ld b, XSTATITEM_DUPLICATE_ANIM
.chargeEffect
set CHARGING_UP, [hl]
ld a, [de]
@@ -1055,7 +1055,7 @@ ChargeEffect:
cp DIG
jr nz, .notDigOrFly
set INVULNERABLE, [hl] ; mon is now invulnerable to typical attacks (fly/dig)
- ld b, ANIM_C0
+ ld b, SLIDE_DOWN_ANIM
.notDigOrFly
push de
push bc
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index 4048e808..41325ce7 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -722,7 +722,7 @@ AIIncreaseStat:
ld a, [hl]
push af
push hl
- ld a, ANIM_AF
+ ld a, XSTATITEM_DUPLICATE_ANIM
ld [hli], a
ld [hl], b
callfar StatModifierUpEffect
diff --git a/engine/debug/debug_menu.asm b/engine/debug/debug_menu.asm
index 83917823..d888743e 100644
--- a/engine/debug/debug_menu.asm
+++ b/engine/debug/debug_menu.asm
@@ -2,12 +2,14 @@ DebugMenu:
IF DEF(_DEBUG)
call ClearScreen
- ld hl, DebugPlayerName
+ ; These debug names are used for TestBattle.
+ ; StartNewGameDebug uses the debug names from PrepareOakSpeech.
+ ld hl, DebugBattlePlayerName
ld de, wPlayerName
ld bc, NAME_LENGTH
call CopyData
- ld hl, DebugRivalName
+ ld hl, DebugBattleRivalName
ld de, wRivalName
ld bc, NAME_LENGTH
call CopyData
@@ -58,10 +60,10 @@ IF DEF(_DEBUG)
ld hl, StartNewGameDebug
ret
-DebugPlayerName:
+DebugBattlePlayerName:
db "Tom@"
-DebugRivalName:
+DebugBattleRivalName:
db "Juerry@"
DebugMenuOptions:
diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm
index cfcfcb74..ce0b12c5 100644
--- a/engine/menus/main_menu.asm
+++ b/engine/menus/main_menu.asm
@@ -147,6 +147,7 @@ NotEnoughMemoryText:
StartNewGame:
ld hl, wd732
res 1, [hl]
+ ; fallthrough
StartNewGameDebug:
call OakSpeech
ld a, $8
diff --git a/engine/movie/oak_speech/oak_speech.asm b/engine/movie/oak_speech/oak_speech.asm
index 2ed61fda..3c6b8b45 100644
--- a/engine/movie/oak_speech/oak_speech.asm
+++ b/engine/movie/oak_speech/oak_speech.asm
@@ -1,4 +1,4 @@
-SetDefaultNames:
+PrepareOakSpeech:
ld a, [wLetterPrintingDelayFlags]
push af
ld a, [wOptions]
@@ -30,11 +30,13 @@ SetDefaultNames:
ld a, [wOptionsInitialized]
and a
call z, InitOptions
- ld hl, NintenText
+ ; These debug names are used for StartNewGameDebug.
+ ; TestBattle uses the debug names from DebugMenu.
+ ld hl, DebugNewGamePlayerName
ld de, wPlayerName
ld bc, NAME_LENGTH
call CopyData
- ld hl, SonyText
+ ld hl, DebugNewGameRivalName
ld de, wRivalName
ld bc, NAME_LENGTH
call CopyData ; rip optimizations
@@ -48,7 +50,7 @@ OakSpeech:
call PlayMusic
call ClearScreen
call LoadTextBoxTilePatterns
- call SetDefaultNames
+ call PrepareOakSpeech
predef InitPlayerData2
ld hl, wNumBoxItems
ld a, POTION
diff --git a/engine/movie/title.asm b/engine/movie/title.asm
index c84b1f23..3d054138 100644
--- a/engine/movie/title.asm
+++ b/engine/movie/title.asm
@@ -1,10 +1,13 @@
-SetDefaultNamesBeforeTitlescreen::
- ld hl, NintenText
+PrepareTitleScreen::
+ ; These debug names are already copied later in PrepareOakSpeech.
+ ; Removing the unused copies below has no apparent impact.
+ ; CopyDebugName can also be safely deleted afterwards.
+ ld hl, DebugNewGamePlayerName
ld de, wPlayerName
- call CopyFixedLengthText
- ld hl, SonyText
+ call CopyDebugName
+ ld hl, DebugNewGameRivalName
ld de, wRivalName
- call CopyFixedLengthText
+ call CopyDebugName
xor a
ldh [hWY], a
ld [wLetterPrintingDelayFlags], a
@@ -344,13 +347,15 @@ DoTitleScreenFunction:
ld [wTitleScreenScene], a
ret
-; copy text of fixed length NAME_LENGTH (like player name, rival name, mon names, ...)
-CopyFixedLengthText:
+CopyDebugName:
ld bc, NAME_LENGTH
jp CopyData
-NintenText: db "NINTEN@"
-SonyText: db "SONY@"
+DebugNewGamePlayerName:
+ db "NINTEN@"
+
+DebugNewGameRivalName:
+ db "SONY@"
IncrementResetCounter:
ld hl, wTitleScreenScene + 2