Class: Bayonetta::EXPFile2
- Inherits:
-
LibBin::Structure
- Object
- LibBin::Structure
- Bayonetta::EXPFile2
show all
- Defined in:
- lib/bayonetta/exp.rb
Defined Under Namespace
Classes: EXPFileHeader, Entry, Interpolation, InterpolationEntry, Operation, Point, Record
Instance Method Summary
collapse
Instance Method Details
#apply(tracks, table) ⇒ Object
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
# File 'lib/bayonetta/exp.rb', line 238
def apply(tracks, table)
rad_to_deg = 180.0 / Math::PI
deg_to_rad = Math::PI / 180.0
tracks.each { |tr|
tr[0] *= 10.0
tr[1] *= 10.0
tr[2] *= 10.0
tr[3] *= rad_to_deg
tr[4] *= rad_to_deg
tr[5] *= rad_to_deg
}
@records.each_with_index { |r, i|
bone_index = table[r.bone_index]
next unless bone_index
animation_track = r.animation_track
if @entries[i]
value = @entries[i].get_value(tracks, table, interpolation_entries)
end
tracks[bone_index][animation_track] = value
}
tracks.each { |tr|
tr[0] *= 0.1
tr[1] *= 0.1
tr[2] *= 0.1
tr[3] *= deg_to_rad
tr[4] *= deg_to_rad
tr[5] *= deg_to_rad
}
end
|
#dump(output_name, output_big = false) ⇒ Object
276
277
278
279
280
281
282
283
284
285
286
287
288
289
|
# File 'lib/bayonetta/exp.rb', line 276
def dump(output_name, output_big = false)
if output_name.respond_to?(:write) && output_name.respond_to?(:seek)
output = output_name
else
output = File.open(output_name, "wb")
end
output.rewind
__set_dump_state(output, output_big, nil, nil)
__dump_fields
__unset_dump_state
output.close unless output_name.respond_to?(:write) && output_name.respond_to?(:seek)
self
end
|
#recompute_layout ⇒ Object
268
269
270
|
# File 'lib/bayonetta/exp.rb', line 268
def recompute_layout
self
end
|
#was_big? ⇒ Boolean
272
273
274
|
# File 'lib/bayonetta/exp.rb', line 272
def was_big?
@__was_big
end
|