Class: RPG::Tileset
- Inherits:
-
Object
- Object
- RPG::Tileset
- Defined in:
- lib/rpg/tileset.rb
Overview
Data class for tilesets.
Instance Attribute Summary collapse
-
#autotile_names ⇒ Object
The autotile graphic’s file name array ([0]..).
-
#battleback_name ⇒ Object
The battle background’s graphic file name.
-
#fog_blend_type ⇒ Object
The fog’s blending mode.
-
#fog_hue ⇒ Object
The adjustment value for the fog graphic’s hue (0..360).
-
#fog_name ⇒ Object
The fog graphic’s file name.
-
#fog_opacity ⇒ Object
The fog’s opacity.
-
#fog_sx ⇒ Object
The fog’s SX (automatic X-axis scrolling speed).
-
#fog_sy ⇒ Object
The fog’s SY (automatic Y-axis scrolling speed).
-
#fog_zoom ⇒ Object
The fog’s zoom level.
-
#id ⇒ Object
The tileset ID.
-
#name ⇒ Object
The tileset name.
-
#panorama_hue ⇒ Object
The adjustment value for the panorama graphic’s hue (0..360).
-
#panorama_name ⇒ Object
The panorama graphic file name.
-
#passages ⇒ Table
Passage table.
-
#priorities ⇒ Table
Priority table.
-
#terrain_tags ⇒ Table
Terrain tag table A 1-dimensional Table containing terrain tag data.
-
#tileset_name ⇒ Object
The tileset’s graphic file name.
Instance Method Summary collapse
-
#initialize ⇒ Tileset
constructor
A new instance of Tileset.
Constructor Details
#initialize ⇒ Tileset
Returns a new instance of Tileset.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rpg/tileset.rb', line 6 def initialize @id = 0 @name = "" @tileset_name = "" @autotile_names = [""]*7 @panorama_name = "" @panorama_hue = 0 @fog_name = "" @fog_hue = 0 @fog_opacity = 64 @fog_blend_type = 0 @fog_zoom = 200 @fog_sx = 0 @fog_sy = 0 @battleback_name = "" @passages = Table.new(384) @priorities = Table.new(384) @priorities[0] = 5 @terrain_tags = Table.new(384) end |
Instance Attribute Details
#autotile_names ⇒ Object
The autotile graphic’s file name array ([0]..).
37 38 39 |
# File 'lib/rpg/tileset.rb', line 37 def autotile_names @autotile_names end |
#battleback_name ⇒ Object
The battle background’s graphic file name.
67 68 69 |
# File 'lib/rpg/tileset.rb', line 67 def battleback_name @battleback_name end |
#fog_blend_type ⇒ Object
The fog’s blending mode.
55 56 57 |
# File 'lib/rpg/tileset.rb', line 55 def fog_blend_type @fog_blend_type end |
#fog_hue ⇒ Object
The adjustment value for the fog graphic’s hue (0..360).
49 50 51 |
# File 'lib/rpg/tileset.rb', line 49 def fog_hue @fog_hue end |
#fog_name ⇒ Object
The fog graphic’s file name.
46 47 48 |
# File 'lib/rpg/tileset.rb', line 46 def fog_name @fog_name end |
#fog_opacity ⇒ Object
The fog’s opacity.
52 53 54 |
# File 'lib/rpg/tileset.rb', line 52 def fog_opacity @fog_opacity end |
#fog_sx ⇒ Object
The fog’s SX (automatic X-axis scrolling speed).
61 62 63 |
# File 'lib/rpg/tileset.rb', line 61 def fog_sx @fog_sx end |
#fog_sy ⇒ Object
The fog’s SY (automatic Y-axis scrolling speed).
64 65 66 |
# File 'lib/rpg/tileset.rb', line 64 def fog_sy @fog_sy end |
#fog_zoom ⇒ Object
The fog’s zoom level.
58 59 60 |
# File 'lib/rpg/tileset.rb', line 58 def fog_zoom @fog_zoom end |
#id ⇒ Object
The tileset ID.
28 29 30 |
# File 'lib/rpg/tileset.rb', line 28 def id @id end |
#name ⇒ Object
The tileset name.
31 32 33 |
# File 'lib/rpg/tileset.rb', line 31 def name @name end |
#panorama_hue ⇒ Object
The adjustment value for the panorama graphic’s hue (0..360).
43 44 45 |
# File 'lib/rpg/tileset.rb', line 43 def panorama_hue @panorama_hue end |
#panorama_name ⇒ Object
The panorama graphic file name.
40 41 42 |
# File 'lib/rpg/tileset.rb', line 40 def panorama_name @panorama_name end |
#passages ⇒ Table
Passage table. A 1-dimensional Table containing passage flags, Bush flags, and counter flags.
The tile ID is used as a subscript. Each bit is handled as follows:
- 0x01
-
Cannot move down.
- 0x02
-
Cannot move left.
- 0x04
-
Cannot move right.
- 0x08
-
Cannot move up.
- 0x40
-
Bush flag.
- 0x80
-
Counter flag.
80 81 82 |
# File 'lib/rpg/tileset.rb', line 80 def passages @passages end |
#priorities ⇒ Table
Priority table. A 1-dimensional Table containing priority data.
The tile ID is used as a subscript.
86 87 88 |
# File 'lib/rpg/tileset.rb', line 86 def priorities @priorities end |
#terrain_tags ⇒ Table
Terrain tag table A 1-dimensional Table containing terrain tag data.
The tile ID is used as a subscript.
92 93 94 |
# File 'lib/rpg/tileset.rb', line 92 def @terrain_tags end |
#tileset_name ⇒ Object
The tileset’s graphic file name.
34 35 36 |
# File 'lib/rpg/tileset.rb', line 34 def tileset_name @tileset_name end |