Added meta
This commit is contained in:
parent
40dfc6e25b
commit
c037f6d9a1
|
@ -2,12 +2,12 @@
|
|||
|
||||
ID="tgachr"
|
||||
ASM="uxncli $HOME/roms/drifblim.rom"
|
||||
EMU="uxncli"
|
||||
EMU="uxnemu"
|
||||
LIN="uxncli $HOME/roms/uxnlin.rom"
|
||||
SRC="${ID}.tal"
|
||||
DST="${ID}.rom"
|
||||
CPY="$HOME/roms"
|
||||
ARG="pict.tga"
|
||||
ARG="pict3.tga"
|
||||
|
||||
if [[ "$*" == *"--lint"* ]]
|
||||
then
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|0100
|
||||
|
||||
@on-reset ( -> )
|
||||
;meta #06 DEO2
|
||||
( | theme )
|
||||
#26ae .System/r DEO2
|
||||
#26ae .System/g DEO2
|
||||
|
@ -28,6 +29,13 @@
|
|||
;await-src .Console/vector DEO2
|
||||
BRK
|
||||
|
||||
@meta $1
|
||||
( name ) "Tgachr 0a
|
||||
( desc ) "TGA 20 "to 20 "CHR 20 "Converter 0a
|
||||
( auth ) "By 20 "Devine 20 "Lu 20 "Linvega 0a
|
||||
( date ) "27 20 "Nov 20 "2023 $1
|
||||
( exts ) $1
|
||||
|
||||
(
|
||||
@|vectors )
|
||||
|
||||
|
@ -41,10 +49,7 @@
|
|||
#0a18 DEO
|
||||
BRK
|
||||
|
||||
@hexc ( hex -- char )
|
||||
#0f AND DUP #09 GTH #27 MUL ADD #30 ADD JMP2r
|
||||
|
||||
@write-size ( str* -- )
|
||||
@<write-size> ( str* -- )
|
||||
STH2
|
||||
;image/w LDA2 #03 SFT2 NIP
|
||||
( ) DUP #04 SFT hexc STH2kr STA
|
||||
|
@ -69,7 +74,7 @@
|
|||
;image/h STH2k LDA2 SWP STH2r STA2
|
||||
( | output path )
|
||||
;src ;dst scpy ;dst
|
||||
( ) DUP2 scap/ #0004 SUB2 write-size
|
||||
( ) DUP2 scap/ #0004 SUB2 <write-size>
|
||||
( ) { ".chr 00 }
|
||||
STH2r SWP2 scap/ scpy ;dst .File2/name DEO2
|
||||
( | resize )
|
||||
|
@ -85,19 +90,32 @@
|
|||
#0a18 DEO
|
||||
( | get parser )
|
||||
;image/image-type LDA #02 NEQk NIP ?{
|
||||
;pixel-raw-true #0004 parse-tga POP JMP2r }
|
||||
;pixel-raw-true #0004 <parse-tga>
|
||||
POP JMP2r }
|
||||
#03 NEQk NIP ?{
|
||||
;pixel-raw-bw #0001 parse-tga POP JMP2r }
|
||||
;pixel-raw-bw #0001 <parse-tga>
|
||||
POP JMP2r }
|
||||
( | error )
|
||||
;&err <pstr>
|
||||
#0a18 DEO
|
||||
JMP2r
|
||||
&err "Unsupported 20 "tga-type: 20 $1
|
||||
|
||||
@parse-tga ( filter* length* -- )
|
||||
@<draw-row> ( -- )
|
||||
#2000
|
||||
&l ( -- )
|
||||
#81 .Screen/sprite DEO
|
||||
INC GTHk ?&l
|
||||
POP2
|
||||
( | move down )
|
||||
#0020 .Screen/x DEO2
|
||||
.Screen/y DEI2k #0008 ADD2 ROT DEO2
|
||||
JMP2r
|
||||
|
||||
@<parse-tga> ( filter* length* -- )
|
||||
#0020 .Screen/x DEO2
|
||||
#0020 .Screen/y DEO2
|
||||
;image/w LDA2 NIP #10 SFT #10 SUB #f0 AND #06 ORA .Screen/auto DEO
|
||||
#05 .Screen/auto DEO
|
||||
.File1/length DEO2
|
||||
,&filter STR2
|
||||
#0000 ,&x STR2
|
||||
|
@ -110,11 +128,11 @@
|
|||
;image/w LDA2 NEQ2 ?&no-line
|
||||
#0000 ,&x STR2
|
||||
,&y LDR2 INC2 ,&y STR2
|
||||
( on row ) ,&y LDR2 #0007 AND2 ORA ?&no-row
|
||||
( on row ) ,&y LDR2 #0007 AND2 ORA ?&no-line
|
||||
;buffer DUP2 .Screen/addr DEO2
|
||||
.File2/write DEO2
|
||||
#81 .Screen/sprite DEO
|
||||
&no-row &no-line .File1/success DEI2 ORA ?&stream
|
||||
<draw-row>
|
||||
&no-line .File1/success DEI2 ORA ?&stream
|
||||
JMP2r
|
||||
&pixel $4
|
||||
|
||||
|
@ -127,7 +145,8 @@
|
|||
( | get addr )
|
||||
DUP2 #0007 AND2 SWP2 #83 SFT2 ADD2 SWP2 #43 SFT2 ADD2 ;buffer ADD2
|
||||
( ch1 ) OVR2 OVR2 STHkr #00 toggle-pixel
|
||||
( ch2 ) #0008 ADD2 STHr #01 toggle-pixel JMP2r
|
||||
( ch2 ) #0008 ADD2 STHr #01
|
||||
( >> )
|
||||
|
||||
@toggle-pixel ( x* addr* color -- )
|
||||
STH2
|
||||
|
@ -185,6 +204,9 @@
|
|||
POP2 #00 STH2r STA
|
||||
JMP2r
|
||||
|
||||
@hexc ( hex -- char )
|
||||
#0f AND DUP #09 GTH #27 MUL ADD #30 ADD JMP2r
|
||||
|
||||
(
|
||||
@|assets )
|
||||
|
||||
|
|
Loading…
Reference in New Issue