mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:07:42 +00:00
Work on CBallCamera
This commit is contained in:
@@ -117,6 +117,8 @@ public:
|
||||
TCastToPtr() = default;
|
||||
TCastToPtr(CEntity* p);
|
||||
TCastToPtr(CEntity& p);
|
||||
TCastToPtr<T>& operator=(CEntity& p);
|
||||
TCastToPtr<T>& operator=(CEntity* p);
|
||||
|
||||
''')
|
||||
|
||||
@@ -139,6 +141,8 @@ public:
|
||||
TCastToConstPtr() = default;
|
||||
TCastToConstPtr(const CEntity* p) : TCastToPtr<T>(const_cast<CEntity*>(p)) {}
|
||||
TCastToConstPtr(const CEntity& p) : TCastToPtr<T>(const_cast<CEntity&>(p)) {}
|
||||
TCastToConstPtr<T>& operator=(const CEntity& p) { TCastToPtr<T>::operator=(const_cast<CEntity&>(p)); return *this; }
|
||||
TCastToConstPtr<T>& operator=(const CEntity* p) { TCastToPtr<T>::operator=(const_cast<CEntity*>(p)); return *this; }
|
||||
const T* GetPtr() const { return TCastToPtr<T>::ptr; }
|
||||
operator const T*() const { return GetPtr(); }
|
||||
const T& operator*() const { return *GetPtr(); }
|
||||
@@ -169,6 +173,12 @@ TCastToPtr<T>::TCastToPtr(CEntity* p) { p->Accept(*this); }
|
||||
template <class T>
|
||||
TCastToPtr<T>::TCastToPtr(CEntity& p) { p.Accept(*this); }
|
||||
|
||||
template <class T>
|
||||
TCastToPtr<T>& TCastToPtr<T>::operator=(CEntity* p) { p->Accept(*this); return *this; }
|
||||
|
||||
template <class T>
|
||||
TCastToPtr<T>& TCastToPtr<T>::operator=(CEntity& p) { p.Accept(*this); return *this; }
|
||||
|
||||
''')
|
||||
|
||||
for tp in CENTITY_TYPES:
|
||||
|
||||
Reference in New Issue
Block a user