diff --git a/.vscode/configurations/windows-docker/settings.json b/.vscode/configurations/windows-docker/settings.json index c933a6f..56568d9 100644 --- a/.vscode/configurations/windows-docker/settings.json +++ b/.vscode/configurations/windows-docker/settings.json @@ -1,5 +1,5 @@ { - "buildDirectory": "tutorials/01-hello", + "buildDirectory": "demo", "C_Cpp.default.intelliSenseMode": "gcc-x86", "files.associations": { "*.vcl": "asm-collection", diff --git a/demo/Makefile b/demo/Makefile new file mode 100644 index 0000000..1ac4111 --- /dev/null +++ b/demo/Makefile @@ -0,0 +1,33 @@ +TARGET := demo.elf +ENGINEDIR := ../engine + +#The Directories, Source, Includes, Objects, Binary and Resources +SRCDIR := src +INCDIR := inc +BUILDDIR := obj +TARGETDIR := bin +RESDIR := res +SRCEXT := cpp +VSMEXT := vsm +VCLEXT := vcl +VCLPPEXT := vclpp +DEPEXT := d +OBJEXT := o + +#Flags, Libraries and Includes +CFLAGS := +LIB := -ltyra +LIBDIRS := -L$(ENGINEDIR)/bin +INC := -I$(INCDIR) -I$(ENGINEDIR)/inc +INCDEP := -I$(INCDIR) -I$(ENGINEDIR)/inc + +include ../Makefile.base + +clean-engine: + cd $(ENGINEDIR) && $(MAKE) cleaner + +build-engine: + cd $(ENGINEDIR) && $(MAKE) + +build-release-engine: + cd $(ENGINEDIR) && $(MAKE) release diff --git a/demo/bin/audsrv.irx b/demo/bin/audsrv.irx new file mode 100644 index 0000000..7e3c9fd Binary files /dev/null and b/demo/bin/audsrv.irx differ diff --git a/demo/inc/demo.hpp b/demo/inc/demo.hpp new file mode 100644 index 0000000..724ebcf --- /dev/null +++ b/demo/inc/demo.hpp @@ -0,0 +1,30 @@ +/* +# ______ ____ ___ +# | \/ ____| |___| +# | | | \ | | +#----------------------------------------------------------------------- +# Copyright 2020 - 2022, tyra - https://github.com/h4570/tyra +# Licenced under Apache License 2.0 +# Sandro Sobczyński +*/ + +#pragma once + +#include +#include + +namespace Tyra { + +class Demo : public Game { + public: + Demo(Engine* engine); + ~Demo(); + + void init(); + void loop(); + + private: + Engine* engine; +}; + +} // namespace Tyra diff --git a/demo/run.ps1 b/demo/run.ps1 new file mode 100644 index 0000000..58035c6 --- /dev/null +++ b/demo/run.ps1 @@ -0,0 +1,4 @@ +$ConfigFile = Join-Path $PSScriptRoot '../windows-pcsx2.ps1' +. $ConfigFile + +RunPCSX2 diff --git a/demo/src/demo.cpp b/demo/src/demo.cpp new file mode 100644 index 0000000..b1dbb46 --- /dev/null +++ b/demo/src/demo.cpp @@ -0,0 +1,21 @@ +/* +# ______ ____ ___ +# | \/ ____| |___| +# | | | \ | | +#----------------------------------------------------------------------- +# Copyright 2020, tyra - https://github.com/h4570/tyra +# Licenced under Apache License 2.0 +# Sandro Sobczyński +*/ + +#include "demo.hpp" + +namespace Tyra { + +Demo::Demo(Engine* t_engine) { engine = t_engine; } +Demo::~Demo() {} + +void Demo::init() { TYRA_LOG("Init!"); } +void Demo::loop() {} + +} // namespace Tyra diff --git a/demo/src/main.cpp b/demo/src/main.cpp new file mode 100644 index 0000000..7f21e36 --- /dev/null +++ b/demo/src/main.cpp @@ -0,0 +1,20 @@ +/* +# ______ ____ ___ +# | \/ ____| |___| +# | | | \ | | +#----------------------------------------------------------------------- +# Copyright 2020, tyra - https://github.com/h4570/tyra +# Licenced under Apache License 2.0 +# Sandro Sobczyński +*/ + +#include "engine.hpp" +#include "demo.hpp" + +int main() { + Tyra::Engine engine; + Tyra::Demo game(&engine); + engine.run(&game); + SleepThread(); + return 0; +} diff --git a/tutorials/01-hello/src/tutorial_01.cpp b/tutorials/01-hello/src/tutorial_01.cpp index 9b7776c..12af225 100644 --- a/tutorials/01-hello/src/tutorial_01.cpp +++ b/tutorials/01-hello/src/tutorial_01.cpp @@ -5,7 +5,7 @@ #----------------------------------------------------------------------- # Copyright 2020, tyra - https://github.com/h4570/tyra # Licenced under Apache License 2.0 -# Wellington Carvalho +# Sandro Sobczyński */ #include "tutorial_01.hpp"