ref: 13d4d533f7c5904391309e72f4b7937210b1c476
parent: d3f13528754b985e892385dbd88c3c9a95681f1b
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Fri Nov 6 05:33:58 EST 2020
Sync more with pokeyellow
--- a/data/text/text_2.asm
+++ b/data/text/text_2.asm
@@ -888,7 +888,7 @@
text "Use next #MON?"
done
-_Sony1WinText::
+_Rival1WinText::
text "<RIVAL>: Yeah! Am"
line "I great or what?"
prompt
--- a/data/trainers/ai_pointers.asm
+++ b/data/trainers/ai_pointers.asm
@@ -27,8 +27,8 @@
dbw 3, GenericAI
dbw 3, GenericAI
dbw 2, BlackbeltAI ; blackbelt
+ dbw 3, GenericAI ; rival1
dbw 3, GenericAI
- dbw 3, GenericAI
dbw 1, GenericAI ; chief
dbw 3, GenericAI
dbw 1, GiovanniAI ; giovanni
@@ -44,8 +44,8 @@
dbw 2, BlaineAI ; blaine
dbw 1, SabrinaAI ; sabrina
dbw 3, GenericAI
- dbw 1, Sony2AI ; sony2
- dbw 1, Sony3AI ; sony3
+ dbw 1, Rival2AI ; rival2
+ dbw 1, Rival3AI ; rival3
dbw 2, LoreleiAI ; lorelei
dbw 3, GenericAI
dbw 2, AgathaAI ; agatha
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -1132,22 +1132,22 @@
HandlePlayerBlackOut:
ld a, [wLinkState]
cp LINK_STATE_BATTLING
- jr z, .notSony1Battle
+ jr z, .notRival1Battle
ld a, [wCurOpponent]
cp OPP_RIVAL1
- jr nz, .notSony1Battle
- hlcoord 0, 0 ; sony 1 battle
+ jr nz, .notRival1Battle
+ hlcoord 0, 0 ; rival 1 battle
lb bc, 8, 21
call ClearScreenArea
call ScrollTrainerPicAfterBattle
ld c, 40
call DelayFrames
- ld hl, Sony1WinText
+ ld hl, Rival1WinText
call PrintText
ld a, [wCurMap]
cp OAKS_LAB
ret z ; starter battle in oak's lab: don't black out
-.notSony1Battle
+.notRival1Battle
ld b, SET_PAL_BATTLE_BLACK
call RunPaletteCommand
ld hl, PlayerBlackedOutText2
@@ -1164,8 +1164,8 @@
scf
ret
-Sony1WinText:
- text_far _Sony1WinText
+Rival1WinText:
+ text_far _Rival1WinText
text_end
PlayerBlackedOutText2:
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -394,7 +394,7 @@
ret nc
jp AIUseHyperPotion
-Sony2AI:
+Rival2AI:
cp 13 percent - 1
ret nc
ld a, 5
@@ -402,7 +402,7 @@
ret nc
jp AIUsePotion
-Sony3AI:
+Rival3AI:
cp 13 percent - 1
ret nc
ld a, 5
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -35,7 +35,7 @@
dec b
jr nz, .partyLoop
ld a, [wAudioROMBank]
- cp BANK(Audio3_UpdateMusic)
+ cp BANK("Audio Engine 3")
ld [wAudioSavedROMBank], a
jr nz, .next
ld a, SFX_STOP_ALL_MUSIC
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -73,7 +73,6 @@
ld b, a
cp BANK(Audio1_UpdateMusic)
jr nz, .checkForAudio2
-
; audio 1
ld hl, Audio1_UpdateMusic
jr .next
@@ -81,7 +80,6 @@
.checkForAudio2
cp BANK(Audio2_UpdateMusic)
jr nz, .audio3
-
; audio 2
ld hl, Audio2_UpdateMusic
jr .next
@@ -177,7 +175,6 @@
ld [MBC1RomBank], a
cp BANK(Audio1_PlaySound)
jr nz, .checkForAudio2
-
; audio 1
ld a, b
call Audio1_PlaySound
@@ -186,7 +183,6 @@
.checkForAudio2
cp BANK(Audio2_PlaySound)
jr nz, .audio3
-
; audio 2
ld a, b
call Audio2_PlaySound
--- a/scripts/AgathasRoom.asm
+++ b/scripts/AgathasRoom.asm
@@ -20,7 +20,7 @@
jp .setExitBlock
.blockExitToNextRoom
ld a, $3b
-.setExitBlock:
+.setExitBlock
ld [wNewTileBlockID], a
lb bc, 0, 2
predef_jump ReplaceTileBlock
--- a/scripts/BikeShop.asm
+++ b/scripts/BikeShop.asm
@@ -50,8 +50,8 @@
ld hl, wd730
set 6, [hl]
hlcoord 0, 0
- ld b, $4
- ld c, $f
+ ld b, 4
+ ld c, 15
call TextBoxBorder
call UpdateSprites
hlcoord 2, 2
@@ -63,7 +63,7 @@
ld hl, BikeShopText_1d815
call PrintText
call HandleMenuInput
- bit 1, a
+ bit BIT_B_BUTTON, a
jr nz, .cancel
ld hl, wd730
res 6, [hl]
--- a/scripts/CeladonMartRoof.asm
+++ b/scripts/CeladonMartRoof.asm
@@ -71,7 +71,7 @@
ld hl, wd730
res 6, [hl]
call HandleMenuInput
- bit 1, a ; pressed b
+ bit BIT_B_BUTTON, a
ret nz
ld hl, wFilteredBagItems
ld a, [wCurrentMenuItem]
--- a/scripts/GameCorner.asm
+++ b/scripts/GameCorner.asm
@@ -475,8 +475,8 @@
ld hl, wd730
set 6, [hl]
hlcoord 11, 0
- ld b, $5
- ld c, $7
+ ld b, 5
+ ld c, 7
call TextBoxBorder
call UpdateSprites
hlcoord 12, 1
@@ -491,7 +491,7 @@
call PlaceString
hlcoord 12, 3
ld de, wPlayerMoney
- ld c, $a3
+ ld c, 3 | MONEY_SIGN | LEADING_ZEROES
call PrintBCDNumber
hlcoord 12, 4
ld de, GameCornerCoinText
--- a/scripts/LancesRoom.asm
+++ b/scripts/LancesRoom.asm
@@ -18,23 +18,21 @@
; open entrance
ld a, $31
ld b, $32
- jp LanceSetEntranceBlocks
+ jp .setEntranceBlocks
.closeEntrance
ld a, $72
ld b, $73
-
-LanceSetEntranceBlocks:
+.setEntranceBlocks
; Replaces the tile blocks so the player can't leave.
push bc
ld [wNewTileBlockID], a
lb bc, 6, 2
- call LanceSetEntranceBlock
+ call .SetEntranceBlock
pop bc
ld a, b
ld [wNewTileBlockID], a
lb bc, 6, 3
-
-LanceSetEntranceBlock:
+.SetEntranceBlock:
predef_jump ReplaceTileBlock
ResetLanceScript:
--- a/scripts/MtMoonB2F.asm
+++ b/scripts/MtMoonB2F.asm
@@ -180,7 +180,8 @@
text_asm
CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
jr z, .asm_49e8d
- and $c0
+ ; CheckEitherEventSetReuseA EVENT_GOT_DOME_FOSSIL, EVENT_GOT_HELIX_FOSSIL
+ and (1 << (EVENT_GOT_DOME_FOSSIL % 8)) | (1 << (EVENT_GOT_HELIX_FOSSIL % 8))
jr nz, .asm_49eb8
ld hl, MtMoon3Text_49f8f
call PrintText
--- a/scripts/OaksLab.asm
+++ b/scripts/OaksLab.asm
@@ -666,7 +666,7 @@
ld hl, wNumBagItems
ld a, c
ld [wWhichPokemon], a
- ld a, $1
+ ld a, 1
ld [wItemQuantity], a
jp RemoveItemFromInventory
@@ -716,7 +716,7 @@
ld a, l
ld [wMapTextPtr], a
ld a, h
- ld [wMapTextPtr+1], a
+ ld [wMapTextPtr + 1], a
ret
OaksLab_TextPointers:
--- a/scripts/PewterGym.asm
+++ b/scripts/PewterGym.asm
@@ -41,7 +41,6 @@
jp z, PewterGymScript_5c3bf
ld a, $f0
ld [wJoyIgnore], a
-
PewterGymScript_5c3df:
ld a, $4
ldh [hSpriteIndexOrTextID], a
--- a/scripts/PewterMart.asm
+++ b/scripts/PewterMart.asm
@@ -14,6 +14,7 @@
ld hl, .Text
call PrintText
jp TextScriptEnd
+
.Text
text_far _PewterMartText2
text_end
@@ -23,6 +24,7 @@
ld hl, .Text
call PrintText
jp TextScriptEnd
+
.Text
text_far _PewterMartText3
text_end
--- a/scripts/Route22Gate.asm
+++ b/scripts/Route22Gate.asm
@@ -59,7 +59,7 @@
Route22GateText1:
text_asm
ld a, [wObtainedBadges]
- bit 0, a
+ bit BIT_BOULDERBADGE, a
jr nz, .asm_1e6f6
ld hl, Route22GateText_1e704
call PrintText
--- a/scripts/SSAnneCaptainsRoom.asm
+++ b/scripts/SSAnneCaptainsRoom.asm
@@ -45,7 +45,7 @@
text_far _SSAnne7RubText
text_asm
ld a, [wAudioROMBank]
- cp BANK(Audio3_UpdateMusic)
+ cp BANK("Audio Engine 3")
ld [wAudioSavedROMBank], a
jr nz, .asm_61908
ld a, SFX_STOP_ALL_MUSIC
--- a/scripts/VermilionDock.asm
+++ b/scripts/VermilionDock.asm
@@ -124,7 +124,7 @@
VermilionDock_AnimSmokePuffDriftRight:
push bc
push de
- ld hl, wOAMBuffer + $11
+ ld hl, wOAMBuffer + 4 * $4 + 1 ; x coord
ld a, [wSSAnneSmokeDriftAmount]
swap a
ld c, a
--- a/scripts/VictoryRoad2F.asm
+++ b/scripts/VictoryRoad2F.asm
@@ -17,7 +17,6 @@
VictoryRoad2Script_517c4:
ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
-
VictoryRoad2Script_517c9:
CheckEvent EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
jr z, .asm_517da
@@ -31,7 +30,6 @@
ret z
ld a, $1d
lb bc, 7, 11
-
VictoryRoad2Script_517e2:
ld [wNewTileBlockID], a
predef ReplaceTileBlock