mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
refactor: replace Tutorial::staticCtor with ITutorial::staticInit in Minecraft.cpp
This commit is contained in:
parent
514c75bf01
commit
41d139ce32
|
|
@ -72,6 +72,8 @@ bool Tutorial::PopupMessageDetails::isSameContent(PopupMessageDetails* other) {
|
||||||
return textTheSame && titleTheSame && promptTheSame;
|
return textTheSame && titleTheSame && promptTheSame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ITutorial::staticInit() { Tutorial::staticCtor(); }
|
||||||
|
|
||||||
void Tutorial::staticCtor() {
|
void Tutorial::staticCtor() {
|
||||||
//
|
//
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "User.h"
|
#include "User.h"
|
||||||
#include "app/common/Audio/SoundEngine.h"
|
#include "app/common/Audio/SoundEngine.h"
|
||||||
#include "app/common/Tutorial/Tutorial.h"
|
#include "minecraft/world/tutorial/ITutorial.h"
|
||||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||||
#include "app/linux/Linux_UIController.h"
|
#include "app/linux/Linux_UIController.h"
|
||||||
|
|
@ -4207,7 +4207,7 @@ void Minecraft::main(IPlatformLeaderboard& leaderboard) {
|
||||||
EntityRenderDispatcher::staticCtor();
|
EntityRenderDispatcher::staticCtor();
|
||||||
TileEntityRenderDispatcher::staticCtor();
|
TileEntityRenderDispatcher::staticCtor();
|
||||||
User::staticCtor();
|
User::staticCtor();
|
||||||
Tutorial::staticCtor();
|
ITutorial::staticInit();
|
||||||
ColourTable::staticCtor();
|
ColourTable::staticCtor();
|
||||||
gameServices().loadDefaultGameRules();
|
gameServices().loadDefaultGameRules();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,11 @@ class ITutorial {
|
||||||
public:
|
public:
|
||||||
virtual ~ITutorial() = default;
|
virtual ~ITutorial() = default;
|
||||||
|
|
||||||
|
// One-time process-wide initialisation. The concrete tutorial
|
||||||
|
// implementation in app/common/Tutorial/Tutorial.cpp provides the
|
||||||
|
// body. Called once from Minecraft::staticCtor.
|
||||||
|
static void staticInit();
|
||||||
|
|
||||||
[[nodiscard]] virtual bool isStateCompleted(eTutorial_State state) = 0;
|
[[nodiscard]] virtual bool isStateCompleted(eTutorial_State state) = 0;
|
||||||
virtual void changeTutorialState(eTutorial_State newState) = 0;
|
virtual void changeTutorialState(eTutorial_State newState) = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue