mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 23:47:42 +00:00
atdna fixes
This commit is contained in:
@@ -14,7 +14,7 @@ logvisor::Module LogDNAFSM2("urde::DNAFSM2");
|
||||
template <class IDType>
|
||||
template <class Op>
|
||||
void FSM2<IDType>::Enumerate(typename Op::StreamT& s) {
|
||||
Do<Op>({"header"}, header, s);
|
||||
Do<Op>(athena::io::PropId{"header"}, header, s);
|
||||
if (header.magic != SBIG('FSM2')) {
|
||||
LogDNAFSM2.report(logvisor::Fatal, fmt("Invalid FSM2 magic '{}' expected 'FSM2'"), header.magic);
|
||||
return;
|
||||
@@ -23,11 +23,11 @@ void FSM2<IDType>::Enumerate(typename Op::StreamT& s) {
|
||||
if (header.version == 1) {
|
||||
if (!detail)
|
||||
detail.reset(new FSMV1);
|
||||
Do<Op>({"detail"}, static_cast<FSMV1&>(*detail), s);
|
||||
Do<Op>(athena::io::PropId{"detail"}, static_cast<FSMV1&>(*detail), s);
|
||||
} else if (header.version == 2) {
|
||||
if (!detail)
|
||||
detail.reset(new FSMV2);
|
||||
Do<Op>({"detail"}, static_cast<FSMV2&>(*detail), s);
|
||||
Do<Op>(athena::io::PropId{"detail"}, static_cast<FSMV2&>(*detail), s);
|
||||
} else {
|
||||
LogDNAFSM2.report(logvisor::Fatal, fmt("Invalid FSM2 version '{}'"), header.version);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user