class GBTiles::GBR::TileSet::Objects::Palettes

Attributes

colors[RW]
count[RW]
id[RW]
sgb_colors[RW]
sgb_count[RW]

Public Class Methods

initFromBitString(src) click to toggle source
# File lib/gbtiles/gbr/tile_set/objects/palettes.rb, line 17
def self.initFromBitString src
  object = GBTiles::GBR::TileSet::Objects::Palettes.new

  object.id         = GBTiles::DataType.word!(src)
  object.count      = GBTiles::DataType.word!(src)
  object.colors     = src.slice!(0, object.count)
  object.sgb_count  = GBTiles::DataType.word!(src)
  object.sgb_colors = src.slice!(0, object.sgb_count)

  object
end
new() click to toggle source
Calls superclass method GBTiles::GBR::TileSet::Object::new
# File lib/gbtiles/gbr/tile_set/objects/palettes.rb, line 13
def initialize
  super GBTiles::GBR::TileSet::OBJECT_TYPE[:palettes]
end