Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Untitled diff
作成日
9 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
11 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
171 行
すべてコピー
18 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
177 行
すべてコピー
//========= Copyright Valve Corporation, All rights reserved. ============//
//========= Copyright Valve Corporation, All rights reserved. ============//
//
//
// Purpose:
// Purpose:
//
//
// $NoKeywords: $
// $NoKeywords: $
//=============================================================================//
//=============================================================================//
#ifndef AI_COMPONENT_H
#ifndef AI_COMPONENT_H
#define AI_COMPONENT_H
#define AI_COMPONENT_H
#if defined( _WIN32 )
#if defined( _WIN32 )
#pragma once
#pragma once
#endif
#endif
class CAI_BaseNPC;
class CAI_BaseNPC;
class CAI_Enemies;
class CAI_Enemies;
typedef int AI_TaskFailureCode_t;
typedef int AI_TaskFailureCode_t;
struct Task_t;
struct Task_t;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// CAI_Component
// CAI_Component
//
//
// Purpose: Shared functionality of all classes that assume some of the
// Purpose: Shared functionality of all classes that assume some of the
// responsibilities of an owner AI.
// responsibilities of an owner AI.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
class CAI_Component
class CAI_Component
{
{
DECLARE_CLASS_NOBASE( CAI_Component );
DECLARE_CLASS_NOBASE( CAI_Component );
protected:
protected:
コピー
コピー済み
コピー
コピー済み
CAI_Component( CAI_BaseNPC *pOuter = NULL )
CAI_Component( CAI_BaseNPC *pOuter = NULL )
;
: m_pOuter(pOuter)
{
}
virtual ~CAI_Component() {}
virtual ~CAI_Component() {}
public:
public:
コピー
コピー済み
コピー
コピー済み
virtual void SetOuter(
CAI_BaseNPC
*pOuter ) { m_pOuter = pOuter; }
virtual void SetOuter(
CBaseCombatCharacter
*pOuter ) { m_pOuter = pOuter; }
コピー
コピー済み
コピー
コピー済み
CAI_BaseNPC * GetOuter()
{ return m_pOuter; }
CAI_BaseNPC * GetOuter()
;
const CAI_BaseNPC * GetOuter() const
{
return m_pOuter;
}
const CAI_BaseNPC * GetOuter() const
;
CBaseCombatCharacter *GetCharacter() {
return m_pOuter;
}
const CBaseCombatCharacter *GetCharacter() const {
return m_pOuter;
}
Hull_t GetHullType() const;
Hull_t GetHullType() const;
float GetHullWidth() const;
float GetHullWidth() const;
float GetHullHeight() const;
float GetHullHeight() const;
const Vector & GetHullMins() const;
const Vector & GetHullMins() const;
const Vector & GetHullMaxs() const;
const Vector & GetHullMaxs() const;
protected:
protected:
//
//
// Common services provided by CAI_BaseNPC, Convenience methods to simplify derived code
// Common services provided by CAI_BaseNPC, Convenience methods to simplify derived code
//
//
edict_t * GetEdict();
edict_t * GetEdict();
const Vector & GetLocalOrigin() const;
const Vector & GetLocalOrigin() const;
void SetLocalOrigin( const Vector &origin );
void SetLocalOrigin( const Vector &origin );
const Vector & GetAbsOrigin() const;
const Vector & GetAbsOrigin() const;
const QAngle& GetAbsAngles() const;
const QAngle& GetAbsAngles() const;
void SetLocalAngles( const QAngle& angles );
void SetLocalAngles( const QAngle& angles );
const QAngle & GetLocalAngles( void ) const;
const QAngle & GetLocalAngles( void ) const;
const Vector& WorldAlignMins() const;
const Vector& WorldAlignMins() const;
const Vector& WorldAlignMaxs() const;
const Vector& WorldAlignMaxs() const;
Vector WorldSpaceCenter() const;
Vector WorldSpaceCenter() const;
int GetCollisionGroup() const;
int GetCollisionGroup() const;
void SetSolid( SolidType_t val );
void SetSolid( SolidType_t val );
SolidType_t GetSolid() const;
SolidType_t GetSolid() const;
float GetGravity() const;
float GetGravity() const;
void SetGravity( float );
void SetGravity( float );
CBaseEntity* GetEnemy();
CBaseEntity* GetEnemy();
const Vector & GetEnemyLKP() const;
const Vector & GetEnemyLKP() const;
void TranslateNavGoal( CBaseEntity *pEnemy, Vector &chasePosition);
void TranslateNavGoal( CBaseEntity *pEnemy, Vector &chasePosition);
CBaseEntity* GetTarget();
CBaseEntity* GetTarget();
void SetTarget( CBaseEntity *pTarget );
void SetTarget( CBaseEntity *pTarget );
const Task_t* GetCurTask( void );
const Task_t* GetCurTask( void );
virtual void TaskFail( AI_TaskFailureCode_t );
virtual void TaskFail( AI_TaskFailureCode_t );
void TaskFail( const char *pszGeneralFailText );
void TaskFail( const char *pszGeneralFailText );
virtual void TaskComplete( bool fIgnoreSetFailedCondition = false );
virtual void TaskComplete( bool fIgnoreSetFailedCondition = false );
int TaskIsRunning();
int TaskIsRunning();
inline int TaskIsComplete();
inline int TaskIsComplete();
Activity GetActivity();
Activity GetActivity();
void SetActivity( Activity NewActivity );
void SetActivity( Activity NewActivity );
float GetIdealSpeed() const;
float GetIdealSpeed() const;
float GetIdealAccel() const;
float GetIdealAccel() const;
int GetSequence();
int GetSequence();
int GetEntFlags() const;
int GetEntFlags() const;
void AddEntFlag( int flags );
void AddEntFlag( int flags );
void RemoveEntFlag( int flagsToRemove );
void RemoveEntFlag( int flagsToRemove );
void ToggleEntFlag( int flagToToggle );
void ToggleEntFlag( int flagToToggle );
void SetGroundEntity( CBaseEntity *ground );
void SetGroundEntity( CBaseEntity *ground );
CBaseEntity* GetGoalEnt();
CBaseEntity* GetGoalEnt();
void SetGoalEnt( CBaseEntity *pGoalEnt );
void SetGoalEnt( CBaseEntity *pGoalEnt );
void Remember( int iMemory );
void Remember( int iMemory );
void Forget( int iMemory );
void Forget( int iMemory );
bool HasMemory( int iMemory );
bool HasMemory( int iMemory );
CAI_Enemies * GetEnemies();
CAI_Enemies * GetEnemies();
const char * GetEntClassname();
const char * GetEntClassname();
int CapabilitiesGet();
int CapabilitiesGet();
float GetLastThink( const char *szContext = NULL );
float GetLastThink( const char *szContext = NULL );
public:
public:
#if defined(new)
#if defined(new)
#error
#error
#endif
#endif
void *operator new( size_t nBytes )
void *operator new( size_t nBytes )
{
{
MEM_ALLOC_CREDIT();
MEM_ALLOC_CREDIT();
void *pResult = MemAlloc_Alloc( nBytes );
void *pResult = MemAlloc_Alloc( nBytes );
memset( pResult, 0, nBytes );
memset( pResult, 0, nBytes );
return pResult;
return pResult;
};
};
void *operator new( size_t nBytes, int nBlockUse, const char *pFileName, int nLine )
void *operator new( size_t nBytes, int nBlockUse, const char *pFileName, int nLine )
{
{
MEM_ALLOC_CREDIT();
MEM_ALLOC_CREDIT();
void *pResult = MemAlloc_Alloc( nBytes, pFileName, nLine );
void *pResult = MemAlloc_Alloc( nBytes, pFileName, nLine );
memset( pResult, 0, nBytes );
memset( pResult, 0, nBytes );
return pResult;
return pResult;
}
}
private:
private:
コピー
コピー済み
コピー
コピー済み
CAI_BaseNPC
*m_pOuter;
CBaseCombatCharacter
*m_pOuter;
};
};
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
template <class NPC_CLASS, class BASE_COMPONENT = CAI_Component>
template <class NPC_CLASS, class BASE_COMPONENT = CAI_Component>
class CAI_ComponentWithOuter : public BASE_COMPONENT
class CAI_ComponentWithOuter : public BASE_COMPONENT
{
{
protected:
protected:
CAI_ComponentWithOuter(NPC_CLASS *pOuter = NULL)
CAI_ComponentWithOuter(NPC_CLASS *pOuter = NULL)
: BASE_COMPONENT(pOuter)
: BASE_COMPONENT(pOuter)
{
{
}
}
public:
public:
// Hides base version
// Hides base version
void SetOuter( NPC_CLASS *pOuter ) { BASE_COMPONENT::SetOuter((CAI_BaseNPC *)pOuter); }
void SetOuter( NPC_CLASS *pOuter ) { BASE_COMPONENT::SetOuter((CAI_BaseNPC *)pOuter); }
NPC_CLASS * GetOuter() { return (NPC_CLASS *)(BASE_COMPONENT::GetOuter()); }
NPC_CLASS * GetOuter() { return (NPC_CLASS *)(BASE_COMPONENT::GetOuter()); }
const NPC_CLASS * GetOuter() const { return (NPC_CLASS *)(BASE_COMPONENT::GetOuter()); }
const NPC_CLASS * GetOuter() const { return (NPC_CLASS *)(BASE_COMPONENT::GetOuter()); }
};
};
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
#define DEFINE_AI_COMPONENT_OUTER( NPC_CLASS ) \
#define DEFINE_AI_COMPONENT_OUTER( NPC_CLASS ) \
void SetOuter( NPC_CLASS *pOuter ) { CAI_Component::SetOuter((CAI_BaseNPC *)pOuter); } \
void SetOuter( NPC_CLASS *pOuter ) { CAI_Component::SetOuter((CAI_BaseNPC *)pOuter); } \
NPC_CLASS * GetOuter() { return (NPC_CLASS *)(CAI_Component::GetOuter()); } \
NPC_CLASS * GetOuter() { return (NPC_CLASS *)(CAI_Component::GetOuter()); } \
const NPC_CLASS * GetOuter() const { return (NPC_CLASS *)(CAI_Component::GetOuter()); }
const NPC_CLASS * GetOuter() const { return (NPC_CLASS *)(CAI_Component::GetOuter()); }
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
#endif // AI_COMPONENT_H
#endif // AI_COMPONENT_H
コピー
コピー済み
コピー
コピー済み
保存された差分
原文
ファイルを開く
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #ifndef AI_COMPONENT_H #define AI_COMPONENT_H #if defined( _WIN32 ) #pragma once #endif class CAI_BaseNPC; class CAI_Enemies; typedef int AI_TaskFailureCode_t; struct Task_t; //----------------------------------------------------------------------------- // CAI_Component // // Purpose: Shared functionality of all classes that assume some of the // responsibilities of an owner AI. //----------------------------------------------------------------------------- class CAI_Component { DECLARE_CLASS_NOBASE( CAI_Component ); protected: CAI_Component( CAI_BaseNPC *pOuter = NULL ) : m_pOuter(pOuter) { } virtual ~CAI_Component() {} public: virtual void SetOuter( CAI_BaseNPC *pOuter ) { m_pOuter = pOuter; } CAI_BaseNPC * GetOuter() { return m_pOuter; } const CAI_BaseNPC * GetOuter() const { return m_pOuter; } Hull_t GetHullType() const; float GetHullWidth() const; float GetHullHeight() const; const Vector & GetHullMins() const; const Vector & GetHullMaxs() const; protected: // // Common services provided by CAI_BaseNPC, Convenience methods to simplify derived code // edict_t * GetEdict(); const Vector & GetLocalOrigin() const; void SetLocalOrigin( const Vector &origin ); const Vector & GetAbsOrigin() const; const QAngle& GetAbsAngles() const; void SetLocalAngles( const QAngle& angles ); const QAngle & GetLocalAngles( void ) const; const Vector& WorldAlignMins() const; const Vector& WorldAlignMaxs() const; Vector WorldSpaceCenter() const; int GetCollisionGroup() const; void SetSolid( SolidType_t val ); SolidType_t GetSolid() const; float GetGravity() const; void SetGravity( float ); CBaseEntity* GetEnemy(); const Vector & GetEnemyLKP() const; void TranslateNavGoal( CBaseEntity *pEnemy, Vector &chasePosition); CBaseEntity* GetTarget(); void SetTarget( CBaseEntity *pTarget ); const Task_t* GetCurTask( void ); virtual void TaskFail( AI_TaskFailureCode_t ); void TaskFail( const char *pszGeneralFailText ); virtual void TaskComplete( bool fIgnoreSetFailedCondition = false ); int TaskIsRunning(); inline int TaskIsComplete(); Activity GetActivity(); void SetActivity( Activity NewActivity ); float GetIdealSpeed() const; float GetIdealAccel() const; int GetSequence(); int GetEntFlags() const; void AddEntFlag( int flags ); void RemoveEntFlag( int flagsToRemove ); void ToggleEntFlag( int flagToToggle ); void SetGroundEntity( CBaseEntity *ground ); CBaseEntity* GetGoalEnt(); void SetGoalEnt( CBaseEntity *pGoalEnt ); void Remember( int iMemory ); void Forget( int iMemory ); bool HasMemory( int iMemory ); CAI_Enemies * GetEnemies(); const char * GetEntClassname(); int CapabilitiesGet(); float GetLastThink( const char *szContext = NULL ); public: #if defined(new) #error #endif void *operator new( size_t nBytes ) { MEM_ALLOC_CREDIT(); void *pResult = MemAlloc_Alloc( nBytes ); memset( pResult, 0, nBytes ); return pResult; }; void *operator new( size_t nBytes, int nBlockUse, const char *pFileName, int nLine ) { MEM_ALLOC_CREDIT(); void *pResult = MemAlloc_Alloc( nBytes, pFileName, nLine ); memset( pResult, 0, nBytes ); return pResult; } private: CAI_BaseNPC *m_pOuter; }; //----------------------------------------------------------------------------- template <class NPC_CLASS, class BASE_COMPONENT = CAI_Component> class CAI_ComponentWithOuter : public BASE_COMPONENT { protected: CAI_ComponentWithOuter(NPC_CLASS *pOuter = NULL) : BASE_COMPONENT(pOuter) { } public: // Hides base version void SetOuter( NPC_CLASS *pOuter ) { BASE_COMPONENT::SetOuter((CAI_BaseNPC *)pOuter); } NPC_CLASS * GetOuter() { return (NPC_CLASS *)(BASE_COMPONENT::GetOuter()); } const NPC_CLASS * GetOuter() const { return (NPC_CLASS *)(BASE_COMPONENT::GetOuter()); } }; //----------------------------------------------------------------------------- #define DEFINE_AI_COMPONENT_OUTER( NPC_CLASS ) \ void SetOuter( NPC_CLASS *pOuter ) { CAI_Component::SetOuter((CAI_BaseNPC *)pOuter); } \ NPC_CLASS * GetOuter() { return (NPC_CLASS *)(CAI_Component::GetOuter()); } \ const NPC_CLASS * GetOuter() const { return (NPC_CLASS *)(CAI_Component::GetOuter()); } //----------------------------------------------------------------------------- #endif // AI_COMPONENT_H
変更されたテキスト
ファイルを開く
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #ifndef AI_COMPONENT_H #define AI_COMPONENT_H #if defined( _WIN32 ) #pragma once #endif class CAI_BaseNPC; class CAI_Enemies; typedef int AI_TaskFailureCode_t; struct Task_t; //----------------------------------------------------------------------------- // CAI_Component // // Purpose: Shared functionality of all classes that assume some of the // responsibilities of an owner AI. //----------------------------------------------------------------------------- class CAI_Component { DECLARE_CLASS_NOBASE( CAI_Component ); protected: CAI_Component( CAI_BaseNPC *pOuter = NULL ); virtual ~CAI_Component() {} public: virtual void SetOuter( CBaseCombatCharacter *pOuter ) { m_pOuter = pOuter; } CAI_BaseNPC * GetOuter(); const CAI_BaseNPC * GetOuter() const; CBaseCombatCharacter *GetCharacter() { return m_pOuter; } const CBaseCombatCharacter *GetCharacter() const { return m_pOuter; } Hull_t GetHullType() const; float GetHullWidth() const; float GetHullHeight() const; const Vector & GetHullMins() const; const Vector & GetHullMaxs() const; protected: // // Common services provided by CAI_BaseNPC, Convenience methods to simplify derived code // edict_t * GetEdict(); const Vector & GetLocalOrigin() const; void SetLocalOrigin( const Vector &origin ); const Vector & GetAbsOrigin() const; const QAngle& GetAbsAngles() const; void SetLocalAngles( const QAngle& angles ); const QAngle & GetLocalAngles( void ) const; const Vector& WorldAlignMins() const; const Vector& WorldAlignMaxs() const; Vector WorldSpaceCenter() const; int GetCollisionGroup() const; void SetSolid( SolidType_t val ); SolidType_t GetSolid() const; float GetGravity() const; void SetGravity( float ); CBaseEntity* GetEnemy(); const Vector & GetEnemyLKP() const; void TranslateNavGoal( CBaseEntity *pEnemy, Vector &chasePosition); CBaseEntity* GetTarget(); void SetTarget( CBaseEntity *pTarget ); const Task_t* GetCurTask( void ); virtual void TaskFail( AI_TaskFailureCode_t ); void TaskFail( const char *pszGeneralFailText ); virtual void TaskComplete( bool fIgnoreSetFailedCondition = false ); int TaskIsRunning(); inline int TaskIsComplete(); Activity GetActivity(); void SetActivity( Activity NewActivity ); float GetIdealSpeed() const; float GetIdealAccel() const; int GetSequence(); int GetEntFlags() const; void AddEntFlag( int flags ); void RemoveEntFlag( int flagsToRemove ); void ToggleEntFlag( int flagToToggle ); void SetGroundEntity( CBaseEntity *ground ); CBaseEntity* GetGoalEnt(); void SetGoalEnt( CBaseEntity *pGoalEnt ); void Remember( int iMemory ); void Forget( int iMemory ); bool HasMemory( int iMemory ); CAI_Enemies * GetEnemies(); const char * GetEntClassname(); int CapabilitiesGet(); float GetLastThink( const char *szContext = NULL ); public: #if defined(new) #error #endif void *operator new( size_t nBytes ) { MEM_ALLOC_CREDIT(); void *pResult = MemAlloc_Alloc( nBytes ); memset( pResult, 0, nBytes ); return pResult; }; void *operator new( size_t nBytes, int nBlockUse, const char *pFileName, int nLine ) { MEM_ALLOC_CREDIT(); void *pResult = MemAlloc_Alloc( nBytes, pFileName, nLine ); memset( pResult, 0, nBytes ); return pResult; } private: CBaseCombatCharacter *m_pOuter; }; //----------------------------------------------------------------------------- template <class NPC_CLASS, class BASE_COMPONENT = CAI_Component> class CAI_ComponentWithOuter : public BASE_COMPONENT { protected: CAI_ComponentWithOuter(NPC_CLASS *pOuter = NULL) : BASE_COMPONENT(pOuter) { } public: // Hides base version void SetOuter( NPC_CLASS *pOuter ) { BASE_COMPONENT::SetOuter((CAI_BaseNPC *)pOuter); } NPC_CLASS * GetOuter() { return (NPC_CLASS *)(BASE_COMPONENT::GetOuter()); } const NPC_CLASS * GetOuter() const { return (NPC_CLASS *)(BASE_COMPONENT::GetOuter()); } }; //----------------------------------------------------------------------------- #define DEFINE_AI_COMPONENT_OUTER( NPC_CLASS ) \ void SetOuter( NPC_CLASS *pOuter ) { CAI_Component::SetOuter((CAI_BaseNPC *)pOuter); } \ NPC_CLASS * GetOuter() { return (NPC_CLASS *)(CAI_Component::GetOuter()); } \ const NPC_CLASS * GetOuter() const { return (NPC_CLASS *)(CAI_Component::GetOuter()); } //----------------------------------------------------------------------------- #endif // AI_COMPONENT_H
違いを見つける