Progress in flexible file size
This commit is contained in:
parent
a80dfd2b04
commit
65bac442c5
|
@ -26,14 +26,14 @@
|
|||
|
||||
|0100 @on-reset ( -> )
|
||||
|
||||
( theme )
|
||||
( | theme )
|
||||
#26ae .System/r DEO2
|
||||
#26ae .System/g DEO2
|
||||
#26ae .System/b DEO2
|
||||
( size )
|
||||
( | size )
|
||||
#0080 .Screen/width DEO2
|
||||
#0100 .Screen/height DEO2
|
||||
( wait )
|
||||
( | wait )
|
||||
;await-src .Console/vector DEO2
|
||||
|
||||
BRK
|
||||
|
@ -64,24 +64,25 @@ BRK
|
|||
|
||||
@file-open-tga ( path* -- )
|
||||
|
||||
( header )
|
||||
( | header )
|
||||
DUP2 .File1/name DEO2
|
||||
#0012 .File1/length DEO2
|
||||
;image .File1/read DEO2
|
||||
( flip endianness )
|
||||
( | flip endianness )
|
||||
;image/w STH2k LDA2 SWP STH2r STA2
|
||||
;image/h STH2k LDA2 SWP STH2r STA2
|
||||
|
||||
( | resize )
|
||||
;image/w LDA2 #0040 ADD2 .Screen/width DEO2
|
||||
;image/h LDA2 #0040 ADD2 .Screen/height DEO2
|
||||
;image/w LDA2 #43 SFT2 .File2/length DEO2
|
||||
|
||||
( print details )
|
||||
( | print details )
|
||||
;src-txt pstr
|
||||
pstr
|
||||
LIT "( #18 DEO #00
|
||||
;image/image-type LDA #10 SFT ;image-types ADD2 LDA2 pstr
|
||||
LIT ") #18 DEO #0a18 DEO
|
||||
|
||||
( get parser )
|
||||
( | get parser )
|
||||
;image/image-type LDA
|
||||
#02 NEQk NIP ?&no-raw-true
|
||||
;pixel-raw-true #0004 parse-tga POP JMP2r
|
||||
|
@ -90,7 +91,7 @@ BRK
|
|||
;pixel-raw-bw #0001 parse-tga POP JMP2r
|
||||
&no-raw-bw
|
||||
|
||||
( error )
|
||||
( | error )
|
||||
;&err pstr #0a18 DEO
|
||||
|
||||
JMP2r
|
||||
|
@ -99,8 +100,8 @@ JMP2r
|
|||
@parse-tga ( filter* length* -- )
|
||||
|
||||
#0020 .Screen/x DEO2
|
||||
#0040 .Screen/y DEO2
|
||||
#76 .Screen/auto DEO
|
||||
#0020 .Screen/y DEO2
|
||||
;image/w LDA2 NIP #10 SFT #10 SUB #f0 AND #06 ORA .Screen/auto DEO
|
||||
|
||||
.File1/length DEO2 ,&filter STR2
|
||||
#0000 ,&x STR2
|
||||
|
@ -132,7 +133,7 @@ JMP2r
|
|||
|
||||
STH
|
||||
OVR2 SWP2
|
||||
( get addr )
|
||||
( | get addr )
|
||||
DUP2 #0007 AND2
|
||||
SWP2 #83 SFT2 ADD2
|
||||
SWP2 #43 SFT2 ADD2
|
||||
|
|
Loading…
Reference in New Issue