WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 266074c

Browse files
committed
Use more hardware and graphics constants (#532)
- Use `OBJ_SIZE` and `TILE_SIZE` from hardware.inc. - `SPRITESTATEDATA1_LENGTH`, `NUM_SPRITESTATEDATA_STRUCTS` and `TILE_1BPP_SIZE` are used in some places. - Highlight an oversight in `OakSpeech` where several direct MBC bank switches are requested. - Remove redundant comments in home/overworld.asm. - Add unreferenced `FillBgMap` function to avoid a byte of dead code. - Some constants added in wram.asm. - Correctly separate the commented code in `SaveMainData`.
1 parent cf35dda commit 266074c

File tree

10 files changed

+40
-20
lines changed

10 files changed

+40
-20
lines changed

pokeblue.map

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,9 @@ ROM0 bank #0:
473473
$1cc1 = TextCommandJumpTable
474474
$1cdd = GetRowColAddressBgMap
475475
$1cf0 = ClearBgMap
476-
$1cf5 = ClearBgMap.next
477-
$1cf9 = ClearBgMap.loop
476+
$1cf4 = FillBgMap
477+
$1cf5 = FillBgMapCommon
478+
$1cf9 = FillBgMapCommon.loop
478479
$1d01 = RedrawRowOrColumn
479480
$1d0c = RedrawRowOrColumn.redrawColumn
480481
$1d17 = RedrawRowOrColumn.loop1
@@ -1197,6 +1198,7 @@ ROMX bank #1:
11971198
$4361 = DisplayTitleScreen.pokemonLogoLastTileRowLoop
11981199
$4377 = DisplayTitleScreen.tileScreenCopyrightTilesLoop
11991200
$437f = DisplayTitleScreen.tileScreenCopyrightTiles
1201+
$438f = DisplayTitleScreen.tileScreenCopyrightTilesEnd
12001202
$438f = DisplayTitleScreen.next
12011203
$43c6 = DisplayTitleScreen.bouncePokemonLogoLoop
12021204
$43d4 = DisplayTitleScreen.skipPlayingSound

pokeblue.sym

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,9 @@
448448
00:1cc1 TextCommandJumpTable
449449
00:1cdd GetRowColAddressBgMap
450450
00:1cf0 ClearBgMap
451-
00:1cf5 ClearBgMap.next
452-
00:1cf9 ClearBgMap.loop
451+
00:1cf4 FillBgMap
452+
00:1cf5 FillBgMapCommon
453+
00:1cf9 FillBgMapCommon.loop
453454
00:1d01 RedrawRowOrColumn
454455
00:1d0c RedrawRowOrColumn.redrawColumn
455456
00:1d17 RedrawRowOrColumn.loop1
@@ -1168,6 +1169,7 @@
11681169
01:4377 DisplayTitleScreen.tileScreenCopyrightTilesLoop
11691170
01:437f DisplayTitleScreen.tileScreenCopyrightTiles
11701171
01:438f DisplayTitleScreen.next
1172+
01:438f DisplayTitleScreen.tileScreenCopyrightTilesEnd
11711173
01:43c6 DisplayTitleScreen.bouncePokemonLogoLoop
11721174
01:43d4 DisplayTitleScreen.skipPlayingSound
11731175
01:43db DisplayTitleScreen.TitleScreenPokemonLogoYScrolls

pokeblue_debug.map

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,9 @@ ROM0 bank #0:
473473
$1cc1 = TextCommandJumpTable
474474
$1cdd = GetRowColAddressBgMap
475475
$1cf0 = ClearBgMap
476-
$1cf5 = ClearBgMap.next
477-
$1cf9 = ClearBgMap.loop
476+
$1cf4 = FillBgMap
477+
$1cf5 = FillBgMapCommon
478+
$1cf9 = FillBgMapCommon.loop
478479
$1d01 = RedrawRowOrColumn
479480
$1d0c = RedrawRowOrColumn.redrawColumn
480481
$1d17 = RedrawRowOrColumn.loop1
@@ -1198,6 +1199,7 @@ ROMX bank #1:
11981199
$4361 = DisplayTitleScreen.pokemonLogoLastTileRowLoop
11991200
$4377 = DisplayTitleScreen.tileScreenCopyrightTilesLoop
12001201
$437f = DisplayTitleScreen.tileScreenCopyrightTiles
1202+
$438f = DisplayTitleScreen.tileScreenCopyrightTilesEnd
12011203
$438f = DisplayTitleScreen.next
12021204
$43c6 = DisplayTitleScreen.bouncePokemonLogoLoop
12031205
$43d4 = DisplayTitleScreen.skipPlayingSound

pokeblue_debug.sym

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,9 @@
448448
00:1cc1 TextCommandJumpTable
449449
00:1cdd GetRowColAddressBgMap
450450
00:1cf0 ClearBgMap
451-
00:1cf5 ClearBgMap.next
452-
00:1cf9 ClearBgMap.loop
451+
00:1cf4 FillBgMap
452+
00:1cf5 FillBgMapCommon
453+
00:1cf9 FillBgMapCommon.loop
453454
00:1d01 RedrawRowOrColumn
454455
00:1d0c RedrawRowOrColumn.redrawColumn
455456
00:1d17 RedrawRowOrColumn.loop1
@@ -1169,6 +1170,7 @@
11691170
01:4377 DisplayTitleScreen.tileScreenCopyrightTilesLoop
11701171
01:437f DisplayTitleScreen.tileScreenCopyrightTiles
11711172
01:438f DisplayTitleScreen.next
1173+
01:438f DisplayTitleScreen.tileScreenCopyrightTilesEnd
11721174
01:43c6 DisplayTitleScreen.bouncePokemonLogoLoop
11731175
01:43d4 DisplayTitleScreen.skipPlayingSound
11741176
01:43db DisplayTitleScreen.TitleScreenPokemonLogoYScrolls

pokeblue_vc.map

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,9 @@ ROM0 bank #0:
473473
$1cc1 = TextCommandJumpTable
474474
$1cdd = GetRowColAddressBgMap
475475
$1cf0 = ClearBgMap
476-
$1cf5 = ClearBgMap.next
477-
$1cf9 = ClearBgMap.loop
476+
$1cf4 = FillBgMap
477+
$1cf5 = FillBgMapCommon
478+
$1cf9 = FillBgMapCommon.loop
478479
$1d01 = RedrawRowOrColumn
479480
$1d0c = RedrawRowOrColumn.redrawColumn
480481
$1d17 = RedrawRowOrColumn.loop1
@@ -1203,6 +1204,7 @@ ROMX bank #1:
12031204
$4361 = DisplayTitleScreen.pokemonLogoLastTileRowLoop
12041205
$4377 = DisplayTitleScreen.tileScreenCopyrightTilesLoop
12051206
$437f = DisplayTitleScreen.tileScreenCopyrightTiles
1207+
$438f = DisplayTitleScreen.tileScreenCopyrightTilesEnd
12061208
$438f = DisplayTitleScreen.next
12071209
$43c6 = DisplayTitleScreen.bouncePokemonLogoLoop
12081210
$43d4 = DisplayTitleScreen.skipPlayingSound

pokeblue_vc.sym

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,9 @@
448448
00:1cc1 TextCommandJumpTable
449449
00:1cdd GetRowColAddressBgMap
450450
00:1cf0 ClearBgMap
451-
00:1cf5 ClearBgMap.next
452-
00:1cf9 ClearBgMap.loop
451+
00:1cf4 FillBgMap
452+
00:1cf5 FillBgMapCommon
453+
00:1cf9 FillBgMapCommon.loop
453454
00:1d01 RedrawRowOrColumn
454455
00:1d0c RedrawRowOrColumn.redrawColumn
455456
00:1d17 RedrawRowOrColumn.loop1
@@ -1174,6 +1175,7 @@
11741175
01:4377 DisplayTitleScreen.tileScreenCopyrightTilesLoop
11751176
01:437f DisplayTitleScreen.tileScreenCopyrightTiles
11761177
01:438f DisplayTitleScreen.next
1178+
01:438f DisplayTitleScreen.tileScreenCopyrightTilesEnd
11771179
01:43c6 DisplayTitleScreen.bouncePokemonLogoLoop
11781180
01:43d4 DisplayTitleScreen.skipPlayingSound
11791181
01:43db DisplayTitleScreen.TitleScreenPokemonLogoYScrolls

pokered.map

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,9 @@ ROM0 bank #0:
473473
$1cc1 = TextCommandJumpTable
474474
$1cdd = GetRowColAddressBgMap
475475
$1cf0 = ClearBgMap
476-
$1cf5 = ClearBgMap.next
477-
$1cf9 = ClearBgMap.loop
476+
$1cf4 = FillBgMap
477+
$1cf5 = FillBgMapCommon
478+
$1cf9 = FillBgMapCommon.loop
478479
$1d01 = RedrawRowOrColumn
479480
$1d0c = RedrawRowOrColumn.redrawColumn
480481
$1d17 = RedrawRowOrColumn.loop1
@@ -1197,6 +1198,7 @@ ROMX bank #1:
11971198
$4361 = DisplayTitleScreen.pokemonLogoLastTileRowLoop
11981199
$4377 = DisplayTitleScreen.tileScreenCopyrightTilesLoop
11991200
$437f = DisplayTitleScreen.tileScreenCopyrightTiles
1201+
$438f = DisplayTitleScreen.tileScreenCopyrightTilesEnd
12001202
$438f = DisplayTitleScreen.next
12011203
$43c6 = DisplayTitleScreen.bouncePokemonLogoLoop
12021204
$43d4 = DisplayTitleScreen.skipPlayingSound

pokered.sym

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,9 @@
448448
00:1cc1 TextCommandJumpTable
449449
00:1cdd GetRowColAddressBgMap
450450
00:1cf0 ClearBgMap
451-
00:1cf5 ClearBgMap.next
452-
00:1cf9 ClearBgMap.loop
451+
00:1cf4 FillBgMap
452+
00:1cf5 FillBgMapCommon
453+
00:1cf9 FillBgMapCommon.loop
453454
00:1d01 RedrawRowOrColumn
454455
00:1d0c RedrawRowOrColumn.redrawColumn
455456
00:1d17 RedrawRowOrColumn.loop1
@@ -1168,6 +1169,7 @@
11681169
01:4377 DisplayTitleScreen.tileScreenCopyrightTilesLoop
11691170
01:437f DisplayTitleScreen.tileScreenCopyrightTiles
11701171
01:438f DisplayTitleScreen.next
1172+
01:438f DisplayTitleScreen.tileScreenCopyrightTilesEnd
11711173
01:43c6 DisplayTitleScreen.bouncePokemonLogoLoop
11721174
01:43d4 DisplayTitleScreen.skipPlayingSound
11731175
01:43db DisplayTitleScreen.TitleScreenPokemonLogoYScrolls

pokered_vc.map

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,9 @@ ROM0 bank #0:
473473
$1cc1 = TextCommandJumpTable
474474
$1cdd = GetRowColAddressBgMap
475475
$1cf0 = ClearBgMap
476-
$1cf5 = ClearBgMap.next
477-
$1cf9 = ClearBgMap.loop
476+
$1cf4 = FillBgMap
477+
$1cf5 = FillBgMapCommon
478+
$1cf9 = FillBgMapCommon.loop
478479
$1d01 = RedrawRowOrColumn
479480
$1d0c = RedrawRowOrColumn.redrawColumn
480481
$1d17 = RedrawRowOrColumn.loop1
@@ -1203,6 +1204,7 @@ ROMX bank #1:
12031204
$4361 = DisplayTitleScreen.pokemonLogoLastTileRowLoop
12041205
$4377 = DisplayTitleScreen.tileScreenCopyrightTilesLoop
12051206
$437f = DisplayTitleScreen.tileScreenCopyrightTiles
1207+
$438f = DisplayTitleScreen.tileScreenCopyrightTilesEnd
12061208
$438f = DisplayTitleScreen.next
12071209
$43c6 = DisplayTitleScreen.bouncePokemonLogoLoop
12081210
$43d4 = DisplayTitleScreen.skipPlayingSound

pokered_vc.sym

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,9 @@
448448
00:1cc1 TextCommandJumpTable
449449
00:1cdd GetRowColAddressBgMap
450450
00:1cf0 ClearBgMap
451-
00:1cf5 ClearBgMap.next
452-
00:1cf9 ClearBgMap.loop
451+
00:1cf4 FillBgMap
452+
00:1cf5 FillBgMapCommon
453+
00:1cf9 FillBgMapCommon.loop
453454
00:1d01 RedrawRowOrColumn
454455
00:1d0c RedrawRowOrColumn.redrawColumn
455456
00:1d17 RedrawRowOrColumn.loop1
@@ -1174,6 +1175,7 @@
11741175
01:4377 DisplayTitleScreen.tileScreenCopyrightTilesLoop
11751176
01:437f DisplayTitleScreen.tileScreenCopyrightTiles
11761177
01:438f DisplayTitleScreen.next
1178+
01:438f DisplayTitleScreen.tileScreenCopyrightTilesEnd
11771179
01:43c6 DisplayTitleScreen.bouncePokemonLogoLoop
11781180
01:43d4 DisplayTitleScreen.skipPlayingSound
11791181
01:43db DisplayTitleScreen.TitleScreenPokemonLogoYScrolls

0 commit comments

Comments
 (0)