Files
ss/src/s/s_StateID.cpp
T
robojumper 1180e1f486 m3d (#13)
* Initial M3d Pass
* `m_bmdl` and `m_bline` left

---------

Co-authored-by: elijah-thomas774 <elijahthomas774@gmail.com>
Co-authored-by: Elijah Thomas <42302100+elijah-thomas774@users.noreply.github.com>
2024-09-12 16:36:34 -04:00

57 lines
1.4 KiB
C++

#include <common.h>
#include <s/s_StateInterfaces.hpp>
#include <s/s_StateID.hpp>
#include <s/s_StateMethodUsr_FI.hpp>
#include <s/s_StateIDChk.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
sStateID_c::NumberMemo_c sStateID_c::sm_numberMemo;
sStateID_c sStateID::null(nullptr);
sStateID_c::sStateID_c(const char *name) {
mpName = name;
mNumber = (name != nullptr) ? sm_numberMemo.get() : 0;
}
sStateID_c::~sStateID_c() {}
bool sStateID_c::isNull() const {
return mNumber == 0;
}
bool sStateID_c::isEqual(const sStateIDIf_c &other) const {
return number() == other.number();
}
BOOL sStateID_c::operator==(const sStateIDIf_c &other) const {
return isEqual(other);
}
BOOL sStateID_c::operator!=(const sStateIDIf_c &other) const {
return !isEqual(other);
}
bool sStateID_c::isSameName(const char *name) const {
// Just return false, the full implementation is in sFStateID_c
return false;
}
const char *sStateID_c::name() const {
return mpName;
}
unsigned int sStateID_c::number() const {
return mNumber;
}
sStateFctIf_c::~sStateFctIf_c() {}
sStateIDChkIf_c::~sStateIDChkIf_c() {}
sStateIDChk_c::~sStateIDChk_c() {}
sStateIDIf_c::~sStateIDIf_c() {}
sStateIf_c::~sStateIf_c() {}
sStateMethodIf_c::~sStateMethodIf_c() {}
sStateMethodUsr_FI_c::~sStateMethodUsr_FI_c() {}
sStateMgrIf_c::~sStateMgrIf_c() {}