Class: RPG::Tileset

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/tileset.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Tileset) initialize

Returns a new instance of Tileset



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/rpg/tileset.rb', line 3

def initialize
  @id = 0
  @mode = 1
  @name = ''
  @tileset_names = Array.new(9).collect{''}
  @flags = Table.new(8192)
  @flags[0] = 0x0010
  (2048..2815).each {|i| @flags[i] = 0x000F}
  (4352..8191).each {|i| @flags[i] = 0x000F}
  @note = ''
end

Instance Attribute Details

- (Object) flags

Returns the value of attribute flags



18
19
20
# File 'lib/rpg/tileset.rb', line 18

def flags
  @flags
end

- (Object) id

Returns the value of attribute id



14
15
16
# File 'lib/rpg/tileset.rb', line 14

def id
  @id
end

- (Object) mode

Returns the value of attribute mode



15
16
17
# File 'lib/rpg/tileset.rb', line 15

def mode
  @mode
end

- (Object) name

Returns the value of attribute name



16
17
18
# File 'lib/rpg/tileset.rb', line 16

def name
  @name
end

- (Object) note

Returns the value of attribute note



19
20
21
# File 'lib/rpg/tileset.rb', line 19

def note
  @note
end

- (Object) tileset_names

Returns the value of attribute tileset_names



17
18
19
# File 'lib/rpg/tileset.rb', line 17

def tileset_names
  @tileset_names
end