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