Class: GBTiles::GBR::TileSet::Objects::TileExport

Inherits:
GBTiles::GBR::TileSet::Object show all
Defined in:
lib/gbtiles/gbr/tile_set/objects/tile_export.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

#initializeTileExport

Returns a new instance of TileExport.



29
30
31
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 29

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

Instance Attribute Details

#bankObject

Returns the value of attribute bank.



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

def bank
  @bank
end

#block_sizeObject

Returns the value of attribute block_size.



26
27
28
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 26

def block_size
  @block_size
end

#compressionObject

Returns the value of attribute compression.



18
19
20
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 18

def compression
  @compression
end

#counterObject

Returns the value of attribute counter.



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

def counter
  @counter
end

#file_nameObject

Returns the value of attribute file_name.



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

def file_name
  @file_name
end

#file_typeObject

Returns the value of attribute file_type.



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

def file_type
  @file_type
end

#formatObject

Returns the value of attribute format.



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

def format
  @format
end

#fromObject

Returns the value of attribute from.



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

def from
  @from
end

#gbc_palettesObject

Returns the value of attribute gbc_palettes.



21
22
23
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 21

def gbc_palettes
  @gbc_palettes
end

#include_colorsObject

Returns the value of attribute include_colors.



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

def include_colors
  @include_colors
end

#label_nameObject

Returns the value of attribute label_name.



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

def label_name
  @label_name
end

#make_meta_tilesObject

Returns the value of attribute make_meta_tiles.



22
23
24
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 22

def make_meta_tiles
  @make_meta_tiles
end

#meta_counterObject

Returns the value of attribute meta_counter.



24
25
26
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 24

def meta_counter
  @meta_counter
end

#meta_offsetObject

Returns the value of attribute meta_offset.



23
24
25
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 23

def meta_offset
  @meta_offset
end

#section_nameObject

Returns the value of attribute section_name.



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

def section_name
  @section_name
end

#sel_tabObject

Returns the value of attribute sel_tab.



27
28
29
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 27

def sel_tab
  @sel_tab
end

#sgb_palettesObject

Returns the value of attribute sgb_palettes.



20
21
22
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 20

def sgb_palettes
  @sgb_palettes
end

#splitObject

Returns the value of attribute split.



25
26
27
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 25

def split
  @split
end

#tile_arrayObject

Returns the value of attribute tile_array.



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

def tile_array
  @tile_array
end

#tile_idObject

Returns the value of attribute tile_id.



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

def tile_id
  @tile_id
end

#uptoObject

Returns the value of attribute upto.



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

def upto
  @upto
end

Class Method Details

.initFromBitString(src) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/gbtiles/gbr/tile_set/objects/tile_export.rb', line 33

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

  object.tile_id         = GBTiles::DataType.word!(src)
  object.file_name       = GBTiles::DataType.string!(src, 128)
  object.file_type       = GBTiles::DataType.byte!(src)
  object.section_name    = GBTiles::DataType.string!(src, 20)
  object.label_name      = GBTiles::DataType.string!(src, 20)
  object.bank            = GBTiles::DataType.byte!(src)
  object.tile_array      = GBTiles::DataType.byte!(src)
  object.format          = GBTiles::DataType.byte!(src)
  object.counter         = GBTiles::DataType.byte!(src)
  object.from            = GBTiles::DataType.word!(src)
  object.upto            = GBTiles::DataType.word!(src)
  object.compression     = GBTiles::DataType.byte!(src)
  object.include_colors  = GBTiles::DataType.boolean!(src)
  object.sgb_palettes    = GBTiles::DataType.byte!(src)
  object.gbc_palettes    = GBTiles::DataType.byte!(src)
  object.make_meta_tiles = GBTiles::DataType.boolean!(src)
  object.meta_offset     = GBTiles::DataType.long!(src)
  object.meta_counter    = GBTiles::DataType.byte!(src)
  object.split           = GBTiles::DataType.boolean!(src)
  object.block_size      = GBTiles::DataType.long!(src)
  object.sel_tab         = GBTiles::DataType.byte!(src)

  object
end