class WolfRpg::Database::Field

Constants

INT_START
STRING_START

Attributes

args[RW]
default_value[RW]
indexinfo[RW]
name[RW]
string_args[RW]
type[RW]
unknown1[RW]

Public Class Methods

new(coder) click to toggle source
# File lib/wolfrpg/database.rb, line 219
def initialize(coder)
  @name = coder.read_string
end

Public Instance Methods

dump_dat(coder) click to toggle source
# File lib/wolfrpg/database.rb, line 231
def dump_dat(coder)
  coder.write_int(@indexinfo)
end
dump_project(coder) click to toggle source
# File lib/wolfrpg/database.rb, line 223
def dump_project(coder)
  coder.write_string(@name)
end
index() click to toggle source
# File lib/wolfrpg/database.rb, line 243
def index
  if string?
    @indexinfo - STRING_START
  else
    @indexinfo - INT_START
  end
end
int?() click to toggle source
# File lib/wolfrpg/database.rb, line 239
def int?
  !string?
end
read_dat(coder) click to toggle source
# File lib/wolfrpg/database.rb, line 227
def read_dat(coder)
  @indexinfo = coder.read_int
end
string?() click to toggle source
# File lib/wolfrpg/database.rb, line 235
def string?
  @indexinfo >= STRING_START
end