Just breaking stuff
This commit is contained in:
10
archive/dawnpokergame/scenes/CMakeLists.txt
Normal file
10
archive/dawnpokergame/scenes/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2022 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${DAWN_TARGET_NAME}
|
||||
PRIVATE
|
||||
PokerVNScene.cpp
|
||||
)
|
39
archive/dawnpokergame/scenes/PokerVNScene.cpp
Normal file
39
archive/dawnpokergame/scenes/PokerVNScene.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#include "PokerVNScene.hpp"
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
PokerVNScene::PokerVNScene(DawnGame *game) : SimpleVNScene(game) {
|
||||
|
||||
}
|
||||
|
||||
std::vector<Asset*> PokerVNScene::getRequiredAssets() {
|
||||
auto assMan = &this->game->assetManager;
|
||||
std::vector<Asset*> assets;
|
||||
vectorAppend(&assets, SimpleVNScene::getRequiredAssets());
|
||||
vectorAppend(&assets, PokerPlayerDisplay::getAssets(assMan));
|
||||
return assets;
|
||||
}
|
||||
|
||||
void PokerVNScene::vnStage() {
|
||||
|
||||
auto pokerGameItem = this->createSceneItem();
|
||||
this->pokerGame = pokerGameItem->addComponent<PokerGame>();
|
||||
|
||||
this->pokerPlayers = this->getPokerPlayers();
|
||||
|
||||
auto it = this->pokerPlayers.begin();
|
||||
int32_t i = 0;
|
||||
while(it != this->pokerPlayers.end()) {
|
||||
auto player = *it;
|
||||
// auto uiPlayer = canvas->addElement<PokerPlayerDisplay>();
|
||||
// uiPlayer->setTransform(UI_COMPONENT_ALIGN_START, UI_COMPONENT_ALIGN_START, glm::vec4(i * 220, 0, 220, 200), 0);
|
||||
// uiPlayer->setPlayer(player);
|
||||
++it;
|
||||
++i;
|
||||
}
|
||||
}
|
39
archive/dawnpokergame/scenes/PokerVNScene.hpp
Normal file
39
archive/dawnpokergame/scenes/PokerVNScene.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "poker/PokerGame.hpp"
|
||||
#include "visualnovel/events/PokerBetLoopEvent.hpp"
|
||||
#include "visualnovel/events/PokerInitialEvent.hpp"
|
||||
#include "ui/PokerPlayerDisplay.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class PokerVNScene : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override;
|
||||
std::vector<Asset*> getRequiredAssets() override;
|
||||
|
||||
/**
|
||||
* Returns the Poker Players that are in this poker scene.
|
||||
*
|
||||
* @return List of Poker Players.
|
||||
*/
|
||||
virtual std::vector<PokerPlayer*> getPokerPlayers() = 0;
|
||||
|
||||
public:
|
||||
PokerGame *pokerGame;
|
||||
std::vector<PokerPlayer*> pokerPlayers;
|
||||
std::map<PokerPlayer*, PokerPlayerDisplay*> pokerPlayerDisplays;
|
||||
|
||||
/**
|
||||
* Create a simple Poker Visual Novel Scene. Simplifies some of the less
|
||||
* interesting parts of a poker VN game.
|
||||
*
|
||||
* @param game Game that this poker scene belongs to.
|
||||
*/
|
||||
PokerVNScene(DawnGame *game);
|
||||
};
|
||||
}
|
45
archive/dawnpokergame/scenes/Scene_10.hpp
Normal file
45
archive/dawnpokergame/scenes/Scene_10.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_11.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_10 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_11(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_10(DawnGame *game) : SimpleVNScene(game) {
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.10.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_10>(vnManager, this, &Scene_10::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
45
archive/dawnpokergame/scenes/Scene_11.hpp
Normal file
45
archive/dawnpokergame/scenes/Scene_11.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_12.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_11 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_12(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_11(DawnGame *game) : SimpleVNScene(game) {
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.11.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_11>(vnManager, this, &Scene_11::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
66
archive/dawnpokergame/scenes/Scene_12.hpp
Normal file
66
archive/dawnpokergame/scenes/Scene_12.hpp
Normal file
@ -0,0 +1,66 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "PokerVNScene.hpp"
|
||||
#include "prefabs/characters/PennyPrefab.hpp"
|
||||
#include "scenes/Scene_13.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_12 : public PokerVNScene {
|
||||
protected:
|
||||
PennyPrefab *penny;
|
||||
PennyPrefab *julie;
|
||||
PennyPrefab *sammy;
|
||||
PennyPrefab *lucy;
|
||||
|
||||
void vnStage() override {
|
||||
penny = PennyPrefab::create(this);
|
||||
julie = PennyPrefab::create(this);
|
||||
sammy = PennyPrefab::create(this);
|
||||
lucy = PennyPrefab::create(this);
|
||||
|
||||
PokerVNScene::vnStage();
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_13(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
std::vector<PokerPlayer *> getPokerPlayers() override {
|
||||
return std::vector<PokerPlayer*>{
|
||||
this->penny->getComponent<PokerPlayer>(),
|
||||
this->julie->getComponent<PokerPlayer>(),
|
||||
this->sammy->getComponent<PokerPlayer>(),
|
||||
this->lucy->getComponent<PokerPlayer>()
|
||||
};
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_12(DawnGame *game) : PokerVNScene(game) {}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
auto assMan = &this->game->assetManager;
|
||||
std::vector<Asset*> assets;
|
||||
vectorAppend(&assets, PokerVNScene::getRequiredAssets());
|
||||
vectorAppend(&assets, PennyPrefab::getRequiredAssets(assMan));
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelTextboxEvent(vnManager, "scene.12.1");
|
||||
start
|
||||
->then(new VisualNovelCallbackEvent<Scene_12>(vnManager, this, &Scene_12::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
45
archive/dawnpokergame/scenes/Scene_13.hpp
Normal file
45
archive/dawnpokergame/scenes/Scene_13.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_14.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_13 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_14(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_13(DawnGame *game) : SimpleVNScene(game) {
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.13.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_13>(vnManager, this, &Scene_13::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
45
archive/dawnpokergame/scenes/Scene_14.hpp
Normal file
45
archive/dawnpokergame/scenes/Scene_14.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_15.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_14 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_15(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_14(DawnGame *game) : SimpleVNScene(game) {
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.14.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_14>(vnManager, this, &Scene_14::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
45
archive/dawnpokergame/scenes/Scene_15.hpp
Normal file
45
archive/dawnpokergame/scenes/Scene_15.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_16.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_15 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_16(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_15(DawnGame *game) : SimpleVNScene(game) {
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.15.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_15>(vnManager, this, &Scene_15::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
45
archive/dawnpokergame/scenes/Scene_16.hpp
Normal file
45
archive/dawnpokergame/scenes/Scene_16.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_17.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_16 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_17(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
public:
|
||||
Scene_16(DawnGame *game) : SimpleVNScene(game) {
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.16.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_16>(vnManager, this, &Scene_16::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
66
archive/dawnpokergame/scenes/Scene_17.hpp
Normal file
66
archive/dawnpokergame/scenes/Scene_17.hpp
Normal file
@ -0,0 +1,66 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "PokerVNScene.hpp"
|
||||
#include "prefabs/characters/PennyPrefab.hpp"
|
||||
#include "scenes/Scene_18.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_17 : public PokerVNScene {
|
||||
protected:
|
||||
PennyPrefab *penny;
|
||||
PennyPrefab *julie;
|
||||
PennyPrefab *sammy;
|
||||
PennyPrefab *lucy;
|
||||
|
||||
void vnStage() override {
|
||||
penny = PennyPrefab::create(this);
|
||||
julie = PennyPrefab::create(this);
|
||||
sammy = PennyPrefab::create(this);
|
||||
lucy = PennyPrefab::create(this);
|
||||
|
||||
PokerVNScene::vnStage();
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_18(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
std::vector<PokerPlayer *> getPokerPlayers() override {
|
||||
return std::vector<PokerPlayer*>{
|
||||
this->penny->getComponent<PokerPlayer>(),
|
||||
this->julie->getComponent<PokerPlayer>(),
|
||||
this->sammy->getComponent<PokerPlayer>(),
|
||||
this->lucy->getComponent<PokerPlayer>()
|
||||
};
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_17(DawnGame *game) : PokerVNScene(game) {}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
auto assMan = &this->game->assetManager;
|
||||
std::vector<Asset*> assets;
|
||||
vectorAppend(&assets, PokerVNScene::getRequiredAssets());
|
||||
vectorAppend(&assets, PennyPrefab::getRequiredAssets(assMan));
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelTextboxEvent(vnManager, "scene.17.1");
|
||||
start
|
||||
->then(new VisualNovelCallbackEvent<Scene_17>(vnManager, this, &Scene_17::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
37
archive/dawnpokergame/scenes/Scene_18.hpp
Normal file
37
archive/dawnpokergame/scenes/Scene_18.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_18 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_18(DawnGame *game) : SimpleVNScene(game) {
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.18.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_18>(vnManager, this, &Scene_18::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
46
archive/dawnpokergame/scenes/Scene_2.hpp
Normal file
46
archive/dawnpokergame/scenes/Scene_2.hpp
Normal file
@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_3.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_2 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_3(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_2(DawnGame *game) : SimpleVNScene(game) {
|
||||
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.2.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_2>(vnManager, this, &Scene_2::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
46
archive/dawnpokergame/scenes/Scene_3.hpp
Normal file
46
archive/dawnpokergame/scenes/Scene_3.hpp
Normal file
@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_4.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_3 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_4(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_3(DawnGame *game) : SimpleVNScene(game) {
|
||||
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.3.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_3>(vnManager, this, &Scene_3::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
66
archive/dawnpokergame/scenes/Scene_4.hpp
Normal file
66
archive/dawnpokergame/scenes/Scene_4.hpp
Normal file
@ -0,0 +1,66 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "PokerVNScene.hpp"
|
||||
#include "prefabs/characters/PennyPrefab.hpp"
|
||||
#include "scenes/Scene_5.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_4 : public PokerVNScene {
|
||||
protected:
|
||||
PennyPrefab *penny;
|
||||
PennyPrefab *julie;
|
||||
PennyPrefab *sammy;
|
||||
PennyPrefab *lucy;
|
||||
|
||||
void vnStage() override {
|
||||
penny = PennyPrefab::create(this);
|
||||
julie = PennyPrefab::create(this);
|
||||
sammy = PennyPrefab::create(this);
|
||||
lucy = PennyPrefab::create(this);
|
||||
|
||||
PokerVNScene::vnStage();
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_5(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
std::vector<PokerPlayer *> getPokerPlayers() override {
|
||||
return std::vector<PokerPlayer*>{
|
||||
this->penny->getComponent<PokerPlayer>(),
|
||||
this->julie->getComponent<PokerPlayer>(),
|
||||
this->sammy->getComponent<PokerPlayer>(),
|
||||
this->lucy->getComponent<PokerPlayer>()
|
||||
};
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_4(DawnGame *game) : PokerVNScene(game) {}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
auto assMan = &this->game->assetManager;
|
||||
std::vector<Asset*> assets;
|
||||
vectorAppend(&assets, PokerVNScene::getRequiredAssets());
|
||||
vectorAppend(&assets, PennyPrefab::getRequiredAssets(assMan));
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelTextboxEvent(vnManager, "scene.4.1");
|
||||
start
|
||||
->then(new VisualNovelCallbackEvent<Scene_4>(vnManager, this, &Scene_4::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
46
archive/dawnpokergame/scenes/Scene_5.hpp
Normal file
46
archive/dawnpokergame/scenes/Scene_5.hpp
Normal file
@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_6.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_5 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_6(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_5(DawnGame *game) : SimpleVNScene(game) {
|
||||
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.5.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_5>(vnManager, this, &Scene_5::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
46
archive/dawnpokergame/scenes/Scene_6.hpp
Normal file
46
archive/dawnpokergame/scenes/Scene_6.hpp
Normal file
@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_7.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_6 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_7(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_6(DawnGame *game) : SimpleVNScene(game) {
|
||||
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.6.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_6>(vnManager, this, &Scene_6::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
45
archive/dawnpokergame/scenes/Scene_7.hpp
Normal file
45
archive/dawnpokergame/scenes/Scene_7.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_8.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_7 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_8(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_7(DawnGame *game) : SimpleVNScene(game) {
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.7.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_7>(vnManager, this, &Scene_7::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
66
archive/dawnpokergame/scenes/Scene_8.hpp
Normal file
66
archive/dawnpokergame/scenes/Scene_8.hpp
Normal file
@ -0,0 +1,66 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "PokerVNScene.hpp"
|
||||
#include "prefabs/characters/PennyPrefab.hpp"
|
||||
#include "scenes/Scene_9.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_8 : public PokerVNScene {
|
||||
protected:
|
||||
PennyPrefab *penny;
|
||||
PennyPrefab *julie;
|
||||
PennyPrefab *sammy;
|
||||
PennyPrefab *lucy;
|
||||
|
||||
void vnStage() override {
|
||||
penny = PennyPrefab::create(this);
|
||||
julie = PennyPrefab::create(this);
|
||||
sammy = PennyPrefab::create(this);
|
||||
lucy = PennyPrefab::create(this);
|
||||
|
||||
PokerVNScene::vnStage();
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_9(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
std::vector<PokerPlayer *> getPokerPlayers() override {
|
||||
return std::vector<PokerPlayer*>{
|
||||
this->penny->getComponent<PokerPlayer>(),
|
||||
this->julie->getComponent<PokerPlayer>(),
|
||||
this->sammy->getComponent<PokerPlayer>(),
|
||||
this->lucy->getComponent<PokerPlayer>()
|
||||
};
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_8(DawnGame *game) : PokerVNScene(game) {}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
auto assMan = &this->game->assetManager;
|
||||
std::vector<Asset*> assets;
|
||||
vectorAppend(&assets, PokerVNScene::getRequiredAssets());
|
||||
vectorAppend(&assets, PennyPrefab::getRequiredAssets(assMan));
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelTextboxEvent(vnManager, "scene.8.1");
|
||||
start
|
||||
->then(new VisualNovelCallbackEvent<Scene_8>(vnManager, this, &Scene_8::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
45
archive/dawnpokergame/scenes/Scene_9.hpp
Normal file
45
archive/dawnpokergame/scenes/Scene_9.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/scene/SimpleVNScene.hpp"
|
||||
#include "scenes/Scene_10.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class Scene_9 : public SimpleVNScene {
|
||||
protected:
|
||||
void vnStage() override {
|
||||
|
||||
}
|
||||
|
||||
void onSceneEnded() {
|
||||
auto scene = new Scene_10(this->game);
|
||||
game->assetManager.queueSwap(
|
||||
scene->getRequiredAssets(), this->getRequiredAssets()
|
||||
);
|
||||
game->assetManager.syncLoad();
|
||||
scene->stage();
|
||||
this->game->sceneCutover(scene);
|
||||
}
|
||||
|
||||
public:
|
||||
Scene_9(DawnGame *game) : SimpleVNScene(game) {
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||
start
|
||||
->then(new VisualNovelTextboxEvent(vnManager, "scene.9.1"))
|
||||
->then(new VisualNovelCallbackEvent<Scene_9>(vnManager, this, &Scene_9::onSceneEnded))
|
||||
;
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
57
archive/dawnpokergame/scenes/TestScene.hpp
Normal file
57
archive/dawnpokergame/scenes/TestScene.hpp
Normal file
@ -0,0 +1,57 @@
|
||||
// Copyright (c) 2022 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "PokerVNScene.hpp"
|
||||
#include "prefabs/characters/PennyPrefab.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class TestScene : public PokerVNScene {
|
||||
protected:
|
||||
PennyPrefab *penny;
|
||||
PennyPrefab *julie;
|
||||
PennyPrefab *sammy;
|
||||
PennyPrefab *lucy;
|
||||
|
||||
void vnStage() override {
|
||||
penny = PennyPrefab::create(this);
|
||||
julie = PennyPrefab::create(this);
|
||||
sammy = PennyPrefab::create(this);
|
||||
lucy = PennyPrefab::create(this);
|
||||
|
||||
PokerVNScene::vnStage();
|
||||
}
|
||||
|
||||
std::vector<PokerPlayer *> getPokerPlayers() override {
|
||||
return std::vector<PokerPlayer*>{
|
||||
this->penny->getComponent<PokerPlayer>(),
|
||||
this->julie->getComponent<PokerPlayer>(),
|
||||
this->sammy->getComponent<PokerPlayer>(),
|
||||
this->lucy->getComponent<PokerPlayer>()
|
||||
};
|
||||
}
|
||||
|
||||
public:
|
||||
TestScene(DawnGame *game) : PokerVNScene(game) {}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
auto assMan = &this->game->assetManager;
|
||||
std::vector<Asset*> assets;
|
||||
vectorAppend(&assets, PokerVNScene::getRequiredAssets());
|
||||
vectorAppend(&assets, PennyPrefab::getRequiredAssets(assMan));
|
||||
assets.push_back(assMan->get<TextureAsset>("texture_tavern_night"));
|
||||
return assets;
|
||||
}
|
||||
|
||||
IVisualNovelEvent * getVNEvent() override {
|
||||
auto texture = this->game->assetManager.get<TextureAsset>("texture_tavern_night");
|
||||
auto start = new VisualNovelChangeSimpleBackgroundEvent(
|
||||
vnManager, &texture->texture
|
||||
);
|
||||
start->then(new VisualNovelTextboxEvent(vnManager, penny->getComponent<VisualNovelCharacter>(), "1234"));
|
||||
return start;
|
||||
}
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user