2022-02-06 02:33:09 +01:00
|
|
|
#include "classicmode/classicfactory.h"
|
2021-12-28 19:04:50 +01:00
|
|
|
|
|
|
|
#include "graphics/classicscenegraphicsmanager.h"
|
2022-02-06 02:33:09 +01:00
|
|
|
#include "graphics/classicgraphicsfactory.h"
|
2021-12-28 19:04:50 +01:00
|
|
|
|
2022-02-06 02:33:09 +01:00
|
|
|
#include "core/timeline.h"
|
2021-12-28 19:04:50 +01:00
|
|
|
#include "game/classicgame.h"
|
|
|
|
#include "editor/classiceditor.h"
|
2022-02-10 00:30:49 +01:00
|
|
|
#include "editor/selectionmanager.h"
|
2021-12-28 19:04:50 +01:00
|
|
|
|
2021-12-29 15:59:18 +01:00
|
|
|
|
2022-02-06 02:33:09 +01:00
|
|
|
std::unique_ptr<kku::Game> classic::getGame(const std::shared_ptr<kku::CoreFactory>& core_factory)
|
2021-12-28 19:04:50 +01:00
|
|
|
{
|
|
|
|
// read offset from beatmap metadata
|
2021-12-29 15:59:18 +01:00
|
|
|
const kku::microsec visibility_offset = 1648648;
|
2021-12-28 19:04:50 +01:00
|
|
|
|
2022-02-06 02:33:09 +01:00
|
|
|
const auto factory = std::make_shared<ClassicGraphicsFactory>(core_factory);
|
2021-12-29 15:59:18 +01:00
|
|
|
const auto timeline = std::make_shared<kku::Timeline<ClassicNote>>();
|
2022-02-23 23:45:43 +01:00
|
|
|
const auto graphics_manager = std::make_shared<ClassicSceneGraphicsManager<ClassicNote>>(timeline, factory, visibility_offset);
|
2021-12-28 19:04:50 +01:00
|
|
|
|
|
|
|
return std::make_unique<ClassicGame>(timeline, graphics_manager);
|
|
|
|
}
|
|
|
|
|
2022-02-06 02:33:09 +01:00
|
|
|
std::unique_ptr<kku::Editor> classic::getEditor(const std::shared_ptr<kku::CoreFactory>& core_factory)
|
2021-12-28 19:04:50 +01:00
|
|
|
{
|
|
|
|
// read offset from beatmap metadata
|
2021-12-29 15:59:18 +01:00
|
|
|
const kku::microsec visibility_offset = 1648648;
|
2021-12-28 19:04:50 +01:00
|
|
|
|
2022-02-06 02:33:09 +01:00
|
|
|
const auto factory = std::make_shared<ClassicGraphicsFactory>(core_factory);
|
2022-03-15 18:11:17 +01:00
|
|
|
const auto timeline = std::make_shared<kku::Timeline<ClassicNote>>();
|
|
|
|
const auto graphics_manager = std::make_shared<ClassicSceneGraphicsManager<ClassicNote>>(timeline, factory, visibility_offset);
|
2021-12-28 19:04:50 +01:00
|
|
|
|
2022-03-15 18:11:17 +01:00
|
|
|
return std::make_unique<ClassicEditor>(timeline, graphics_manager);
|
2021-12-28 19:04:50 +01:00
|
|
|
}
|