diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index a112c0d9..a784916d 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -8,7 +8,6 @@ ], "cStandard": "c99", "cppStandard": "c++98", - "defines": ["__MWERKS__=1"], "intelliSenseMode": "linux-clang-x86", "compilerPath": "" } diff --git a/configure.py b/configure.py index 07181238..df29650e 100755 --- a/configure.py +++ b/configure.py @@ -26,6 +26,7 @@ LIBS = [ "lib": "TRK_MINNOW_DOLPHIN", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ ["MetroTRK/mslsupp", True], ], @@ -34,6 +35,7 @@ LIBS = [ "lib": "MetroidPrimeCW", "cflags": "$cflags_retro", "mwcc_version": "1.3.2", + "host": True, "objects": [ ["MetroidPrime/main", False], "MetroidPrime/IRenderer", @@ -86,7 +88,7 @@ LIBS = [ "MetroidPrime/CPauseScreen", "MetroidPrime/Tweaks/CTweakGui", "MetroidPrime/ScriptObjects/CScriptActor", - "MetroidPrime/ScriptObjects/CScriptTrigger", + ["MetroidPrime/ScriptObjects/CScriptTrigger", False], "MetroidPrime/ScriptObjects/CScriptWaypoint", "MetroidPrime/Enemies/CPatterned", "MetroidPrime/ScriptObjects/CScriptDoor", @@ -231,7 +233,7 @@ LIBS = [ "MetroidPrime/Factories/CScannableObjectInfo", "MetroidPrime/Enemies/CMetroid", "MetroidPrime/Player/CScanDisplay", - "MetroidPrime/ScriptObjects/CScriptSteam", + ["MetroidPrime/ScriptObjects/CScriptSteam", False], ["MetroidPrime/ScriptObjects/CScriptRipple", False], "MetroidPrime/CBoneTracking", "MetroidPrime/Player/CFaceplateDecoration", @@ -395,6 +397,7 @@ LIBS = [ "lib": "WorldFormatCW", "mwcc_version": "1.3.2", "cflags": "$cflags_retro", + "host": True, "objects": [ "WorldFormat/CAreaOctTree_Tests", ["WorldFormat/CCollisionSurface", True], @@ -414,6 +417,7 @@ LIBS = [ "lib": "WeaponsCW", "mwcc_version": "1.3.2", "cflags": "$cflags_retro", + "host": True, "objects": [ "Weapons/CProjectileWeapon", "Weapons/CProjectileWeaponDataFactory", @@ -429,12 +433,14 @@ LIBS = [ "lib": "MetaRenderCW", "mwcc_version": "1.3.2", "cflags": "$cflags_retro", + "host": True, "objects": ["MetaRender/CCubeRenderer"], }, { "lib": "GuiSysCW", "mwcc_version": "1.3.2", "cflags": "$cflags_retro", + "host": True, "objects": [ "GuiSys/CAuiMain", "GuiSys/CAuiMeter", @@ -461,6 +467,7 @@ LIBS = [ "lib": "CollisionCW", "mwcc_version": "1.3.2", "cflags": "$cflags_retro", + "host": True, "objects": [ "Collision/CCollidableAABox", "Collision/CCollidableCollisionSurface", @@ -479,6 +486,7 @@ LIBS = [ "lib": "Kyoto_CW1", "mwcc_version": "1.3.2", "cflags": "$cflags_retro", + "host": True, "objects": [ "Kyoto/Basics/CBasics", ["Kyoto/Basics/CStopwatch", True], @@ -632,6 +640,7 @@ LIBS = [ "lib": "zlib", "mwcc_version": "1.3.2", "cflags": "$cflags_runtime", + "host": True, "objects": [ ["Kyoto/zlib/adler32", True], ["Kyoto/zlib/infblock", True], @@ -647,6 +656,7 @@ LIBS = [ "lib": "Kyoto_CW2", "mwcc_version": "1.3.2", "cflags": "$cflags_retro", + "host": True, "objects": [ "Kyoto/CARAMManager", "Kyoto/Math/CFrustumPlanes", @@ -708,6 +718,7 @@ LIBS = [ "lib": "ai", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/ai", False], ], @@ -716,6 +727,7 @@ LIBS = [ "lib": "ar", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ "Dolphin/ar/ar", "Dolphin/ar/arq", @@ -725,6 +737,7 @@ LIBS = [ "lib": "base", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/PPCArch", True], ], @@ -733,6 +746,7 @@ LIBS = [ "lib": "db", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/db", True], ], @@ -741,6 +755,7 @@ LIBS = [ "lib": "dsp", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/dsp/dsp", False], ["Dolphin/dsp/dsp_debug", True], @@ -751,6 +766,7 @@ LIBS = [ "lib": "dvd", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ "Dolphin/dvd/dvdlow", "Dolphin/dvd/dvdfs", @@ -766,6 +782,7 @@ LIBS = [ "lib": "gx", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ "Dolphin/gx/GXInit", "Dolphin/gx/GXFifo", @@ -788,6 +805,7 @@ LIBS = [ "lib": "mtx", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ "Dolphin/mtx/mtx", "Dolphin/mtx/mtx44vec", @@ -800,6 +818,7 @@ LIBS = [ "lib": "os", "mwcc_version": "1.2.5e", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/os/__start", True], "Dolphin/os/OS", @@ -829,6 +848,7 @@ LIBS = [ "lib": "pad", "mwcc_version": "1.2.5e", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/pad/PadClamp", True], ["Dolphin/pad/pad", False], @@ -838,12 +858,16 @@ LIBS = [ "lib": "vi", "mwcc_version": "1.2.5", "cflags": "$cflags_base", - "objects": ["Dolphin/vi"], + "host": False, + "objects": [ + "Dolphin/vi" + ], }, { "lib": "MSL_C.PPCEABI.bare.H", "mwcc_version": "1.3.2", "cflags": "$cflags_runtime", + "host": False, "objects": [ ["Runtime/__mem", True], ["Runtime/__va_arg", True], @@ -915,6 +939,7 @@ LIBS = [ "lib": "musyx", "mwcc_version": "1.3.2", "cflags": "$cflags_musyx", + "host": False, "objects": [ "musyx/seq", "musyx/synth", @@ -953,6 +978,7 @@ LIBS = [ "lib": "dtk", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/dtk", True], ], @@ -961,6 +987,7 @@ LIBS = [ "lib": "card", "mwcc_version": "1.2.5e", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/card/CARDBios", False], ["Dolphin/card/CARDUnlock", True], @@ -984,6 +1011,7 @@ LIBS = [ "lib": "si", "mwcc_version": "1.2.5e", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/si/SIBios", False], ["Dolphin/si/SISamplingRate", True], @@ -993,6 +1021,7 @@ LIBS = [ "lib": "exi", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ "Dolphin/exi/EXIBios", "Dolphin/exi/EXIUart", @@ -1002,6 +1031,7 @@ LIBS = [ "lib": "thp", "mwcc_version": "1.2.5", "cflags": "$cflags_base", + "host": False, "objects": [ "Dolphin/thp/THPDec", "Dolphin/thp/THPAudio", @@ -1011,6 +1041,7 @@ LIBS = [ "lib": "gba", "mwcc_version": "1.2.5e", "cflags": "$cflags_base", + "host": False, "objects": [ ["Dolphin/GBA/GBA", True], ["Dolphin/GBA/GBAGetProcessStatus", False], @@ -1092,6 +1123,9 @@ else: n.variable("wine", "wine ") n.variable("exe", "") n.newline() +n.variable("host_cflags", "-I include/ -Wno-trigraphs") +n.variable("host_cppflags", + "-std=c++98 -I include/ -fno-exceptions -fno-rtti -Wno-trigraphs") ### # Rules @@ -1133,17 +1167,17 @@ else: n.rule(name="ar", command="$devkitppc/bin/powerpc-eabi-ar crs $out $in", description="AR $out") n.newline() - -n.rule(name="host_cc", command="clang -I include/ -Wno-trigraphs -o $out $in", - description="host_cc $out") -n.rule(name="host_cpp", command="clang++ -std=c++03 -I include/ -Wno-trigraphs -o $out $in", - description="host_c++ $out") +n.rule(name="host_cc", command="clang $host_cflags -c -o $out $in", + description="host_cc $out") +n.rule(name="host_cpp", command="clang++ $host_cppflags -c -o $out $in", + description="host_c++ $out") n.newline() ### # Build ### all_source_files = [] +all_host_source_files = [] for lib in LIBS: inputs = [] if "lib" in lib: @@ -1152,7 +1186,7 @@ for lib in LIBS: else: n.comment("Loose files") for object in lib["objects"]: - completed = False + completed = None add_to_all = True if type(object) is list: if len(object) > 2: @@ -1167,6 +1201,8 @@ for lib in LIBS: elif os.path.exists(os.path.join("src", f"{object}.c")): c_file = os.path.join("src", f"{object}.c") if c_file is not None: + if completed is None: + print(f"Mark as incomplete: {c_file}") rule = "mwcc" if mwcc_version == "1.2.5e": mwcc_version = "1.2.5" @@ -1178,11 +1214,14 @@ for lib in LIBS: "basedir": os.path.dirname(f"$builddir/src/{object}"), "basefile": f"$builddir/src/{object}" }) - n.build(f"$builddir/host/{object}.o", "host_cc" if c_file.endswith(".c") else "host_cpp", c_file, - variables={ - "basedir": os.path.dirname(f"$builddir/src/{object}"), - "basefile": f"$builddir/src/{object}" - }) + if lib["host"]: + n.build(f"$builddir/host/{object}.o", "host_cc" if c_file.endswith(".c") else "host_cpp", c_file, + variables={ + "basedir": os.path.dirname(f"$builddir/src/{object}"), + "basefile": f"$builddir/src/{object}" + }) + if add_to_all: + all_host_source_files.append(f"$builddir/host/{object}.o") if add_to_all: all_source_files.append(f"$builddir/src/{object}.o") if os.path.exists(os.path.join("asm", f"{object}.s")): @@ -1232,7 +1271,7 @@ n.newline() # Helper rule for building all source files, with a host compiler ### n.comment("Adds a command for building all source files with a host compiler") -n.build("all_source_host", "phony", [s.replace("/src/", "/host/") for s in all_source_files]) +n.build("all_source_host", "phony", all_host_source_files) n.newline() ### diff --git a/include/Kyoto/Alloc/CMemory.hpp b/include/Kyoto/Alloc/CMemory.hpp index 0053fcf1..59ae5678 100644 --- a/include/Kyoto/Alloc/CMemory.hpp +++ b/include/Kyoto/Alloc/CMemory.hpp @@ -1,9 +1,9 @@ #ifndef _CMEMORY #define _CMEMORY -#include "types.h" -#include "Kyoto/Alloc/IAllocator.hpp" #include "Kyoto/Alloc/CCallStack.hpp" +#include "Kyoto/Alloc/IAllocator.hpp" +#include "types.h" class COsContext; class CMemory { @@ -16,7 +16,8 @@ public: static void SetAllocator(COsContext& ctx, IAllocator& allocator); static IAllocator* GetAllocator(); static void* Alloc(size_t len, IAllocator::EHint hint = IAllocator::kHI_None, - IAllocator::EScope scope = IAllocator::kSC_Unk1, IAllocator::EType type = IAllocator::kTP_Heap, + IAllocator::EScope scope = IAllocator::kSC_Unk1, + IAllocator::EType type = IAllocator::kTP_Heap, const CCallStack& callstack = CCallStack(-1, "??(??)")); static void Free(const void* ptr); static void SetOutOfMemoryCallback(IAllocator::FOutOfMemoryCb callback, const void* context); @@ -26,13 +27,25 @@ public: void* operator new(size_t sz, const char*, const char*); void* operator new[](size_t sz, const char*, const char*); // TODO remove +#ifdef __MWERKS__ inline void* operator new(size_t sz) { return operator new(sz, "??(??)", nullptr); } inline void* operator new[](size_t sz) { return operator new[](sz, "??(??)", nullptr); } +#else +__attribute__((weak)) void* operator new(size_t sz) { return operator new(sz, "??(??)", nullptr); } +__attribute__((weak)) void* operator new[](size_t sz) { + return operator new[](sz, "??(??)", nullptr); +} +#endif // placement new inline void* operator new(size_t n, void* ptr) { return ptr; }; +#ifdef __MWERKS__ inline void operator delete(void* ptr) { CMemory::Free(ptr); } inline void operator delete[](void* ptr) { CMemory::Free(ptr); } +#else +__attribute__((weak)) void operator delete(void* ptr) { CMemory::Free(ptr); } +__attribute__((weak)) void operator delete[](void* ptr) { CMemory::Free(ptr); } +#endif #define NEW new ("??(??)", nullptr) diff --git a/include/Kyoto/CPakFile.hpp b/include/Kyoto/CPakFile.hpp index 5595fb14..f125113e 100644 --- a/include/Kyoto/CPakFile.hpp +++ b/include/Kyoto/CPakFile.hpp @@ -10,6 +10,8 @@ #include "Kyoto/CResLoader.hpp" #include "Kyoto/IObjectStore.hpp" +class IDvdRequest; + class CPakFile : CDvdFile { public: bool IsWorldPak() const { return x28_26_worldPak; } @@ -23,8 +25,8 @@ private: bool x28_25_aramFile : 1; bool x28_26_worldPak : 1; bool x28_27_stashedInARAM : 1; - int x2c_asyncLoadPhase; // EAsyncPhase - rstl::auto_ptr< void > x30_dvdReq; // IDvdRequest + int x2c_asyncLoadPhase; // EAsyncPhase + rstl::auto_ptr< IDvdRequest > x30_dvdReq; rstl::vector< uchar > x38_headerData; uint x48_resTableOffset; uint x4c_resTableCount; diff --git a/include/Kyoto/Math/CMath.hpp b/include/Kyoto/Math/CMath.hpp index 8d103011..0313ff2e 100644 --- a/include/Kyoto/Math/CMath.hpp +++ b/include/Kyoto/Math/CMath.hpp @@ -21,6 +21,7 @@ public: static float SqrtF(float v); static inline float Limit(float v, float h) { return fabs(v) > h ? h * Sign(v) : v; } static inline float Sign(float v) { return FastFSel(v, 1.f, -1.f); } +#ifdef __MWERKS__ static inline float FastFSel(register float v, register float h, register float l) { register float out; asm { @@ -28,6 +29,11 @@ public: } return out; } +#else + static inline float FastFSel(float v, float h, float l) { + return v >= 0.f ? h : l; + } +#endif static inline float AbsF(float v) { return fabs(v); } static inline double AbsD(double v) { return fabs(v); } static inline int AbsI(int v) { return abs(v); } diff --git a/include/Kyoto/Streams/CInputStream.hpp b/include/Kyoto/Streams/CInputStream.hpp index 697b6804..719e2007 100644 --- a/include/Kyoto/Streams/CInputStream.hpp +++ b/include/Kyoto/Streams/CInputStream.hpp @@ -3,6 +3,8 @@ #include "types.h" +#include "stddef.h" + class CInputStream; template < typename T > struct TType {}; diff --git a/include/Kyoto/Streams/COutputStream.hpp b/include/Kyoto/Streams/COutputStream.hpp index 2b516be9..a5a8de41 100644 --- a/include/Kyoto/Streams/COutputStream.hpp +++ b/include/Kyoto/Streams/COutputStream.hpp @@ -3,6 +3,7 @@ #include "types.h" +#include "stddef.h" class COutputStream; diff --git a/include/Kyoto/TAverage.hpp b/include/Kyoto/TAverage.hpp index 8be307bf..a1969673 100644 --- a/include/Kyoto/TAverage.hpp +++ b/include/Kyoto/TAverage.hpp @@ -6,36 +6,37 @@ #include "rstl/optional_object.hpp" #include "rstl/vector.hpp" +template < typename T > +T GetAverageValue(const T* ptr, int count); // TODO + template < typename T > class TAverage : rstl::vector< T > { public: TAverage() {} TAverage(int capacity, const T& value); + void AddValue(const T& value); rstl::optional_object< T > GetAverage() const { - if (empty()) { + if (this->empty()) { return rstl::optional_object_null(); } else { - return GetAverageValue(data(), size()); + return GetAverageValue(this->data(), this->size()); } } }; template < typename T > TAverage< T >::TAverage(int capacity, const T& value) { - resize(capacity, value); + this->resize(capacity, value); } template < typename T > void TAverage< T >::AddValue(const T& value) { - if (size() == capacity()) { + if (this->size() == this->capacity()) { // TODO ? - x4_count -= 1; + this->x4_count -= 1; } - insert(begin(), value); + this->insert(this->begin(), value); } -template < typename T > -T GetAverageValue(const T* ptr, int count); // TODO - #endif // _TAVERAGE diff --git a/include/Kyoto/TReservedAverage.hpp b/include/Kyoto/TReservedAverage.hpp index 39771ff9..cfb2d1c7 100644 --- a/include/Kyoto/TReservedAverage.hpp +++ b/include/Kyoto/TReservedAverage.hpp @@ -16,11 +16,11 @@ public: // resize(value, N); TODO } void AddValue(const T& value) { - push_back(value); - for (int i = size() - 1; i > 0; --i) { - operator[](i) = operator[](i - 1); + this->push_back(value); + for (int i = this->size() - 1; i > 0; --i) { + this->operator[](i) = this->operator[](i - 1); } - operator[](0) = value; + this->operator[](0) = value; } rstl::optional_object< T > GetAverage() const; }; diff --git a/include/MetroidPrime/Player/CPlayerCameraBob.hpp b/include/MetroidPrime/Player/CPlayerCameraBob.hpp index cb8c4fc1..4ff35bab 100644 --- a/include/MetroidPrime/Player/CPlayerCameraBob.hpp +++ b/include/MetroidPrime/Player/CPlayerCameraBob.hpp @@ -51,8 +51,9 @@ public: CTransform4f CalculateCameraBobTransformation() const; static void ReadTweaks(CInputStream& in); - static const CVector2f& GetCameraBobExtent() { return CVector2f(kCameraBobExtentX, kCameraBobExtentY); } - static float GetCameraBobPeriod() { return kCameraBobPeriod; } + // static float GetCameraBobExtentX() { return kCameraBobExtentX; } + // static float GetCameraBobExtentY() { return kCameraBobExtentY; } + // static float GetCameraBobPeriod() { return kCameraBobPeriod; } static float GetOrbitBobScale() { return kOrbitBobScale; } static float GetMaxOrbitBobScale() { return kMaxOrbitBobScale; } static float GetSlowSpeedPeriodScale() { return kSlowSpeedPeriodScale; } @@ -85,6 +86,7 @@ private: float x100_wanderMagnitude; float x104_targetWanderMagnitude; +public: static float kCameraBobExtentX; static float kCameraBobExtentY; static float kCameraBobPeriod; diff --git a/include/rstl/map.hpp b/include/rstl/map.hpp index ed4723a8..c2617d82 100644 --- a/include/rstl/map.hpp +++ b/include/rstl/map.hpp @@ -17,7 +17,6 @@ private: typedef red_black_tree< K, value_type, 1, select1st< value_type >, Cmp, Alloc > rep_type; public: - typedef pair< K, V > value_type; // typedef typename rep_type::iterator iterator; typedef typename rep_type::const_iterator const_iterator; diff --git a/include/rstl/rc_ptr.hpp b/include/rstl/rc_ptr.hpp index 09a8549a..1ffce123 100644 --- a/include/rstl/rc_ptr.hpp +++ b/include/rstl/rc_ptr.hpp @@ -47,7 +47,7 @@ void rc_ptr< T >::ReleaseData() { template < typename T > class ncrc_ptr : public rc_ptr< T > { public: - ncrc_ptr(T* ptr) : rc_ptr(ptr) {} + ncrc_ptr(T* ptr) : rc_ptr< T >(ptr) {} }; } // namespace rstl diff --git a/include/rstl/vector.hpp b/include/rstl/vector.hpp index f0c70cbd..4544c7de 100644 --- a/include/rstl/vector.hpp +++ b/include/rstl/vector.hpp @@ -144,7 +144,7 @@ void vector< T, Alloc >::reserve(int newSize) { if (newSize <= x8_capacity) { return; } - T* newData = x0_allocator.allocate2< T >(newSize); + T* newData = x0_allocator.template allocate2< T >(newSize); uninitialized_copy(begin(), end(), newData); destroy(xc_items, xc_items + x4_count); x0_allocator.deallocate(xc_items); @@ -154,7 +154,7 @@ void vector< T, Alloc >::reserve(int newSize) { template < typename T, typename Alloc > typename vector< T, Alloc >::iterator vector< T, Alloc >::insert(iterator it, const T& value) { - iterator::difference_type diff = it - begin(); // distance(begin(), it); + typename iterator::difference_type diff = it - begin(); // distance(begin(), it); const_counting_iterator< T > in(&value, 0); insert_into(it, 1, in); return begin() + diff; diff --git a/src/Kyoto/Math/CVector3f.cpp b/src/Kyoto/Math/CVector3f.cpp index 408b30c4..7189ef38 100644 --- a/src/Kyoto/Math/CVector3f.cpp +++ b/src/Kyoto/Math/CVector3f.cpp @@ -7,6 +7,11 @@ #include "Kyoto/Streams/COutputStream.hpp" #include "types.h" +#ifndef __MWERKS__ +// TODO +#define __HI(x) (*(int*)&x) +#endif + CVector3f CVector3f::sZeroVector(0.f, 0.f, 0.f); CVector3f CVector3f::sUpVector(0.f, 0.f, 1.f); CVector3f CVector3f::sDownVector(0.f, 0.f, -1.f); @@ -26,8 +31,8 @@ void CVector3f::PutTo(COutputStream& out) const { CVector3f CVector3f::Slerp(const CVector3f& a, const CVector3f& b, const CRelAngle& angle) { CVector3f ab = CVector3f::Cross(a, b); CVector3f vec = CVector3f::Cross(ab.AsNormalized(), a); - float sinAngle = sin(angle.AsRadians()); - float cosAngle = cos(angle.AsRadians()); + float sinAngle = sine(angle); + float cosAngle = cosine(angle); return cosAngle * a + vec * sinAngle; } @@ -79,16 +84,16 @@ bool CVector3f::IsMagnitudeSafe() const { } bool CVector3f::CanBeNormalized() const { - int x = *(int*)&mX; - int y = *(int*)&mY; - int z = *(int*)&mZ; + int x = __HI(mX); + int y = __HI(mY); + int z = __HI(mZ); if ((x & 0x7f800000) == 0x7f800000 || (y & 0x7f800000) == 0x7f800000 || (z & 0x7f800000) == 0x7f800000) { return false; } - if ((float)fabs(mX) < FLT_EPSILON && (float)fabs(mY) < FLT_EPSILON && - (float)fabs(mZ) < FLT_EPSILON) { + if (CMath::AbsF(mX) < FLT_EPSILON && CMath::AbsF(mY) < FLT_EPSILON && + CMath::AbsF(mZ) < FLT_EPSILON) { return false; } @@ -113,6 +118,6 @@ float CVector3f::GetAngleDiff(const CVector3f& a, const CVector3f& b) { } bool CVector3f::IsEqu(const CVector3f& vec, float epsilon) const { - return (float)fabs(mX - vec.mX) <= epsilon && (float)fabs(mY - vec.mY) <= epsilon && - (float)fabs(mZ - vec.mZ) <= epsilon; + return CMath::AbsF(mX - vec.mX) <= epsilon && CMath::AbsF(mY - vec.mY) <= epsilon && + CMath::AbsF(mZ - vec.mZ) <= epsilon; } diff --git a/src/Kyoto/Streams/CInputStream.cpp b/src/Kyoto/Streams/CInputStream.cpp index 969619d7..373f6b74 100644 --- a/src/Kyoto/Streams/CInputStream.cpp +++ b/src/Kyoto/Streams/CInputStream.cpp @@ -2,8 +2,8 @@ #include "string.h" -#include "Kyoto/Streams/StreamSupport.hpp" #include "Kyoto/Alloc/CMemory.hpp" +#include "Kyoto/Streams/StreamSupport.hpp" CInputStream::CInputStream(int len) : x4_blockOffset(0) diff --git a/src/MetroidPrime/CGBASupport.cpp b/src/MetroidPrime/CGBASupport.cpp index aecb3bd6..761b8b14 100644 --- a/src/MetroidPrime/CGBASupport.cpp +++ b/src/MetroidPrime/CGBASupport.cpp @@ -12,7 +12,7 @@ void joyboot_callback(s32 chan, s32 ret) {} const uint MAGIC = 0x414d5445; #endif -static CGBASupport* g_GBA; +CGBASupport* g_GBA; inline bool GetFontEncoding() { return OSGetFontEncode() == 1; } @@ -87,16 +87,16 @@ bool CGBASupport::IsReady() { return CheckReadyStatus(); } void CGBASupport::Update(float dt) { switch (x34_phase) { - case kP_LoadClientPad: + case kP_LoadClientPad: { CheckReadyStatus(); break; - - case kP_StartProbeTimeout: + } + case kP_StartProbeTimeout: { x38_timeout = 4.f; x34_phase = kP_PollProbe; // [[fallthrough]]; - - case kP_PollProbe: + } + case kP_PollProbe: { int channel = 1; do { uint result = SIProbe(channel); @@ -114,14 +114,14 @@ void CGBASupport::Update(float dt) { x34_phase = kP_Failed; } break; - - case kP_StartJoyBusBoot: + } + case kP_StartJoyBusBoot: { x34_phase = kP_PollJoyBusBoot; GBAJoyBootAsync(x40_siChan, x40_siChan << 1, 2, x2c_buffer.get(), x0_file.Length(), &x3c_status, &joyboot_callback); break; - - case kP_PollJoyBusBoot: + } + case kP_PollJoyBusBoot: { int status = GBAGetProcessStatus(x40_siChan, &x3c_status); if (status != GBA_BUSY) { if (GBAGetStatus(x40_siChan, &x3c_status) == GBA_NOT_READY) { @@ -132,7 +132,8 @@ void CGBASupport::Update(float dt) { } } break; - case kP_DataTransfer: + } + case kP_DataTransfer: { if (PollResponse()) { x34_phase = kP_Complete; break; @@ -141,6 +142,8 @@ void CGBASupport::Update(float dt) { if (x38_timeout == 0.f) x34_phase = kP_Failed; break; + } + case kP_Standby: case kP_Complete: case kP_Failed: break; @@ -181,7 +184,7 @@ bool CGBASupport::PollResponse() { if (gbaStatus != 0x28) { return false; } - + #if VERSION >= 2 const uint targetMagic = GetFontEncoding() ? 0x414D544A : 0x414D5445; #endif @@ -229,25 +232,27 @@ bool CGBASupport::PollResponse() { } while ((GBAGetStatus(x40_siChan, &gbaStatus) == GBA_NOT_READY || (gbaStatus & 0x8) == 0) || (GBAGetStatus(x40_siChan, &gbaStatus) != GBA_READY || gbaStatus != 0x38)); - uint read; - uchar fusionStatus[4]; - if (GBARead(x40_siChan, reinterpret_cast< uchar* >(&read), &gbaStatus) != GBA_READY) { - return false; - } - fusionStatus[0] = read >> 24; - fusionStatus[1] = read >> 16; - fusionStatus[2] = read >> 8; - fusionStatus[3] = read; - if (fusionStatus[3] != CalculateFusionJBusChecksum(fusionStatus, 3)) { - return false; - } + { + uint read; + uchar fusionStatus[4]; + if (GBARead(x40_siChan, reinterpret_cast< uchar* >(&read), &gbaStatus) != GBA_READY) { + return false; + } + fusionStatus[0] = read >> 24; + fusionStatus[1] = read >> 16; + fusionStatus[2] = read >> 8; + fusionStatus[3] = read; + if (fusionStatus[3] != CalculateFusionJBusChecksum(fusionStatus, 3)) { + return false; + } - x44_fusionLinked = (fusionStatus[2] & 0x2) == 0; - bool fusionBeat = false; - if (x44_fusionLinked != false && (fusionStatus[2] & 0x1) > 0) { - fusionBeat = true; + x44_fusionLinked = (fusionStatus[2] & 0x2) == 0; + bool fusionBeat = false; + if (x44_fusionLinked != false && (fusionStatus[2] & 0x1) > 0) { + fusionBeat = true; + } + x45_fusionBeat = fusionBeat; } - x45_fusionBeat = fusionBeat; end: return true; diff --git a/src/MetroidPrime/Player/CPlayerGun.cpp b/src/MetroidPrime/Player/CPlayerGun.cpp index 182498fa..4ff81cae 100644 --- a/src/MetroidPrime/Player/CPlayerGun.cpp +++ b/src/MetroidPrime/Player/CPlayerGun.cpp @@ -215,8 +215,8 @@ CPlayerGun::CPlayerGun(TUniqueId playerId) , x538_playerId(playerId) , x53a_powerBomb(kInvalidUniqueId) , x53c_lightId(kInvalidUniqueId) -, x550_camBob(CPlayerCameraBob::kCBT_One, CPlayerCameraBob::GetCameraBobPeriod(), - CPlayerCameraBob::GetCameraBobExtent()) +, x550_camBob(CPlayerCameraBob::kCBT_One, CPlayerCameraBob::kCameraBobPeriod, + CVector2f(CPlayerCameraBob::kCameraBobExtentX, CPlayerCameraBob::kCameraBobExtentY)) , x658_(1) , x65c_(0.f) , x660_(0.f) @@ -311,24 +311,26 @@ CPlayerGun::~CPlayerGun() {} void CPlayerGun::AddToRenderer(const CFrustumPlanes& frustum, const CStateManager&) const { rstl::optional_object< CModelData >& model = x72c_currentBeam->SolidModelData(); - if (model) + if (model) { model->RenderParticles(frustum); + } } void CPlayerGun::PreRender(CStateManager& mgr, const CFrustumPlanes& frustum, const CVector3f& camPos) { const CPlayerState& playerState = *mgr.GetPlayerState(); - if (playerState.GetCurrentVisor() == CPlayerState::kPV_Scan) + if (playerState.GetCurrentVisor() == CPlayerState::kPV_Scan) { return; + } CPlayerState::EPlayerVisor activeVisor = playerState.GetActiveVisor(mgr); switch (activeVisor) { - case CPlayerState::kPV_Thermal: + case CPlayerState::kPV_Thermal: { float rgb = CMath::Clamp(0.6f, 0.5f * x380_shotSmokeTimer + 0.6f - x378_shotSmokeStartTimer, 1.f); x0_lights.BuildConstantAmbientLighting(CColor(rgb, rgb, rgb, 1.f)); break; - + } case CPlayerState::kPV_Combat: { CAABox aabb = x72c_currentBeam->GetBounds(CTransform4f::Translate(camPos) * x4a8_gunWorldXf); if (mgr.GetNextAreaId() != kInvalidAreaId) { @@ -351,15 +353,18 @@ void CPlayerGun::PreRender(CStateManager& mgr, const CFrustumPlanes& frustum, break; } - if (x740_grappleArm->GetActive()) + if (x740_grappleArm->GetActive()) { x740_grappleArm->PreRender(mgr, frustum, camPos); + } if (x678_morph.GetGunState() != CGunMorph::kGS_OutWipeDone || - activeVisor == CPlayerState::kPV_XRay) + activeVisor == CPlayerState::kPV_XRay) { x6e0_rightHandModel.AnimationData()->PreRender(); + } - if (x833_28_phazonBeamActive) + if (x833_28_phazonBeamActive) { gpRender->AllocatePhazonSuitMaskTexture(); + } } void CPlayerGun::TouchModel(const CStateManager&) const {} diff --git a/src/MetroidPrime/ScriptObjects/CScriptAreaAttributes.cpp b/src/MetroidPrime/ScriptObjects/CScriptAreaAttributes.cpp index efeea676..2572436d 100644 --- a/src/MetroidPrime/ScriptObjects/CScriptAreaAttributes.cpp +++ b/src/MetroidPrime/ScriptObjects/CScriptAreaAttributes.cpp @@ -18,7 +18,7 @@ CScriptAreaAttributes::CScriptAreaAttributes(TUniqueId uid, const CEntityInfo& i void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override { CEntity::AcceptScriptMsg(msg, objId, stateMgr); - + if (x4_areaId == kInvalidAreaId) { return; } @@ -28,13 +28,13 @@ void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId stateMgr.World()->Area(GetAreaIdAlways())->SetAreaAttributes(this); stateMgr.EnvFxManager()->SetFxDensity(500, x3c_envFxDensity); break; - } + } case kSM_Deleted: { if (stateMgr.World()->Area(GetAreaIdAlways())->IsLoaded()) { stateMgr.World()->Area(GetAreaIdAlways())->SetAreaAttributes(nullptr); } - } + } } } diff --git a/src/MetroidPrime/ScriptObjects/CScriptRelay.cpp b/src/MetroidPrime/ScriptObjects/CScriptRelay.cpp index c077b824..1a1ebdd1 100644 --- a/src/MetroidPrime/ScriptObjects/CScriptRelay.cpp +++ b/src/MetroidPrime/ScriptObjects/CScriptRelay.cpp @@ -24,7 +24,7 @@ void CScriptRelay::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CEntity::AcceptScriptMsg(msg, objId, stateMgr); switch (msg) { - case kSM_SetToZero: + case kSM_SetToZero: { if (!x30_24_active) { return; } @@ -46,7 +46,7 @@ void CScriptRelay::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, stateMgr.SetLastRelayId(GetUniqueId()); } break; - + } case kSM_Deleted: UpdateObjectRef(stateMgr); break; diff --git a/src/MetroidPrime/ScriptObjects/CScriptRipple.cpp b/src/MetroidPrime/ScriptObjects/CScriptRipple.cpp index f2c14e74..a2a29aa3 100644 --- a/src/MetroidPrime/ScriptObjects/CScriptRipple.cpp +++ b/src/MetroidPrime/ScriptObjects/CScriptRipple.cpp @@ -4,7 +4,6 @@ #include "MetroidPrime/CStateManager.hpp" #include "MetroidPrime/ScriptObjects/CScriptWater.hpp" - CScriptRipple::CScriptRipple(TUniqueId uid, const rstl::string& name, const CEntityInfo& info, const CVector3f& vec, bool active, float f1) : CEntity(uid, info, active, name), x34_magnitude(f1 >= 0.f ? f1 : 0.5f), x38_center(vec) {} @@ -13,7 +12,7 @@ CScriptRipple::~CScriptRipple() {} void CScriptRipple::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) { switch (msg) { - case (kSM_Play): + case (kSM_Play): { if (!GetActive()) { return; } @@ -33,6 +32,7 @@ void CScriptRipple::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CSt } } break; + } default: CEntity::AcceptScriptMsg(msg, uid, mgr); break; diff --git a/src/MetroidPrime/ScriptObjects/CScriptSpecialFunction.cpp b/src/MetroidPrime/ScriptObjects/CScriptSpecialFunction.cpp index 95498e92..d8e84614 100644 --- a/src/MetroidPrime/ScriptObjects/CScriptSpecialFunction.cpp +++ b/src/MetroidPrime/ScriptObjects/CScriptSpecialFunction.cpp @@ -196,6 +196,8 @@ void CScriptSpecialFunction::PreRender(CStateManager&, const CFrustumPlanes& fru x1e4_30_ = val; break; } + default: + break; } } @@ -476,7 +478,7 @@ void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId } break; } - case kSF_RumbleEffect: + case kSF_RumbleEffect: { if (msg != kSM_Action) { break; } @@ -498,6 +500,7 @@ void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId mgr.GetRumbleManager()->Rumble(mgr, pos, rumbFx, xfc_float1, kRP_One); } break; + } case kSF_InventoryActivator: { if (msg == kSM_Action && mgr.GetPlayerState()->HasPowerUp(x1c4_item)) { SendScriptMsgs(kSS_Zero, mgr, kSM_None); diff --git a/src/MetroidPrime/TCastTo.cpp b/src/MetroidPrime/TCastTo.cpp index da347670..9dab4577 100644 --- a/src/MetroidPrime/TCastTo.cpp +++ b/src/MetroidPrime/TCastTo.cpp @@ -133,9 +133,16 @@ VISIT_IMPL(cls, CWeapon) // clang-format on #define VISIT_IMPL(base, cls) \ - void TCastToPtr< base >::Visit(cls& v) { ptr = GetPtr(&v); } + template <> \ + void TCastToPtr< base >::Visit(cls& v) { \ + ptr = GetPtr(&v); \ + } #define VISIT(cls) \ - TCastToPtr< cls >::TCastToPtr(CEntity& p) : ptr(nullptr) { p.Accept(*this); } \ + template <> \ + TCastToPtr< cls >::TCastToPtr(CEntity& p) : ptr(nullptr) { \ + p.Accept(*this); \ + } \ + template <> \ TCastToPtr< cls >::TCastToPtr(CEntity* p) : ptr(nullptr) { \ if (p != nullptr) { \ p->Accept(*this); \ @@ -149,3759 +156,13572 @@ TCASTTO_VISITORS #else // Generated with gcc -I include -E src/MetroidPrime/TCastTo.cpp > TCastTo.i -TCastToPtr< CActor >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CActor >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +TCastToPtr< CActor >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CActor >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CActor >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CActor >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CBallCamera >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CBallCamera >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CActor >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CActor >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CBallCamera >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CBallCamera >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CBallCamera >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBallCamera >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CBomb >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CBomb >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CBallCamera >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBallCamera >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CBomb >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CBomb >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CBomb >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CBomb >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CCinematicCamera >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CCinematicCamera >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CBomb >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CBomb >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CCinematicCamera >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CCinematicCamera >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CCinematicCamera >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CCinematicCamera >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CCinematicCamera >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCinematicCamera >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CCollisionActor >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CCollisionActor >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCinematicCamera >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CCollisionActor >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CCollisionActor >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CCollisionActor >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CCollisionActor >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CCollisionActor >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CCollisionActor >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CDestroyableRock >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CDestroyableRock >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CCollisionActor >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CDestroyableRock >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CDestroyableRock >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CDestroyableRock >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CDestroyableRock >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CDestroyableRock >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CDestroyableRock >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CEnergyProjectile >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CEnergyProjectile >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CDestroyableRock >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CEnergyProjectile >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CEnergyProjectile >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CEnergyProjectile >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CEnergyProjectile >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEnergyProjectile >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CEntity >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CEntity >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEnergyProjectile >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CEntity >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CEntity >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CEntity >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CEntity >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CExplosion >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CExplosion >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CEntity >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CEntity >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CExplosion >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CExplosion >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CExplosion >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CExplosion >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CFirstPersonCamera >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CFirstPersonCamera >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CExplosion >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CExplosion >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CFirstPersonCamera >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CFirstPersonCamera >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CFirstPersonCamera >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFirstPersonCamera >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CFishCloud >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CFishCloud >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFirstPersonCamera >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CFishCloud >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CFishCloud >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CFishCloud >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CFishCloud >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CGameCamera >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CGameCamera >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CFishCloud >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CFishCloud >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CGameCamera >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CGameCamera >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CGameCamera >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameCamera >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CGameLight >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CGameLight >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CGameCamera >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameCamera >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CGameLight >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CGameLight >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CGameLight >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameLight >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CGameProjectile >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CGameProjectile >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CGameLight >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameLight >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CGameProjectile >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CGameProjectile >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CGameProjectile >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CGameProjectile >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CGameProjectile >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CGameProjectile >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CHUDBillboardEffect >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CHUDBillboardEffect >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CGameProjectile >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CHUDBillboardEffect >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CHUDBillboardEffect >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CHUDBillboardEffect >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CHUDBillboardEffect >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CMetroidPrimeRelay >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CMetroidPrimeRelay >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CHUDBillboardEffect >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CMetroidPrimeRelay >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CMetroidPrimeRelay >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CMetroidPrimeRelay >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CPathCamera >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CPathCamera >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CMetroidPrimeRelay >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CPathCamera >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CPathCamera >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CPathCamera >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPathCamera >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CPatterned >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CPatterned >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CPathCamera >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPathCamera >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CPatterned >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CPatterned >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CPatterned >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPatterned >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CPhysicsActor >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CPhysicsActor >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CPatterned >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPatterned >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CPhysicsActor >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CPhysicsActor >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CPhysicsActor >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPhysicsActor >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CPlayer >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CPlayer >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CPhysicsActor >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPhysicsActor >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CPlayer >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CPlayer >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CPlayer >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CPlayer >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CRepulsor >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CRepulsor >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CPlayer >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CPlayer >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CRepulsor >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CRepulsor >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CRepulsor >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CRepulsor >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptActor >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptActor >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CRepulsor >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CRepulsor >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptActor >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptActor >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptActor >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActor >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptActorKeyframe >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptActorKeyframe >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptActor >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActor >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptActorKeyframe >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptActorKeyframe >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptActorKeyframe >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptActorKeyframe >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptAiJumpPoint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptAiJumpPoint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptActorKeyframe >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptAiJumpPoint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptAiJumpPoint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptAiJumpPoint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptCameraHint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptCameraHint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptAiJumpPoint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptCameraHint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptCameraHint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptCameraHint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptCameraHint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraHint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptCameraPitchVolume >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptCameraPitchVolume >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraHint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptCameraPitchVolume >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptCameraPitchVolume >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraPitchVolume >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptCameraWaypoint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptCameraWaypoint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraPitchVolume >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptCameraWaypoint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptCameraWaypoint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCameraWaypoint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptCoverPoint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptCoverPoint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCameraWaypoint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptCoverPoint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptCoverPoint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptCoverPoint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptCoverPoint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptDebugCameraWaypoint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptDebugCameraWaypoint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptCoverPoint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptDebugCameraWaypoint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptDebugCameraWaypoint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptDistanceFog >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptDistanceFog >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDebugCameraWaypoint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptDistanceFog >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptDistanceFog >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptDistanceFog >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDistanceFog >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptDock >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptDock >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDistanceFog >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptDock >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptDock >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptDock >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDock >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptDoor >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptDoor >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptDock >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDock >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptDoor >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptDoor >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptDoor >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptDoor >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptEffect >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptEffect >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptDoor >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptDoor >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptEffect >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptEffect >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptEffect >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptEffect >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptGrapplePoint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptGrapplePoint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptEffect >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptEffect >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptGrapplePoint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptGrapplePoint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptGrapplePoint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGrapplePoint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptGunTurret >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptGunTurret >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGrapplePoint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptGunTurret >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptGunTurret >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptGunTurret >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptGunTurret >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptGunTurret >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptMazeNode >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptMazeNode >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptGunTurret >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptMazeNode >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptMazeNode >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptMazeNode >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptMazeNode >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptMazeNode >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptPickup >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptPickup >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptMazeNode >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptPickup >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptPickup >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptPickup >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPickup >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptPlatform >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptPlatform >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptPickup >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPickup >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptPlatform >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptPlatform >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptPlatform >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptPlatform >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptPlatform >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlatform >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptPlayerHint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptPlayerHint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlatform >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptPlayerHint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptPlayerHint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptPlayerHint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPlayerHint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptPointOfInterest >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptPointOfInterest >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPlayerHint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptPointOfInterest >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptPointOfInterest >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptPointOfInterest >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptPointOfInterest >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptRoomAcoustics >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptRoomAcoustics >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptPointOfInterest >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptRoomAcoustics >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptRoomAcoustics >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptRoomAcoustics >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptSound >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptSound >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptRoomAcoustics >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptSound >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptSound >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptSound >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSound >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptSpawnPoint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptSpawnPoint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptSound >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSound >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptSpawnPoint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptSpawnPoint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptSpawnPoint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpawnPoint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptSpecialFunction >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptSpecialFunction >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpawnPoint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptSpecialFunction >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptSpecialFunction >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptSpecialFunction >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpecialFunction >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptSpiderBallAttractionSurface >::TCastToPtr(CEntity& p) : ptr(0) { +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpecialFunction >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptSpiderBallAttractionSurface >::TCastToPtr(CEntity& p) : ptr(nullptr) { p.Accept(*this); } -TCastToPtr< CScriptSpiderBallAttractionSurface >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +TCastToPtr< CScriptSpiderBallAttractionSurface >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CBomb& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CExplosion& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CGameLight& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit( CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptSpiderBallWaypoint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptSpiderBallWaypoint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptSpiderBallAttractionSurface >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptSpiderBallWaypoint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptSpiderBallWaypoint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } +template <> void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptTargetingPoint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptTargetingPoint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpiderBallWaypoint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptTargetingPoint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptTargetingPoint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptTargetingPoint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTargetingPoint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CTeamAiMgr >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CTeamAiMgr >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTargetingPoint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CTeamAiMgr >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CTeamAiMgr >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CTeamAiMgr >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CTeamAiMgr >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptTimer >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptTimer >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CTeamAiMgr >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptTimer >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptTimer >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptTimer >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTimer >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptTrigger >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptTrigger >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptTimer >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTimer >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptTrigger >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptTrigger >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptTrigger >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptTrigger >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptTrigger >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptTrigger >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptVisorFlare >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptVisorFlare >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptTrigger >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptVisorFlare >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptVisorFlare >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptVisorFlare >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptVisorFlare >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptWater >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptWater >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptVisorFlare >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptWater >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptWater >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptWater >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWater >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptWaypoint >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptWaypoint >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptWater >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWater >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptWaypoint >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptWaypoint >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptWaypoint >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptWaypoint >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptWaypoint >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CSnakeWeedSwarm >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CSnakeWeedSwarm >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptWaypoint >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CSnakeWeedSwarm >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CSnakeWeedSwarm >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CSnakeWeedSwarm >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CScriptSpindleCamera >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CScriptSpindleCamera >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CSnakeWeedSwarm >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CScriptSpindleCamera >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CScriptSpindleCamera >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CScriptSpindleCamera >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CScriptSpindleCamera >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CWallCrawlerSwarm >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CWallCrawlerSwarm >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CScriptSpindleCamera >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CWallCrawlerSwarm >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CWallCrawlerSwarm >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWallCrawlerSwarm >::Visit(CWeapon& v) { ptr = GetPtr(&v); } -TCastToPtr< CWeapon >::TCastToPtr(CEntity& p) : ptr(0) { p.Accept(*this); } -TCastToPtr< CWeapon >::TCastToPtr(CEntity* p) : ptr(0) { - if (p != 0) { +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWallCrawlerSwarm >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} +template <> +TCastToPtr< CWeapon >::TCastToPtr(CEntity& p) : ptr(nullptr) { + p.Accept(*this); +} +template <> +TCastToPtr< CWeapon >::TCastToPtr(CEntity* p) : ptr(nullptr) { + if (p != nullptr) { p->Accept(*this); } } -void TCastToPtr< CWeapon >::Visit(CActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CBallCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CBomb& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CCinematicCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CCollisionActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CDestroyableRock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CEnergyProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CEntity& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CExplosion& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CFirstPersonCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CFishCloud& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CGameCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CGameLight& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CGameProjectile& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CHUDBillboardEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CMetroidPrimeRelay& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CPathCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CPatterned& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CPhysicsActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CPlayer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CRepulsor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptActor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptActorKeyframe& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptAiJumpPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptCameraHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptCameraPitchVolume& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptCoverPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptDebugCameraWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptDistanceFog& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptDock& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptDoor& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptEffect& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptGrapplePoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptGunTurret& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptMazeNode& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptPickup& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptPlatform& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptPlayerHint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptPointOfInterest& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptRoomAcoustics& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptSound& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptSpawnPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptSpecialFunction& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptSpiderBallAttractionSurface& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptSpiderBallWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptTargetingPoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CTeamAiMgr& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptTimer& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptTrigger& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptVisorFlare& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptWater& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptWaypoint& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CSnakeWeedSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CScriptSpindleCamera& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CWallCrawlerSwarm& v) { ptr = GetPtr(&v); } -void TCastToPtr< CWeapon >::Visit(CWeapon& v) { ptr = GetPtr(&v); } +template <> +void TCastToPtr< CWeapon >::Visit(CActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CBallCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CBomb& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CCinematicCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CCollisionActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CDestroyableRock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CEnergyProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CEntity& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CExplosion& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CFirstPersonCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CFishCloud& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CGameCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CGameLight& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CGameProjectile& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CHUDBillboardEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CMetroidPrimeRelay& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CPathCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CPatterned& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CPhysicsActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CPlayer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CRepulsor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptActor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptActorKeyframe& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptAiJumpPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptCameraHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptCameraPitchVolume& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptCoverPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptDebugCameraWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptDistanceFog& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptDock& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptDoor& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptEffect& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptGrapplePoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptGunTurret& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptMazeNode& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptPickup& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptPlatform& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptPlayerHint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptPointOfInterest& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptRoomAcoustics& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptSound& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptSpawnPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptSpecialFunction& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptSpiderBallAttractionSurface& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptSpiderBallWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptTargetingPoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CTeamAiMgr& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptTimer& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptTrigger& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptVisorFlare& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptWater& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptWaypoint& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CSnakeWeedSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CScriptSpindleCamera& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CWallCrawlerSwarm& v) { + ptr = GetPtr(&v); +} +template <> +void TCastToPtr< CWeapon >::Visit(CWeapon& v) { + ptr = GetPtr(&v); +} #endif