Class: GBTiles::GBR::TileSet::Objects::TileImport

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

#initializeTileImport

Returns a new instance of TileImport.



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

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

Instance Attribute Details

#binary_file_typeObject

Returns the value of attribute binary_file_type.



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

def binary_file_type
  @binary_file_type
end

#color_conversionObject

Returns the value of attribute color_conversion.



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

def color_conversion
  @color_conversion
end

#file_nameObject

Returns the value of attribute file_name.



8
9
10
# File 'lib/gbtiles/gbr/tile_set/objects/tile_import.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_import.rb', line 9

def file_type
  @file_type
end

#first_byteObject

Returns the value of attribute first_byte.



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

def first_byte
  @first_byte
end

#from_tileObject

Returns the value of attribute from_tile.



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

def from_tile
  @from_tile
end

#tile_countObject

Returns the value of attribute tile_count.



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

def tile_count
  @tile_count
end

#tile_idObject

Returns the value of attribute tile_id.



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

def tile_id
  @tile_id
end

#to_tileObject

Returns the value of attribute to_tile.



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

def to_tile
  @to_tile
end

Class Method Details

.initFromBitString(src) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/gbtiles/gbr/tile_set/objects/tile_import.rb', line 21

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

  object.tile_id          = GBTiles::DataType.word!(src)
  object.file_name        = GBTiles::DataType.string!(src, 128)
  object.file_type        = GBTiles::DataType.byte!(src)
  object.from_tile        = GBTiles::DataType.word!(src)
  object.to_tile          = GBTiles::DataType.word!(src)
  object.tile_count       = GBTiles::DataType.word!(src)
  object.color_conversion = GBTiles::DataType.byte!(src)
  object.first_byte       = GBTiles::DataType.long!(src)
  object.binary_file_type = GBTiles::DataType.byte!(src)

  object
end