This commit is contained in:
h4570
2022-08-11 10:20:35 +02:00
parent 5f5f28b3fb
commit b6ffc11be3
302 changed files with 3547 additions and 691 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+3 -3
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -15,7 +15,7 @@
namespace Demo {
DemoGame::DemoGame(Engine* t_engine)
: engine(t_engine), stateManager(STATE_INTRO, STATE_EXIT) {}
: engine(t_engine), stateManager(STATE_GAME, STATE_EXIT) {}
DemoGame::~DemoGame() {}
void DemoGame::init() {
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
+2 -2
View File
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -57,7 +57,7 @@ void IntroPressKeyState::onStart() {
mapTextures[i][j] = engine->renderer.core.texture.repository.add(
FileUtils::fromCwd(path));
mapTextures[i][j]->addLink(mapSprites[i][j]->getId());
mapTextures[i][j]->addLink(mapSprites[i][j]->id);
}
}
@@ -67,7 +67,7 @@ void IntroPressKeyState::onStart() {
fillerTexture = engine->renderer.core.texture.repository.add(
FileUtils::fromCwd("intro/filler.png"));
fillerTexture->addLink(fillerSprite->getId());
fillerTexture->addLink(fillerSprite->id);
pressKeySprite = new Sprite;
pressKeySprite->size.set(256.0F, 64.0F);
@@ -76,7 +76,7 @@ void IntroPressKeyState::onStart() {
pressKeyTexture = engine->renderer.core.texture.repository.add(
FileUtils::fromCwd("intro/press-key.png"));
pressKeyTexture->addLink(pressKeySprite->getId());
pressKeyTexture->addLink(pressKeySprite->id);
logoSprite = new Sprite;
logoSprite->size.set(256.0F, 128.0F);
@@ -84,7 +84,7 @@ void IntroPressKeyState::onStart() {
logoTexture = engine->renderer.core.texture.repository.add(
FileUtils::fromCwd("intro/lastalive.png"));
logoTexture->addLink(logoSprite->getId());
logoTexture->addLink(logoSprite->id);
initialized = true;
}
@@ -94,17 +94,17 @@ IntroStateType IntroPressKeyState::onFinish() {
for (u8 i = 0; i < mapRows; i++)
for (u8 j = 0; j < mapCols; j++) {
engine->renderer.core.texture.repository.free(mapTextures[i][j]->getId());
engine->renderer.core.texture.repository.free(mapTextures[i][j]->id);
delete mapSprites[i][j];
}
engine->renderer.core.texture.repository.free(fillerTexture->getId());
engine->renderer.core.texture.repository.free(fillerTexture->id);
delete fillerSprite;
engine->renderer.core.texture.repository.free(logoTexture->getId());
engine->renderer.core.texture.repository.free(logoTexture->id);
delete logoSprite;
engine->renderer.core.texture.repository.free(pressKeyTexture->getId());
engine->renderer.core.texture.repository.free(pressKeyTexture->id);
delete pressKeySprite;
initialized = false;
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -47,7 +47,7 @@ void IntroPs2DevState::onStart() {
texture = engine->renderer.core.texture.repository.add(
FileUtils::fromCwd("intro/ps2dev.png"));
texture->addLink(sprite->getId());
texture->addLink(sprite->id);
initialized = true;
}
@@ -56,7 +56,7 @@ IntroStateType IntroPs2DevState::onFinish() {
if (!initialized) return STATE_TYRA;
delete sprite;
engine->renderer.core.texture.repository.free(texture->getId());
engine->renderer.core.texture.repository.free(texture->id);
initialized = false;
return STATE_TYRA;
@@ -1,10 +1,10 @@
/*
# ______ ____ ___
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
@@ -63,19 +63,19 @@ void IntroTyraState::onStart() {
tyraTexture = engine->renderer.core.texture.repository.add(
FileUtils::fromCwd("intro/tyra.png"));
tyraTexture->addLink(tyraSprite->getId());
tyraTexture->addLink(tyraSprite->id);
bgTexture = engine->renderer.core.texture.repository.add(
FileUtils::fromCwd("intro/tyra_bg.png"));
bgTexture->addLink(bgSprite->getId());
bgTexture->addLink(bgSprite->id);
bg2Texture = engine->renderer.core.texture.repository.add(
FileUtils::fromCwd("intro/tyra_bg2.png"));
bg2Texture->addLink(bg2Sprite->getId());
bg2Texture->addLink(bg2Sprite->id);
fillerTexture = engine->renderer.core.texture.repository.add(
FileUtils::fromCwd("intro/filler.png"));
fillerTexture->addLink(fillerSprite->getId());
fillerTexture->addLink(fillerSprite->id);
initialized = true;
}
@@ -83,10 +83,10 @@ void IntroTyraState::onStart() {
IntroStateType IntroTyraState::onFinish() {
if (!initialized) return STATE_PRESS_KEY;
engine->renderer.core.texture.repository.free(tyraTexture->getId());
engine->renderer.core.texture.repository.free(bgTexture->getId());
engine->renderer.core.texture.repository.free(bg2Texture->getId());
engine->renderer.core.texture.repository.free(fillerTexture->getId());
engine->renderer.core.texture.repository.free(tyraTexture->id);
engine->renderer.core.texture.repository.free(bgTexture->id);
engine->renderer.core.texture.repository.free(bg2Texture->id);
engine->renderer.core.texture.repository.free(fillerTexture->id);
delete tyraSprite;
delete bgSprite;