summaryrefslogtreecommitdiff
path: root/img
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-05 23:28:29 +0100
committerubq323 <ubq323@ubq323.website>2022-08-05 23:28:29 +0100
commite4134721df73ae71f4d17d5a41208ab15e50ad04 (patch)
treedb553289aa92840619160503b9f6135237d9ba40 /img
parent2a14a8ba3d97562919f585383db0dc800636fe5a (diff)
betterness ?
Diffstat (limited to 'img')
-rw-r--r--img/all.dat2
-rw-r--r--img/better_disp.lua24
2 files changed, 25 insertions, 1 deletions
diff --git a/img/all.dat b/img/all.dat
index 42ce640..caa1988 100644
--- a/img/all.dat
+++ b/img/all.dat
@@ -1,2 +1,2 @@
-dep img/load_pnm img/shitty_disp img/driver
+dep img/load_pnm img/shitty_disp img/driver img/better_disp
file
diff --git a/img/better_disp.lua b/img/better_disp.lua
new file mode 100644
index 0000000..85fea3e
--- /dev/null
+++ b/img/better_disp.lua
@@ -0,0 +1,24 @@
+-- a vlorb consists of six gromlings[A
+-- 1 2
+-- 4 8
+-- 16 Q
+-- these are characters 0x80 through 0x9f in the cc charset
+-- which is only 2^5 characters though. for the sixth bit you flip the colours
+-- of that vlorb.
+
+-- on colour, off colour, gromlings 1 through 6 (bools)
+-- returns text colour, bg color, and vlorbchar
+local function vlorb(onc,offc, g1,g2,g3,g4,g5,g6)
+ local textc,bgc = onc,offc
+ if g6 then textc,bgc=bgc,textc end
+ local vlorbchar = 0
+ if g1 then vlorbchar=vlorbchar+1 end
+ if g2 then vlorbchar=vlorbchar+2 end
+ if g3 then vlorbchar=vlorbchar+4 end
+ if g4 then vlorbchar=vlorbchar+8 end
+ if g5 then vlorbchar=vlorbchar+16 end
+ return textc,bgc,string.char(vlorbchar)
+end
+
+
+