Module: Badline::VIC::GraphicsMode
- Defined in:
- lib/badline/vic/graphics_mode.rb
Defined Under Namespace
Modules: Hires, Multicolor Classes: Bitmap, ExtendedBackgroundText, MulticolorBitmap, MulticolorText, Null, Text
Constant Summary collapse
- HIRES_FG =
Foreground masks depend only on the data byte, so each byte maps to a precomputed frozen pattern shared by reference instead of being written out pixel by pixel.
Array.new(256) do |data| Array.new(8) { |i| data.anybits?(1 << (7 - i)) }.freeze end.freeze
- PAIR_FG =
The high bit of each 2-bit pair (10/11) is foreground.
Array.new(256) do |data| Array.new(8) { |i| (data >> (6 - (i & ~1))).allbits?(0b10) }.freeze end.freeze
- NO_FG =
HIRES_FG[0]