NerveStateBase decompilation

This commit is contained in:
shibbo 2020-10-27 07:44:47 -04:00
parent 7f28d37cfe
commit cef98f1871
4 changed files with 99 additions and 4 deletions

View file

@ -0,0 +1,21 @@
#pragma once
#include "al/nerve/NerveExecutor.h"
namespace al
{
class NerveStateBase : public NerveExecutor
{
public:
NerveStateBase(const char *);
virtual ~NerveStateBase();
virtual void init();
virtual void appear();
virtual void kill();
virtual bool update();
virtual void control();
bool mIsDead; // _10
};
};

View file

@ -1,11 +1,31 @@
#pragma once
#include "al/nerve/Nerve.h"
#include "al/nerve/NerveStateBase.h"
class NerveStateCtrl
namespace al
{
public:
NerveStateCtrl(int);
struct State
{
al::NerveStateBase* mStateBase; // _0
const al::Nerve* mNerve; // _8
const char* mName; // _10
};
void update();
class NerveStateCtrl
{
public:
NerveStateCtrl(int);
void addState(al::NerveStateBase *, const al::Nerve *, const char *);
void update();
bool isCurrentStateEnd() const;
int _0;
int _4;
State** mStates; // _8
int mCurrentState; // _10
int _14;
};
};

View file

@ -0,0 +1,48 @@
#include "al/nerve/NerveStateBase.h"
namespace al
{
NerveStateBase::NerveStateBase(const char *pName) : NerveExecutor(pName)
{
mIsDead = true;
}
NerveStateBase::~NerveStateBase()
{
delete this;
}
void NerveStateBase::init()
{
}
void NerveStateBase::appear()
{
mIsDead = false;
}
void NerveStateBase::kill()
{
mIsDead = true;
}
bool NerveStateBase::update()
{
updateNerve();
if (mIsDead)
{
return true;
}
control();
return mIsDead;
}
void NerveStateBase::control()
{
}
};

View file

@ -0,0 +1,6 @@
#include "al/nerve/NerveStateCtrl.h"
namespace al
{
};