#include #include #include class dMrSun_c : public dEn_c { int onCreate(); int onDelete(); int onExecute(); int onDraw(); mHeapAllocator_c allocator; static dMrSun_c *build(); }; #define ACTIVATE 1 #define DEACTIVATE 0 int dMrSun_c::onCreate() { OSReport("Creating the Mr.Sun Model"); OSReport("Setting Mr.Sun's Size to 4.0"); this->scale = (Vec){4.0, 4.0, 4.0}; OSReport("Creating Mr.Sun's Physics Struct"); ActivePhysics::Info HitMeBaby; HitMeBaby.xDistToCenter = 0.0; HitMeBaby.yDistToCenter = 0.0; HitMeBaby.xDistToEdge = 8.0; HitMeBaby.yDistToEdge = 8.0; HitMeBaby.category1 = 0x3; HitMeBaby.category2 = 0x0; HitMeBaby.bitfield1 = 0x4F; HitMeBaby.bitfield2 = 0x820C; HitMeBaby.unkShort1C = 0; HitMeBaby.callback = &dEn_c::collisionCallback; OSReport("Making the Physics Class and adding to the list"); this->aPhysics.initWithStruct(this, &HitMeBaby); this->aPhysics.addToList(); OSReport("Going to Execute Mr.Sun"); this->onExecute(); return true; } int dMrSun_c::onDelete() { return true; } int dMrSun_c::onExecute() { OSReport("Oh Mr.Sun, Sun, Mr.Golden Sun"); return true; } int dMrSun_c::onDraw() { return true; }