From fc3232a8e891c6f79cb6b276f1a15ea045854793 Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Thu, 10 Nov 2022 21:54:32 +0000 Subject: [PATCH] Replace now-invalid macros in projects. --- projects/examples/demos/snake.tal | 22 +++++++++++----------- projects/examples/old/dungeon.tal | 14 +++++++------- projects/examples/old/rule110.tal | 16 ++++++++-------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/projects/examples/demos/snake.tal b/projects/examples/demos/snake.tal index 77f043d..2175894 100644 --- a/projects/examples/demos/snake.tal +++ b/projects/examples/demos/snake.tal @@ -1,9 +1,9 @@ ( uxnasm projects/examples/demos/snake.tal bin/snake.rom && uxnemu bin/snake.rom ) -%+ { ADD } %- { SUB } %/ { DIV } -%< { LTH } %> { GTH } %= { EQU } %! { NEQ } -%++ { ADD2 } %-- { SUB2 } %// { DIV2 } -%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 } +%+ { ADD } %/ { DIV } +%< { LTH } %> { GTH } %! { NEQ } +%++ { ADD2 } %// { DIV2 } +%<< { LTH2 } %>> { GTH2 } %!! { NEQ2 } %2/ { #01 SFT } %2* { #10 SFT } %8// { #03 SFT2 } %8** { #30 SFT2 } %MOD { DIVk MUL SUB } @@ -65,7 +65,7 @@ BRK @on-frame ( -> ) .arena/timer LDZ INC DUP .arena/timer STZ - DIFFICULTY = BRK? + DIFFICULTY EQU BRK? ( clear ) #00 ;draw-snake JSR2 ( update ) ;move JSR2 @@ -82,7 +82,7 @@ BRK DUP #08 ! ,&no-escape JCN ;reset JSR2 &no-escape - #04 SFT DUP #00 = ,&skip JCN + #04 SFT DUP #00 EQU ,&skip JCN DUP .snake/direction STZ &skip POP @@ -94,8 +94,8 @@ BRK #00 ;draw-snake JSR2 #00 ;draw-apple JSR2 - .arena/w LDZ 2/ #01 - .snake/x STZ - .arena/h LDZ 2/ #01 - .snake/y STZ + .arena/w LDZ 2/ #01 SUB .snake/x STZ + .arena/h LDZ 2/ #01 SUB .snake/y STZ #00 .snake/dead STZ #00 .snake/length STZ #00 .snake/direction STZ @@ -117,11 +117,11 @@ RTN POP2 POP2r - .snake/dead LDZ #00 = JMP RTN + .snake/dead LDZ #00 EQU JMP RTN .snake/direction LDZ DUP #01 ! ,&no-up JCN - .snake/y LDZ #01 - + .snake/y LDZ #01 SUB .arena/h LDZ MAX .snake/y STZ &no-up @@ -131,7 +131,7 @@ RTN .snake/y STZ &no-down DUP #04 ! ,&no-left JCN - .snake/x LDZ #01 - + .snake/x LDZ #01 SUB .arena/w LDZ MAX .snake/x STZ &no-left diff --git a/projects/examples/old/dungeon.tal b/projects/examples/old/dungeon.tal index abbd436..521a968 100644 --- a/projects/examples/old/dungeon.tal +++ b/projects/examples/old/dungeon.tal @@ -1,9 +1,9 @@ ( art by @ritualdust ) -%+ { ADD } %- { SUB } %/ { DIV } -%< { LTH } %> { GTH } %= { EQU } %! { NEQ } -%++ { ADD2 } %-- { SUB2 } %// { DIV2 } -%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 } +%+ { ADD } %/ { DIV } +%< { LTH } %> { GTH } %! { NEQ } +%++ { ADD2 } %-- { SUB2 } %// { DIV2 } +%<< { LTH2 } %>> { GTH2 } %!! { NEQ2 } %8** { #30 SFT2 } %10** { #40 SFT2 } @@ -13,7 +13,7 @@ %RTN { JMP2r } %TOS { #00 SWP } -%DEC { #01 - } +%DEC { #01 SUB } %MOUSE { #82 } @@ -45,8 +45,8 @@ #036f .System/g DEO2 #003f .System/b DEO2 - .Screen/width DEI2 #01 SFT2 #0040 -- .room/x STZ2 - .Screen/height DEI2 #01 SFT2 #0040 -- .room/y STZ2 + .Screen/width DEI2 #01 SFT2 #0040 SUB2 .room/x STZ2 + .Screen/height DEI2 #01 SFT2 #0040 SUB2 .room/y STZ2 ( vectors ) ;on-frame .Screen/vector DEO2 diff --git a/projects/examples/old/rule110.tal b/projects/examples/old/rule110.tal index 2962eb0..505e4f2 100644 --- a/projects/examples/old/rule110.tal +++ b/projects/examples/old/rule110.tal @@ -2,10 +2,10 @@ ( uxnasm rule110.tal rule110.rom && uxnemu rule110.rom ) -%+ { ADD } %- { SUB } %* { MUL } %/ { DIV } -%< { LTH } %> { GTH } %= { EQU } %! { NEQ } -%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 } -%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 } +%+ { ADD } %* { MUL } %/ { DIV } +%< { LTH } %> { GTH } %! { NEQ } +%++ { ADD2 } %** { MUL2 } %// { DIV2 } +%<< { LTH2 } %>> { GTH2 } %!! { NEQ2 } %2* { #10 SFT } %2/ { #01 SFT } %2** { #10 SFT2 } %2// { #01 SFT2 } %4* { #20 SFT } %4/ { #02 SFT } %4** { #20 SFT2 } %4// { #02 SFT2 } @@ -76,11 +76,11 @@ RTN #1000 &loop DUP #00 SWP 8** .Screen/x DEO2 - ( shift ) INCk #10 SWP - + ( shift ) INCk #10 SWP SUB ( get address ) STHkr 2* LDZ2 ( bit ) ROT SFT2 #0001 AND2 ( get sprite ) 8** ;cell-icns ++ .Screen/addr DEO2 - #01 STHkr #00 = + .Screen/sprite DEO + #01 STHkr #00 EQU + .Screen/sprite DEO INC GTHk ,&loop JCN POP2 POPr @@ -123,14 +123,14 @@ RTN .Mouse/y DEI2 DUP2 ,&y STR2 .Screen/y DEO2 ( colorize on state ) - #43 [ .Mouse/state DEI #00 ! ] - .Screen/sprite DEO + #43 [ .Mouse/state DEI #00 ! ] SUB .Screen/sprite DEO ( on click ) .Mouse/state DEI #00 ! JMP BRK ( toggle bit ) .input LDZ2k - #0001 .Mouse/x DEI2 8// #000f SWP2 -- NIP #40 SFT SFT2 EOR2 + #0001 .Mouse/x DEI2 8// #000f SWP2 SUB2 NIP #40 SFT SFT2 EOR2 ROT STZ2 ;render JSR2 ( release ) #00 .Mouse/state DEO