[BUILD] Finalizing the Bazel setup

This commit is contained in:
dpeter99 2022-06-24 01:07:57 +02:00
parent ae19bccce4
commit 4dbf5cacea
32 changed files with 342 additions and 416 deletions

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.system.id="Blaze" type="BLAZE_CPP_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../..">
<excludeFolder url="file://$MODULE_DIR$/../../.idea" />
<excludeFolder url="file://$MODULE_DIR$/.." />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.system.id="Blaze" type="BLAZE_CPP_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../../..">
<sourceFolder url="file://$MODULE_DIR$/../../.." isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/../../../bazel-bin" />
<excludeFolder url="file://$MODULE_DIR$/../../../bazel-genfiles" />
<excludeFolder url="file://$MODULE_DIR$/../../../bazel-out" />
<excludeFolder url="file://$MODULE_DIR$/../../../bazel-testlogs" />
<excludeFolder url="file://$MODULE_DIR$/../../../bazel-umbra" />
<excludeFolder url="file://$MODULE_DIR$/../.." />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

1
.clwb/.idea/.name Normal file
View File

@ -0,0 +1 @@
umbra

9
.clwb/.idea/modules.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.blaze/modules/.project-data-dir.iml" filepath="$PROJECT_DIR$/.blaze/modules/.project-data-dir.iml" />
<module fileurl="file://$PROJECT_DIR$/.blaze/modules/.workspace.iml" filepath="$PROJECT_DIR$/.blaze/modules/.workspace.iml" />
</modules>
</component>
</project>

6
.clwb/.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

1
.gitignore vendored
View File

@ -5,6 +5,5 @@ riderModule.iml
/_ReSharper.Caches/
*.user
projs/shadow-file-format/shadow-file-format.vcxproj.user
bazel-*/

View File

@ -1,71 +0,0 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="Umbra.props"/>
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{47591591-E091-4B88-8418-74D3CBEC5712}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
<OutDir>$(SolutionDir)bin\$(Configuration)\$(MSBuildProjectName)\</OutDir>
<IntDir>$(SolutionDir)obj\$(Configuration)\$(MSBuildProjectName)\</IntDir>
<LocalDebuggerWorkingDirectory>$(SolutionDir)</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<LinkIncremental>false</LinkIncremental>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp20</LanguageStandard>
<EnableModules>true</EnableModules>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>

View File

@ -1,13 +0,0 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
</Project>

View File

@ -0,0 +1,17 @@
cc_library(
name = "shadow-engine",
srcs = glob(["src/**/*.cpp", "src/**/*.h"]),
hdrs = glob(["src/**/*.h"]),
strip_include_prefix = "src/",
includes = [],
copts = [
"/std:c++20"
],
deps = [
"//projs/shadow-utility",
"@sdl2"
],
visibility = ["//visibility:public"],
)

View File

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="../../Umbra.CPP.props" />
<Import Project="$(SolutionDir)vendor/sdl2/sdl2.props" />
<Import Project="$(SolutionDir)vendor/glm/glm.props" />
</ImportGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{76759923-036B-4D7B-A79C-332698CDC6A8}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>shadow_engine</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
<ClCompile Include="shadow-engine.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\shadow-entity\shadow-entity.vcxproj">
<Project>{47591591-e091-4b88-8418-74d3cbec5712}</Project>
<Name>shadow-entity</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="shadow_engine.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,77 @@
#include "ShadowApplication.h"
#include "Time.h"
#include <string>
namespace ShadowEngine {
ShadowApplication* ShadowApplication::instance = nullptr;
ShadowApplication::ShadowApplication(int argc, char* argv[])
{
instance = this;
if(argc > 1)
{
for (size_t i = 0; i < argc; i++)
{
std::string param(argv[i]);
if(param == "-no-gui")
{
this->no_gui = true;
}
}
}
//game = _setupFunc();
}
ShadowApplication::~ShadowApplication()
{
}
void ShadowApplication::Init()
{
// Initialize SDL. SDL_Init will return -1 if it fails.
if ( SDL_Init( SDL_INIT_EVERYTHING ) < 0 ) {
//std::cout << "Error initializing SDL: " << SDL_GetError() << std::endl;
//system("pause");
// End the program
//return 1;
}
window_ = new ShadowWindow(800,450);
/*
moduleManager.PushModule(new Log());
moduleManager.PushModule(new EventSystem::ShadowEventManager());
moduleManager.PushModule(new SDLPlatform::SDLModule());
moduleManager.PushModule(new Rendering::Renderer());
moduleManager.PushModule(new Assets::AssetManager());
if(!no_gui)
moduleManager.PushModule(new DebugGui::ImGuiModule());
moduleManager.PushModule(new InputSystem::ShadowActionSystem());
//moduleManager.PushModule(new Debug::DebugModule());
moduleManager.PushModule(new EntitySystem::EntitySystem());
game->Init();
moduleManager.Init();
*/
}
void ShadowApplication::Start()
{
while (running)
{
Time::UpdateTime();
}
}
}

View File

@ -0,0 +1,60 @@
#pragma once
#include "ShadowWindow.h"
namespace ShadowEngine {
/// <summary>
/// Represents the application
/// </summary>
class ShadowApplication
{
/// <summary>
/// This is the singleton instance
/// </summary>
static ShadowApplication* instance;
/// <summary>
/// The active window that we are drawing to
/// </summary>
ShadowWindow* window_;
/// <summary>
/// The module manager instance
/// </summary>
//ShadowEngine::ShadowModuleManager moduleManager;
/// <summary>
/// Represents the running state.
/// </summary>
/// If set to false the main loop will stop and continue with the shutdown.
bool running = true;
bool no_gui = false;
public:
/// <summary>
/// Default constructor
/// </summary>
ShadowApplication(int argc, char* argv[]);
virtual ~ShadowApplication();
/// <summary>
/// Static getter for the singleton instance
/// </summary>
/// Use this for accessing the Application
/// <returns>The current application reference</returns>
static ShadowApplication& Get() { return *instance; };
/// <summary>
/// Returns the active window used for rendering
/// </summary>
/// <returns> The window instance </returns>
//ShadowWindow& const GetWindow() const { return window_; };
//void SetWindow(ShadowWindow w) { window_ = w; }
//ShadowEngine::ShadowModuleManager& GetModuleManager() { return moduleManager; };
void Init();
void Start();
};
}

View File

@ -0,0 +1,37 @@
#include "ShadowWindow.h"
ShadowWindow::ShadowWindow(int W, int H) : Height(H), Width(W)
{
// Create our window
sdlWindowPtr = SDL_CreateWindow( "Example", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, Width, Height, SDL_WINDOW_SHOWN );
// Make sure creating the window succeeded
if ( !sdlWindowPtr ) {
//Raise an error in the log
//std::cout << "Error creating window: " << SDL_GetError() << std::endl;
}
// Get the surface from the window
sdlSurface = SDL_GetWindowSurface( sdlWindowPtr );
// Make sure getting the surface succeeded
if ( !sdlSurface ) {
//Raise an error in the log
//std::cout << "Error getting surface: " << SDL_GetError() << std::endl;
}
// Create window
/*
this->winPtr = SDL_CreateWindow("Hello World!", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, W, H,
SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);
SH_CORE_ASSERT(winPtr, "Window could not be created! SDL_Error: %s\n", SDL_GetError());
context = ShadowEngine::Rendering::GraphicsContext::Create(this);
context->Init();
*/
}
ShadowWindow::~ShadowWindow()
{
}

View File

@ -0,0 +1,22 @@
#pragma once
#include <SDL2/SDL.h>
class ShadowWindow
{
public:
int Height;
int Width;
SDL_Window* sdlWindowPtr;
SDL_Surface* sdlSurface = NULL;
//ShadowEngine::Ref<ShadowEngine::Rendering::GraphicsContext> context;
ShadowWindow(int W, int H);
~ShadowWindow();
};

View File

@ -0,0 +1,20 @@
#include "Time.h"
//#include <SDL_hints.h>
//#include <SDL.h>
int Time::NOW = 0;//SDL_GetPerformanceCounter();
int Time::LAST = 0;
double Time::deltaTime_ms = 0;
double Time::deltaTime = 0;
void Time::UpdateTime()
{
/*
NOW = SDL_GetTicks();
deltaTime_ms = LAST > 0 ? (NOW - LAST) *10 : (1.0f / 60.0f);
deltaTime_ms = deltaTime_ms == 0 ? (1.0f / 60.0f) : deltaTime_ms;
LAST = NOW;
deltaTime = deltaTime_ms * 0.001;
*/
}

View File

@ -0,0 +1,14 @@
#pragma once
class Time
{
static int NOW;
public:
static int LAST;
static double deltaTime;
static double deltaTime_ms;
static void UpdateTime();
};

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="../../Umbra.CPP.props" />
</ImportGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{47591591-E091-4B88-8418-74D3CBEC5712}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>shadow_entity</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared"/>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
<ClCompile Include="shadow-entity.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="shadow_entity.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="../../Umbra.CPP.props" />
</ImportGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B2E3515C-3FE0-44B9-9ABE-8584A836230F}</ProjectGuid>
<RootNamespace>shadow_file_format</RootNamespace>
<ProjectName>shadow-file-format</ProjectName>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)\projs\shadow-utility\src\; %(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src/SFFElement.cpp" />
<ClCompile Include="src\SFFParser.cpp" />
<ClCompile Include="src\SFFWriter.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src/SFFElement.h" />
<ClInclude Include="src\SFFParser.h" />
<ClInclude Include="src\SFFVersion.h" />
<ClInclude Include="src\SFFWriter.h" />
</ItemGroup>
<ItemGroup>
<Natvis Include="SFFElement.natvis" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\shadow-utility\shadow-utility.vcxproj">
<Project>{7b9e6056-e4fb-411b-9612-a2fd679c2b69}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

View File

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src/SFFElement.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SFFParser.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SFFWriter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\SFFParser.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SFFVersion.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SFFWriter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SFFParser.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SFFVersion.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SFFWriter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src/SFFElement.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SFFParser.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SFFVersion.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SFFWriter.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Natvis Include="SFFElement.natvis" />
</ItemGroup>
</Project>

View File

@ -4,7 +4,6 @@
#include <sstream>
#include "SFFParser.h"
//import Shadow.FileFormat;
std::string example_empty = "ShadowFileFormat_1_0_0";

View File

@ -0,0 +1,16 @@
cc_binary(
name = "shadow-runtime",
srcs = glob(["src/**/*.cpp", "src/**/*.h"]),
includes = [],
copts = [
"/std:c++20"
],
deps = [
"//projs/shadow-engine",
"@sdl2"
],
)

View File

@ -0,0 +1,28 @@
#include "main.h"
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include "core/ShadowApplication.h"
#include <SDL2/SDL.h>
int main(int argc, char *argv[])
{
std::cout << "argc == " << argc << '\n';
for(int ndx{}; ndx != argc; ++ndx) {
std::cout << "argv[" << ndx << "] == " << std::quoted(argv[ndx]) << '\n';
}
std::cout << "argv[" << argc << "] == "
<< static_cast<void*>(argv[argc]) << '\n';
/*...*/
ShadowEngine::ShadowApplication app(argc, argv);
app.Init();
app.Start();
return argc == 3 ? EXIT_SUCCESS : EXIT_FAILURE; // optional return value
}

View File

@ -0,0 +1,8 @@
//
// Created by dpete on 2022-06-20.
//
#ifndef UMBRA_MAIN_H
#define UMBRA_MAIN_H
#endif //UMBRA_MAIN_H

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="../../Umbra.CPP.props" />
</ImportGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{7B9E6056-E4FB-411B-9612-A2FD679C2B69}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>shadow_utility</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"/>
<ImportGroup Label="Shared"/>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
<ClInclude Include="src\string-helpers.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\string-helpers.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\shadow-entity\shadow-entity.vcxproj">
<Project>{47591591-e091-4b88-8418-74d3cbec5712}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\string-helpers.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="string-helpers.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -1,9 +0,0 @@
module;
#include <string>
#include <vector>
export module shadow_utils;
export std::vector<std::string> explode(const std::string& s, const char& c);

View File

@ -1,20 +0,0 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ItemGroup Label="AdditionalIncludes">
<Item>
$(SolutionDir)vendor/sdl2/SDL2-2.0.22/include/
</Item>
</ItemGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)vendor/sdl2/SDL2-2.0.22/include/; %(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)vendor/sdl2/SDL2-2.0.22/lib/$(Platform)</AdditionalLibraryDirectories>
<AdditionalDependencies>sdl2.lib;sdl2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>