aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-04-15 14:47:12 +0200
committerkdx <kikoodx@paranoici.org>2023-04-15 14:47:12 +0200
commit1e30b6337b21a9958da58f07bb1229a79f834b3b (patch)
tree2597ea9399f41194a763cf49ffd7b4947f3ba11e
parent9030e54e1bc84b06154e66f596305d31f51475c9 (diff)
downloadorga-1e30b6337b21a9958da58f07bb1229a79f834b3b.tar.gz
rgb move
-rwxr-xr-xembed.sh3
-rw-r--r--samples/move.orgaasm9
2 files changed, 12 insertions, 0 deletions
diff --git a/embed.sh b/embed.sh
index 67062ba..22eb51a 100755
--- a/embed.sh
+++ b/embed.sh
@@ -8,3 +8,6 @@ cd "$OLDPWD" || exit 1
cembed rom >src/rom.h || exit 1
rm -f rom
./build.sh -DEMBED_ROM=
+OUT="$(basename "$1" .orgaasm)"
+printf '%s\n' "$OUT"
+mv orgaemu "$OUT"
diff --git a/samples/move.orgaasm b/samples/move.orgaasm
index 7ca109f..f47b6ff 100644
--- a/samples/move.orgaasm
+++ b/samples/move.orgaasm
@@ -16,6 +16,7 @@ include(std.orgaasm)
/player/erase
/player/update
/player/draw
+ /invert
JMP ,main/loop
@input.kleft 0000
@@ -46,6 +47,7 @@ include(std.orgaasm)
-input.kup LDA SUB
-input.kdown LDA ADD
/clamp -player.y STA
+@player/update/break
RET
@player/erase ( -- )
@@ -62,6 +64,13 @@ include(std.orgaasm)
/draw/sprite
RET
+@invert ( -- )
+ -Screen
+@invert/loop
+ DUP LDA #0001 LSF OVR STA
+ INC DUP JNZ ,invert/loop
+ POP RET
+
@draw/pixel ( x y col -- )
ROT #007f AND
ROT #007f AND