Class: Tone

Inherits:
Object show all
Defined in:
lib/rmxp_extractor/classnames.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blueObject

Returns the value of attribute blue.



120
121
122
# File 'lib/rmxp_extractor/classnames.rb', line 120

def blue
  @blue
end

#grayObject

Returns the value of attribute gray.



120
121
122
# File 'lib/rmxp_extractor/classnames.rb', line 120

def gray
  @gray
end

#greenObject

Returns the value of attribute green.



120
121
122
# File 'lib/rmxp_extractor/classnames.rb', line 120

def green
  @green
end

#redObject

Returns the value of attribute red.



120
121
122
# File 'lib/rmxp_extractor/classnames.rb', line 120

def red
  @red
end

Class Method Details

._load(data) ⇒ Object



126
127
128
129
130
# File 'lib/rmxp_extractor/classnames.rb', line 126

def self._load(data)
  obj = Tone.new
  obj.red, obj.green, obj.blue, obj.gray = *data.unpack("d4")
  obj
end

Instance Method Details

#_dump(limit) ⇒ Object



122
123
124
# File 'lib/rmxp_extractor/classnames.rb', line 122

def _dump(limit)
  [@red, @green, @blue, @gray].pack("d4")
end