Class: Bayonetta::EXPFile::Entry

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



424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/bayonetta/exp.rb', line 424

def self.convert(input, output, input_big, output_big, parent, index, length = nil)
  entry_type = parent.records[index].entry_type
  entry = nil
  case entry_type
  when 1
    entry = Entry1::convert(input, output, input_big, output_big, parent, index, length)
  when 2
    entry = Entry2::convert(input, output, input_big, output_big, parent, index, length)
  when 3
    entry = Entry3::convert(input, output, input_big, output_big, parent, index, length)
  end
  entry
end

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



438
439
440
441
442
443
444
445
446
447
448
449
450
# File 'lib/bayonetta/exp.rb', line 438

def self.load(input, input_big, parent, index, length = nil)
  entry_type = parent.records[index].entry_type
  entry = nil
  case entry_type
  when 1
    entry = Entry1::load(input, input_big, parent, index, length)
  when 2
    entry = Entry2::load(input, input_big, parent, index, length)
  when 3
    entry = Entry3::load(input, input_big, parent, index, length)
  end
  entry
end