summaryrefslogtreecommitdiff
path: root/engine/events
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-10-28 13:35:39 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-10-28 14:34:38 -0400
commitea426a88794b1d216a278b54d18cefafbf7d8771 (patch)
tree732c7a81c528251b651b6441d0f4a974548beb2c /engine/events
parent6d333bed5fde0c2da0a6a9df2ccae83933400e42 (diff)
Identify more WRAM labels, and start a <X>_DummyFunction label convention
Diffstat (limited to 'engine/events')
-rw-r--r--engine/events/battle_tower/battle_tower.asm12
-rw-r--r--engine/events/celebi.asm2
-rw-r--r--engine/events/field_moves.asm2
-rw-r--r--engine/events/npc_trade.asm9
-rw-r--r--engine/events/print_unown_2.asm12
-rw-r--r--engine/events/specials.asm4
6 files changed, 21 insertions, 20 deletions
diff --git a/engine/events/battle_tower/battle_tower.asm b/engine/events/battle_tower/battle_tower.asm
index 0e59b4737..0164ede48 100644
--- a/engine/events/battle_tower/battle_tower.asm
+++ b/engine/events/battle_tower/battle_tower.asm
@@ -183,7 +183,7 @@ BattleTowerBattle:
call _BattleTowerBattle
ret
-DummySpecial_17021d:
+UnusedBattleTowerDummySpecial1:
ret
InitBattleTowerChallengeRAM:
@@ -1008,11 +1008,11 @@ BattleTowerAction_SetExplanationRead:
BattleTowerAction_SetByteToQuickSaveChallenge:
ld c, BATTLETOWER_SAVED_AND_LEFT
- jr asm_17079f
+ jr SetBattleTowerChallengeState
BattleTowerAction_SetByteToCancelChallenge:
ld c, BATTLETOWER_NO_CHALLENGE
-asm_17079f:
+SetBattleTowerChallengeState:
ld a, BANK(sBattleTowerChallengeState)
call OpenSRAM
ld a, c
@@ -1447,11 +1447,11 @@ Function1709bb: ; BattleTowerAction $10
Function170a9c:
ld c, FALSE
- jr asm_170aa2
+ jr Set_s5_aa8d
Function170aa0:
ld c, TRUE
-asm_170aa2:
+Set_s5_aa8d:
ld a, BANK(s5_aa8d)
call OpenSRAM
ld a, c
@@ -1576,7 +1576,7 @@ LoadOpponentTrainerAndPokemonWithOTSprite:
INCLUDE "data/trainers/sprites.asm"
-DummySpecial_170bd2:
+UnusedBattleTowerDummySpecial2:
ret
CheckForBattleTowerRules:
diff --git a/engine/events/celebi.asm b/engine/events/celebi.asm
index fe842819b..6a2d16dfc 100644
--- a/engine/events/celebi.asm
+++ b/engine/events/celebi.asm
@@ -100,7 +100,7 @@ CelebiEvent_CountDown:
ret
CelebiEvent_SpawnLeaf: ; unreferenced
- ld hl, wcf65
+ ld hl, wFrameCounter2
ld a, [hl]
inc [hl]
and $7
diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm
index 6bbb7cbec..130ec411d 100644
--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -426,7 +426,7 @@ FlyFunction_FrameTimer:
ret
.SpawnLeaf:
- ld hl, wcf65
+ ld hl, wFrameCounter2
ld a, [hl]
inc [hl]
and $7
diff --git a/engine/events/npc_trade.asm b/engine/events/npc_trade.asm
index 94aaace72..6b32aff56 100644
--- a/engine/events/npc_trade.asm
+++ b/engine/events/npc_trade.asm
@@ -56,11 +56,12 @@ NPCTrade::
call DisableSpriteUpdates
ld a, [wJumptableIndex]
push af
- ld a, [wcf64]
+ ; wTradeDialog aliases wFrameCounter, which TradeAnimation uses
+ ld a, [wTradeDialog]
push af
predef TradeAnimation
pop af
- ld [wcf64], a
+ ld [wTradeDialog], a
pop af
ld [wJumptableIndex], a
call ReturnToMapWithSpeechTextbox
@@ -107,7 +108,7 @@ Trade_GetDialog:
ld e, NPCTRADE_DIALOG
call GetTradeAttribute
ld a, [hl]
- ld [wcf64], a
+ ld [wTradeDialog], a
ret
DoNPCTrade:
@@ -392,7 +393,7 @@ PrintTradeText:
ld bc, 2 * 4
ld hl, TradeTexts
call AddNTimes
- ld a, [wcf64]
+ ld a, [wTradeDialog]
ld c, a
add hl, bc
add hl, bc
diff --git a/engine/events/print_unown_2.asm b/engine/events/print_unown_2.asm
index 7d83ff049..0b72ae0b0 100644
--- a/engine/events/print_unown_2.asm
+++ b/engine/events/print_unown_2.asm
@@ -9,7 +9,7 @@ RotateUnownFrontpic:
push bc
push hl
push bc
- ld de, wd002
+ ld de, wPrintedUnownTileSource
call .Copy
call .Rotate
ld hl, UnownPrinter_GBPrinterRectangle
@@ -19,10 +19,10 @@ RotateUnownFrontpic:
ld a, [hli]
ld e, a
ld d, [hl]
- ld hl, wd012
+ ld hl, wPrintedUnownTileDest
call .Copy
pop hl
- ld bc, $10
+ ld bc, LEN_2BPP_TILE
add hl, bc
pop bc
inc c
@@ -44,7 +44,7 @@ RotateUnownFrontpic:
ret
.Copy:
- ld c, $10
+ ld c, LEN_2BPP_TILE
.loop_copy
ld a, [hli]
ld [de], a
@@ -54,12 +54,12 @@ RotateUnownFrontpic:
ret
.Rotate:
- ld hl, wd012
+ ld hl, wPrintedUnownTileDest
ld e, %10000000
ld d, 8
.loop_decompress
push hl
- ld hl, wd002
+ ld hl, wPrintedUnownTileSource
call .CountSetBit
pop hl
ld a, b
diff --git a/engine/events/specials.asm b/engine/events/specials.asm
index 1ce06de57..1333f27ce 100644
--- a/engine/events/specials.asm
+++ b/engine/events/specials.asm
@@ -15,7 +15,7 @@ Special::
INCLUDE "data/events/special_pointers.asm"
-DummySpecial_c224:
+UnusedDummySpecial:
ret
SetPlayerPalette:
@@ -207,7 +207,7 @@ CardFlip:
call StartGameCornerGame
ret
-DummyNonfunctionalGameCornerGame:
+UnusedDummyGame:
call CheckCoinsAndCoinCase
ret c
ld a, BANK(_DummyGame)