Class: Bayonetta::UByteList
- Inherits:
-
LibBin::Structure
- Object
- LibBin::Structure
- Bayonetta::UByteList
- Defined in:
- lib/bayonetta/wmb.rb
Class Method Summary collapse
Instance Method Summary collapse
- #__convert(input, output, input_big, output_big, parent = nil, index = nil) ⇒ Object
- #__dump(output, output_big, parent = nil, index = nil) ⇒ Object
- #__load(input, input_big, parent = nil, index = nil) ⇒ Object
-
#initialize ⇒ UByteList
constructor
A new instance of UByteList.
Constructor Details
#initialize ⇒ UByteList
Returns a new instance of UByteList.
48 49 50 |
# File 'lib/bayonetta/wmb.rb', line 48 def initialize @data = 0 end |
Class Method Details
.inherited(subclass) ⇒ Object
20 21 22 |
# File 'lib/bayonetta/wmb.rb', line 20 def self.inherited(subclass) subclass.instance_variable_set(:@fields, @fields.dup) end |
.is_bayo2?(parent) ⇒ Boolean
11 12 13 14 15 16 17 18 |
# File 'lib/bayonetta/wmb.rb', line 11 def self.is_bayo2?(parent) if parent.__parent.respond_to?(:is_bayo2?) return parent.__parent.is_bayo2? elsif parent.__parent.__parent.respond_to?(:is_bayo2?) return parent.__parent.__parent.is_bayo2? end raise "Cannot determine if Bayo2 or not!" end |
Instance Method Details
#__convert(input, output, input_big, output_big, parent = nil, index = nil) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/bayonetta/wmb.rb', line 24 def __convert(input, output, input_big, output_big, parent = nil, index = nil) __set_convert_state(input, output, input_big && self.class.is_bayo2?(parent) ? false : input_big, output_big && self.class.is_bayo2?(parent) ? false : output_big, parent, index) __convert_fields __unset_convert_state self end |
#__dump(output, output_big, parent = nil, index = nil) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/bayonetta/wmb.rb', line 41 def __dump(output, output_big, parent = nil, index = nil) __set_dump_state(output, output_big && self.class.is_bayo2?(parent) ? false : output_big, parent, index) __dump_fields __unset_dump_state self end |
#__load(input, input_big, parent = nil, index = nil) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/bayonetta/wmb.rb', line 34 def __load(input, input_big, parent = nil, index = nil) __set_load_state(input, input_big && self.class.is_bayo2?(parent) ? false : input_big, parent, index) __load_fields __unset_load_state self end |