summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-03-24 10:24:54 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2021-03-24 10:24:54 -0400
commit9d5121ba9adc44df98e4a7396385d68386a265d7 (patch)
tree7c27e17334eca7f14f43fda640f1012d198d4b77
parentb299b8954f8ceafe06780e73540d8172d62261ac (diff)
Sync some files with pokecrystal
-rw-r--r--engine/overworld/map_objects.asm2
-rw-r--r--engine/overworld/player_movement.asm2
-rw-r--r--engine/pokegear/pokegear.asm2
-rw-r--r--engine/pokemon/evolve.asm1
-rw-r--r--engine/printer/printer.asm19
-rw-r--r--engine/rtc/restart_clock.asm4
6 files changed, 20 insertions, 10 deletions
diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm
index 9da9cdb0..d9b13b13 100644
--- a/engine/overworld/map_objects.asm
+++ b/engine/overworld/map_objects.asm
@@ -2684,7 +2684,7 @@ _UpdateSprites::
ret
.fill
- ld b, OBJECT_LENGTH * SPRITEOAMSTRUCT_LENGTH
+ ld b, NUM_SPRITE_OAM_STRUCTS * SPRITEOAMSTRUCT_LENGTH
ldh a, [hUsedSpriteIndex]
cp b
ret nc
diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm
index b5ece1be..7fb321dc 100644
--- a/engine/overworld/player_movement.asm
+++ b/engine/overworld/player_movement.asm
@@ -392,7 +392,7 @@ DoPlayerMovement::
.CheckWarp:
; Bug: Since no case is made for STANDING here, it will check
-; [.edgewarps + $ff]. This resolves to $3e at $1035a.
+; [.EdgeWarps + $ff]. This resolves to $3e.
; This causes wWalkingIntoEdgeWarp to be nonzero when standing on tile $3e,
; making bumps silent.
diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm
index ee040de3..b369aa01 100644
--- a/engine/pokegear/pokegear.asm
+++ b/engine/pokegear/pokegear.asm
@@ -1677,6 +1677,7 @@ NoRadioStation:
call PlayMusic
ld a, ENTER_MAP_MUSIC
ld [wPokegearRadioMusicPlaying], a
+
; no radio name
xor a
ldh [hBGMapMode], a
@@ -1686,6 +1687,7 @@ NoRadioStation:
hlcoord 0, 12
lb bc, 4, 18
call Textbox
+
; no radio channel
xor a
ld [wPokegearRadioChannelBank], a
diff --git a/engine/pokemon/evolve.asm b/engine/pokemon/evolve.asm
index 678c87a8..5172c59e 100644
--- a/engine/pokemon/evolve.asm
+++ b/engine/pokemon/evolve.asm
@@ -219,6 +219,7 @@ EvolveAfterBattle_MasterLoop:
ld a, $1
ldh [hBGMapMode], a
call ClearSprites
+
call EvolutionAnimation
push af
diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm
index 71af6f2e..20fc4c2f 100644
--- a/engine/printer/printer.asm
+++ b/engine/printer/printer.asm
@@ -71,7 +71,7 @@ PrintDexEntry:
ld hl, hVBlank
ld a, [hl]
push af
- ld [hl], $4
+ ld [hl], 4 ; vblank mode that calls AskSerial
ld a, 8 ; 16 rows
ld [wPrinterQueueLength], a
@@ -146,7 +146,7 @@ PrintPCBox:
ld hl, hVBlank
ld a, [hl]
push af
- ld [hl], $4
+ ld [hl], 4 ; vblank mode that calls AskSerial
xor a
ldh [hBGMapMode], a
@@ -212,19 +212,23 @@ Printer_ResetRegistersAndStartDataSend:
PrintUnownStamp:
ld a, [wPrinterQueueLength]
push af
+
xor a
ldh [hPrinter], a
call Printer_PlayMusic
+
ldh a, [rIE]
push af
xor a
ldh [rIF], a
ld a, (1 << SERIAL) | (1 << VBLANK)
ldh [rIE], a
+
ld hl, hVBlank
ld a, [hl]
push af
- ld [hl], $4
+ ld [hl], 4 ; vblank mode that calls AskSerial
+
xor a
ldh [hBGMapMode], a
call LoadTilemapToTempTilemap
@@ -233,6 +237,7 @@ PrintUnownStamp:
call Printer_PrepareTilemapForPrint
call SafeLoadTempTilemapToTilemap
call Printer_ResetJoypadRegisters
+
ld a, 18 / 2
ld [wPrinterQueueLength], a
.loop
@@ -260,10 +265,12 @@ PrintUnownStamp:
ldh [hVBlank], a
call Printer_CleanUpAfterSend
call SafeLoadTempTilemapToTilemap
+
xor a
ldh [rIF], a
pop af
ldh [rIE], a
+
pop af
ld [wPrinterQueueLength], a
ret
@@ -290,7 +297,7 @@ PrintMailAndExit:
ld hl, hVBlank
ld a, [hl]
push af
- ld [hl], 4
+ ld [hl], 4 ; vblank mode that calls AskSerial
ld a, 18 / 2
ld [wPrinterQueueLength], a
@@ -334,7 +341,7 @@ PrintPartymon:
ld hl, hVBlank
ld a, [hl]
push af
- ld [hl], 4
+ ld [hl], 4 ; vblank mode that calls AskSerial
ld a, 16 / 2
ld [wPrinterQueueLength], a
@@ -392,7 +399,7 @@ _PrintDiploma:
ld hl, hVBlank
ld a, [hl]
push af
- ld [hl], $4
+ ld [hl], 4 ; vblank mode that calls AskSerial
ln a, 1, 0 ; to be loaded to wPrinterMargins
call Printer_PrepareTilemapForPrint
diff --git a/engine/rtc/restart_clock.asm b/engine/rtc/restart_clock.asm
index 65c4fbdb..ddec8356 100644
--- a/engine/rtc/restart_clock.asm
+++ b/engine/rtc/restart_clock.asm
@@ -100,11 +100,11 @@ RestartClock:
ld hl, .ClockHasResetText
call PrintText
call WaitPressAorB_BlinkCursor
- xor a
+ xor a ; FALSE
ret
.cancel
- ld a, $1
+ ld a, TRUE
ret
.ClockIsThisOKText: