mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-20 04:30:12 +02:00
All Doom 3 AI is now native.
This commit is contained in:
+50
-26
@@ -57,39 +57,47 @@ class idDeclParticle;
|
||||
|
||||
class idAnimState {
|
||||
public:
|
||||
|
||||
bool idleAnim;
|
||||
idStr state;
|
||||
int animBlendFrames;
|
||||
int lastAnimBlendFrames; // allows override anims to blend based on the last transition time
|
||||
|
||||
public:
|
||||
idAnimState();
|
||||
~idAnimState();
|
||||
idAnimState();
|
||||
~idAnimState();
|
||||
|
||||
void Save( idSaveGame *savefile ) const;
|
||||
void Restore( idRestoreGame *savefile );
|
||||
void Save(idSaveGame* savefile) const;
|
||||
void Restore(idRestoreGame* savefile);
|
||||
|
||||
void Init( idActor *owner, idAnimator *_animator, int animchannel );
|
||||
void Shutdown( void );
|
||||
void SetState( const char *name, int blendFrames );
|
||||
void StopAnim( int frames );
|
||||
void PlayAnim( int anim );
|
||||
void CycleAnim( int anim );
|
||||
void BecomeIdle( void );
|
||||
bool UpdateState( void );
|
||||
bool Disabled( void ) const;
|
||||
void Enable( int blendFrames );
|
||||
void Disable( void );
|
||||
bool AnimDone( int blendFrames ) const;
|
||||
bool IsIdle( void ) const;
|
||||
animFlags_t GetAnimFlags( void ) const;
|
||||
void Init(idEntity* owner, idAnimator* _animator, int animchannel);
|
||||
void Shutdown(void);
|
||||
void SetState(const char* name, int blendFrames, int flags = 0);
|
||||
void PostState(const char* name, int blendFrames = 0, int delay = 0, int flags = 0);
|
||||
void StopAnim(int frames);
|
||||
void PlayAnim(int anim);
|
||||
void CycleAnim(int anim);
|
||||
void BecomeIdle(void);
|
||||
bool UpdateState(void);
|
||||
bool Disabled(void) const;
|
||||
void Enable(int blendFrames);
|
||||
void Disable(void);
|
||||
bool AnimDone(int blendFrames) const;
|
||||
bool IsIdle(void) const;
|
||||
animFlags_t GetAnimFlags(void) const;
|
||||
|
||||
rvStateThread& GetStateThread(void);
|
||||
|
||||
idAnimator* GetAnimator(void) const { return animator; };
|
||||
private:
|
||||
idActor * self;
|
||||
idAnimator * animator;
|
||||
idThread * thread;
|
||||
// RAVEN BEGIN
|
||||
// bdube: converted self to entity ptr so any entity can use it
|
||||
idEntity* self;
|
||||
// RAVEN END
|
||||
idAnimator* animator;
|
||||
int channel;
|
||||
bool disabled;
|
||||
|
||||
rvStateThread stateThread;
|
||||
};
|
||||
|
||||
class idAttachInfo {
|
||||
@@ -106,6 +114,8 @@ typedef struct {
|
||||
|
||||
class idActor : public idAFEntity_Gibbable {
|
||||
public:
|
||||
friend class rvmAIObject;
|
||||
|
||||
CLASS_PROTOTYPE( idActor );
|
||||
|
||||
int team;
|
||||
@@ -135,6 +145,10 @@ public:
|
||||
|
||||
void CheckBlink( void );
|
||||
|
||||
void SetAnimState(int channel, const char* statename, int blendFrames, int flags);
|
||||
void PostAnimState(int channel, const char* statename, int blendFrames, int delay = 0, int flags = 0);
|
||||
void StopAnimState(int channel);
|
||||
|
||||
virtual bool GetPhysicsToVisualTransform( idVec3 &origin, idMat3 &axis );
|
||||
virtual bool GetPhysicsToSoundTransform( idVec3 &origin, idMat3 &axis );
|
||||
|
||||
@@ -198,7 +212,7 @@ public:
|
||||
int GetAnim( int channel, const char *name );
|
||||
void UpdateAnimState( void );
|
||||
void SetAnimState( int channel, const char *name, int blendFrames );
|
||||
const char * GetAnimState( int channel ) const;
|
||||
idAnimState& GetAnimState(int channel);
|
||||
bool InAnimState( int channel, const char *name ) const;
|
||||
const char * WaitState( void ) const;
|
||||
void SetWaitState( const char *_waitstate );
|
||||
@@ -270,7 +284,10 @@ protected:
|
||||
// copies animation from body to head joints
|
||||
void CopyJointsFromBodyToHead( void );
|
||||
|
||||
private:
|
||||
void Event_PlayAnim(int channel, const char* animname, int blendFrames);
|
||||
void Event_PlayCycle(int channel, const char* animname, int blendFrames);
|
||||
bool HasAnim(int channel, const char* animname, bool forcePrefix);
|
||||
protected:
|
||||
void SyncAnimChannels( int channel, int syncToChannel, int blendFrames );
|
||||
void FinishSetup( void );
|
||||
void SetupHead( void );
|
||||
@@ -290,8 +307,8 @@ private:
|
||||
void Event_EnablePain( void );
|
||||
void Event_GetPainAnim( void );
|
||||
void Event_StopAnim( int channel, int frames );
|
||||
void Event_PlayAnim( int channel, const char *name );
|
||||
void Event_PlayCycle( int channel, const char *name );
|
||||
void Event_PlayAnimScript( int channel, const char *name );
|
||||
void Event_PlayCycleScript( int channel, const char *name );
|
||||
void Event_IdleAnim( int channel, const char *name );
|
||||
void Event_SetSyncedAnimWeight( int channel, int anim, float weight );
|
||||
void Event_OverrideAnim( int channel );
|
||||
@@ -316,6 +333,13 @@ private:
|
||||
void Event_SetState( const char *name );
|
||||
void Event_GetState( void );
|
||||
void Event_GetHead( void );
|
||||
|
||||
idAnimState& GetAnimStateVar(int channel);
|
||||
const idAnimState& GetAnimStateVar(int channel) const;
|
||||
};
|
||||
|
||||
ID_INLINE rvStateThread& idAnimState::GetStateThread(void) {
|
||||
return stateThread;
|
||||
}
|
||||
|
||||
#endif /* !__GAME_ACTOR_H__ */
|
||||
|
||||
Reference in New Issue
Block a user