~kylep/tilegarden

7babbb8114b4b0fc0ce7415cea083e86825af99f — Kyle Perik 2 months ago 67bacd7
Make more tiles produce
3 files changed, 20 insertions(+), 10 deletions(-)

M src/draw/store.fn
M src/resource-add.fn
M src/resource-tick.fn
M src/draw/store.fn => src/draw/store.fn +10 -4
@@ 5,10 5,16 @@ DUP #80 EQU IFF POP
	#01 QUE
	#0010 QUE2 #0094 QUE2
	#01 QUE
	VAL2 NIP DUP #0a DIVk MUL SUB
	SWP #0a DIV #0a DIVk MUL SUB
	#30 ADD QUE
	#30 ADD QUE
	VAL2
	( Draw 4 digits )
	#04 FOR
		ROTk ROT
		ROT FOR POP #000a DIV2 END
		#000a DIV2k MUL2 SUB2 NIP
		#30 ADD QUE
		POP
	END
	POP2
	AMT
	RTN
END

M src/resource-add.fn => src/resource-add.fn +9 -2
@@ 3,14 3,21 @@ VAL DUP #00 EQU #10 SFT #01 SUB
#03 LDB

ROTk NIP
#0f AND DUP #01 EQU SWP #04 EQU ORA
#0f AND
DUP #04 EQU #10 SFT
OVR #01 EQU ADD
OVR #0a EQU #03 MUL ADD
SWP #0b EQU #30 SFT ADD
MUL ADD

VAC #01 SFT FOR POP
	OVR
	VAL POP VAL
	#0f AND
	DUP #01 EQU SWP #04 EQU ORA
	DUP #04 EQU #10 SFT
	OVR #01 EQU ADD
	OVR #0a EQU #03 MUL ADD
	SWP #0b EQU #30 SFT ADD
	MUL ADD
END
#03 STB

M src/resource-tick.fn => src/resource-tick.fn +1 -4
@@ 1,11 1,8 @@
#00 LDB INC DUP #00 STB

( Repeat every #04 Ticks )
( DUP #60 SFT IFF POP RTN END )

#00 OVR INC2 #02 SFT2
#03 LDB DUP #7f GTH #ff MUL SWP
MUL2 #05 SFT2
MUL2 #06 SFT2
#01 LDB2 ADD2
DUP2 QUE2 #03 LDB QUE AMT