~rabbits/adelie

f0c1c54f2167605ed4c4dee8ec32d11a81fbef1b — Devine Lu Linvega 1 year, 19 days ago f8bded4
Support auto for <draw-icn>
2 files changed, 6 insertions(+), 2 deletions(-)

M src/adelie.tal
M src/tga.tal
M src/adelie.tal => src/adelie.tal +5 -1
@@ 317,7 317,7 @@
	.pen/y LDZ2 .Screen/y DEO2
	next-word DUP2 wcap #0004 SUB2 ;&tga-ext scmp ?&tga
	DUP2 !<draw-icn>
	&tga DUP2 !draw-tga
	&tga DUP2 !<draw-tga>
	&tga-ext ".tga $1

@op-goto ( addr* -- addr* )


@@ 566,6 566,10 @@
	;&buf .Screen/addr DEO2
	scap #0009 SUB2 read-point ,&h STR
	,&w STR
	( | is pos auto )
	.pen/auto LDZ #00 EQU ?&>no-auto
		.center/x LDZ2 #00 ,&w LDR #30 SFT2 #01 SFT2 SUB2 .Screen/x DEO2
		.center/y LDZ2 #00 ,&h LDR #30 SFT2 #01 SFT2 SUB2 .Screen/y DEO2 &>no-auto
	[ LIT2 00 &h $1 ] SUB
	&y ( -- )
		[ LIT2 00 &w $1 ] SUB

M src/tga.tal => src/tga.tal +1 -1
@@ 11,7 11,7 @@
	&depth $1
	&descriptor $1

@draw-tga ( addr* -- )
@<draw-tga> ( addr* -- )
	( | header )
	.File/name DEO2
	#0012 .File/length DEO2