diff --git a/src/Common/CommonImportExport.inl b/src/Common/CommonImportExport.inl index 7b472a50227..f92b44275d9 100644 --- a/src/Common/CommonImportExport.inl +++ b/src/Common/CommonImportExport.inl @@ -29,6 +29,12 @@ #define XRCORE_API XR_IMPORT #endif +#ifdef XRECORE_EXPORTS +#define XRECORE_API XR_EXPORT +#else +#define XRECORE_API XR_IMPORT +#endif + #ifdef XRGAMESPY_EXPORTS #define XRGAMESPY_API XR_EXPORT #else diff --git a/src/Common/NvMender2003/NVMeshMender.h b/src/Common/NvMender2003/NVMeshMender.h index f172e5c9a6b..90af5babd1e 100644 --- a/src/Common/NvMender2003/NVMeshMender.h +++ b/src/Common/NvMender2003/NVMeshMender.h @@ -108,7 +108,7 @@ class MeshMender FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX3 | D3DFVF_TEXCOORDSIZE2(0) | D3DFVF_TEXCOORDSIZE3(1) | D3DFVF_TEXCOORDSIZE3(2) }; - Vertex::Vertex() : + Vertex() : pos(0.0f, 0.0f, 0.0f), normal(0.0f, 0.0f, 0.0f), s(0.0f), t(0.0f), tangent(0.0f, 0.0f, 0.0f), binormal(0.0f, 0.0f, 0.0f) {} diff --git a/src/Common/NvMender2003/mender_input_output.h b/src/Common/NvMender2003/mender_input_output.h index 463edc96854..5b201e5f3fa 100644 --- a/src/Common/NvMender2003/mender_input_output.h +++ b/src/Common/NvMender2003/mender_input_output.h @@ -31,7 +31,7 @@ static void fill_mender_input(const xr_vector& vertices, const xr_v for (u32 i = 0; i < vertices_number; ++i) set_vertex(theVerts[i], vertices[i]); // fill inputs (indices) - for (xr_vector::const_iterator face_it = faces.begin(); face_it!=faces.end(); face_it++) + for (auto face_it = faces.cbegin(); face_it!=faces.cend(); ++face_it) add_face(theIndices, *face_it); } @@ -45,7 +45,7 @@ static void retrive_data_from_mender_otput(xr_vector& vertices, // old_vertices.clear(); // save old vertices to retrive through mappingNewToOldVert data that missing in MeshMender::Vertex old_vertices = vertices; - // retriving data + // retrieving data const u32 face_count = faces.size(); for (u32 i = 0; i < face_count; ++i) set_face(faces[i], theIndices[3*i + 0], theIndices[3*i + 1], theIndices[3*i + 2]); diff --git a/src/editors/ECore/ECore.vcxproj b/src/editors/ECore/ECore.vcxproj index b8e0f652565..812eacbf19b 100644 --- a/src/editors/ECore/ECore.vcxproj +++ b/src/editors/ECore/ECore.vcxproj @@ -54,6 +54,7 @@ EDITOR;_EDITOR;%(PreprocessorDefinitions) + $(ProjectDir)Editor;$(ProjectDir)Engine;%(AdditionalIncludeDirectories) @@ -75,7 +76,6 @@ - @@ -115,7 +115,6 @@ - @@ -144,7 +143,6 @@ - @@ -185,6 +183,11 @@ Create + + + {a0f7d1fb-59a7-4717-a7e4-96f37e91998e} + + diff --git a/src/editors/ECore/ECore.vcxproj.filters b/src/editors/ECore/ECore.vcxproj.filters index d15f7f0fc15..ee4bbd6603e 100644 --- a/src/editors/ECore/ECore.vcxproj.filters +++ b/src/editors/ECore/ECore.vcxproj.filters @@ -64,9 +64,6 @@ editor - - editor - editor @@ -178,9 +175,6 @@ - - editor - editor @@ -265,9 +259,6 @@ editor - - editor - editor diff --git a/src/editors/ECore/Editor/EStats.h b/src/editors/ECore/Editor/EStats.h index 324dc6f04ea..42f6bdbda03 100644 --- a/src/editors/ECore/Editor/EStats.h +++ b/src/editors/ECore/Editor/EStats.h @@ -9,9 +9,8 @@ // refs class CGameFont; -class ENGINE_API CEStats : - - public CStatsPhysics +class ENGINE_API CEStats + : public CStats //CStatsPhysics { public: float fFPS, fRFPS, fTPS; // FPS, RenderFPS, TPS diff --git a/src/editors/ECore/Editor/ETextureParams.cpp b/src/editors/ECore/Editor/ETextureParams.cpp deleted file mode 100644 index 8b137891791..00000000000 --- a/src/editors/ECore/Editor/ETextureParams.cpp +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/editors/ECore/Editor/ETextureParams.h b/src/editors/ECore/Editor/ETextureParams.h deleted file mode 100644 index 8b137891791..00000000000 --- a/src/editors/ECore/Editor/ETextureParams.h +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/editors/ECore/Editor/EditorPreferences.cpp b/src/editors/ECore/Editor/EditorPreferences.cpp index 62076def537..6e7ad1af598 100644 --- a/src/editors/ECore/Editor/EditorPreferences.cpp +++ b/src/editors/ECore/Editor/EditorPreferences.cpp @@ -72,7 +72,7 @@ void CCustomPreferences::ApplyValues() //--------------------------------------------------------------------------- -void __stdcall CCustomPreferences::OnClose() { ApplyValues(); } +void CCustomPreferences::OnClose() { ApplyValues(); } //--------------------------------------------------------------------------- void CheckValidate(ShortcutValue*, const xr_shortcut& new_val, bool& result) diff --git a/src/editors/ECore/Editor/EditorPreferences.h b/src/editors/ECore/Editor/EditorPreferences.h index 2b2284ccd40..d07f72564e0 100644 --- a/src/editors/ECore/Editor/EditorPreferences.h +++ b/src/editors/ECore/Editor/EditorPreferences.h @@ -68,7 +68,7 @@ class ECORE_API CCustomPreferences protected: void OnKeyboardCommonFileClick(ButtonValue* value, bool& bModif, bool& bSafe); - void__stdcall OnClose(); + void OnClose(); void ApplyValues(); virtual void Load(CInifile*); diff --git a/src/editors/ECore/Editor/Engine.cpp b/src/editors/ECore/Editor/Engine.cpp index 9a64cc00a4e..823a2b8f718 100644 --- a/src/editors/ECore/Editor/Engine.cpp +++ b/src/editors/ECore/Editor/Engine.cpp @@ -8,6 +8,7 @@ #include "Engine.h" #include "ui_main.h" +/* CEngine Engine; ////////////////////////////////////////////////////////////////////// @@ -48,7 +49,7 @@ void CEngine::Initialize(void) xrBinder* bindCPU = (xrBinder*)GetProcAddress(hPSGP, "xrBind_PSGP"); R_ASSERT(bindCPU); - bindCPU(&PSGP, CPU::ID.feature /*& CPU::ID.os_support*/); + bindCPU(&PSGP, CPU::ID.feature / *& CPU::ID.os_support* /); // for compliance with editor PSGP.skin1W = xrSkin1W_x86; PSGP.skin2W = xrSkin2W_x86; @@ -75,3 +76,4 @@ void CEngine::Destroy() hPSGP = 0; } } +*/ diff --git a/src/editors/ECore/Editor/UI_Camera.h b/src/editors/ECore/Editor/UI_Camera.h index fc6c09cdaee..b6be6502a92 100644 --- a/src/editors/ECore/Editor/UI_Camera.h +++ b/src/editors/ECore/Editor/UI_Camera.h @@ -24,8 +24,8 @@ class ECORE_API CUI_Camera Fvector m_Target; protected: - friendclass CEditorRenderDevice; - friendclass TUI; + friend class CEditorRenderDevice; + friend class TUI; float m_Znear; float m_Zfar; diff --git a/src/editors/ECore/Editor/UI_ToolsCustom.h b/src/editors/ECore/Editor/UI_ToolsCustom.h index 6a6f2e6ffca..b1103528b6c 100644 --- a/src/editors/ECore/Editor/UI_ToolsCustom.h +++ b/src/editors/ECore/Editor/UI_ToolsCustom.h @@ -48,7 +48,7 @@ enum ETFlags class ECORE_API CToolCustom { - friendclass CCustomPreferences; + friend class CCustomPreferences; protected: bool m_bReady; @@ -82,7 +82,7 @@ class ECORE_API CToolCustom u32 dwFogColor; public: - AnsiString m_LastFileName; + xr_string m_LastFileName; public: struct SDebugDraw @@ -220,13 +220,13 @@ class ECORE_API CToolCustom virtual void OnShowHint(AStringVec& SS) = 0; - virtual bool__fastcall MouseStart(TShiftState Shift) = 0; - virtual bool__fastcall MouseEnd(TShiftState Shift) = 0; - virtual void__fastcall MouseMove(TShiftState Shift) = 0; - virtual bool__fastcall HiddenMode() { return m_bHiddenMode; } - virtual bool__fastcall KeyDown(WORD Key, TShiftState Shift) { return false; } - virtual bool__fastcall KeyUp(WORD Key, TShiftState Shift) { return false; } - virtual bool__fastcall KeyPress(WORD Key, TShiftState Shift) { return false; } + virtual bool MouseStart(TShiftState Shift) = 0; + virtual bool MouseEnd(TShiftState Shift) = 0; + virtual void MouseMove(TShiftState Shift) = 0; + virtual bool HiddenMode() { return m_bHiddenMode; } + virtual bool KeyDown(WORD Key, TShiftState Shift) { return false; } + virtual bool KeyUp(WORD Key, TShiftState Shift) { return false; } + virtual bool KeyPress(WORD Key, TShiftState Shift) { return false; } virtual bool Pick(TShiftState Shift) = 0; virtual bool RayPick(const Fvector& start, const Fvector& dir, float& dist, Fvector* pt = 0, Fvector* n = 0) = 0; @@ -234,7 +234,7 @@ class ECORE_API CToolCustom virtual void UpdateProperties(BOOL bForced = FALSE) = 0; virtual void RefreshProperties() = 0; - const AnsiString& GetEditFileName() { return m_LastFileName; } + const xr_string& GetEditFileName() { return m_LastFileName; } CEditableObject* m_pAxisMoveObject; Fmatrix m_axis_xform; diff --git a/src/editors/ECore/Editor/device.h b/src/editors/ECore/Editor/device.h index 118017c82cc..e4cbeff52b7 100644 --- a/src/editors/ECore/Editor/device.h +++ b/src/editors/ECore/Editor/device.h @@ -96,6 +96,7 @@ class ECORE_API CEditorRenderDevice : // Dependent classes CResourceManager* Resources; CEStats* Statistic; + RenderDeviceStatictics stats; CGameFont* pSystemFont; @@ -132,6 +133,9 @@ class ECORE_API CEditorRenderDevice : void ShutDown(void); void Reset(IReader* F, BOOL bKeepTextures); + const RenderDeviceStatictics& GetStats() const override { return stats; } + void DumpStatistics(class IGameFont& font, class IPerformanceAlert* alert) override {} + IC CTimer* GetTimerGlobal() { return &TimerGlobal; } IC float GetRenderArea() { return m_RenderArea; } // Sprite rendering @@ -175,9 +179,9 @@ class ECORE_API CEditorRenderDevice : Shader_xrLC_LIB ShaderXRLC; private: - virtual CStatsPhysics* _BCL StatPhysics() { return Statistic; } - virtual void _BCL AddSeqFrame(pureFrame* f, bool mt) { seqFrame.Add(f, REG_PRIORITY_LOW); } - virtual void _BCL RemoveSeqFrame(pureFrame* f) { seqFrame.Remove(f); } + virtual CStats* StatPhysics() { return Statistic; } + virtual void AddSeqFrame(pureFrame* f, bool mt) { seqFrame.Add(f, REG_PRIORITY_LOW); } + virtual void RemoveSeqFrame(pureFrame* f) { seqFrame.Remove(f); } }; extern ECORE_API CEditorRenderDevice EDevice; diff --git a/src/editors/ECore/Editor/engine.h b/src/editors/ECore/Editor/engine.h index cd451801a40..4d02c5c4eaa 100644 --- a/src/editors/ECore/Editor/engine.h +++ b/src/editors/ECore/Editor/engine.h @@ -8,6 +8,7 @@ #include "ELog.h" +/* class ENGINE_API CEngine { HMODULE hPSGP; @@ -24,5 +25,6 @@ class ENGINE_API CEngine }; ENGINE_API extern CEngine Engine; +*/ #endif // !defined(AFX_ENGINE_H__22802DD7_D7EB_4234_9781_E237657471AC__INCLUDED_) diff --git a/src/editors/ECore/Editor/render.h b/src/editors/ECore/Editor/render.h index db268586c97..cd835374cf1 100644 --- a/src/editors/ECore/Editor/render.h +++ b/src/editors/ECore/Editor/render.h @@ -2,8 +2,8 @@ #ifndef renderH #define renderH -#include "xrCDB\Frustum.h" -#include "vis_common.h" +#include "xrCDB/Frustum.h" +#include "xrEngine/vis_common.h" #include "Layers/xrRender/blenders/Blender.h" #include "Layers/xrRender/blenders/Blender_CLSID.h" @@ -16,14 +16,14 @@ #include "Include/xrAPI/xrAPI.h" // definition (Renderer) -class CRenderTarget /*:public IRender_Target*/ +class CRenderTarget : public IRender_Target { public: virtual u32 get_width() { return EDevice.dwWidth; } virtual u32 get_height() { return EDevice.dwHeight; } }; -class IRender +class IERender { public: enum GenerationLevel @@ -39,9 +39,7 @@ class IRender virtual GenerationLevel get_generation() = 0; }; -class ECORE_API CRender : - - public IRender +class ECORE_API CRender : public IERender { CRenderTarget* Target; Fmatrix current_matrix; diff --git a/src/editors/ECore/Engine/NVMeshMender.h b/src/editors/ECore/Engine/NVMeshMender.h index cd685d9d154..9103c539742 100644 --- a/src/editors/ECore/Engine/NVMeshMender.h +++ b/src/editors/ECore/Engine/NVMeshMender.h @@ -209,11 +209,11 @@ class NVMeshMender DontWeightNormalsByFaceSize }; - bool NVMeshMender::Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVector& output, + bool Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVector& output, const float bSmoothCreaseAngleRadians = 3.141592654f / 3.0f, const float* pTextureMatrix = 0, const Option _FixTangents = FixTangents, const Option _FixCylindricalTexGen = FixCylindricalTexGen, const Option _WeightNormalsByFaceSize = WeightNormalsByFaceSize); - bool NVMeshMender::MungeD3DX(const NVMeshMender::VAVector& input, NVMeshMender::VAVector& output, + bool MungeD3DX(const NVMeshMender::VAVector& input, NVMeshMender::VAVector& output, const float bSmoothCreaseAngleRadians = 3.141592654f / 3.0f, const float* pTextureMatrix = 0, const Option _FixTangents = FixTangents, const Option _FixCylindricalTexGen = FixCylindricalTexGen, const Option _WeightNormalsByFaceSize = WeightNormalsByFaceSize); diff --git a/src/editors/ECore/stdafx.h b/src/editors/ECore/stdafx.h index 0a0eb68261f..8ec996b565e 100644 --- a/src/editors/ECore/stdafx.h +++ b/src/editors/ECore/stdafx.h @@ -98,7 +98,13 @@ enum TMsgDlgBtn typedef TMsgDlgBtn TMsgDlgButtons[mbHelp]; // core -#include +#include "xrCore/xrCore.h" +#include "xrCore/_stl_extensions.h" +#include "xrCore/_types.h" +#include "xrCore/_fbox.h" +#include "xrCommon/xr_vector.h" +#include "xrCore/Animation/Bone.hpp" +#include "xrCore/Animation/Motion.hpp" #define AnsiString xr_string @@ -139,19 +145,22 @@ DEFINE_VECTOR(AnsiString*, LPAStringVec, LPAStringIt); #include "xrPhysics/xrPhysics.h" -struct str_pred : public std::binary_function +struct str_pred { - IC bool operator()(LPCSTR x, LPCSTR y) const { return strcmp(x, y) < 0; } + bool operator()(LPCSTR x, LPCSTR y) const { return strcmp(x, y) < 0; } }; -struct astr_pred : public std::binary_function + +struct astr_pred { - IC bool operator()(const AnsiString& x, const AnsiString& y) const { return x < y; } + bool operator()(const AnsiString& x, const AnsiString& y) const { return x < y; } }; +enum TShiftState { ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble }; + #ifdef _EDITOR -#include "Editor\device.h" -#include "xrEngine\properties.h" -#include "Editor\render.h" +#include "Editor/device.h" +#include "xrEngine/properties.h" +#include "Editor/render.h" DEFINE_VECTOR(FVF::L, FLvertexVec, FLvertexIt); DEFINE_VECTOR(FVF::TL, FTLvertexVec, FTLvertexIt); DEFINE_VECTOR(FVF::LIT, FLITvertexVec, FLITvertexIt); diff --git a/src/xrCore/Animation/Bone.hpp b/src/xrCore/Animation/Bone.hpp index 035d3f9990d..0afeb752745 100644 --- a/src/xrCore/Animation/Bone.hpp +++ b/src/xrCore/Animation/Bone.hpp @@ -392,7 +392,6 @@ class XRCORE_API CBone : public CBoneInstance, public IBoneData void ResetData(); void CopyData(CBone* bone); -#if defined _EDITOR || defined _MAYA_EXPORT void ShapeScale(const Fvector& amount); void ShapeRotate(const Fvector& amount); void ShapeMove(const Fvector& amount); @@ -404,11 +403,11 @@ class XRCORE_API CBone : public CBoneInstance, public IBoneData bool Pick(float& dist, const Fvector& S, const Fvector& D, const Fmatrix& parent); void Select(BOOL flag) { flags.set(flSelected, flag); } - bool Selected() { return !!flags.is(flSelected); } + bool Selected() { return flags.is(flSelected); } void ClampByLimits(); bool ExportOGF(IWriter& F); -#endif + private: IBoneData& GetChild(u16 id) { return *children[id]; } const IBoneData& GetChild(u16 id) const { return *children[id]; }