mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-09 08:35:09 +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;
|
||||
}
|
||||
|
||||
void ITutorial::staticInit() { Tutorial::staticCtor(); }
|
||||
|
||||
void Tutorial::staticCtor() {
|
||||
//
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include "Timer.h"
|
||||
#include "User.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/UIStructs.h"
|
||||
#include "app/linux/Linux_UIController.h"
|
||||
|
|
@ -4207,7 +4207,7 @@ void Minecraft::main(IPlatformLeaderboard& leaderboard) {
|
|||
EntityRenderDispatcher::staticCtor();
|
||||
TileEntityRenderDispatcher::staticCtor();
|
||||
User::staticCtor();
|
||||
Tutorial::staticCtor();
|
||||
ITutorial::staticInit();
|
||||
ColourTable::staticCtor();
|
||||
gameServices().loadDefaultGameRules();
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ class ITutorial {
|
|||
public:
|
||||
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;
|
||||
virtual void changeTutorialState(eTutorial_State newState) = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue