Fixed more *nix compile issues

This commit is contained in:
2023-02-03 06:23:21 -08:00
parent 7db25fc659
commit 6e9a54b4f2
7 changed files with 15 additions and 14 deletions

View File

@ -26,6 +26,6 @@ target_include_directories(stb INTERFACE stb)
set(LIBTYPE "STATIC")
add_subdirectory(openal-soft)
set(BUILD_TESTS OFF CACHE BOOL "Build tests")
set(BUILD_EXAMPLES OFF CACHE BOOL "Build examples")
set(BUILD_TESTS OFF CACHE BOOL "Build tests" FORCE)
set(BUILD_EXAMPLES OFF CACHE BOOL "Build examples" FORCE)
add_subdirectory(AudioFile)

View File

@ -23,7 +23,7 @@ namespace Dawn {
}
void onValueModified() override {
SimpleAnimation::onValueModified();
SimpleAnimation<T>::onValueModified();
this->invoke();
}
@ -32,7 +32,7 @@ namespace Dawn {
* Construct a new Simple Function Animation object
*/
SimpleCallbackAnimation() :
SimpleAnimation(&value)
SimpleAnimation<T>(&value)
{
}

View File

@ -6,6 +6,7 @@
#pragma once
#include "Prefab.hpp"
#include "scene/SceneItem.hpp"
#include "game/DawnGame.hpp"
namespace Dawn {
template<class T>

View File

@ -13,7 +13,7 @@
#include "visualnovel/events/VisualNovelTextboxEvent.hpp"
#include "visualnovel/events/timing/VisualNovelPauseEvent.hpp"
#include "visualnovel/events/VisualNovelFadeEvent.hpp"
#include "visualnovel/events/VisualNovelCAllbackEvent.hpp"
#include "visualnovel/events/VisualNovelCallbackEvent.hpp"
#include "visualnovel/events/VisualNovelChangeSimpleBackgroundEvent.hpp"
namespace Dawn {

View File

@ -47,7 +47,7 @@ namespace Dawn {
TiledSprite *tiledSprite;
AudioSource *audioSource;
CharacterPrefab(Scene *s, sceneitemid_t i) : SceneItemPrefab(s, i) {}
CharacterPrefab(Scene *s, sceneitemid_t i) : SceneItemPrefab<T>(s, i) {}
void prefabInit(AssetManager *man) override {
characterTexture = man->get<TextureAsset>(T::getCharacterTexture());
@ -57,24 +57,24 @@ namespace Dawn {
auto emotion = this->defineAndGetInitialEmotion(man);
// Components
meshRenderer = this->addComponent<MeshRenderer>();
meshHost = this->addComponent<MeshHost>();
meshRenderer = SceneItem::addComponent<MeshRenderer>();
meshHost = SceneItem::addComponent<MeshHost>();
material = this->addComponent<SimpleTexturedMaterial>();
material = SceneItem::addComponent<SimpleTexturedMaterial>();
material->texture = &characterTexture->texture;
vnCharacter = this->addComponent<VisualNovelCharacter>();
vnCharacter = SceneItem::addComponent<VisualNovelCharacter>();
vnCharacter->nameKey = T::getLanguagePrefix() + ".name";
animation = this->addComponent<AnimationController>();
animation = SceneItem::addComponent<AnimationController>();
tiledSprite = this->addComponent<TiledSprite>();
tiledSprite = SceneItem::addComponent<TiledSprite>();
tiledSprite->setTileset(&characterTileset->tileset);
float_t ratio = characterTileset->tileset.getTileWidth() / characterTileset->tileset.getTileHeight();
tiledSprite->setSize(glm::vec2(ratio, 1.0f));
tiledSprite->setTile(emotion.tile);
audioSource = this->addComponent<AudioSource>();
audioSource = SceneItem::addComponent<AudioSource>();
this->transform.setLocalPosition(glm::vec3(0, 0, 0));
}

View File

@ -8,7 +8,7 @@
#include "scenes/Scene_2.hpp"
#include "prefabs/characters/DeathPrefab.hpp"
#include "visualnovel/events/characters/VisualNovelFadeCharacterEvent.hpp"
#include "visualnovel/events/characters/VIsualNovelTransformItemEvent.hpp"
#include "visualnovel/events/characters/VisualNovelTransformItemEvent.hpp"
#include "visualnovel/events/timing/VisualNovelBatchEvent.hpp"
namespace Dawn {