2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_CAI_HPP__
|
|
|
|
#define __URDE_CAI_HPP__
|
2015-08-17 20:33:58 +00:00
|
|
|
|
2015-10-29 07:52:15 +00:00
|
|
|
#include "GCNTypes.hpp"
|
|
|
|
#include "ScriptObjectSupport.hpp"
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "CEntity.hpp"
|
|
|
|
#include "CPhysicsActor.hpp"
|
2016-04-19 00:17:49 +00:00
|
|
|
#include "CDamageVulnerability.hpp"
|
2016-04-25 05:03:38 +00:00
|
|
|
#include "CHealthInfo.hpp"
|
2016-04-25 05:46:28 +00:00
|
|
|
#include "CStateMachine.hpp"
|
2015-10-29 07:52:15 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
#include "zeus/zeus.hpp"
|
2015-10-29 07:52:15 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-17 22:05:00 +00:00
|
|
|
{
|
|
|
|
|
2015-11-21 01:16:07 +00:00
|
|
|
enum class EListenNoiseType
|
2015-10-29 07:52:15 +00:00
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2017-03-29 02:51:12 +00:00
|
|
|
enum class EKnockBackType
|
|
|
|
{
|
|
|
|
Zero,
|
|
|
|
One
|
|
|
|
};
|
|
|
|
|
2016-04-25 05:46:28 +00:00
|
|
|
class CAiFuncMap;
|
2015-10-29 07:52:15 +00:00
|
|
|
class CStateManager;
|
|
|
|
class CAi : public CPhysicsActor
|
2015-08-22 01:58:41 +00:00
|
|
|
{
|
2016-04-24 02:46:13 +00:00
|
|
|
static CAiFuncMap* m_FuncMap;
|
|
|
|
CHealthInfo x258_healthInfo;
|
|
|
|
CDamageVulnerability x260_damageVulnerability;
|
|
|
|
TLockedToken<CStateMachine> x2c8_stateMachine;
|
2015-08-22 01:58:41 +00:00
|
|
|
public:
|
|
|
|
|
2016-04-25 05:46:28 +00:00
|
|
|
CAi(TUniqueId uid, bool active, const std::string& name, const CEntityInfo& info, const zeus::CTransform& xf,
|
|
|
|
CModelData&& mData, const zeus::CAABox& box, float mass, const CHealthInfo& hInfo, const CDamageVulnerability&,
|
2017-08-13 05:26:14 +00:00
|
|
|
const CMaterialList& list, CAssetId fsm, const CActorParameters&, float f1, float f2);
|
2016-04-24 02:46:13 +00:00
|
|
|
|
|
|
|
static void CreateFuncLookup(CAiFuncMap* funcMap);
|
2016-04-25 05:46:28 +00:00
|
|
|
static CAiStateFunc GetStateFunc(const char* func);
|
|
|
|
static CAiTriggerFunc GetTrigerFunc(const char* func);
|
2016-04-24 02:46:13 +00:00
|
|
|
|
2016-09-17 06:40:45 +00:00
|
|
|
const CStateMachine* GetStateMachine() const;
|
2015-10-29 07:52:15 +00:00
|
|
|
|
|
|
|
virtual void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) {}
|
2016-11-22 20:43:16 +00:00
|
|
|
virtual CHealthInfo* HealthInfo() { return &x258_healthInfo; }
|
2017-03-31 19:51:40 +00:00
|
|
|
virtual void Death(CStateManager&, const zeus::CVector3f&, EStateMsg)=0;
|
2017-03-29 02:51:12 +00:00
|
|
|
virtual void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo& info, EKnockBackType, bool, float)=0;
|
2016-04-24 02:46:13 +00:00
|
|
|
virtual CDamageVulnerability GetDamageVulnerability() { return x260_damageVulnerability; }
|
2016-03-04 23:04:53 +00:00
|
|
|
virtual void TakeDamage(const zeus::CVector3f&, float) {}
|
2015-10-29 07:52:15 +00:00
|
|
|
virtual bool CanBeShot(const CStateManager&, int) { return true; }
|
2017-01-18 22:30:02 +00:00
|
|
|
virtual bool IsListening() const { return false; }
|
2016-03-04 23:04:53 +00:00
|
|
|
virtual int Listen(const zeus::CVector3f&, EListenNoiseType) { return 0; }
|
2015-10-29 07:52:15 +00:00
|
|
|
|
|
|
|
virtual void Patrol(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void FollowPattern(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Dead(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void PathFind(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Start(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void SelectTarget(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void TargetPatrol(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void TargetPlayer(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void TargetCover(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Halt(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Walk(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Run(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Generate(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Deactivate(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Attack(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void LoopedAttack(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void JumpBack(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void DoubleSnap(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Shuffle(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void TurnAround(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Skid(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Active(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void InActive(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void CoverAttack(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Crouch(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void FadeIn(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void FadeOut(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void GetUp(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Taunt(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Suck(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Flee(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Lurk(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void ProjectileAttack(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Flinch(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Hurled(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void TelegraphAttack(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Jump(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Explode(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Dodge(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Retreat(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Cover(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Approach(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void WallHang(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void WallDetach(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Enraged(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void SpecialAttack(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Growth(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Faint(CStateManager&, EStateMsg, float) {}
|
2016-04-24 02:46:13 +00:00
|
|
|
virtual void Land(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Bounce(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void PathFindEx(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void Dizzy(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void CallForBackup(CStateManager&, EStateMsg, float) {}
|
2015-10-29 07:52:15 +00:00
|
|
|
virtual void BulbAttack(CStateManager&, EStateMsg, float) {}
|
|
|
|
virtual void PodAttack(CStateManager&, EStateMsg, float) {}
|
|
|
|
|
2016-04-24 02:46:13 +00:00
|
|
|
virtual bool InAttackPosition(CStateManager&, float) { return false; }
|
|
|
|
virtual bool Leash(CStateManager&, float) { return false; }
|
|
|
|
virtual bool OffLine(CStateManager&,float) { return false; }
|
|
|
|
virtual bool Attacked(CStateManager&, float) { return false; }
|
|
|
|
virtual bool PathShagged(CStateManager&, float) { return false; }
|
|
|
|
virtual bool PathOver(CStateManager&, float) { return false; }
|
|
|
|
virtual bool PathFound(CStateManager&, float) { return false; }
|
|
|
|
virtual bool TooClose(CStateManager&, float) { return false; }
|
|
|
|
virtual bool InRange(CStateManager&, float) { return false; }
|
|
|
|
virtual bool InMaxRange(CStateManager&, float) { return false; }
|
|
|
|
virtual bool InDetectionRange(CStateManager&, float) { return false; }
|
|
|
|
virtual bool SpotPlayer(CStateManager&, float) { return false; }
|
|
|
|
virtual bool PlayerSpot(CStateManager&, float) { return false; }
|
|
|
|
virtual bool PatternOver(CStateManager&, float) { return false; }
|
|
|
|
virtual bool PatternShagged(CStateManager&, float) { return false; }
|
|
|
|
virtual bool HasAttackPattern(CStateManager&, float) { return false; }
|
|
|
|
virtual bool HasPatrolPath(CStateManager&, float) { return false; }
|
|
|
|
virtual bool HasRetreatPattern(CStateManager&, float) { return false; }
|
|
|
|
virtual bool Delay(CStateManager&,float) { return false; }
|
|
|
|
virtual bool RandomDelay(CStateManager&, float) { return false; }
|
|
|
|
virtual bool FixedDelay(CStateManager&, float) { return false; }
|
|
|
|
virtual bool Default(CStateManager&, float) { return false; }
|
|
|
|
virtual bool AnimOver(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldAttack(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldDoubleSnap(CStateManager&, float) { return false; }
|
|
|
|
virtual bool InPosition(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldTurn(CStateManager&, float) { return false; }
|
|
|
|
virtual bool HitSomething(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldJumpBack(CStateManager&, float) { return false; }
|
|
|
|
virtual bool Stuck(CStateManager&, float) { return false; }
|
|
|
|
virtual bool NoPathNodes(CStateManager&, float) { return false; }
|
|
|
|
virtual bool Landed(CStateManager&, float) { return false; }
|
|
|
|
virtual bool HearShot(CStateManager&,float) { return false; }
|
|
|
|
virtual bool HearPlayer(CStateManager&,float) { return false; }
|
|
|
|
virtual bool CoverCheck(CStateManager&, float) { return false; }
|
|
|
|
virtual bool CoverFind(CStateManager&, float) { return false; }
|
|
|
|
virtual bool CoverBlown(CStateManager&, float) { return false; }
|
|
|
|
virtual bool CoverNearlyBlown(CStateManager&, float) { return false; }
|
|
|
|
virtual bool CoveringFire(CStateManager&, float) { return false; }
|
|
|
|
virtual bool GotUp(CStateManager&, float) { return false; }
|
|
|
|
virtual bool LineOfSight(CStateManager&,float) { return false; }
|
|
|
|
virtual bool AggressionCheck(CStateManager&, float) { return false; }
|
|
|
|
virtual bool AttackOver(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldTaunt(CStateManager&,float) { return false; }
|
|
|
|
virtual bool Inside(CStateManager&,float) { return false; }
|
|
|
|
virtual bool ShouldFire(CStateManager&,float) { return false; }
|
|
|
|
virtual bool ShouldFlinch(CStateManager&, float) { return false; }
|
|
|
|
virtual bool PatrolPathOver(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldDodge(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldRetreat(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldCrouch(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldMove(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShotAt(CStateManager&, float) { return false; }
|
|
|
|
virtual bool HasTargetingPoint(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldWallHang(CStateManager&, float) { return false; }
|
|
|
|
virtual bool SetAIStage(CStateManager&, float) { return false; }
|
|
|
|
virtual bool AIStage(CStateManager&, float) { return false; }
|
|
|
|
virtual bool StartAttack(CStateManager&, float) { return false; }
|
|
|
|
virtual bool BreakAttack(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldStrafe(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldSpecialAttack(CStateManager&, float) { return false; }
|
|
|
|
virtual bool LostInterest(CStateManager&, float) { return false; }
|
|
|
|
virtual bool CodeTrigger(CStateManager&, float) { return false; }
|
|
|
|
virtual bool BounceFind(CStateManager&, float) { return false; }
|
|
|
|
virtual bool Random(CStateManager&, float) { return false; }
|
|
|
|
virtual bool FixedRandom(CStateManager&, float) { return false; }
|
|
|
|
virtual bool IsDizzy(CStateManager&, float) { return false; }
|
|
|
|
virtual bool ShouldCallForBackup(CStateManager&, float) { return false; }
|
2015-08-22 01:58:41 +00:00
|
|
|
};
|
|
|
|
|
2015-08-17 22:05:00 +00:00
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_CAI_HPP__
|