From b30a3c8743d8837e4b1ef871d133ae5e7ef9a06b Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 3 Dec 2021 18:17:33 +0800 Subject: *misc --- .../VisualStudio/MapEditor/MapEditor.vcxproj | 122 +++++++++++++++++++++ .../MapEditor/MapEditor.vcxproj.filters | 17 +++ .../VisualStudio/MapEditor/MapEditor.vcxproj.user | 4 + Client/Project/VisualStudio/PND.sln | 11 ++ .../Project/VisualStudio/PND_LIB/PND_LIB.vcxproj | 1 + .../VisualStudio/PND_LIB/PND_LIB.vcxproj.filters | 81 +++++++++++++- Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj | 6 + .../VisualStudio/Phy2D/Phy2D.vcxproj.filters | 24 ++++ Client/Source/PND/Common/Type.h | 7 +- Client/Source/PND/Math/Vector2.h | 6 +- Client/Source/PND/main.cpp | 2 +- Client/Source/Phy2D/Common/Settings.h | 103 +---------------- Client/Source/Phy2D/Common/Type.h | 9 ++ Client/Source/Phy2D/Documents/Phy2D.xlsx | Bin 0 -> 15199 bytes Client/Source/Phy2D/Documents/UnityPhysics2D.xlsx | Bin 0 -> 64233 bytes Client/Source/Phy2D/Math/Mat22.cpp | 0 Client/Source/Phy2D/Math/Mat22.h | 0 Client/Source/Phy2D/Math/Mat33.cpp | 0 Client/Source/Phy2D/Math/Mat33.h | 0 Client/Source/Phy2D/Math/Vec2.cpp | 0 Client/Source/Phy2D/Math/Vec2.h | 0 Client/Source/Phy2D/Phy2D.h | 3 +- Client/ThirdParty/README.txt | 1 + Client/Tools/README.txt | 2 + 24 files changed, 287 insertions(+), 112 deletions(-) create mode 100644 Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj create mode 100644 Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj.filters create mode 100644 Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj.user create mode 100644 Client/Source/Phy2D/Documents/Phy2D.xlsx create mode 100644 Client/Source/Phy2D/Documents/UnityPhysics2D.xlsx create mode 100644 Client/Source/Phy2D/Math/Mat22.cpp create mode 100644 Client/Source/Phy2D/Math/Mat22.h create mode 100644 Client/Source/Phy2D/Math/Mat33.cpp create mode 100644 Client/Source/Phy2D/Math/Mat33.h create mode 100644 Client/Source/Phy2D/Math/Vec2.cpp create mode 100644 Client/Source/Phy2D/Math/Vec2.h create mode 100644 Client/ThirdParty/README.txt create mode 100644 Client/Tools/README.txt diff --git a/Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj b/Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj new file mode 100644 index 0000000..01c1b89 --- /dev/null +++ b/Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj @@ -0,0 +1,122 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {0189015F-D8AE-40DE-8EDF-089EB08EC960} + MapEditor + 10.0.17763.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + true + + + + + Level3 + Disabled + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj.filters b/Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj.filters new file mode 100644 index 0000000..6546942 --- /dev/null +++ b/Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj.user b/Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj.user new file mode 100644 index 0000000..6e2aec7 --- /dev/null +++ b/Client/Project/VisualStudio/MapEditor/MapEditor.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/PND.sln b/Client/Project/VisualStudio/PND.sln index 3169007..0503ff2 100644 --- a/Client/Project/VisualStudio/PND.sln +++ b/Client/Project/VisualStudio/PND.sln @@ -31,6 +31,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{3D588F3B-8 EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_json", "test_json\test_json.vcxproj", "{ED1DC038-8E90-443F-88DE-C2F2D0D81052}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MapEditor", "MapEditor\MapEditor.vcxproj", "{0189015F-D8AE-40DE-8EDF-089EB08EC960}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -127,6 +129,14 @@ Global {ED1DC038-8E90-443F-88DE-C2F2D0D81052}.Release|x64.Build.0 = Release|x64 {ED1DC038-8E90-443F-88DE-C2F2D0D81052}.Release|x86.ActiveCfg = Release|Win32 {ED1DC038-8E90-443F-88DE-C2F2D0D81052}.Release|x86.Build.0 = Release|Win32 + {0189015F-D8AE-40DE-8EDF-089EB08EC960}.Debug|x64.ActiveCfg = Debug|x64 + {0189015F-D8AE-40DE-8EDF-089EB08EC960}.Debug|x64.Build.0 = Debug|x64 + {0189015F-D8AE-40DE-8EDF-089EB08EC960}.Debug|x86.ActiveCfg = Debug|Win32 + {0189015F-D8AE-40DE-8EDF-089EB08EC960}.Debug|x86.Build.0 = Debug|Win32 + {0189015F-D8AE-40DE-8EDF-089EB08EC960}.Release|x64.ActiveCfg = Release|x64 + {0189015F-D8AE-40DE-8EDF-089EB08EC960}.Release|x64.Build.0 = Release|x64 + {0189015F-D8AE-40DE-8EDF-089EB08EC960}.Release|x86.ActiveCfg = Release|Win32 + {0189015F-D8AE-40DE-8EDF-089EB08EC960}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -142,6 +152,7 @@ Global {88E2113C-BC15-4D54-8D09-5DBFB3A47C6D} = {845A763B-9CD8-4795-A3C4-D83146B3550C} {3D588F3B-81F5-44EF-8E6E-074D111DCE46} = {845A763B-9CD8-4795-A3C4-D83146B3550C} {ED1DC038-8E90-443F-88DE-C2F2D0D81052} = {3D588F3B-81F5-44EF-8E6E-074D111DCE46} + {0189015F-D8AE-40DE-8EDF-089EB08EC960} = {69D9F6A1-FE05-4A58-B87C-E62A6C69BE8F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3501AE41-C1E5-4131-9AB2-0DCBD10D9E3F} diff --git a/Client/Project/VisualStudio/PND_LIB/PND_LIB.vcxproj b/Client/Project/VisualStudio/PND_LIB/PND_LIB.vcxproj index e3748f7..25822a6 100644 --- a/Client/Project/VisualStudio/PND_LIB/PND_LIB.vcxproj +++ b/Client/Project/VisualStudio/PND_LIB/PND_LIB.vcxproj @@ -136,6 +136,7 @@ + diff --git a/Client/Project/VisualStudio/PND_LIB/PND_LIB.vcxproj.filters b/Client/Project/VisualStudio/PND_LIB/PND_LIB.vcxproj.filters index ef1ebf5..2213dc5 100644 --- a/Client/Project/VisualStudio/PND_LIB/PND_LIB.vcxproj.filters +++ b/Client/Project/VisualStudio/PND_LIB/PND_LIB.vcxproj.filters @@ -1,2 +1,81 @@  - \ No newline at end of file + + + + {73913a85-4152-4ecb-8a2c-3e36849d21ae} + + + {c5ed6e67-2e83-4845-97bc-5c013f8bfb7d} + + + {72e20810-8126-4b0f-a36f-32f11b3ac19c} + + + {2a4fa516-8c89-428b-afcb-aca4806a13e5} + + + {bc2c69cb-ebb4-4e55-b0eb-6174efd4e970} + + + {e49ff05d-4b4e-433a-a335-683439b65561} + + + {bdc96687-46e3-490a-b612-7b467803bd0f} + + + {466d0dc0-cd4d-4a68-a37c-b66db796e643} + + + {4812f18a-79bd-4ef3-a6a2-6df76e06ce8e} + + + {3420320a-2fd5-4ae5-bddc-b3190e2be605} + + + {185e4d48-3278-408e-8952-9eae4c54e052} + + + {dd6facc4-308c-4259-a1db-5f2f50ce2f2f} + + + {ae16fdbc-3f39-4b3c-b727-e54b65b622c4} + + + {1ab66501-f8e9-4d46-883b-43d72d037a2c} + + + {8b068df4-700c-43c7-875e-38c6e5181d55} + + + + + Animation + + + Common + + + GameCode + + + GameCode + + + GameCode\Components + + + Math + + + ThirdParty\json + + + + + GameCode + + + GameCode + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj b/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj index 51acc0e..5dd7295 100644 --- a/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj +++ b/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj @@ -137,6 +137,9 @@ + + + @@ -161,6 +164,9 @@ + + + diff --git a/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj.filters b/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj.filters index 1c1e5ec..79e95cb 100644 --- a/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj.filters +++ b/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj.filters @@ -34,6 +34,12 @@ {fc4d6710-2d01-480a-892c-79a461ad0ec4} + + {9b93e921-176b-4735-9194-f47fccd6ca60} + + + {ea4df851-7347-4fbd-a050-e7b4adf1bb68} + @@ -96,6 +102,15 @@ Libs\sll + + Math + + + Math + + + Math + @@ -171,6 +186,15 @@ Libs\fix32 + + Math + + + Math + + + Math + diff --git a/Client/Source/PND/Common/Type.h b/Client/Source/PND/Common/Type.h index 9b768e9..5ac3660 100644 --- a/Client/Source/PND/Common/Type.h +++ b/Client/Source/PND/Common/Type.h @@ -3,6 +3,7 @@ #include "libfixmath/libfixmath/fix16.hpp" #include "fix32/fix32.hpp" -typedef Fix32 fixed32; -typedef Fix16 fixed16; -typedef fixed32 fixed; +typedef Fix32 fixed32; // Q32.32 +typedef Fix16 fixed16; // Q16.16 + +using fixed = fixed32; diff --git a/Client/Source/PND/Math/Vector2.h b/Client/Source/PND/Math/Vector2.h index 67ac4b7..ab5ec5c 100644 --- a/Client/Source/PND/Math/Vector2.h +++ b/Client/Source/PND/Math/Vector2.h @@ -1,14 +1,12 @@ #pragma once - +// #include #include #include "../Common/Type.h" - class Vector2 { public: - fixed32 x, y; - + fixed x,y; }; diff --git a/Client/Source/PND/main.cpp b/Client/Source/PND/main.cpp index 5f2628a..4655eb9 100644 --- a/Client/Source/PND/main.cpp +++ b/Client/Source/PND/main.cpp @@ -10,4 +10,4 @@ int main() getchar(); return 0; -} \ No newline at end of file +} diff --git a/Client/Source/Phy2D/Common/Settings.h b/Client/Source/Phy2D/Common/Settings.h index b03ecad..7368f9c 100644 --- a/Client/Source/Phy2D/Common/Settings.h +++ b/Client/Source/Phy2D/Common/Settings.h @@ -1,111 +1,10 @@ #pragma once -#define NUMBER_FLOAT 1 -#define NUMBER_LIBFIX 2 -#define NUMBER_FPM 3 -#define NUMBER_FIX32 4 - -#define NUMBER_ALIAS NUMBER_FIX32 - -#if NUMBER_ALIAS == NUMBER_LIBFIX -#include "libfixmath/libfixmath/fixmath.h" -#elif NUMBER_ALIAS == NUMBER_FPM -#include "fpm/include/fpm/fixed.hpp" -#include "fpm/include/fpm/math.hpp" -#elif NUMBER_ALIAS == NUMBER_FIX32 -#include "fix32/fix32.hpp" -#endif +#include "Type.h" namespace Phy2D { -#if NUMBER_ALIAS == NUMBER_FLOAT - - typedef float fixed; -#define NUMBER_MAX (FLT_MAX) -#define NUMBER_MIN (FLT_MIN) -#define SQRT(a) (sqrt((a))) -#define SIN(a) (sin((a))) -#define COS(a) (cos((a))) -#define PI (3.1415925f) - -#elif NUMBER_ALIAS == NUMBER_LIBFIX - - typedef Fix16 fixed; -#define NUMBER_MAX (fix16_maximum) -#define NUMBER_MIN (fix16_minimum) -#define SQRT(a) ((a).sqrt()) -#define SIN(a) ((a).sin()) -#define COS(a) ((a).cos()) -#define PI (fix16_pi) - -#elif NUMBER_ALIAS == NUMBER_FPM - - template - struct Limits {}; - - template <> - struct Limits - { - static constexpr bool is_signed() noexcept { return true; } - static constexpr int digits() noexcept { return 31; } - static constexpr int max_digits10() noexcept { return 5 + 5; } - static constexpr int min_exponent() noexcept { return -15; } - static constexpr int max_exponent() noexcept { return 15; } - static constexpr int min_exponent10() noexcept { return -4; } - static constexpr int max_exponent10() noexcept { return 4; } - static constexpr fpm::fixed_16_16 min() noexcept { return fpm::fixed_16_16::from_raw_value(-2147483647 - 1); } - static constexpr fpm::fixed_16_16 max() noexcept { return fpm::fixed_16_16::from_raw_value(2147483647); } - }; - - template <> - struct Limits - { - static constexpr bool is_signed() noexcept { return true; } - static constexpr int digits() noexcept { return 31; } - static constexpr int max_digits10() noexcept { return 7 + 3; } - static constexpr int min_exponent() noexcept { return -7; } - static constexpr int max_exponent() noexcept { return 23; } - static constexpr int min_exponent10() noexcept { return -2; } - static constexpr int max_exponent10() noexcept { return 6; } - static constexpr fpm::fixed_24_8 min() noexcept { return fpm::fixed_24_8::from_raw_value(-2147483647 - 1); } - static constexpr fpm::fixed_24_8 max() noexcept { return fpm::fixed_24_8::from_raw_value(2147483647); } - }; - - template <> - struct Limits - { - static constexpr bool is_signed() noexcept { return true; } - static constexpr int digits() noexcept { return 31; } - static constexpr int max_digits10() noexcept { return 3 + 8; } - static constexpr int min_exponent() noexcept { return -23; } - static constexpr int max_exponent() noexcept { return 7; } - static constexpr int min_exponent10() noexcept { return -7; } - static constexpr int max_exponent10() noexcept { return 2; } - static constexpr fpm::fixed_8_24 min() noexcept { return fpm::fixed_8_24::from_raw_value(-2147483647 - 1); } - static constexpr fpm::fixed_8_24 max() noexcept { return fpm::fixed_8_24::from_raw_value(2147483647); } - }; - - typedef fpm::fixed_16_16 fixed; -#define NUMBER_MAX (Limits::max()) -#define NUMBER_MIN (Limits::min()) -#define SQRT(a) (fpm::sqrt((a))) -#define SIN(a) (fpm::sin((a))) -#define COS(a) (fpm::cos((a))) -#define PI (fixed::pi()) - -#elif NUMBER_ALIAS == NUMBER_FIX32 - - typedef Fix32 fixed32; // Q32.32 - typedef fixed32 fixed; - -#define NUMBER_MAX (CONST_MAX) -#define NUMBER_MIN (CONST_MIN) -#define SQRT(a) ((a).sqrt()) -#define SIN(a) ((a).sin()) -#define COS(a) ((a).cos()) -#define PI (CONST_PI) -#endif } \ No newline at end of file diff --git a/Client/Source/Phy2D/Common/Type.h b/Client/Source/Phy2D/Common/Type.h index e69de29..c985d99 100644 --- a/Client/Source/Phy2D/Common/Type.h +++ b/Client/Source/Phy2D/Common/Type.h @@ -0,0 +1,9 @@ +#include "fix32/fix32.hpp" + +namespace Phy2D +{ + + using fixed = Fix32; + +} + diff --git a/Client/Source/Phy2D/Documents/Phy2D.xlsx b/Client/Source/Phy2D/Documents/Phy2D.xlsx new file mode 100644 index 0000000..5b6ba93 Binary files /dev/null and b/Client/Source/Phy2D/Documents/Phy2D.xlsx differ diff --git a/Client/Source/Phy2D/Documents/UnityPhysics2D.xlsx b/Client/Source/Phy2D/Documents/UnityPhysics2D.xlsx new file mode 100644 index 0000000..25bc056 Binary files /dev/null and b/Client/Source/Phy2D/Documents/UnityPhysics2D.xlsx differ diff --git a/Client/Source/Phy2D/Math/Mat22.cpp b/Client/Source/Phy2D/Math/Mat22.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Math/Mat22.h b/Client/Source/Phy2D/Math/Mat22.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Math/Mat33.cpp b/Client/Source/Phy2D/Math/Mat33.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Math/Mat33.h b/Client/Source/Phy2D/Math/Mat33.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Math/Vec2.cpp b/Client/Source/Phy2D/Math/Vec2.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Math/Vec2.h b/Client/Source/Phy2D/Math/Vec2.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Phy2D.h b/Client/Source/Phy2D/Phy2D.h index 0fc0011..2f41e80 100644 --- a/Client/Source/Phy2D/Phy2D.h +++ b/Client/Source/Phy2D/Phy2D.h @@ -1,4 +1,5 @@ #pragma once - // + + diff --git a/Client/ThirdParty/README.txt b/Client/ThirdParty/README.txt new file mode 100644 index 0000000..a815db8 --- /dev/null +++ b/Client/ThirdParty/README.txt @@ -0,0 +1 @@ +游戏和工具共用的库目录 \ No newline at end of file diff --git a/Client/Tools/README.txt b/Client/Tools/README.txt new file mode 100644 index 0000000..c8501c1 --- /dev/null +++ b/Client/Tools/README.txt @@ -0,0 +1,2 @@ +开发工具 +* Me \ No newline at end of file -- cgit v1.1-26-g67d0