summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlibjet <libj3t@gmail.com>2020-06-02 02:53:22 +0100
committerlibjet <libj3t@gmail.com>2020-06-02 02:53:22 +0100
commitea845793bb1d3d2b5e2e7778ec83ed932bbf1adc (patch)
tree03fbb845ffdf0217484e3534e736e57e63eba492
parent991832399b893fc0ec92a8d67f3da134c2652674 (diff)
Add engine/movie/init_hof_credits.asm
-rwxr-xr-xengine/movie/init_hof_credits.asm60
-rw-r--r--main.asm13
2 files changed, 61 insertions, 12 deletions
diff --git a/engine/movie/init_hof_credits.asm b/engine/movie/init_hof_credits.asm
new file mode 100755
index 00000000..70a9b6e7
--- /dev/null
+++ b/engine/movie/init_hof_credits.asm
@@ -0,0 +1,60 @@
+InitDisplayForHallOfFame:
+ call ClearBGPalettes
+ call ClearTilemap
+ call ClearSprites
+ call DisableLCD
+ call LoadStandardFont
+ call LoadFontsBattleExtra
+ hlbgcoord 0, 0
+ ld bc, vBGMap1 - vBGMap0
+ ld a, " "
+ call ByteFill
+ hlcoord 0, 0, wAttrmap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ xor a
+ call ByteFill
+ xor a
+ ldh [hSCY], a
+ ldh [hSCX], a
+ call EnableLCD
+ ld hl, .SavingRecordText
+ call PrintText
+ call WaitBGMap2
+ call SetPalettes
+ ret
+
+.SavingRecordText:
+ text_far _SavingRecordText
+ text_end
+
+InitDisplayForRedCredits:
+ call ClearBGPalettes
+ call ClearTilemap
+ call ClearSprites
+ call DisableLCD
+ call LoadStandardFont
+ call LoadFontsBattleExtra
+ hlbgcoord 0, 0
+ ld bc, vBGMap1 - vBGMap0
+ ld a, " "
+ call ByteFill
+ hlcoord 0, 0, wAttrmap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ xor a
+ call ByteFill
+ ld hl, wBGPals1
+ ld c, 4 tiles
+.load_white_palettes
+ ld a, LOW(PALRGB_WHITE)
+ ld [hli], a
+ ld a, HIGH(PALRGB_WHITE)
+ ld [hli], a
+ dec c
+ jr nz, .load_white_palettes
+ xor a
+ ldh [hSCY], a
+ ldh [hSCX], a
+ call EnableLCD
+ call WaitBGMap2
+ call SetPalettes
+ ret
diff --git a/main.asm b/main.asm
index c43f52b0..ece4cd9b 100644
--- a/main.asm
+++ b/main.asm
@@ -239,18 +239,7 @@ INCLUDE "engine/events/field_moves.asm"
INCLUDE "engine/events/magnet_train.asm"
INCLUDE "engine/gfx/sprites.asm"
INCLUDE "engine/gfx/mon_icons.asm"
-
-InitDisplayForHallOfFame::
-IF DEF(_GOLD)
- dr $8fdbe, $8fdff
-InitDisplayForRedCredits::
- dr $8fdff, $8fe43
-
-ELIF DEF(_SILVER)
- dr $8fda4, $8fde5
-InitDisplayForRedCredits::
- dr $8fde5, $8fe43
-ENDC
+INCLUDE "engine/movie/init_hof_credits.asm"
SECTION "bank24", ROMX