Class: Bayonetta::EXPFile::Interpolation

Inherits:
LibBin::Structure
  • Object
show all
Defined in:
lib/bayonetta/exp.rb

Class Method Summary collapse

Class Method Details

.convert(input, output, input_big, output_big, parent, index, length = nil) ⇒ Object



557
558
559
560
561
562
563
564
565
566
567
568
569
570
# File 'lib/bayonetta/exp.rb', line 557

def self.convert(input, output, input_big, output_big, parent, index, length = nil)
  case parent.records[index].interpolation_type
  when 2
    Interpolation2::convert(input, output, input_big, output_big, parent, index, length)
  when 4
    Interpolation4::convert(input, output, input_big, output_big, parent, index, length)
  when 6
    Interpolation6::convert(input, output, input_big, output_big, parent, index, length)
  when -1
    nil
  else
    raise "Unknown Interpolation type: #{interpolation_type}, please report!"
  end
end

.load(input, input_big, parent, index, length = nil) ⇒ Object



572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/bayonetta/exp.rb', line 572

def self.load(input, input_big, parent, index, length = nil)
  case parent.records[index].interpolation_type
  when 2
    Interpolation2::load(input, input_big, parent, index, length)
  when 4
    Interpolation4::load(input, input_big, parent, index, length)
  when 6
    Interpolation6::load(input, input_big, parent, index, length)
  when -1
    nil
  else
    raise "Unknown Interpolation type: #{interpolation_type}, please report!"
  end
end