diff --git a/src/SB/Game/zNPCTypeBossPlankton.cpp b/src/SB/Game/zNPCTypeBossPlankton.cpp index 7b2a0e13d..6321aebb6 100644 --- a/src/SB/Game/zNPCTypeBossPlankton.cpp +++ b/src/SB/Game/zNPCTypeBossPlankton.cpp @@ -128,7 +128,7 @@ namespace } } - void* play_sound(int, const xVec3*, float) + void* play_sound(int, const xVec3*, F32) { return NULL; } @@ -1104,7 +1104,7 @@ void zNPCBPlankton::Destroy() zNPCCommon::Destroy(); } -void zNPCBPlankton::Process(xScene* xscn, float dt) +void zNPCBPlankton::Process(xScene* xscn, F32 dt) { // This function needs a lot of work, writing most of these comments // so that i can resume where i left off when i return to it @@ -1303,11 +1303,6 @@ S32 zNPCBPlankton::next_goal() return tempR; } -void zNPCBPlankton::render_debug() -{ - // weak -} - void zNPCBPlankton::reset_territories() { } @@ -1438,26 +1433,6 @@ void zNPCBPlankton::follow_camera() flag.move = MOVE_ORBIT; } -S32 zNPCBPlankton::IsAlive() -{ - return 1; -} - -U8 zNPCBPlankton::ColPenFlags() const -{ - return 0; -} - -U8 zNPCBPlankton::ColChkFlags() const -{ - return 0; -} - -U8 zNPCBPlankton::ColChkByFlags() const -{ - return 16; -} - xFactoryInst* zNPCGoalBPlanktonIdle::create(S32 who, RyzMemGrow* grow, void* info) { return new (who, grow) zNPCGoalBPlanktonIdle(who, (zNPCBPlankton&)*info); @@ -1559,6 +1534,16 @@ xFactoryInst* zNPCGoalBPlanktonTaunt::create(S32 who, RyzMemGrow* grow, void* in return new (who, grow) zNPCGoalBPlanktonTaunt(who, (zNPCBPlankton&)*info); } +S32 zNPCGoalBPlanktonTaunt::Enter(F32 dt, void* updCtxt) +{ + return zNPCGoalCommon::Enter(dt, updCtxt); +} + +S32 zNPCGoalBPlanktonTaunt::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + S32 zNPCGoalBPlanktonTaunt::Process(en_trantype*, F32, void*, xScene*) { return 0; @@ -1569,6 +1554,16 @@ xFactoryInst* zNPCGoalBPlanktonMove::create(S32 who, RyzMemGrow* grow, void* inf return new (who, grow) zNPCGoalBPlanktonMove(who, (zNPCBPlankton&)*info); } +S32 zNPCGoalBPlanktonMove::Enter(F32 dt, void* updCtxt) +{ + return zNPCGoalCommon::Enter(dt, updCtxt); +} + +S32 zNPCGoalBPlanktonMove::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + S32 zNPCGoalBPlanktonMove::Process(en_trantype*, F32, void*, xScene*) { return 0; @@ -1579,7 +1574,7 @@ xFactoryInst* zNPCGoalBPlanktonStun::create(S32 who, RyzMemGrow* grow, void* inf return new (who, grow) zNPCGoalBPlanktonStun(who, (zNPCBPlankton&)*info); } -S32 zNPCGoalBPlanktonStun::Enter(float dt, void* updCtxt) +S32 zNPCGoalBPlanktonStun::Enter(F32 dt, void* updCtxt) { owner.reappear(); owner.delay = 0.0f; @@ -1587,7 +1582,7 @@ S32 zNPCGoalBPlanktonStun::Enter(float dt, void* updCtxt) return zNPCGoalCommon::Enter(dt, updCtxt); } -S32 zNPCGoalBPlanktonStun::Exit(float dt, void* updCtxt) +S32 zNPCGoalBPlanktonStun::Exit(F32 dt, void* updCtxt) { owner.give_control(); owner.flag.follow = owner.FOLLOW_PLAYER; @@ -1599,12 +1594,17 @@ xFactoryInst* zNPCGoalBPlanktonFall::create(S32 who, RyzMemGrow* grow, void* inf return new (who, grow) zNPCGoalBPlanktonFall(who, (zNPCBPlankton&)*info); } +S32 zNPCGoalBPlanktonFall::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + xFactoryInst* zNPCGoalBPlanktonDizzy::create(S32 who, RyzMemGrow* grow, void* info) { return new (who, grow) zNPCGoalBPlanktonDizzy(who, (zNPCBPlankton&)*info); } -S32 zNPCGoalBPlanktonDizzy::Enter(float dt, void* updCtxt) +S32 zNPCGoalBPlanktonDizzy::Enter(F32 dt, void* updCtxt) { owner.give_control(); owner.delay = 0.0f; @@ -1612,12 +1612,17 @@ S32 zNPCGoalBPlanktonDizzy::Enter(float dt, void* updCtxt) return zNPCGoalCommon::Enter(dt, updCtxt); } +S32 zNPCGoalBPlanktonDizzy::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + xFactoryInst* zNPCGoalBPlanktonBeam::create(S32 who, RyzMemGrow* grow, void* info) { return new (who, grow) zNPCGoalBPlanktonBeam(who, (zNPCBPlankton&)*info); } -S32 zNPCGoalBPlanktonBeam::Enter(float dt, void* updCtxt) +S32 zNPCGoalBPlanktonBeam::Enter(F32 dt, void* updCtxt) { owner.reappear(); substate = SS_WARM_UP; @@ -1630,7 +1635,7 @@ S32 zNPCGoalBPlanktonBeam::Enter(float dt, void* updCtxt) return zNPCGoalCommon::Enter(dt, updCtxt); } -S32 zNPCGoalBPlanktonBeam::Exit(float dt, void* updCtxt) +S32 zNPCGoalBPlanktonBeam::Exit(F32 dt, void* updCtxt) { owner.flag.aim_gun = false; owner.flag.follow = owner.FOLLOW_PLAYER; @@ -1676,6 +1681,16 @@ xFactoryInst* zNPCGoalBPlanktonWall::create(S32 who, RyzMemGrow* grow, void* inf return new (who, grow) zNPCGoalBPlanktonWall(who, (zNPCBPlankton&)*info); } +S32 zNPCGoalBPlanktonWall::Enter(F32 dt, void* updCtxt) +{ + return zNPCGoalCommon::Enter(dt, updCtxt); +} + +S32 zNPCGoalBPlanktonWall::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + S32 zNPCGoalBPlanktonWall::Process(en_trantype*, F32, void*, xScene*) { return 0; @@ -1686,6 +1701,16 @@ xFactoryInst* zNPCGoalBPlanktonMissle::create(S32 who, RyzMemGrow* grow, void* i return new (who, grow) zNPCGoalBPlanktonMissle(who, (zNPCBPlankton&)*info); } +S32 zNPCGoalBPlanktonMissle::Enter(F32 dt, void* updCtxt) +{ + return zNPCGoalCommon::Enter(dt, updCtxt); +} + +S32 zNPCGoalBPlanktonMissle::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + S32 zNPCGoalBPlanktonMissle::Process(en_trantype*, F32, void*, xScene*) { return 0; @@ -1696,12 +1721,12 @@ xFactoryInst* zNPCGoalBPlanktonBomb::create(S32 who, RyzMemGrow* grow, void* inf return new (who, grow) zNPCGoalBPlanktonBomb(who, (zNPCBPlankton&)*info); } -S32 zNPCGoalBPlanktonBomb::Enter(float dt, void* updCtxt) +S32 zNPCGoalBPlanktonBomb::Enter(F32 dt, void* updCtxt) { return zNPCGoalCommon::Enter(dt, updCtxt); } -S32 zNPCGoalBPlanktonBomb::Exit(float dt, void* updCtxt) +S32 zNPCGoalBPlanktonBomb::Exit(F32 dt, void* updCtxt) { return xGoal::Exit(dt, updCtxt); } @@ -1710,3 +1735,51 @@ S32 zNPCGoalBPlanktonBomb::Process(en_trantype*, F32, void*, xScene*) { return 0; } + +xVec3& zNPCBPlankton::location() const +{ + return reinterpret_cast(this->model->Mat->pos); +} + +void zNPCBPlankton::render_debug() +{ +} + +void zNPCBPlankton::enable_emitter(xParEmitter& p1) const +{ + p1.emit_flags |= 1; +} + +void zNPCBPlankton::disable_emitter(xParEmitter& p1) const +{ +} + +U8 zNPCBPlankton::ColChkFlags() const +{ + return 0; +} + +U8 zNPCBPlankton::ColPenFlags() const +{ + return 0; +} + +U8 zNPCBPlankton::ColChkByFlags() const +{ + return 16; +} + +U8 zNPCBPlankton::ColPenByFlags() const +{ + return 16; +} + +U8 zNPCBPlankton::PhysicsFlags() const +{ + return 3; +} + +S32 zNPCBPlankton::IsAlive() +{ + return 1; +} diff --git a/src/SB/Game/zNPCTypeBossPlankton.h b/src/SB/Game/zNPCTypeBossPlankton.h index 7836d4a53..205e92d85 100644 --- a/src/SB/Game/zNPCTypeBossPlankton.h +++ b/src/SB/Game/zNPCTypeBossPlankton.h @@ -119,15 +119,14 @@ struct zNPCBPlankton : zNPCBoss void PostSetup(); void Reset(); void Destroy(); - void Process(xScene*, float); - S32 SysEvent(xBase*, xBase*, unsigned int, const float*, xBase*, int*); + void Process(xScene*, F32); + S32 SysEvent(xBase*, xBase*, unsigned int, const F32*, xBase*, int*); void Render(); void RenderExtraPostParticles(); void ParseINI(); void SelfSetup(); U32 AnimPick(int, en_NPC_GOAL_SPOT, xGoal*); S32 next_goal(); - void render_debug(); void update_turn(F32); void update_move(F32); void check_player_damage(); @@ -155,16 +154,19 @@ struct zNPCBPlankton : zNPCBoss void follow_camera(); void reset_speed(); void refresh_orbit(); - S32 IsAlive(); - void give_control(); - U8 ColPenFlags() const; - U8 ColChkFlags() const; - U8 ColChkByFlags() const; - // Not yet organized / WEAK + xVec3& location() const; + void face_player(); + void render_debug(); + void give_control(); void enable_emitter(xParEmitter&) const; void disable_emitter(xParEmitter&) const; - void face_player(); + U8 ColChkFlags() const; + U8 ColPenFlags() const; + U8 ColChkByFlags() const; + U8 ColPenByFlags() const; + U8 PhysicsFlags() const; + S32 IsAlive(); }; struct zNPCGoalBPlanktonIdle : zNPCGoalCommon @@ -178,6 +180,7 @@ struct zNPCGoalBPlanktonIdle : zNPCGoalCommon static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); S32 Enter(F32, void*); S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); S32 get_yaw(F32&, F32&) const; S32 apply_yaw(F32); @@ -194,6 +197,7 @@ struct zNPCGoalBPlanktonAttack : zNPCGoalCommon static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); S32 Enter(F32, void*); S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); }; struct zNPCGoalBPlanktonAmbush : zNPCGoalCommon @@ -207,6 +211,7 @@ struct zNPCGoalBPlanktonAmbush : zNPCGoalCommon static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); S32 Enter(F32, void*); S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); }; struct zNPCGoalBPlanktonFlank : zNPCGoalCommon @@ -219,6 +224,9 @@ struct zNPCGoalBPlanktonFlank : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); + S32 Enter(F32, void*); + S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); }; struct zNPCGoalBPlanktonEvade : zNPCGoalCommon @@ -231,6 +239,9 @@ struct zNPCGoalBPlanktonEvade : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); + S32 Enter(F32, void*); + S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); }; struct zNPCGoalBPlanktonHunt : zNPCGoalCommon @@ -243,9 +254,9 @@ struct zNPCGoalBPlanktonHunt : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); - S32 Enter(F32, void*); S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); }; struct zNPCGoalBPlanktonTaunt : zNPCGoalCommon @@ -257,6 +268,8 @@ struct zNPCGoalBPlanktonTaunt : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); + S32 Enter(F32, void*); + S32 Exit(F32, void*); S32 Process(en_trantype*, F32, void*, xScene*); }; @@ -269,6 +282,8 @@ struct zNPCGoalBPlanktonMove : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); + S32 Enter(F32, void*); + S32 Exit(F32, void*); S32 Process(en_trantype*, F32, void*, xScene*); }; @@ -295,6 +310,9 @@ struct zNPCGoalBPlanktonFall : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); + S32 Enter(F32, void*); + S32 Exit(F32 dt, void* updCtxt); + S32 Process(en_trantype*, F32, void*, xScene*); }; struct zNPCGoalBPlanktonDizzy : zNPCGoalCommon @@ -306,8 +324,9 @@ struct zNPCGoalBPlanktonDizzy : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); - S32 Enter(float, void*); - S32 Exit(float, void*); + S32 Enter(F32, void*); + S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); }; struct zNPCGoalBPlanktonBeam : zNPCGoalCommon @@ -329,12 +348,12 @@ struct zNPCGoalBPlanktonBeam : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); - S32 Enter(float, void*); - S32 Exit(float, void*); - S32 Process(en_trantype*, float, void*, xScene*); - S32 update_cool_down(float); - S32 update_warm_up(float); - S32 update_fire(float); + S32 Enter(F32, void*); + S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); + S32 update_cool_down(F32); + S32 update_warm_up(F32); + S32 update_fire(F32); }; struct zNPCGoalBPlanktonWall : zNPCGoalCommon @@ -346,7 +365,9 @@ struct zNPCGoalBPlanktonWall : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); - S32 Process(en_trantype*, float, void*, xScene*); + S32 Enter(F32, void*); + S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); }; struct zNPCGoalBPlanktonMissle : zNPCGoalCommon @@ -358,7 +379,9 @@ struct zNPCGoalBPlanktonMissle : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); - S32 Process(en_trantype*, float, void*, xScene*); + S32 Enter(F32, void*); + S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); }; struct zNPCGoalBPlanktonBomb : zNPCGoalCommon @@ -370,9 +393,9 @@ struct zNPCGoalBPlanktonBomb : zNPCGoalCommon } static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); - S32 Enter(float, void*); - S32 Exit(float, void*); - S32 Process(en_trantype*, float, void*, xScene*); + S32 Enter(F32, void*); + S32 Exit(F32, void*); + S32 Process(en_trantype*, F32, void*, xScene*); }; xAnimTable* ZNPC_AnimTable_BossPlankton();