Class: GBTiles::GBR::TileSet::Objects::TilePal
- Inherits:
-
GBTiles::GBR::TileSet::Object
- Object
- GBTiles::GBR::TileSet::Object
- GBTiles::GBR::TileSet::Objects::TilePal
- Defined in:
- lib/gbtiles/gbr/tile_set/objects/tile_pal.rb
Instance Attribute Summary collapse
-
#color_set ⇒ Object
Returns the value of attribute color_set.
-
#count ⇒ Object
Returns the value of attribute count.
-
#id ⇒ Object
Returns the value of attribute id.
-
#sgb_color_set ⇒ Object
Returns the value of attribute sgb_color_set.
-
#sgb_count ⇒ Object
Returns the value of attribute sgb_count.
Attributes inherited from GBTiles::GBR::TileSet::Object
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ TilePal
constructor
A new instance of TilePal.
Constructor Details
#initialize ⇒ TilePal
Returns a new instance of TilePal.
13 14 15 |
# File 'lib/gbtiles/gbr/tile_set/objects/tile_pal.rb', line 13 def initialize super GBTiles::GBR::TileSet::OBJECT_TYPE[:tile_pal] end |
Instance Attribute Details
#color_set ⇒ Object
Returns the value of attribute color_set.
9 10 11 |
# File 'lib/gbtiles/gbr/tile_set/objects/tile_pal.rb', line 9 def color_set @color_set end |
#count ⇒ Object
Returns the value of attribute count.
8 9 10 |
# File 'lib/gbtiles/gbr/tile_set/objects/tile_pal.rb', line 8 def count @count end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/gbtiles/gbr/tile_set/objects/tile_pal.rb', line 7 def id @id end |
#sgb_color_set ⇒ Object
Returns the value of attribute sgb_color_set.
11 12 13 |
# File 'lib/gbtiles/gbr/tile_set/objects/tile_pal.rb', line 11 def sgb_color_set @sgb_color_set end |
#sgb_count ⇒ Object
Returns the value of attribute sgb_count.
10 11 12 |
# File 'lib/gbtiles/gbr/tile_set/objects/tile_pal.rb', line 10 def sgb_count @sgb_count end |
Class Method Details
.initFromBitString(src) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/gbtiles/gbr/tile_set/objects/tile_pal.rb', line 17 def self.initFromBitString src object = GBTiles::GBR::TileSet::Objects::TilePal.new object.id = GBTiles::DataType.word!(src) object.count = GBTiles::DataType.word!(src) object.color_set = src.slice!(0, object.count) object.sgb_count = GBTiles::DataType.word!(src) object.sgb_color_set = src.slice!(0, object.sgb_count) object end |