mirror of
https://github.com/zeldaret/ss
synced 2026-05-29 16:44:44 -04:00
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>
This commit is contained in:
@@ -16,3 +16,9 @@ In order for vtable ordering to match, some classes had to be extracted to a new
|
||||
|
||||
S_StateMethod_c's destructors calls back into another destructors. sStateMethodIf_c follows the example of
|
||||
the other abstract interface classes and provides this dtor.
|
||||
|
||||
## operator== / != return BOOL instead of bool
|
||||
|
||||
We're observing a lot of word-to-bool casts in code after these
|
||||
operators are invoked, and while there are ways to force the conversion,
|
||||
this seems the most reasonable.
|
||||
|
||||
@@ -27,8 +27,8 @@ public:
|
||||
virtual bool isNull() const;
|
||||
virtual bool isEqual(const sStateIDIf_c &other) const;
|
||||
|
||||
virtual bool operator==(const sStateIDIf_c &other) const;
|
||||
virtual bool operator!=(const sStateIDIf_c &other) const;
|
||||
virtual BOOL operator==(const sStateIDIf_c &other) const;
|
||||
virtual BOOL operator!=(const sStateIDIf_c &other) const;
|
||||
|
||||
virtual bool isSameName(const char *name) const;
|
||||
virtual const char *name() const;
|
||||
|
||||
@@ -23,8 +23,8 @@ public:
|
||||
virtual bool isNull() const = 0; ///< Returns whether this is a null state.
|
||||
virtual bool isEqual(const sStateIDIf_c &other) const = 0; ///< Returns whether both states have the same number.
|
||||
|
||||
virtual bool operator==(const sStateIDIf_c &other) const = 0; ///< Overloaded equality operator, using ::isEqual.
|
||||
virtual bool operator!=(const sStateIDIf_c &other) const = 0; ///< Overloaded inequality operator, using ::isEqual.
|
||||
virtual BOOL operator==(const sStateIDIf_c &other) const = 0; ///< Overloaded equality operator, using ::isEqual.
|
||||
virtual BOOL operator!=(const sStateIDIf_c &other) const = 0; ///< Overloaded inequality operator, using ::isEqual.
|
||||
|
||||
virtual bool isSameName(const char *name) const = 0; ///< Returns whether this state ID is called @p name.
|
||||
virtual const char *name() const = 0; ///< Returns the name of this state ID.
|
||||
|
||||
@@ -35,6 +35,11 @@ public:
|
||||
virtual const sStateIDIf_c *getStateID() const { return mMethod.getStateID(); }
|
||||
virtual const sStateIDIf_c *getOldStateID() const { return mMethod.getOldStateID(); }
|
||||
|
||||
// SS addition
|
||||
bool isState(const sStateIDIf_c& other) {
|
||||
return *getStateID() == other;
|
||||
}
|
||||
|
||||
private:
|
||||
Check mCheck;
|
||||
Factory<T> mFactory;
|
||||
|
||||
Reference in New Issue
Block a user