Class: EhbGameLib::Nes::Palette

Inherits:
Palettes::Palette show all
Defined in:
lib/ehb_game_lib/nes/palette.rb

Overview

Constant Summary collapse

COLUMNS =
%w[grey blue indigo purple violet red brown orange yellow lawn_green lime_green
sea_green cyan black].freeze
ROWS =
%w[dd d l ll].freeze
BLACK =
BLACK_DD
WHITE =
GREY_LL
TRANSPARENT =
0x3F

Instance Attribute Summary

Attributes inherited from Palettes::Palette

#colors

Instance Method Summary collapse

Methods inherited from Palettes::Palette

#[], #color, from_file, #sub, #sub_class

Constructor Details

#initializePalette

Returns a new instance of Palette.



23
24
25
26
27
28
29
# File 'lib/ehb_game_lib/nes/palette.rb', line 23

def initialize
  colors = ::EhbGameLib::Palettes::Color.array_from_file(
    ::File.join(__dir__, 'pvm_style_d93_palette.pal')
  )
  colors[TRANSPARENT] = ::EhbGameLib::Palettes::Color.new(0x00, 0x00, 0x00, 0x00)
  super(colors)
end