summaryrefslogtreecommitdiff
path: root/img/better_disp.lua
blob: 85fea3e5c28e9d385a0cfe2700d8816ee4555d6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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