aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAstatin <[email protected]>2024-12-24 17:51:12 +0900
committerAstatin <[email protected]>2024-12-24 17:51:12 +0900
commit30d350a66f38036316197cc208e4b2f8011c6f50 (patch)
tree59bea84d11a5cf1939784f40a1d53eb75475d79d
parent0ed4b7a5d40ce169dc3f7e061d6edeccfa0b8784 (diff)
Draw cat sprite
-rw-r--r--entity/init.gbasm4
-rw-r--r--main.gbasm30
-rw-r--r--scripts/generate-tiledata.py13
-rw-r--r--sprites/bg/carrot.pngbin164 -> 161 bytes
-rw-r--r--sprites/cat/back.pngbin0 -> 279 bytes
-rw-r--r--sprites/cat/front.pngbin0 -> 288 bytes
-rw-r--r--sprites/cat/side.pngbin0 -> 307 bytes
-rw-r--r--tileset.gbasm30
8 files changed, 44 insertions, 33 deletions
diff --git a/entity/init.gbasm b/entity/init.gbasm
index 42248c8..ba23183 100644
--- a/entity/init.gbasm
+++ b/entity/init.gbasm
@@ -136,6 +136,7 @@ Initialize_Fox:
LD B, $c8
+ ; X
LD A, (BC)
LD D, A
INC BC
@@ -148,6 +149,7 @@ Initialize_Fox:
INC BC
+ ; Y
LD A, (BC)
LD D, A
INC BC
@@ -156,6 +158,8 @@ Initialize_Fox:
CALL =RNG_Bound
ADD D
LD (HL+), A
+
+ ; Direction
LD A, $03
LD (HL+), A
diff --git a/main.gbasm b/main.gbasm
index 237fe1c..dd4f52a 100644
--- a/main.gbasm
+++ b/main.gbasm
@@ -91,9 +91,9 @@ New_Dungeon:
LD $mem_current_mode, A
LD $mem_requested_mode, A
- LD HL, $9c0f
- LD BC, =Debug_Text
- CALL =Print_str
+ ; LD HL, $9c0f
+ ; LD BC, =Debug_Text
+ ; CALL =Print_str
LD A, $68
LD ($9c02), A
@@ -109,18 +109,18 @@ New_Dungeon:
VBLANK_Entrypoint:
.ENABLE_WINDOW_NO_WAIT_HBLANK
- LD A, $tmp_var_5
- LD HL, $9c12
- CALL =Print_8bit
- LD A, $tmp_var_6
- LD HL, $9c0d
- CALL =Print_8bit
- LD A, $tmp_var_4
- LD HL, $9c0a
- CALL =Print_8bit
- LD A, $mem_bunny_current_room_idx
- LD HL, $9c07
- CALL =Print_8bit
+ ; LD A, $tmp_var_5
+ ; LD HL, $9c12
+ ; CALL =Print_8bit
+ ; LD A, $tmp_var_6
+ ; LD HL, $9c0d
+ ; CALL =Print_8bit
+ ; LD A, $tmp_var_4
+ ; LD HL, $9c0a
+ ; CALL =Print_8bit
+ ; LD A, $mem_bunny_current_room_idx
+ ; LD HL, $9c07
+ ; CALL =Print_8bit
LD A, $palette_bold_font
LD $reg_bg_palette, A
diff --git a/scripts/generate-tiledata.py b/scripts/generate-tiledata.py
index dd4b80c..790854b 100644
--- a/scripts/generate-tiledata.py
+++ b/scripts/generate-tiledata.py
@@ -36,11 +36,18 @@ get_sprite_png_parse_output("./sprites/font.png")
sprite_idx = 0x02
print("\nOBJ_Tile_Image_Data:")
print("\n\t; Bunny side")
-get_sprite_png_parse_output("./sprites/bunny/bunny-side.png", tallmode=True)
+# get_sprite_png_parse_output("./sprites/bunny/bunny-side.png", tallmode=True)
+# print("\n\t; Bunny back")
+# get_sprite_png_parse_output("./sprites/bunny/bunny-back.png", tallmode=True)
+# print("\n\t; Bunny front")
+# get_sprite_png_parse_output("./sprites/bunny/bunny-front.png", tallmode=True)
+get_sprite_png_parse_output("./sprites/cat/side.png", tallmode=True)
print("\n\t; Bunny back")
-get_sprite_png_parse_output("./sprites/bunny/bunny-back.png", tallmode=True)
+get_sprite_png_parse_output("./sprites/cat/back.png", tallmode=True)
print("\n\t; Bunny front")
-get_sprite_png_parse_output("./sprites/bunny/bunny-front.png", tallmode=True)
+get_sprite_png_parse_output("./sprites/cat/front.png", tallmode=True)
+
+
print("\n\t; Fox side")
get_sprite_png_parse_output("./sprites/fox/fox-side1.png", tallmode=True)
diff --git a/sprites/bg/carrot.png b/sprites/bg/carrot.png
index 1c42ba9..917defc 100644
--- a/sprites/bg/carrot.png
+++ b/sprites/bg/carrot.png
Binary files differ
diff --git a/sprites/cat/back.png b/sprites/cat/back.png
new file mode 100644
index 0000000..c8f413b
--- /dev/null
+++ b/sprites/cat/back.png
Binary files differ
diff --git a/sprites/cat/front.png b/sprites/cat/front.png
new file mode 100644
index 0000000..20f1723
--- /dev/null
+++ b/sprites/cat/front.png
Binary files differ
diff --git a/sprites/cat/side.png b/sprites/cat/side.png
new file mode 100644
index 0000000..7f1fa67
--- /dev/null
+++ b/sprites/cat/side.png
Binary files differ
diff --git a/tileset.gbasm b/tileset.gbasm
index 59980b0..7737fa0 100644
--- a/tileset.gbasm
+++ b/tileset.gbasm
@@ -83,10 +83,10 @@ BG_Tile_Image_Data:
.DB $ff, $11, $ff, $11, $ff, $11, $f1, $1f, $91, $7f, $11, $ff, $11, $ff, $ff, $ff ; 0x63
; Carrot
- .DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $02, $02, $07, $05, $0f, $08 ; 0x64
- .DB $00, $00, $30, $30, $58, $68, $b4, $fc, $fe, $aa, $ac, $f4, $58, $b8, $a0, $e0 ; 0x65
+ .DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $04, $0f, $08 ; 0x64
+ .DB $00, $00, $30, $30, $58, $68, $74, $5c, $7e, $6a, $fc, $d4, $d8, $78, $e0, $20 ; 0x65
.DB $1f, $10, $1f, $10, $3e, $21, $3c, $23, $7b, $47, $7c, $4c, $70, $70, $00, $00 ; 0x66
- .DB $c0, $40, $a0, $60, $20, $e0, $c0, $c0, $00, $00, $00, $00, $00, $00, $00, $00 ; 0x67
+ .DB $d0, $30, $90, $70, $20, $e0, $c0, $c0, $00, $00, $00, $00, $00, $00, $00, $00 ; 0x67
Small_sprites:
; Heart
@@ -143,22 +143,22 @@ Font_Data:
OBJ_Tile_Image_Data:
; Bunny side
- .DB $00, $00, $44, $44, $aa, $ee, $aa, $ee, $fe, $b2, $fc, $b4, $fc, $94, $75, $4d ; 0x02
- .DB $ff, $82, $6f, $70, $3f, $20, $3f, $20, $31, $2e, $4e, $7f, $51, $71, $60, $60 ; 0x03
- .DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $c0, $c0 ; 0x04
- .DB $34, $f4, $ce, $3a, $fe, $0a, $fc, $04, $bc, $44, $5c, $e4, $88, $f8, $f0, $f0 ; 0x05
+ .DB $00, $00, $00, $00, $22, $22, $55, $77, $6b, $5d, $5d, $63, $7f, $43, $3c, $eb ; 0x02
+ .DB $6b, $57, $24, $fb, $1f, $1c, $0f, $08, $0f, $0b, $0b, $0f, $0b, $0f, $06, $06 ; 0x03
+ .DB $00, $00, $1e, $1e, $3f, $21, $2f, $3d, $2f, $3d, $17, $15, $07, $05, $0f, $09 ; 0x04
+ .DB $fe, $f2, $fc, $04, $fc, $04, $fc, $0c, $ec, $3c, $ec, $fc, $2c, $3c, $18, $18 ; 0x05
; Bunny back
- .DB $00, $00, $00, $00, $00, $00, $1c, $1c, $2e, $32, $2f, $3b, $1f, $19, $0e, $0f ; 0x06
- .DB $13, $1c, $27, $38, $2f, $30, $2f, $30, $2f, $30, $13, $1c, $15, $1b, $0e, $0e ; 0x07
- .DB $00, $00, $40, $40, $a0, $e0, $a0, $e0, $e0, $a0, $e0, $20, $c0, $40, $e0, $e0 ; 0x08
- .DB $d0, $30, $d0, $30, $e8, $18, $f8, $08, $f0, $10, $90, $70, $70, $90, $e0, $e0 ; 0x09
+ .DB $00, $00, $08, $08, $15, $1d, $12, $1f, $1f, $10, $1f, $10, $1f, $37, $1f, $18 ; 0x06
+ .DB $1f, $30, $1f, $10, $1f, $11, $1f, $10, $1f, $17, $15, $1d, $15, $1d, $0d, $0d ; 0x07
+ .DB $00, $00, $90, $90, $68, $f8, $68, $f8, $fc, $64, $dc, $54, $dc, $74, $dc, $d4 ; 0x08
+ .DB $dc, $74, $fc, $e4, $f8, $08, $f0, $70, $c0, $40, $40, $c0, $40, $c0, $80, $80 ; 0x09
; Bunny front
- .DB $00, $00, $04, $04, $0a, $0e, $0a, $0e, $0e, $0a, $0f, $09, $07, $05, $0f, $0e ; 0x0a
- .DB $17, $1c, $17, $1a, $2f, $30, $3f, $20, $1f, $10, $17, $1d, $0d, $0f, $06, $06 ; 0x0b
- .DB $00, $00, $00, $00, $00, $00, $70, $70, $e8, $98, $e8, $b8, $f0, $30, $e0, $e0 ; 0x0c
- .DB $d0, $70, $e8, $98, $e8, $18, $f8, $08, $f8, $08, $d0, $70, $60, $e0, $c0, $c0 ; 0x0d
+ .DB $00, $00, $08, $08, $15, $1d, $1a, $17, $17, $18, $1f, $10, $0f, $35, $15, $1a ; 0x0a
+ .DB $08, $3f, $1f, $17, $1f, $10, $1f, $18, $1f, $1a, $1a, $1f, $1a, $1f, $0d, $0d ; 0x0b
+ .DB $00, $00, $88, $88, $54, $dc, $d4, $5c, $5e, $d2, $ce, $4a, $8e, $6a, $4e, $ca ; 0x0c
+ .DB $8e, $ea, $ce, $4a, $fe, $72, $fc, $c4, $f8, $f8, $c0, $c0, $c0, $c0, $80, $80 ; 0x0d
; Fox side
.DB $00, $00, $00, $00, $01, $01, $15, $15, $1f, $1f, $1a, $1e, $16, $1e, $12, $1e ; 0x0e