Class: EhbGameLib::Nes::Palette
- Inherits:
-
Palettes::Palette
- Object
- Palettes::Palette
- EhbGameLib::Nes::Palette
- Defined in:
- lib/ehb_game_lib/nes/palette.rb
Overview
Reference: www.firebrandx.com/nespalette.html
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
Instance Method Summary collapse
-
#initialize ⇒ Palette
constructor
A new instance of Palette.
Methods inherited from Palettes::Palette
#[], #color, from_file, #sub, #sub_class
Constructor Details
#initialize ⇒ Palette
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 |