Class: GBTiles::GBR::TileSet::Objects::TileSettings

Inherits:
GBTiles::GBR::TileSet::Object show all
Defined in:
lib/gbtiles/gbr/tile_set/objects/tile_settings.rb

Instance Attribute Summary collapse

Attributes inherited from GBTiles::GBR::TileSet::Object

#object_id, #object_type

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTileSettings

Returns a new instance of TileSettings.



19
20
21
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 19

def initialize
  super GBTiles::GBR::TileSet::OBJECT_TYPE[:tile_settings]
end

Instance Attribute Details

#auto_updateObject

Returns the value of attribute auto_update.



17
18
19
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 17

def auto_update
  @auto_update
end

#bookmarksObject

Returns the value of attribute bookmarks.



16
17
18
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 16

def bookmarks
  @bookmarks
end

#color_setObject

Returns the value of attribute color_set.



15
16
17
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 15

def color_set
  @color_set
end

#flagsObject

Returns the value of attribute flags.



9
10
11
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 9

def flags
  @flags
end

#left_colorObject

Returns the value of attribute left_color.



10
11
12
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 10

def left_color
  @left_color
end

#right_colorObject

Returns the value of attribute right_color.



11
12
13
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 11

def right_color
  @right_color
end

#simpleObject

Returns the value of attribute simple.



8
9
10
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 8

def simple
  @simple
end

#split_heightObject

Returns the value of attribute split_height.



13
14
15
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 13

def split_height
  @split_height
end

#split_orderObject

Returns the value of attribute split_order.



14
15
16
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 14

def split_order
  @split_order
end

#split_widthObject

Returns the value of attribute split_width.



12
13
14
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 12

def split_width
  @split_width
end

#tile_idObject

Returns the value of attribute tile_id.



7
8
9
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 7

def tile_id
  @tile_id
end

Class Method Details

.initFromBitString(src) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/gbtiles/gbr/tile_set/objects/tile_settings.rb', line 23

def self.initFromBitString src
  object = GBTiles::GBR::TileSet::Objects::TileSettings.new

  object.tile_id       = GBTiles::DataType.word!(src)
  object.simple        = GBTiles::DataType.boolean!(src)
  object.flags         = GBTiles::DataType.byte!(src)
  object.left_color    = GBTiles::DataType.byte!(src)
  object.right_color   = GBTiles::DataType.byte!(src)
  object.split_width   = GBTiles::DataType.word!(src)
  object.split_height  = GBTiles::DataType.word!(src)
  object.split_order   = GBTiles::DataType.long!(src)
  object.color_set     = GBTiles::DataType.byte!(src)
  # @bookmarks    Word(3)
  # @auto_update   Boolean

  object
end