DisplayObject.cpp
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:3k
源码类别:

游戏

开发平台:

Visual C++

  1. //-----------------------------------------------------------------------------
  2. // File: DisplayObject.cpp
  3. //
  4. // Copyright (C) Microsoft Corporation. All Rights Reserved.
  5. //-----------------------------------------------------------------------------
  6. #include "stdafx.h"
  7. //-----------------------------------------------------------------------------
  8. // Name: CDisplayObject()
  9. // Desc:
  10. //-----------------------------------------------------------------------------
  11. CDisplayObject::CDisplayObject( const OBJECT_TYPE ObjectType )
  12. {
  13.     static DWORD s_dwID = 0;
  14.     s_dwID++;
  15.     m_ObjectType    = ObjectType;
  16.     m_bActive       = true;
  17.     m_pNext         = NULL;
  18.     m_pPrev         = NULL;
  19.     m_vPos          = D3DXVECTOR3(0,0,0);
  20.     m_pMeshNode     = NULL;
  21.     m_dwID          = s_dwID;
  22.     m_pPath         = NULL;
  23.     m_fDistToPlayer = 0.0f;
  24.     m_cullstate     = CS_UNKNOWN;
  25. }
  26. //-----------------------------------------------------------------------------
  27. // Name: CDisplayObject()
  28. // Desc:
  29. //-----------------------------------------------------------------------------
  30. CDisplayObject::~CDisplayObject(void)
  31. {
  32. }
  33. //-----------------------------------------------------------------------------
  34. // Name: OneTimeSceneInit()
  35. // Desc:
  36. //-----------------------------------------------------------------------------
  37. HRESULT CDisplayObject::OneTimeSceneInit()
  38. {
  39.     return S_OK;
  40. }
  41. //-----------------------------------------------------------------------------
  42. // Name: InitDeviceObjects()
  43. // Desc:
  44. //-----------------------------------------------------------------------------
  45. HRESULT CDisplayObject::InitDeviceObjects()
  46. {
  47.     return S_OK;
  48. }
  49. //-----------------------------------------------------------------------------
  50. // Name: RestoreDeviceObjects()
  51. // Desc:
  52. //-----------------------------------------------------------------------------
  53. HRESULT CDisplayObject::RestoreDeviceObjects()
  54. {
  55.     return S_OK;
  56. }
  57. //-----------------------------------------------------------------------------
  58. // Name: FrameMoveFinalize()
  59. // Desc:
  60. //-----------------------------------------------------------------------------
  61. HRESULT CDisplayObject::FrameMoveFinalize( const float fElapsedTime )
  62. {
  63.     return S_OK;
  64. }
  65. //-----------------------------------------------------------------------------
  66. // Name: CullObject()
  67. // Desc:
  68. //-----------------------------------------------------------------------------
  69. HRESULT CDisplayObject::CullObject( const float fWrapOffsetX, const float fWrapOffsetZ, const CULLINFO* const pCullInfo )
  70. {
  71.     m_cullstate = CS_INSIDE;
  72.     return S_OK;
  73. }
  74. //-----------------------------------------------------------------------------
  75. // Name: InvalidateDeviceObjects()
  76. // Desc:
  77. //-----------------------------------------------------------------------------
  78. HRESULT CDisplayObject::InvalidateDeviceObjects()
  79. {
  80.     return S_OK;
  81. }
  82. //-----------------------------------------------------------------------------
  83. // Name: DeleteDeviceObjects()
  84. // Desc:
  85. //-----------------------------------------------------------------------------
  86. HRESULT CDisplayObject::DeleteDeviceObjects()
  87. {
  88.     return S_OK;
  89. }
  90. //-----------------------------------------------------------------------------
  91. // Name: FinalCleanup()
  92. // Desc:
  93. //-----------------------------------------------------------------------------
  94. VOID CDisplayObject::FinalCleanup()
  95. {
  96. }