From 6bdfcf4ad3daddcd9d689deb15798403c89ce42b Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Fri, 31 Dec 2021 11:36:27 +0200 Subject: [PATCH] windows build with msvc2022 --- .gitignore | 3 + andemo.sln | 77 +++++++ andemo.vcxproj | 162 +++++++++++++ andemo.vcxproj.filters | 113 +++++++++ libs/anim/anim.vcxproj | 173 ++++++++++++++ libs/anim/anim.vcxproj.filters | 42 ++++ libs/imago/imago.vcxproj | 278 +++++++++++++++++++++++ libs/imago/imago.vcxproj.filters | 366 ++++++++++++++++++++++++++++++ libs/imago/src/filelbm.c | 2 +- libs/imago/src/filetga.c | 6 +- libs/psys/pattr.c | 2 +- libs/psys/psys.c | 12 + libs/psys/psys.vcxproj | 174 ++++++++++++++ libs/psys/psys.vcxproj.filters | 45 ++++ libs/treestore/README.md | 38 ---- libs/treestore/treestore.c | 2 +- libs/treestore/treestore.vcxproj | 171 ++++++++++++++ libs/treestore/treestore.vcxproj.filters | 36 +++ src/opengl.c | 6 + src/pc/assfilepc.c | 28 +++ src/pc/assman.c | 28 --- src/pc/miniglut.c | 4 +- src/util.h | 2 +- 23 files changed, 1695 insertions(+), 75 deletions(-) create mode 100644 andemo.sln create mode 100644 andemo.vcxproj create mode 100644 andemo.vcxproj.filters create mode 100644 libs/anim/anim.vcxproj create mode 100644 libs/anim/anim.vcxproj.filters create mode 100644 libs/imago/imago.vcxproj create mode 100644 libs/imago/imago.vcxproj.filters create mode 100644 libs/psys/psys.vcxproj create mode 100644 libs/psys/psys.vcxproj.filters delete mode 100644 libs/treestore/README.md create mode 100644 libs/treestore/treestore.vcxproj create mode 100644 libs/treestore/treestore.vcxproj.filters create mode 100644 src/pc/assfilepc.c delete mode 100644 src/pc/assman.c diff --git a/.gitignore b/.gitignore index bb59f12..c9e8abc 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ data apkbuild *.exe *.cfg +x64 +.vs +*.vcxproj.user diff --git a/andemo.sln b/andemo.sln new file mode 100644 index 0000000..5c8a6ac --- /dev/null +++ b/andemo.sln @@ -0,0 +1,77 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "andemo", "andemo.vcxproj", "{B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2}" + ProjectSection(ProjectDependencies) = postProject + {D582831C-F361-46BD-AC2E-ECDDD1565E03} = {D582831C-F361-46BD-AC2E-ECDDD1565E03} + {F2E34635-B8E5-4C07-9652-C485EE884D3D} = {F2E34635-B8E5-4C07-9652-C485EE884D3D} + {D46E73D9-6C99-45AF-8B93-BFF37D12452E} = {D46E73D9-6C99-45AF-8B93-BFF37D12452E} + {11B73DF9-52BE-426F-A330-58DDF2471C1A} = {11B73DF9-52BE-426F-A330-58DDF2471C1A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imago", "libs\imago\imago.vcxproj", "{D582831C-F361-46BD-AC2E-ECDDD1565E03}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "treestore", "libs\treestore\treestore.vcxproj", "{F2E34635-B8E5-4C07-9652-C485EE884D3D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "psys", "libs\psys\psys.vcxproj", "{11B73DF9-52BE-426F-A330-58DDF2471C1A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "anim", "libs\anim\anim.vcxproj", "{D46E73D9-6C99-45AF-8B93-BFF37D12452E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2}.Debug|x64.ActiveCfg = Debug|x64 + {B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2}.Debug|x64.Build.0 = Debug|x64 + {B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2}.Debug|x86.ActiveCfg = Debug|Win32 + {B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2}.Debug|x86.Build.0 = Debug|Win32 + {B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2}.Release|x64.ActiveCfg = Release|x64 + {B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2}.Release|x64.Build.0 = Release|x64 + {B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2}.Release|x86.ActiveCfg = Release|Win32 + {B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2}.Release|x86.Build.0 = Release|Win32 + {D582831C-F361-46BD-AC2E-ECDDD1565E03}.Debug|x64.ActiveCfg = Debug|x64 + {D582831C-F361-46BD-AC2E-ECDDD1565E03}.Debug|x64.Build.0 = Debug|x64 + {D582831C-F361-46BD-AC2E-ECDDD1565E03}.Debug|x86.ActiveCfg = Debug|Win32 + {D582831C-F361-46BD-AC2E-ECDDD1565E03}.Debug|x86.Build.0 = Debug|Win32 + {D582831C-F361-46BD-AC2E-ECDDD1565E03}.Release|x64.ActiveCfg = Release|x64 + {D582831C-F361-46BD-AC2E-ECDDD1565E03}.Release|x64.Build.0 = Release|x64 + {D582831C-F361-46BD-AC2E-ECDDD1565E03}.Release|x86.ActiveCfg = Release|Win32 + {D582831C-F361-46BD-AC2E-ECDDD1565E03}.Release|x86.Build.0 = Release|Win32 + {F2E34635-B8E5-4C07-9652-C485EE884D3D}.Debug|x64.ActiveCfg = Debug|x64 + {F2E34635-B8E5-4C07-9652-C485EE884D3D}.Debug|x64.Build.0 = Debug|x64 + {F2E34635-B8E5-4C07-9652-C485EE884D3D}.Debug|x86.ActiveCfg = Debug|Win32 + {F2E34635-B8E5-4C07-9652-C485EE884D3D}.Debug|x86.Build.0 = Debug|Win32 + {F2E34635-B8E5-4C07-9652-C485EE884D3D}.Release|x64.ActiveCfg = Release|x64 + {F2E34635-B8E5-4C07-9652-C485EE884D3D}.Release|x64.Build.0 = Release|x64 + {F2E34635-B8E5-4C07-9652-C485EE884D3D}.Release|x86.ActiveCfg = Release|Win32 + {F2E34635-B8E5-4C07-9652-C485EE884D3D}.Release|x86.Build.0 = Release|Win32 + {11B73DF9-52BE-426F-A330-58DDF2471C1A}.Debug|x64.ActiveCfg = Debug|x64 + {11B73DF9-52BE-426F-A330-58DDF2471C1A}.Debug|x64.Build.0 = Debug|x64 + {11B73DF9-52BE-426F-A330-58DDF2471C1A}.Debug|x86.ActiveCfg = Debug|Win32 + {11B73DF9-52BE-426F-A330-58DDF2471C1A}.Debug|x86.Build.0 = Debug|Win32 + {11B73DF9-52BE-426F-A330-58DDF2471C1A}.Release|x64.ActiveCfg = Release|x64 + {11B73DF9-52BE-426F-A330-58DDF2471C1A}.Release|x64.Build.0 = Release|x64 + {11B73DF9-52BE-426F-A330-58DDF2471C1A}.Release|x86.ActiveCfg = Release|Win32 + {11B73DF9-52BE-426F-A330-58DDF2471C1A}.Release|x86.Build.0 = Release|Win32 + {D46E73D9-6C99-45AF-8B93-BFF37D12452E}.Debug|x64.ActiveCfg = Debug|x64 + {D46E73D9-6C99-45AF-8B93-BFF37D12452E}.Debug|x64.Build.0 = Debug|x64 + {D46E73D9-6C99-45AF-8B93-BFF37D12452E}.Debug|x86.ActiveCfg = Debug|Win32 + {D46E73D9-6C99-45AF-8B93-BFF37D12452E}.Debug|x86.Build.0 = Debug|Win32 + {D46E73D9-6C99-45AF-8B93-BFF37D12452E}.Release|x64.ActiveCfg = Release|x64 + {D46E73D9-6C99-45AF-8B93-BFF37D12452E}.Release|x64.Build.0 = Release|x64 + {D46E73D9-6C99-45AF-8B93-BFF37D12452E}.Release|x86.ActiveCfg = Release|Win32 + {D46E73D9-6C99-45AF-8B93-BFF37D12452E}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {942C937E-081F-48A2-B8A6-E03214A5E1A5} + EndGlobalSection +EndGlobal diff --git a/andemo.vcxproj b/andemo.vcxproj new file mode 100644 index 0000000..8de57f5 --- /dev/null +++ b/andemo.vcxproj @@ -0,0 +1,162 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17.0 + {B71818F8-BCC8-4A8C-B5E4-EFACC83B78E2} + Win32Proj + + + + Application + true + v143 + + + Application + false + v143 + + + Application + true + v143 + + + Application + false + v143 + + + + + + + + + + + + + + + + + + + + + true + + + true + + + + WIN32;_DEBUG;_CONSOLE;MINIGLUT_USE_LIBC;GLEW_STATIC;%(PreprocessorDefinitions) + src;libs;libs\imago\src;libs\treestore;libs\glew;%(AdditionalIncludeDirectories) + MultiThreadedDebugDLL + Level3 + ProgramDatabase + Disabled + + + MachineX86 + true + Console + + + + + WIN32;NDEBUG;_CONSOLE;MINIGLUT_USE_LIBC;GLEW_STATIC;%(PreprocessorDefinitions) + src;libs;libs\imago\src;libs\treestore;libs\glew;%(AdditionalIncludeDirectories) + MultiThreadedDLL + Level3 + ProgramDatabase + + + MachineX86 + true + Console + true + true + + + + + _USE_MATH_DEFINES;MINIGLUT_USE_LIBC;GLEW_STATIC + 4996;4244;4267 + $(SolutionDir)\src;$(SolutionDir)\libs;$(SolutionDir)\libs\imago\src;$(SolutionDir)\libs\treestore;$(SolutionDir)\libs\glew + + + imago.lib;anim.lib;psys.lib;treestore.lib;%(AdditionalDependencies) + $(IntDir);%(AdditionalLibraryDirectories) + + + + + _USE_MATH_DEFINES;MINIGLUT_USE_LIBC;GLEW_STATIC + 4996;4244;4267 + $(SolutionDir)\src;$(SolutionDir)\libs;$(SolutionDir)\libs\imago\src;$(SolutionDir)\libs\treestore;$(SolutionDir)\libs\glew + + + imago.lib;anim.lib;psys.lib;treestore.lib;%(AdditionalDependencies) + $(IntDir);%(AdditionalLibraryDirectories) + + + + + + \ No newline at end of file diff --git a/andemo.vcxproj.filters b/andemo.vcxproj.filters new file mode 100644 index 0000000..60fbfb5 --- /dev/null +++ b/andemo.vcxproj.filters @@ -0,0 +1,113 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {bcc53176-9ffe-43e8-91b8-126cb891876f} + + + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src\screens + + + src\screens + + + src + + + src + + + src + + + src + + + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + \ No newline at end of file diff --git a/libs/anim/anim.vcxproj b/libs/anim/anim.vcxproj new file mode 100644 index 0000000..3b8c939 --- /dev/null +++ b/libs/anim/anim.vcxproj @@ -0,0 +1,173 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + 16.0 + Win32Proj + {d46e73d9-6c99-45af-8b93-bff37d12452e} + anim + 10.0 + + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + true + true + + + + + Level3 + false + _DEBUG;_LIB;%(PreprocessorDefinitions);_USE_MATH_DEFINES + true + NotUsing + + + 4996;4244;4267 + $(SolutionDir)\libs + + + + + true + + + + + Level3 + true + true + false + NDEBUG;_LIB;%(PreprocessorDefinitions);_USE_MATH_DEFINES + true + NotUsing + + + 4996;4244;4267 + $(SolutionDir)\libs + + + + + true + true + true + + + + + + \ No newline at end of file diff --git a/libs/anim/anim.vcxproj.filters b/libs/anim/anim.vcxproj.filters new file mode 100644 index 0000000..f5ee627 --- /dev/null +++ b/libs/anim/anim.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;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 + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/libs/imago/imago.vcxproj b/libs/imago/imago.vcxproj new file mode 100644 index 0000000..d9c0abe --- /dev/null +++ b/libs/imago/imago.vcxproj @@ -0,0 +1,278 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 16.0 + Win32Proj + {d582831c-f361-46bd-ac2e-ecddd1565e03} + imago + 10.0 + + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + true + true + + + + + Level3 + false + _DEBUG;_LIB;%(PreprocessorDefinitions) + true + NotUsing + + + 4996;4244;4267 + $(SolutionDir)\libs\imago\zlib;$(SolutionDir)\libs\imago\libpng;$(SolutionDir)\libs\imago\jpeglib + + + + + true + + + + + Level3 + true + true + false + NDEBUG;_LIB;%(PreprocessorDefinitions) + true + NotUsing + + + 4996;4244;4267 + $(SolutionDir)\libs\imago\zlib;$(SolutionDir)\libs\imago\libpng;$(SolutionDir)\libs\imago\jpeglib + + + + + true + true + true + + + + + + \ No newline at end of file diff --git a/libs/imago/imago.vcxproj.filters b/libs/imago/imago.vcxproj.filters new file mode 100644 index 0000000..35912a8 --- /dev/null +++ b/libs/imago/imago.vcxproj.filters @@ -0,0 +1,366 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;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 + + + {79f5a32a-a071-46a7-a7f6-319719a9e237} + + + {08ae6bb2-3c44-4ff7-907e-6780d6a844e2} + + + {2407aabc-da74-4fc6-afba-737c937dde4f} + + + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + libpng + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + libpng + + + libpng + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/libs/imago/src/filelbm.c b/libs/imago/src/filelbm.c index 9e3799d..d0bb3f0 100644 --- a/libs/imago/src/filelbm.c +++ b/libs/imago/src/filelbm.c @@ -21,7 +21,7 @@ along with this program. If not, see . #include #include #include -#if defined(__WATCOMC__) || defined(WIN32) +#if defined(__WATCOMC__) || defined(_WIN32) #include #else #ifndef __FreeBSD__ diff --git a/libs/imago/src/filetga.c b/libs/imago/src/filetga.c index d5d9fe8..f34c9ea 100644 --- a/libs/imago/src/filetga.c +++ b/libs/imago/src/filetga.c @@ -138,7 +138,7 @@ static int read_tga(struct img_pixmap *img, struct img_io *io) if(hdr.cmap_type == 1) { cmap.ncolors = hdr.cmap_len; - for(i=0; ipixels + ((hdr.img_desc & 0x20) ? i : y - (i + 1)) * x * pixel_bytes; - for(j=0; j. #include #include -#ifdef __MSVCRT__ +#ifdef _WIN32 #include #else #include diff --git a/libs/psys/psys.c b/libs/psys/psys.c index 6825ae7..25f2487 100644 --- a/libs/psys/psys.c +++ b/libs/psys/psys.c @@ -21,7 +21,9 @@ along with this program. If not, see . #include #include #include "psys.h" +#ifdef PSYS_MULTITHREADED #include +#endif static int spawn_particle(struct psys_emitter *em, struct psys_particle *p); static void update_particle(struct psys_emitter *em, struct psys_particle *p, long tm, float dt, void *cls); @@ -29,7 +31,9 @@ static void update_particle(struct psys_emitter *em, struct psys_particle *p, lo /* particle pool */ static struct psys_particle *ppool; static int ppool_size; +#ifdef PSYS_MULTITHREADED static pthread_mutex_t pool_lock = PTHREAD_MUTEX_INITIALIZER; +#endif static struct psys_particle *palloc(void); static void pfree(struct psys_particle *p); @@ -347,7 +351,9 @@ static struct psys_particle *palloc(void) { struct psys_particle *p; +#ifdef PSYS_MULTITHREADED pthread_mutex_lock(&pool_lock); +#endif if(ppool) { p = ppool; ppool = ppool->next; @@ -355,16 +361,22 @@ static struct psys_particle *palloc(void) } else { p = malloc(sizeof *p); } +#ifdef PSYS_MULTITHREADED pthread_mutex_unlock(&pool_lock); +#endif return p; } static void pfree(struct psys_particle *p) { +#ifdef PSYS_MULTITHREADED pthread_mutex_lock(&pool_lock); +#endif p->next = ppool; ppool = p; ppool_size++; +#ifdef PSYS_MULTITHREADED pthread_mutex_unlock(&pool_lock); +#endif } diff --git a/libs/psys/psys.vcxproj b/libs/psys/psys.vcxproj new file mode 100644 index 0000000..0692237 --- /dev/null +++ b/libs/psys/psys.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + 16.0 + Win32Proj + {11b73df9-52be-426f-a330-58ddf2471c1a} + psys + 10.0 + + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + true + true + + + + + Level3 + false + _DEBUG;_LIB;%(PreprocessorDefinitions) + true + NotUsing + + + 4996;4244;4267 + $(SolutionDir)\libs + + + + + true + + + + + Level3 + true + true + false + NDEBUG;_LIB;%(PreprocessorDefinitions) + true + NotUsing + + + 4996;4244;4267 + $(SolutionDir)\libs + + + + + true + true + true + + + + + + \ No newline at end of file diff --git a/libs/psys/psys.vcxproj.filters b/libs/psys/psys.vcxproj.filters new file mode 100644 index 0000000..182dc0f --- /dev/null +++ b/libs/psys/psys.vcxproj.filters @@ -0,0 +1,45 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;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 + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/libs/treestore/README.md b/libs/treestore/README.md deleted file mode 100644 index f75efa9..0000000 --- a/libs/treestore/README.md +++ /dev/null @@ -1,38 +0,0 @@ -libtreestore -============ - -Libtreestore is a simple C library for reading/writing hierarchical data in a -json-like text format, or a chunk-based binary format. - -A better way to describe the text format is like XML without the CDATA, and with -curly braces instead of tags: - -``` -rootnode { - some_attribute = "some_string_value" - some_numeric_attrib = 10 - vector_attrib = [255, 128, 0] - array_attrib = ["tom", "dick", "harry"] - - # you can have multiple nodes with the same name - childnode { - childattr = "whatever" - } - childnode { - another_childattr = "xyzzy" - } -} -``` - -License -------- -Copyright (C) 2016-2019 John Tsiombikas - -Libtreestore is free software. Feel free to use, modify, and/or redistribute -it, under the terms of the MIT/X11 license. See LICENSE for detauls. - -Issues ------- -At the moment only the text format has been implemented. - -More info soon... diff --git a/libs/treestore/treestore.c b/libs/treestore/treestore.c index 899cfa0..7343b9d 100644 --- a/libs/treestore/treestore.c +++ b/libs/treestore/treestore.c @@ -5,7 +5,7 @@ #include #include "treestore.h" -#ifdef WIN32 +#ifdef _WIN32 #include #else #include diff --git a/libs/treestore/treestore.vcxproj b/libs/treestore/treestore.vcxproj new file mode 100644 index 0000000..2a887bb --- /dev/null +++ b/libs/treestore/treestore.vcxproj @@ -0,0 +1,171 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + 16.0 + Win32Proj + {f2e34635-b8e5-4c07-9652-c485ee884d3d} + treestore + 10.0 + + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + true + true + + + + + Level3 + false + _DEBUG;_LIB;%(PreprocessorDefinitions) + true + NotUsing + + + 4996;4244;4267 + + + + + + true + + + + + Level3 + true + true + false + NDEBUG;_LIB;%(PreprocessorDefinitions) + true + NotUsing + + + 4996;4244;4267 + + + + + + true + true + true + + + + + + \ No newline at end of file diff --git a/libs/treestore/treestore.vcxproj.filters b/libs/treestore/treestore.vcxproj.filters new file mode 100644 index 0000000..caf3c5a --- /dev/null +++ b/libs/treestore/treestore.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;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 + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/src/opengl.c b/src/opengl.c index 78b5591..13b2e05 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -1,3 +1,4 @@ +#include #include "opengl.h" int init_opengl(void) @@ -5,5 +6,10 @@ int init_opengl(void) #ifdef __glew_h__ glewInit(); #endif + + printf("GL vendor: %s\n", glGetString(GL_VENDOR)); + printf("GL renderer: %s\n", glGetString(GL_RENDERER)); + printf("GL version: %s\n", glGetString(GL_VERSION)); + return 0; } diff --git a/src/pc/assfilepc.c b/src/pc/assfilepc.c new file mode 100644 index 0000000..6041dc3 --- /dev/null +++ b/src/pc/assfilepc.c @@ -0,0 +1,28 @@ +#include +#include "assfile.h" + +ass_file *ass_fopen(const char *fname, const char *mode) +{ + return (ass_file*)fopen(fname, mode); +} + +void ass_fclose(ass_file *fp) +{ + fclose((FILE*)fp); +} + +long ass_fseek(ass_file *fp, long offs, int whence) +{ + fseek((FILE*)fp, offs, whence); + return ftell((FILE*)fp); +} + +long ass_ftell(ass_file *fp) +{ + return ftell((FILE*)fp); +} + +size_t ass_fread(void *buf, size_t size, size_t count, ass_file *fp) +{ + return fread(buf, size, count, (FILE*)fp); +} diff --git a/src/pc/assman.c b/src/pc/assman.c deleted file mode 100644 index 6041dc3..0000000 --- a/src/pc/assman.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include "assfile.h" - -ass_file *ass_fopen(const char *fname, const char *mode) -{ - return (ass_file*)fopen(fname, mode); -} - -void ass_fclose(ass_file *fp) -{ - fclose((FILE*)fp); -} - -long ass_fseek(ass_file *fp, long offs, int whence) -{ - fseek((FILE*)fp, offs, whence); - return ftell((FILE*)fp); -} - -long ass_ftell(ass_file *fp) -{ - return ftell((FILE*)fp); -} - -size_t ass_fread(void *buf, size_t size, size_t count, ass_file *fp) -{ - return fread(buf, size, count, (FILE*)fp); -} diff --git a/src/pc/miniglut.c b/src/pc/miniglut.c index 4f77408..1919b64 100644 --- a/src/pc/miniglut.c +++ b/src/pc/miniglut.c @@ -49,7 +49,7 @@ static int have_netwm_fullscr(void); #include #define BUILD_WIN32 -static HRESULT CALLBACK handle_message(HWND win, unsigned int msg, WPARAM wparam, LPARAM lparam); +static LRESULT CALLBACK handle_message(HWND win, unsigned int msg, WPARAM wparam, LPARAM lparam); static HINSTANCE hinst; static HWND win; @@ -1525,7 +1525,7 @@ static void create_window(const char *title) reshape_pending = 1; } -static HRESULT CALLBACK handle_message(HWND win, unsigned int msg, WPARAM wparam, LPARAM lparam) +static LRESULT CALLBACK handle_message(HWND win, unsigned int msg, WPARAM wparam, LPARAM lparam) { static int mouse_x, mouse_y; int x, y, key; diff --git a/src/util.h b/src/util.h index 69b8f53..3633a3f 100644 --- a/src/util.h +++ b/src/util.h @@ -4,7 +4,7 @@ #include #include -#if defined(__WATCOMC__) || defined(WIN32) +#if defined(__WATCOMC__) || defined(_WIN32) #include #else #if !defined(__FreeBSD__) && !defined(__OpenBSD__) -- 1.7.10.4