add bear sprite

This commit is contained in:
~d6 2024-07-28 22:37:52 -04:00
parent 0b84e0af86
commit d221f0d531
4 changed files with 77 additions and 0 deletions

BIN
kodiak.chr Normal file

Binary file not shown.

BIN
kodiak.chr.nmt Normal file

Binary file not shown.

View File

@ -47,6 +47,7 @@
&mouse-x $2 ( previous x-coordinate )
&mouse-y $2 ] ( previous y-coordinate )
@auto $4 ( sorted foundation for auto-move: C D S H )
@frame $1 ( frame counter )
|0100
@ -77,6 +78,7 @@
;on-mouse .Mouse/vect DEO2
;on-key .Controller/vect DEO2
;on-refresh .Screen/vect DEO2
JMP2r
@dump-byte ( byte^ -- )
@ -131,6 +133,7 @@
@draw ( -> )
draw-background
draw-decorations
draw-stock
draw-waste
draw-foundation
@ -180,6 +183,24 @@
#00 OVR STZ ( s^ ; s<-0 )
#01 SUB JMP2r ( s-1^ )
@draw-bear-head ( x* y* head* -> )
.Screen/addr DEO2 ( x* y* ; s/addr<-head )
.Screen/y DEO2 ( y* x* ; s/y<- )
.Screen/x DEO2 ( y* x* ; s/x<- )
#16 .Screen/auto DEO ( y* x* ; s/auto<-0x16 )
#80 .Screen/sprite DEOk DEO JMP2r ( y* x* ; draw 2x2 tiles )
@draw-bear ( x* y* head* -> )
STH2 OVR2 OVR2 STH2r draw-bear-head ( x* y* )
;sprites #0140 ADD2 .Screen/addr DEO2 ( x* y* ; s/addr<-body )
#0010 ADD2 .Screen/y DEO2 ( x* ; s/y<-y+16 )
#0008 SUB2 .Screen/x DEO2 ( ; s/x<-x-8 )
#36 .Screen/auto DEO ( ; s/auto<-0x36 )
#80 .Screen/sprite DEOk DEOk DEO JMP2r ( ; draw 4x3 tiles )
@draw-decorations ( -> )
#00e8 #0098 ;sprites !draw-bear
@draw-stock ( -> )
.stock LDZk #00 EQU ?&empty ( stock^ )
#0008 ,&y STR2 ( ; y0<-8 )
@ -270,6 +291,20 @@
DUP #31 LTH #03 MUL ADD #24 SUB JMP2r
&lt DUP #11 LTH #1d MUL ADD #09 ADD JMP2r
@on-refresh ( -> brk )
.frame LDZ
DUP #e8 NEQ ?{ ;sprites #0040 ADD2 !&update }
DUP #f0 NEQ ?{ ;sprites #0080 ADD2 !&update }
DUP #f8 NEQ ?{ ;sprites #0040 ADD2 !&update }
DUP #00 NEQ ?{ ;sprites !&update }
!&done
&update .Screen/addr DEO2 ( ; s/addr<-addr )
#0098 .Screen/y DEO2 ( ; s/x<-0x98 )
#00e8 .Screen/x DEO2 ( ; s/y<-0xe8 )
#16 .Screen/auto DEO ( ; draw 2 tiles, inc addr and y )
#80 .Screen/sprite DEO ( ; draw it! )
&done .frame LDZk INC SWP STZ BRK
@on-mouse ( -> brk )
on-move
on-click-down
@ -631,3 +666,5 @@
JMP2r
~cards.tal
@sprites ~sprites.tal

40
sprites.tal Normal file
View File

@ -0,0 +1,40 @@
30 78 78 7f 3f 3f 6b 6b 00 00 30 20 00 1c 1c 1c
0c 1e 1e fe fc fc d6 d6 00 00 0c 04 00 38 38 38
7f 7f 7f 3f 3f 1f 0f 0f 03 01 00 01 00 00 00 00
fe fe fe fc fc f8 f0 f0 c0 80 00 80 00 00 00 00
30 78 78 7f 3f 3f 7f 6b 00 00 30 20 00 00 1c 1c
0c 1e 1e fe fc fc fe d6 00 00 0c 04 00 00 38 38
7f 7f 7f 3f 3f 1f 0f 0f 03 01 00 01 00 00 00 00
fe fe fe fc fc f8 f0 f0 c0 80 00 80 00 00 00 00
30 78 78 7f 3f 3f 7f 7f 00 00 30 20 00 00 00 1c
0c 1e 1e fe fc fc fe fe 00 00 0c 04 00 00 00 38
7f 7f 7f 3f 3f 1f 0f 0f 03 01 00 01 00 00 00 00
fe fe fe fc fc f8 f0 f0 c0 80 00 80 00 00 00 00
30 78 78 7f 3f 3f 6b 6b 00 00 30 20 00 1c 1c 1c
0c 1e 1e fe fc fc d6 d6 00 00 0c 04 00 38 38 38
7f 7f 7f 3f 3f 1f 0f 0f 03 01 00 03 01 00 00 00
fe fe fe fc fc f8 f0 f0 c0 80 00 c0 80 00 00 00
30 78 78 7f 3f 3f 6b 6b 00 00 30 20 00 1c 1c 1c
0c 1e 1e fe fc fc d6 d6 00 00 0c 04 00 38 38 38
7f 7f 7f 3f 3f 1f 0f 0f 03 01 00 01 01 00 00 00
fe fe fe fc fc f8 f0 f0 c0 80 00 80 80 00 00 00
00 00 00 01 03 03 07 07 00 00 00 00 00 00 00 00
1f 3f 7f ff ff ff ff ff 00 00 00 00 00 00 00 00
f8 ff ff ff ff ff fe fe 00 00 00 00 00 00 00 00
03 ff ff fe c0 00 00 00 00 00 00 00 00 00 00 00
07 07 07 07 07 03 00 00 00 00 00 00 00 00 00 00
7f 7f 7f 7f 7f 7f 3f 1f 00 00 00 00 00 00 00 00
fe fe fe fe fe fe fc f8 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1e 1e 1e 1e 1e 1e 3e 7c 00 00 00 00 00 00 00 00
78 78 78 78 78 78 7c 3e 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ff 80 90 ab 90 81 92 92 ff 80 80 80 80 80 80 80
ff 01 09 d5 09 81 49 49 ff 01 01 01 01 01 01 01
91 90 91 92 92 91 90 91 80 80 80 80 80 80 80 80
89 09 89 49 49 89 09 89 01 01 01 01 01 01 01 01
92 92 81 90 ab 90 80 ff 80 80 80 80 80 80 80 ff
41 41 81 09 d5 09 01 ff 01 01 01 01 01 01 01 ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff