mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-07 22:59:17 -05:00
Compare commits
9 Commits
99cb82a82c
...
ce8bcb332b
| Author | SHA1 | Date | |
|---|---|---|---|
| ce8bcb332b | |||
| fc082edccc | |||
| 4e71e91a4a | |||
| 18c50bb01b | |||
| 09bd2df17b | |||
| 0aa5e8169d | |||
| 5d9c8c365e | |||
| 2deae294c6 | |||
| 238163c6ca |
@ -29,7 +29,6 @@ int main(void)
|
|||||||
|
|
||||||
Vector2 ballPosition = { -100.0f, -100.0f };
|
Vector2 ballPosition = { -100.0f, -100.0f };
|
||||||
Color ballColor = DARKBLUE;
|
Color ballColor = DARKBLUE;
|
||||||
int isCursorHidden = 0;
|
|
||||||
|
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
@ -41,15 +40,13 @@ int main(void)
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
if (IsKeyPressed(KEY_H))
|
if (IsKeyPressed(KEY_H))
|
||||||
{
|
{
|
||||||
if (isCursorHidden == 0)
|
if (IsCursorHidden())
|
||||||
{
|
{
|
||||||
HideCursor();
|
ShowCursor();
|
||||||
isCursorHidden = 1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowCursor();
|
HideCursor();
|
||||||
isCursorHidden = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +72,7 @@ int main(void)
|
|||||||
DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20, DARKGRAY);
|
DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20, DARKGRAY);
|
||||||
DrawText("Press 'H' to toggle cursor visibility", 10, 30, 20, DARKGRAY);
|
DrawText("Press 'H' to toggle cursor visibility", 10, 30, 20, DARKGRAY);
|
||||||
|
|
||||||
if (isCursorHidden == 1) DrawText("CURSOR HIDDEN", 20, 60, 20, RED);
|
if (!IsCursorHidden()) DrawText("CURSOR HIDDEN", 20, 60, 20, RED);
|
||||||
else DrawText("CURSOR VISIBLE", 20, 60, 20, LIME);
|
else DrawText("CURSOR VISIBLE", 20, 60, 20, LIME);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
|
|||||||
@ -51,11 +51,11 @@
|
|||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{6B1A933E-71B8-4C1F-9E79-02D98830E671}</ProjectGuid>
|
<ProjectGuid>{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>shaders_normalmap</RootNamespace>
|
<RootNamespace>shaders_normal_map</RootNamespace>
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
<ProjectName>shaders_normalmap</ProjectName>
|
<ProjectName>shaders_normal_map</ProjectName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
@ -553,7 +553,7 @@
|
|||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\..\examples\shaders\shaders_normalmap.c" />
|
<ClCompile Include="..\..\..\examples\shaders\shaders_normal_map.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\..\..\examples\examples.rc" />
|
<ResourceCompile Include="..\..\..\examples\examples.rc" />
|
||||||
|
|||||||
@ -335,7 +335,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_input_virtual_controls
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_3d_fps_controller", "examples\core_3d_fps_controller.vcxproj", "{6B1A933E-71B8-4C1F-9E79-02D98830E671}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_3d_fps_controller", "examples\core_3d_fps_controller.vcxproj", "{6B1A933E-71B8-4C1F-9E79-02D98830E671}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shaders_normal_map", "examples\shaders_normal_map.vcxproj", "{6B1A933E-71B8-4C1F-9E79-02D98830E671}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shaders_normal_map", "examples\shaders_normal_map.vcxproj", "{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -4109,30 +4109,30 @@ Global
|
|||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x64.Build.0 = Release|x64
|
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x64.Build.0 = Release|x64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x86.ActiveCfg = Release|Win32
|
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x86.ActiveCfg = Release|Win32
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x86.Build.0 = Release|Win32
|
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x86.Build.0 = Release|Win32
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug.DLL|ARM64.ActiveCfg = Debug.DLL|ARM64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug.DLL|ARM64.ActiveCfg = Debug.DLL|ARM64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug.DLL|ARM64.Build.0 = Debug.DLL|ARM64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug.DLL|ARM64.Build.0 = Debug.DLL|ARM64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug|ARM64.Build.0 = Debug|ARM64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug|x64.ActiveCfg = Debug|x64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug|x64.Build.0 = Debug|x64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug|x64.Build.0 = Debug|x64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug|x86.ActiveCfg = Debug|Win32
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Debug|x86.Build.0 = Debug|Win32
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Debug|x86.Build.0 = Debug|Win32
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release.DLL|ARM64.ActiveCfg = Release.DLL|ARM64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release.DLL|ARM64.ActiveCfg = Release.DLL|ARM64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release.DLL|ARM64.Build.0 = Release.DLL|ARM64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release.DLL|ARM64.Build.0 = Release.DLL|ARM64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release.DLL|x64.Build.0 = Release.DLL|x64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release.DLL|x64.Build.0 = Release.DLL|x64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release.DLL|x86.Build.0 = Release.DLL|Win32
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release.DLL|x86.Build.0 = Release.DLL|Win32
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|ARM64.ActiveCfg = Release|ARM64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|ARM64.Build.0 = Release|ARM64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x64.ActiveCfg = Release|x64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release|x64.ActiveCfg = Release|x64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x64.Build.0 = Release|x64
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release|x64.Build.0 = Release|x64
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x86.ActiveCfg = Release|Win32
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release|x86.ActiveCfg = Release|Win32
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671}.Release|x86.Build.0 = Release|Win32
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3}.Release|x86.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -4301,8 +4301,8 @@ Global
|
|||||||
{C54703BF-D68A-480D-BE27-49B62E45D582} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
{C54703BF-D68A-480D-BE27-49B62E45D582} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||||
{9CD8BCAD-F212-4BCC-BA98-899743CE3279} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
{9CD8BCAD-F212-4BCC-BA98-899743CE3279} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
||||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
|
{0981CA28-E4A5-4DF1-987F-A41D09131EFC} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
|
|
||||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
{6B1A933E-71B8-4C1F-9E79-02D98830E671} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||||
|
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {E926C768-6307-4423-A1EC-57E95B1FAB29}
|
SolutionGuid = {E926C768-6307-4423-A1EC-57E95B1FAB29}
|
||||||
|
|||||||
@ -1767,7 +1767,7 @@ void UnloadMusicStream(Music music)
|
|||||||
else if (music.ctxType == MUSIC_AUDIO_QOA) qoaplay_close((qoaplay_desc *)music.ctxData);
|
else if (music.ctxType == MUSIC_AUDIO_QOA) qoaplay_close((qoaplay_desc *)music.ctxData);
|
||||||
#endif
|
#endif
|
||||||
#if defined(SUPPORT_FILEFORMAT_FLAC)
|
#if defined(SUPPORT_FILEFORMAT_FLAC)
|
||||||
else if (music.ctxType == MUSIC_AUDIO_FLAC) drflac_free((drflac *)music.ctxData, NULL);
|
else if (music.ctxType == MUSIC_AUDIO_FLAC) { drflac_close((drflac *)music.ctxData); drflac_free((drflac *)music.ctxData, NULL); }
|
||||||
#endif
|
#endif
|
||||||
#if defined(SUPPORT_FILEFORMAT_XM)
|
#if defined(SUPPORT_FILEFORMAT_XM)
|
||||||
else if (music.ctxType == MUSIC_MODULE_XM) jar_xm_free_context((jar_xm_context_t *)music.ctxData);
|
else if (music.ctxType == MUSIC_MODULE_XM) jar_xm_free_context((jar_xm_context_t *)music.ctxData);
|
||||||
|
|||||||
@ -583,9 +583,9 @@ int main(int argc, char *argv[])
|
|||||||
TextFormat("%s;%s", exRecategory, exRename));
|
TextFormat("%s;%s", exRecategory, exRename));
|
||||||
|
|
||||||
// Edit: Rename example code and screenshot files .c and .png
|
// Edit: Rename example code and screenshot files .c and .png
|
||||||
rename(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName),
|
FileRename(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName),
|
||||||
TextFormat("%s/%s/%s.c", exBasePath, exCategory, exRename));
|
TextFormat("%s/%s/%s.c", exBasePath, exCategory, exRename));
|
||||||
rename(TextFormat("%s/%s/%s.png", exBasePath, exCategory, exName),
|
FileRename(TextFormat("%s/%s/%s.png", exBasePath, exCategory, exName),
|
||||||
TextFormat("%s/%s/%s.png", exBasePath, exCategory, exRename));
|
TextFormat("%s/%s/%s.png", exBasePath, exCategory, exRename));
|
||||||
|
|
||||||
// NOTE: Example resource files do not need to be changed...
|
// NOTE: Example resource files do not need to be changed...
|
||||||
@ -599,7 +599,8 @@ int main(int argc, char *argv[])
|
|||||||
exName + strlen(exCategory) + 1, exRename + strlen(exRecategory) + 1); // Skip category
|
exName + strlen(exCategory) + 1, exRename + strlen(exRecategory) + 1); // Skip category
|
||||||
|
|
||||||
// Edit: Rename example project and solution
|
// Edit: Rename example project and solution
|
||||||
rename(TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exName),
|
FileTextReplace(TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exName), exName, exRename);
|
||||||
|
FileRename(TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exName),
|
||||||
TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exRename));
|
TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exRename));
|
||||||
FileTextReplace(TextFormat("%s/../projects/VS2022/raylib.sln", exBasePath), exName, exRename);
|
FileTextReplace(TextFormat("%s/../projects/VS2022/raylib.sln", exBasePath), exName, exRename);
|
||||||
}
|
}
|
||||||
@ -616,21 +617,21 @@ int main(int argc, char *argv[])
|
|||||||
// Edit: Rename example code file (copy and remove)
|
// Edit: Rename example code file (copy and remove)
|
||||||
FileCopy(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName),
|
FileCopy(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName),
|
||||||
TextFormat("%s/%s/%s.c", exBasePath, exCategory, exRename));
|
TextFormat("%s/%s/%s.c", exBasePath, exCategory, exRename));
|
||||||
remove(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName));
|
||||||
// Edit: Rename example screenshot file (copy and remove)
|
// Edit: Rename example screenshot file (copy and remove)
|
||||||
FileCopy(TextFormat("%s/%s/%s.png", exBasePath, exCategory, exName),
|
FileCopy(TextFormat("%s/%s/%s.png", exBasePath, exCategory, exName),
|
||||||
TextFormat("%s/%s/%s.png", exBasePath, exCategory, exRename));
|
TextFormat("%s/%s/%s.png", exBasePath, exCategory, exRename));
|
||||||
remove(TextFormat("%s/%s/%s.png", exBasePath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.png", exBasePath, exCategory, exName));
|
||||||
|
|
||||||
// Edit: Update required files: Makefile, Makefile.Web, README.md, examples.js
|
// Edit: Update required files: Makefile, Makefile.Web, README.md, examples.js
|
||||||
UpdateRequiredFiles();
|
UpdateRequiredFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove old web compilation
|
// Remove old web compilation
|
||||||
remove(TextFormat("%s/%s/%s.html", exWebPath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.html", exWebPath, exCategory, exName));
|
||||||
remove(TextFormat("%s/%s/%s.data", exWebPath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.data", exWebPath, exCategory, exName));
|
||||||
remove(TextFormat("%s/%s/%s.wasm", exWebPath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.wasm", exWebPath, exCategory, exName));
|
||||||
remove(TextFormat("%s/%s/%s.js", exWebPath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.js", exWebPath, exCategory, exName));
|
||||||
|
|
||||||
// Recompile example (on raylib side)
|
// Recompile example (on raylib side)
|
||||||
// NOTE: Tools requirements: emscripten, w64devkit
|
// NOTE: Tools requirements: emscripten, w64devkit
|
||||||
@ -692,11 +693,11 @@ int main(int argc, char *argv[])
|
|||||||
for (int v = 0; v < 3; v++)
|
for (int v = 0; v < 3; v++)
|
||||||
{
|
{
|
||||||
char *resPathUpdated = TextReplace(resPaths[r], "glsl%i", TextFormat("glsl%i", glslVer[v]));
|
char *resPathUpdated = TextReplace(resPaths[r], "glsl%i", TextFormat("glsl%i", glslVer[v]));
|
||||||
remove(TextFormat("%s/%s/%s", exBasePath, exCategory, resPathUpdated));
|
FileRemove(TextFormat("%s/%s/%s", exBasePath, exCategory, resPathUpdated));
|
||||||
RL_FREE(resPathUpdated);
|
RL_FREE(resPathUpdated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else remove(TextFormat("%s/%s/%s", exBasePath, exCategory, resPaths[r]));
|
else FileRemove(TextFormat("%s/%s/%s", exBasePath, exCategory, resPaths[r]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -706,14 +707,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Remove: raylib/examples/<category>/<category>_example_name.c
|
// Remove: raylib/examples/<category>/<category>_example_name.c
|
||||||
// Remove: raylib/examples/<category>/<category>_example_name.png
|
// Remove: raylib/examples/<category>/<category>_example_name.png
|
||||||
remove(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName));
|
||||||
remove(TextFormat("%s/%s/%s.png", exBasePath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.png", exBasePath, exCategory, exName));
|
||||||
|
|
||||||
// Edit: Update required files: Makefile, Makefile.Web, README.md, examples.js
|
// Edit: Update required files: Makefile, Makefile.Web, README.md, examples.js
|
||||||
UpdateRequiredFiles();
|
UpdateRequiredFiles();
|
||||||
|
|
||||||
// Remove: raylib/projects/VS2022/examples/<category>_example_name.vcxproj
|
// Remove: raylib/projects/VS2022/examples/<category>_example_name.vcxproj
|
||||||
remove(TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exName));
|
FileRemove(TextFormat("%s/../projects/VS2022/examples/%s.vcxproj", exBasePath, exName));
|
||||||
|
|
||||||
// Edit: raylib/projects/VS2022/raylib.sln --> Remove example project
|
// Edit: raylib/projects/VS2022/raylib.sln --> Remove example project
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@ -726,10 +727,10 @@ int main(int argc, char *argv[])
|
|||||||
// Remove: raylib.com/examples/<category>/<category>_example_name.data
|
// Remove: raylib.com/examples/<category>/<category>_example_name.data
|
||||||
// Remove: raylib.com/examples/<category>/<category>_example_name.wasm
|
// Remove: raylib.com/examples/<category>/<category>_example_name.wasm
|
||||||
// Remove: raylib.com/examples/<category>/<category>_example_name.js
|
// Remove: raylib.com/examples/<category>/<category>_example_name.js
|
||||||
remove(TextFormat("%s/%s/%s.html", exWebPath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.html", exWebPath, exCategory, exName));
|
||||||
remove(TextFormat("%s/%s/%s.data", exWebPath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.data", exWebPath, exCategory, exName));
|
||||||
remove(TextFormat("%s/%s/%s.wasm", exWebPath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.wasm", exWebPath, exCategory, exName));
|
||||||
remove(TextFormat("%s/%s/%s.js", exWebPath, exCategory, exName));
|
FileRemove(TextFormat("%s/%s/%s.js", exWebPath, exCategory, exName));
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case OP_VALIDATE: // Validate: report and actions
|
case OP_VALIDATE: // Validate: report and actions
|
||||||
@ -1620,7 +1621,11 @@ static int FileRename(const char *fileName, const char *fileRename)
|
|||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
if (FileExists(fileName)) rename(fileName, TextFormat("%s/%s", GetDirectoryPath(fileName), fileRename));
|
if (FileExists(fileName))
|
||||||
|
{
|
||||||
|
result = rename(fileName, TextFormat("%s/%s", GetDirectoryPath(fileName), fileRename));
|
||||||
|
}
|
||||||
|
else result = -1;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1630,7 +1635,11 @@ static int FileRemove(const char *fileName)
|
|||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
if (FileExists(fileName)) remove(fileName);
|
if (FileExists(fileName))
|
||||||
|
{
|
||||||
|
result = remove(fileName);
|
||||||
|
}
|
||||||
|
else result = -1;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1646,6 +1655,7 @@ static int FileMove(const char *srcPath, const char *dstPath)
|
|||||||
FileCopy(srcPath, dstPath);
|
FileCopy(srcPath, dstPath);
|
||||||
remove(srcPath);
|
remove(srcPath);
|
||||||
}
|
}
|
||||||
|
else result = -1;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user