Skip to content

Commit 2d180fb

Browse files
committed
feat(gfx): gorgeous art pass — animated water variants, shaded terrain, title emblem
- new animated deep/shallow variants (tiles 137-138) hash-scattered over the sea, synced via 64-byte WaterFrames phases - clustered sand, shaded mountain crags, wooden docks, fuller sails - 5x7 font; 32px skull-and-crossbones title emblem; animated title sea - retuned CGB palettes; tests updated for new tiles/timing
1 parent 168c3e6 commit 2d180fb

9 files changed

Lines changed: 349 additions & 88 deletions

File tree

src/defs.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ DEF TILE_GR_SAND25 EQU 133 ; grass 75 / sand 25 (e 158-159)
135135
DEF TILE_COMPASS EQU 134 ; compass rose (chart header)
136136
DEF TILE_GULL EQU 135 ; gull arcs (title screen)
137137
DEF TILE_FRAME EQU 136 ; thin rule (port screen frame)
138+
DEF TILE_DEEP2 EQU 137 ; second animated deep-water variant
139+
DEF TILE_SHALLOW3 EQU 138 ; second animated shallow-water variant
140+
DEF TILE_EMBLEM EQU 139 ; 139-154: title skull & crossbones (4x4)
138141

139142
; --- Port towns (S4) ---
140143
; In a port district, four buildings spawn at hashed spots: tavern,

src/main.asm

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ MainLoop:
248248
and PADF_SELECT
249249
call nz, ToggleMute
250250
.noMute
251+
ld a, [wState]
252+
cp STATE_TITLE
253+
jr nz, .noTitleWater
254+
call AnimWater ; the title sea is alive
255+
.noTitleWater
251256
call UpdateSound
252257
ld a, [wState]
253258
cp STATE_TITLE
@@ -733,8 +738,8 @@ InitNewGame:
733738
; LCD-off draw of the title. Sea rows + a ship, then text.
734739
DrawTitleScreen::
735740
call DrawSeedScreen ; clear to blank (LCD off)
736-
; sea at the bottom: two deep rows, then two shallow rows (a gradient
737-
; into the foreground, like water shelving toward the viewer)
741+
; four deep-sea rows at the bottom (animated: MainLoop runs
742+
; AnimWater on the title screen)
738743
ld hl, $9800 + 14 * 32
739744
ld b, 64
740745
.sea
@@ -744,47 +749,53 @@ DrawTitleScreen::
744749
jr nz, .sea
745750
ld b, 64
746751
.shal
747-
ld a, TILE_SHALLOW
752+
ld a, TILE_DEEP2
748753
ld [hli], a
749754
dec b
750755
jr nz, .shal
751756
; a lone ship on the horizon
752757
ld a, TILE_SHIP_S
753758
ld [$9800 + 13 * 32 + 9], a
754-
; gulls overhead
755-
ld a, TILE_GULL
756-
ld [$9800 + 2 * 32 + 3], a
757-
ld [$9800 + 2 * 32 + 15], a
758-
; double rules above and below the title block
759-
ld hl, $9800 + 3 * 32 + 2
760-
ld b, 16
761-
.rule1
762-
ld a, TILE_FRAME
763-
ld [hli], a
764-
dec b
765-
jr nz, .rule1
766-
ld hl, $9800 + 10 * 32 + 2
767-
ld b, 16
768-
.rule2
769-
ld a, TILE_FRAME
759+
; skull & crossbones emblem, rows 1-4 cols 8-11 (tiles 139-154)
760+
ld hl, $9800 + 1 * 32 + 8
761+
ld a, TILE_EMBLEM
762+
ld c, 4 ; tile rows
763+
.embRow
764+
ld b, 4 ; tile cols
765+
.embCol
770766
ld [hli], a
767+
inc a
771768
dec b
772-
jr nz, .rule2
769+
jr nz, .embCol
770+
push af
771+
ld a, l
772+
add 28 ; next tilemap row, same column
773+
ld l, a
774+
jr nc, .embNoCy
775+
inc h
776+
.embNoCy
777+
pop af
778+
dec c
779+
jr nz, .embRow
780+
; gulls flanking the emblem
781+
ld a, TILE_GULL
782+
ld [$9800 + 5 * 32 + 4], a
783+
ld [$9800 + 5 * 32 + 14], a
773784
; compass roses flanking the title
774785
ld a, TILE_COMPASS
775-
ld [$9800 + 4 * 32 + 1], a
776-
ld [$9800 + 4 * 32 + 18], a
786+
ld [$9800 + 6 * 32 + 1], a
787+
ld [$9800 + 6 * 32 + 18], a
777788
ld hl, StrTitle
778-
ld de, $9800 + 4 * 32 + 3
789+
ld de, $9800 + 6 * 32 + 3
779790
call PrintStr
780791
ld hl, StrTitleSub1
781-
ld de, $9800 + 6 * 32 + 4
792+
ld de, $9800 + 8 * 32 + 4
782793
call PrintStr
783794
ld hl, StrTitleSub2
784-
ld de, $9800 + 7 * 32 + 3
795+
ld de, $9800 + 9 * 32 + 3
785796
call PrintStr
786797
ld hl, StrTitleSub3
787-
ld de, $9800 + 9 * 32 + 2
798+
ld de, $9800 + 10 * 32 + 2
788799
call PrintStr
789800
ld hl, StrPressStart
790801
ld de, $9800 + 12 * 32 + 4

src/sail.asm

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,21 @@ AnimWater::
284284
ld c, a
285285
ld b, 0
286286
sla c
287-
rl b ; bc = phase * 32
287+
rl b
288+
sla c
289+
rl b ; bc = phase * 64
288290
ld hl, WaterFrames
289291
add hl, bc
292+
push hl
290293
ld de, $8000 + 16 ; tiles 1 (deep) and 2 (shallow)
291294
ld bc, 32
292295
call CopyVRAM
296+
pop hl
297+
ld bc, 32
298+
add hl, bc
299+
ld de, $8000 + 137 * 16 ; tiles 137-138: the variant waters
300+
ld bc, 32
301+
call CopyVRAM
293302
ret
294303
POPS
295304

0 commit comments

Comments
 (0)