The data class for tile sets.
The ID of the tile set.
The name of the tile set.
The mode of the tile set (0: Field type, 1: Area type, 2: VX compatible type).
The file name of the graphic used as the number index (0-8) tile set.
The correspondence between numbers and sets is illustrated in the table below.
0 | TileA1 | 1 | TileA2 | 2 | TileA3 |
---|---|---|---|---|---|
3 | TileA4 | 4 | TileA5 | 5 | TileB |
6 | TileC | 7 | TileD | 8 | TileE |
The flags table. A 1-dimensional array containing a variety of flags (Table).
Uses tile IDs as subscripts. The correspondence of each bit is as shown below:
This manual does not discuss bit operations, but they are similar to those in C. We recommend an Internet search using keywords such as "hexadecimal bit operations" when necessary.
The text of the note.
class RPG::Tileset 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 attr_accessor :id attr_accessor :mode attr_accessor :name attr_accessor :tileset_names attr_accessor :flags attr_accessor :note end