update windows config
This commit is contained in:
parent
2d9727371a
commit
c11b0e1ba6
|
|
@ -381,8 +381,6 @@ Makefile
|
|||
|
||||
*.o
|
||||
|
||||
*.a
|
||||
|
||||
*.d
|
||||
|
||||
*.ninja*
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ project "Editor"
|
|||
cppdialect "C++17"
|
||||
systemversion "latest"
|
||||
targetname "Editor"
|
||||
links {"Engine-Core"}
|
||||
|
||||
files
|
||||
{
|
||||
|
|
@ -11,12 +12,6 @@ project "Editor"
|
|||
"include/**.hpp",
|
||||
}
|
||||
|
||||
filter "not action:vs*"
|
||||
libdirs
|
||||
{
|
||||
corelibdir
|
||||
}
|
||||
|
||||
--visual studio--
|
||||
filter "action:vs*"
|
||||
targetdir (vs_bindir)
|
||||
|
|
@ -30,11 +25,6 @@ project "Editor"
|
|||
vs_imguidir
|
||||
}
|
||||
|
||||
libdirs
|
||||
{
|
||||
vs_corelibdir
|
||||
}
|
||||
|
||||
--not visual studio on windows--
|
||||
filter {"not action:vs*", "system:windows"}
|
||||
targetdir (bindir)
|
||||
|
|
@ -52,7 +42,7 @@ project "Editor"
|
|||
filter{"system:windows"}
|
||||
defines "SFML_STATIC"
|
||||
defines "PLATFORM_WINDOWS"
|
||||
staticruntime "off"
|
||||
staticruntime "on"
|
||||
|
||||
filter {"system:windows", "configurations:debug"}
|
||||
defines{"_DEBUG", "_CONSOLE"}
|
||||
|
|
@ -60,7 +50,7 @@ project "Editor"
|
|||
filter {"system:windows", "configurations:release"}
|
||||
defines{"NDEBUG"}
|
||||
|
||||
--linux specific settings
|
||||
--linux specific settings--
|
||||
filter {"system:linux"}
|
||||
targetdir (bindir)
|
||||
objdir (intdir)
|
||||
|
|
@ -81,15 +71,13 @@ project "Editor"
|
|||
"sfml-system",
|
||||
"OpenGL",
|
||||
}
|
||||
|
||||
|
||||
--config settings
|
||||
--config settings--
|
||||
filter "configurations:debug"
|
||||
defines {"LOG_ENABLE", "GAME_DEBUG"}
|
||||
symbols "on"
|
||||
runtime "Debug"
|
||||
kind "ConsoleApp"
|
||||
links "Core-d:static"
|
||||
|
||||
filter "configurations:release"
|
||||
defines {"GAME_RELEASE"}
|
||||
|
|
@ -98,6 +86,4 @@ project "Editor"
|
|||
symbols "off"
|
||||
runtime "Release"
|
||||
kind "WindowedApp"
|
||||
entrypoint "mainCRTStartup"
|
||||
links "Core:static"
|
||||
|
||||
|
|
@ -28,12 +28,7 @@ project "Engine-Core"
|
|||
vs_imguidir
|
||||
}
|
||||
|
||||
filter {"action:vs*", "configurations:debug"}
|
||||
libdirs {vs_libdebug_dir}
|
||||
|
||||
filter {"action:vs*", "configurations:release"}
|
||||
libdirs {vs_librelease_dir}
|
||||
|
||||
libdirs {vs_sfmldir .."/lib"}
|
||||
|
||||
--not visual studio --
|
||||
filter {"not action:vs*", "system:windows"}
|
||||
|
|
@ -46,35 +41,30 @@ project "Engine-Core"
|
|||
sfmldir .. "/include",
|
||||
imguidir
|
||||
}
|
||||
|
||||
--sfml lib files for windows--
|
||||
filter {"not action:vs*", "system:windows", "configurations:debug"}
|
||||
libdirs {libdebug_dir}
|
||||
|
||||
filter {"not action:vs*", "system:windows", "configurations:release"}
|
||||
libdirs {librelease_dir}
|
||||
libdirs {sfmldir .."/lib"}
|
||||
|
||||
--windows specific settings--
|
||||
filter{"system:windows"}
|
||||
defines "SFML_STATIC"
|
||||
defines "PLATFORM_WINDOWS"
|
||||
staticruntime "off"
|
||||
staticruntime "on"
|
||||
|
||||
filter {"system:windows", "configurations:debug"}
|
||||
defines{"_DEBUG", "_CONSOLE"}
|
||||
links
|
||||
{
|
||||
"sfml-main-d",
|
||||
"sfml-graphics-s-d",
|
||||
"sfml-window-s-d",
|
||||
"opengl32",
|
||||
"gdi32",
|
||||
"freetyped",
|
||||
"freetype",
|
||||
"sfml-audio-s-d",
|
||||
"flacd",
|
||||
"vorbisencd",
|
||||
"vorbisfiled",
|
||||
"vorbisd",
|
||||
"oggd",
|
||||
"flac",
|
||||
"vorbisfile",
|
||||
"vorbis",
|
||||
"ogg",
|
||||
"sfml-system-s-d",
|
||||
"winmm"
|
||||
}
|
||||
|
|
@ -83,14 +73,15 @@ project "Engine-Core"
|
|||
defines{"NDEBUG"}
|
||||
links
|
||||
{
|
||||
"sfml-main",
|
||||
"sfml-graphics-s",
|
||||
"sfml-window-s",
|
||||
"opengl32",
|
||||
"gdi32",
|
||||
"freetype",
|
||||
"sfml-audio-s",
|
||||
"openal32",
|
||||
"flac",
|
||||
"vorbisenc",
|
||||
"vorbisfile",
|
||||
"vorbis",
|
||||
"ogg",
|
||||
|
|
@ -99,7 +90,7 @@ project "Engine-Core"
|
|||
}
|
||||
|
||||
|
||||
--linux specific settings
|
||||
--linux specific settings--
|
||||
filter {"system:linux"}
|
||||
defines "PLATFORM_LINUX"
|
||||
targetdir (corelibdir)
|
||||
|
|
@ -121,7 +112,7 @@ project "Engine-Core"
|
|||
}
|
||||
|
||||
|
||||
--config settings
|
||||
--config settings--
|
||||
filter "configurations:debug"
|
||||
defines {"LOG_ENABLE", "CORE_DEBUG"}
|
||||
symbols "on"
|
||||
|
|
|
|||
|
|
@ -182,17 +182,13 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
reference& operator=(const reference& other)
|
||||
{ return *this = bool(other); }
|
||||
reference& operator=(const reference& other) { return *this = bool(other); }
|
||||
|
||||
void flip()
|
||||
{ *m_ptr ^= m_mask; }
|
||||
void flip() { *m_ptr ^= m_mask; }
|
||||
|
||||
void setTrue()
|
||||
{ *m_ptr |= m_mask; }
|
||||
void setTrue() { *m_ptr |= m_mask; }
|
||||
|
||||
void setFalse()
|
||||
{ *m_ptr &= ~m_mask; }
|
||||
void setFalse() { *m_ptr &= ~m_mask; }
|
||||
|
||||
private:
|
||||
data_type* const m_ptr;
|
||||
|
|
@ -414,7 +410,7 @@ public:
|
|||
void setTrueAt(CapacityType index)
|
||||
{ m_data[index / 8] |= (1 << (index % 8)); }
|
||||
|
||||
void setFalseAt(CapacityType index)
|
||||
void setFalseAt(CapacityType index)
|
||||
{ m_data[index / 8] &= ~(1 << (index % 8)); }
|
||||
|
||||
iterator begin() { return iterator(m_data, 0); }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <utility.h>
|
||||
|
||||
#include <Entities/Entity.h>
|
||||
#include <Entities/Components.h>
|
||||
#include <Entities/EntityMemoryPool.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ public:
|
|||
Entity addEntity(tag_t);
|
||||
|
||||
private:
|
||||
index_t m_numEntities[util::TAG_COUNT];
|
||||
index_t m_numEntitiesToAdd[util::TAG_COUNT];
|
||||
index_t m_numEntities[util::TAG_COUNT]{};
|
||||
index_t m_numEntitiesToAdd[util::TAG_COUNT]{};
|
||||
#ifdef CORE_DEBUG
|
||||
index_t m_totalEntities{};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public:
|
|||
bool operator==(iterator);
|
||||
bool operator!=(iterator);
|
||||
private:
|
||||
index_t m_currentEntity;
|
||||
index_t m_currentEntity{};
|
||||
};
|
||||
|
||||
Entity operator[](index_t) const;
|
||||
|
|
@ -38,6 +38,6 @@ public:
|
|||
iterator end() { return iterator(m_start + m_size); }
|
||||
|
||||
private:
|
||||
index_t m_start;
|
||||
index_t m_size;
|
||||
index_t m_start{};
|
||||
index_t m_size{};
|
||||
};
|
||||
|
|
@ -12,7 +12,7 @@ int EntityManager::update()
|
|||
{
|
||||
for(int i = 0; i < util::TAG_COUNT; i++)
|
||||
{
|
||||
if (m_numEntities[i] + m_numEntitiesToAdd[i] >= util::getTagSize(i)) [[unlikely]]
|
||||
if (m_numEntities[i] + m_numEntitiesToAdd[i] >= util::getTagSize(i))
|
||||
{
|
||||
LOG("Error: Entity Overflow");
|
||||
return ErrorCode::entityOverflow;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -3,6 +3,7 @@ project "Game"
|
|||
cppdialect "C++17"
|
||||
systemversion "latest"
|
||||
targetname "Game"
|
||||
links {"Engine-Core"}
|
||||
|
||||
files
|
||||
{
|
||||
|
|
@ -10,12 +11,6 @@ project "Game"
|
|||
"include/**.h",
|
||||
"include/**.hpp",
|
||||
}
|
||||
|
||||
filter "not action:vs*"
|
||||
libdirs
|
||||
{
|
||||
corelibdir
|
||||
}
|
||||
|
||||
--visual studio--
|
||||
filter {"action:vs*", "system:windows"}
|
||||
|
|
@ -30,11 +25,6 @@ project "Game"
|
|||
vs_imguidir
|
||||
}
|
||||
|
||||
libdirs
|
||||
{
|
||||
vs_corelibdir
|
||||
}
|
||||
|
||||
--not visual studio on windows--
|
||||
filter {"not action:vs*", "system:windows"}
|
||||
targetdir (bindir)
|
||||
|
|
@ -52,7 +42,7 @@ project "Game"
|
|||
filter{"system:windows"}
|
||||
defines "SFML_STATIC"
|
||||
defines "PLATFORM_WINDOWS"
|
||||
staticruntime "off"
|
||||
staticruntime "on"
|
||||
|
||||
filter {"system:windows", "configurations:debug"}
|
||||
defines{"_DEBUG", "_CONSOLE"}
|
||||
|
|
@ -60,7 +50,7 @@ project "Game"
|
|||
filter {"system:windows", "configurations:release"}
|
||||
defines{"NDEBUG"}
|
||||
|
||||
--linux specific settings
|
||||
--linux specific settings--
|
||||
filter {"system:linux"}
|
||||
targetdir (bindir)
|
||||
objdir (intdir)
|
||||
|
|
@ -82,13 +72,12 @@ project "Game"
|
|||
"OpenGL",
|
||||
}
|
||||
|
||||
--config settings
|
||||
--config settings--
|
||||
filter "configurations:debug"
|
||||
defines {"LOG_ENABLE", "GAME_DEBUG"}
|
||||
symbols "on"
|
||||
runtime "Debug"
|
||||
kind "ConsoleApp"
|
||||
links "Core-d:static"
|
||||
|
||||
filter "configurations:release"
|
||||
defines {"GAME_RELEASE"}
|
||||
|
|
@ -97,5 +86,3 @@ project "Game"
|
|||
symbols "off"
|
||||
runtime "Release"
|
||||
kind "WindowedApp"
|
||||
entrypoint "mainCRTStartup"
|
||||
links "Core:static"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
[Window][Debug##Default]
|
||||
Pos=60,60
|
||||
Size=400,400
|
||||
|
||||
[Window][sdfkjasbdf]
|
||||
Pos=60,60
|
||||
Size=957,582
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "Containers/Array.h"
|
||||
|
||||
#define DRAW_SCREEN 1
|
||||
|
||||
#include <Containers.h>
|
||||
|
|
@ -11,13 +11,11 @@
|
|||
#include <iostream>
|
||||
#include <utility.h>
|
||||
|
||||
int main()
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
LOG("\n\n\033[32mTODO: ");
|
||||
LOG("-Implement Draw queue prototype");
|
||||
LOG("-Implement swapback functionality when removing entites");
|
||||
LOG("-Test new Premake config on windows (VS and non VS) and WSL");
|
||||
LOG("-Replace sfml .lib files with ones that dont statically link runtime");
|
||||
LOG("-Implement adding and removing of entities");
|
||||
LOG("-Implement EntityManager::update()");
|
||||
LOG("\033[0m");
|
||||
|
|
@ -40,7 +38,7 @@ int main()
|
|||
LOG(ent);
|
||||
}
|
||||
|
||||
auto window = sf::RenderWindow(sf::VideoMode({ 1920u, 1080u }), "Fake Mario");
|
||||
auto window = sf::RenderWindow(sf::VideoMode({ 1920u, 1080u }), "2d-platformer");
|
||||
window.setFramerateLimit(60);
|
||||
if (!ImGui::SFML::Init(window))
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ workspace "2d-platformer"
|
|||
"release"
|
||||
}
|
||||
|
||||
startproject "Editor"
|
||||
startproject "Game"
|
||||
|
||||
output_dir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
|
||||
vs_intdir = "$(ProjectDir)intermediate-files/" .. output_dir
|
||||
|
|
@ -21,10 +21,6 @@ corelibdir = "%{wks.location}/Engine-Core/lib"
|
|||
vs_corelibdir = "$(SolutionDir)Engine-Core/lib"
|
||||
coreinclude_dir = "%{wks.location}/Engine-Core/include"
|
||||
vs_coreinclude_dir = "$(SolutionDir)Engine-Core/include"
|
||||
vs_librelease_dir = "$(SolutionDir)Engine-Core/vendor/SFML/lib/MinSizeRel"
|
||||
librelease_dir = "%{wks.location}/Engine-Core/vendor/SFML/lib/MinSizeRel"
|
||||
vs_libdebug_dir = "$(SolutionDir)Engine-Core/vendor/SFML/lib/Debug"
|
||||
libdebug_dir = "%{wks.location}/Engine-Core/vendor/SFML/lib/Debug"
|
||||
vs_sfmldir = "$(SolutionDir)Engine-Core/vendor/SFML"
|
||||
sfmldir = "%{wks.location}/Engine-Core/vendor/SFML"
|
||||
vs_imguidir = "$(SolutionDir)Engine-Core/vendor/imgui"
|
||||
|
|
|
|||
Loading…
Reference in New Issue