From a07936677cd26aac197f39d8701ea0d92fb225a9 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 10 May 2024 01:21:25 -0400 Subject: [PATCH] keen: hook up initial title screen --- games/keen/Makefile | 4 +- games/keen/graphics/Makefile | 6 +- games/keen/graphics/title_sprites.png | Bin 0 -> 1485 bytes games/keen/hgr_sprite.s | 88 ++++++++++++++++ games/keen/hgr_tables.s | 146 ++++++++++++++++++++++++++ games/keen/title.s | 34 ++++++ games/keen/zp.inc | 4 + 7 files changed, 278 insertions(+), 4 deletions(-) create mode 100644 games/keen/graphics/title_sprites.png create mode 100644 games/keen/hgr_sprite.s create mode 100644 games/keen/hgr_tables.s diff --git a/games/keen/Makefile b/games/keen/Makefile index cd9ab73b..86454b1d 100644 --- a/games/keen/Makefile +++ b/games/keen/Makefile @@ -60,7 +60,9 @@ TITLE: title.o title.o: title.s zp.inc hardware.inc \ zx02_optim.s \ - graphics/keen1_title.hgr.zx02 + hgr_sprite.s hgr_tables.s \ + graphics/keen1_title.hgr.zx02 \ + graphics/title_sprites.inc ca65 -o title.o title.s -l title.lst #### diff --git a/games/keen/graphics/Makefile b/games/keen/graphics/Makefile index ddc6f508..625916c5 100644 --- a/games/keen/graphics/Makefile +++ b/games/keen/graphics/Makefile @@ -11,12 +11,12 @@ PNG2SPRITES = ../../../utils/gr-utils/png2sprites HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite all: keen1_title.hgr.zx02 level1_bg.gr.zx02 parts.gr.zx02 \ - keen1_story.hgr.zx02 + keen1_story.hgr.zx02 title_sprites.inc #### -#disk_sprites.inc: a2_fortnight_sprites.png -# $(HGR_SPRITE) -s -l disk_sprite0 a2_fortnight_sprites.png 14 7 41 34 > disk_sprites.inc +title_sprites.inc: title_sprites.png + $(HGR_SPRITE) -s -l title_sprite title_sprites.png 0 0 167 95 > title_sprites.inc #### diff --git a/games/keen/graphics/title_sprites.png b/games/keen/graphics/title_sprites.png new file mode 100644 index 0000000000000000000000000000000000000000..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+ lda #$20 + sta DRAW_PAGE + + jsr hgr_draw_sprite + + + lda #100 + jsr wait_a_bit done_intro: @@ -233,6 +264,8 @@ init_vars: .include "text_help.s" .include "gr_fast_clear.s" .include "text_print.s" + .include "hgr_sprite.s" + .include "hgr_tables.s" ; .include "lc_detect.s" @@ -247,6 +280,7 @@ init_vars: new_title: .incbin "graphics/keen1_title.hgr.zx02" +.include "graphics/title_sprites.inc" ;==================================== diff --git a/games/keen/zp.inc b/games/keen/zp.inc index e51ec3b7..f6dc3fac 100644 --- a/games/keen/zp.inc +++ b/games/keen/zp.inc @@ -159,6 +159,10 @@ SOUNDL = $B2 SOUNDH = $B3 START_LINE_L = $B4 ; story START_LINE_H = $B5 ; story +SPRITE_Y = $B6 ; title +CURRENT_ROW = $B7 ; title +SPRITE_X = $B8 ; title +HGR_PAGE = $B9 ; title WHICH_SLOT = $DA JS_BUTTON_STATE = $DB