Fix compiling again on Windows

Also lowering framerate a bit
This commit is contained in:
Edgaru089 2024-03-30 22:53:36 +08:00
parent 1908234213
commit 20e0add5b4
3 changed files with 39 additions and 3 deletions

View File

@ -102,7 +102,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
@ -117,7 +117,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
@ -133,9 +133,12 @@
<ClInclude Include="camera.h" />
<ClInclude Include="entity.h" />
<ClInclude Include="input.h" />
<ClInclude Include="mapper_misc.h" />
<ClInclude Include="particle.h" />
<ClInclude Include="physics.h" />
<ClInclude Include="player.h" />
<ClInclude Include="render_bundle.h" />
<ClInclude Include="render_component.h" />
<ClInclude Include="render_pattern.h" />
<ClInclude Include="render_util.h" />
<ClInclude Include="types.h" />
@ -155,11 +158,17 @@
<ClCompile Include="entity.c" />
<ClCompile Include="input.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="mapper_misc.c" />
<ClCompile Include="mapper_misc_render.cpp" />
<ClCompile Include="particle.c" />
<ClCompile Include="particle_render.cpp" />
<ClCompile Include="physics.c" />
<ClCompile Include="physics_move.c" />
<ClCompile Include="player.c" />
<ClCompile Include="render_bundle.c" />
<ClCompile Include="render_bundle_draw.cpp" />
<ClCompile Include="render_bundle_file.c" />
<ClCompile Include="render_component.c" />
<ClCompile Include="render_pattern.c" />
<ClCompile Include="render_util.cpp" />
<ClCompile Include="types.c" />

View File

@ -69,6 +69,15 @@
<ClInclude Include="util\rand.h">
<Filter>Util</Filter>
</ClInclude>
<ClInclude Include="render_bundle.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="mapper_misc.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="render_component.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="util\queue.c">
@ -128,5 +137,23 @@
<ClCompile Include="util\rand.c">
<Filter>Util</Filter>
</ClCompile>
<ClCompile Include="render_bundle_file.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="render_bundle.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="render_bundle_draw.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="mapper_misc.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="mapper_misc_render.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="render_component.c">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -51,7 +51,7 @@ int main() {
EndBatchDraw();
Duration toSleep = {.microseconds = 1000000 / 300 - time_Reset(&lastFrame).microseconds};
Duration toSleep = {.microseconds = 1000000 / 200 - time_Reset(&lastFrame).microseconds};
duration_Sleep(toSleep);
}