[Scummvm-git-logs] scummvm master -> 094142d5d227b06949949c82e89942e3145d5fab
grisenti
noreply at scummvm.org
Fri Nov 3 14:24:35 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
094142d5d2 HPL1: Only display gamma screen on first start
Commit: 094142d5d227b06949949c82e89942e3145d5fab
https://github.com/scummvm/scummvm/commit/094142d5d227b06949949c82e89942e3145d5fab
Author: grisenti (emanuele at grisenti.net)
Date: 2023-11-03T15:24:26+01:00
Commit Message:
HPL1: Only display gamma screen on first start
Changed paths:
engines/hpl1/penumbra-overture/Init.cpp
engines/hpl1/penumbra-overture/Init.h
engines/hpl1/penumbra-overture/MainMenu.cpp
diff --git a/engines/hpl1/penumbra-overture/Init.cpp b/engines/hpl1/penumbra-overture/Init.cpp
index b42b6938128..c54490c4863 100644
--- a/engines/hpl1/penumbra-overture/Init.cpp
+++ b/engines/hpl1/penumbra-overture/Init.cpp
@@ -159,6 +159,8 @@ bool cInit::Init(tString saveToLoad) {
mpGameConfig = new cConfigFile(_W("config/game.cfg"));
mpGameConfig->Load();
+ _firstStart = getBoolConfig("first-start", true);
+
mvScreenSize.x = getIntConfig("screen-width", 800);
mvScreenSize.y = getIntConfig("screen-height", 600);
mbFullScreen = ConfMan.getBool("fullscreen");
@@ -525,6 +527,8 @@ void cInit::Exit() {
ConfMan.setInt("texture_filter", mpGame->GetResources()->GetMaterialManager()->GetTextureFilter());
// mpConfig->SetFloat("Graphics", "TextureAnisotropy", mpGame->GetResources()->GetMaterialManager()->GetTextureAnisotropy());
+ ConfMan.setBool("first-start", false);
+
ConfMan.setInt("gamma", mpGame->GetGraphics()->GetLowLevel()->GetGammaCorrection() * 1000.f);
ConfMan.setInt("fsaa", mlFSAA);
diff --git a/engines/hpl1/penumbra-overture/Init.h b/engines/hpl1/penumbra-overture/Init.h
index 3657cb63327..72a994ddfaf 100644
--- a/engines/hpl1/penumbra-overture/Init.h
+++ b/engines/hpl1/penumbra-overture/Init.h
@@ -109,6 +109,8 @@ public:
bool mbShowIntro;
int mlFSAA;
eGameDifficulty mDifficulty;
+ // indicates if the game was already started
+ bool _firstStart;
int mlMaxSoundChannels;
int mlStreamUpdateFreq;
diff --git a/engines/hpl1/penumbra-overture/MainMenu.cpp b/engines/hpl1/penumbra-overture/MainMenu.cpp
index 917498f722a..bba5b3de8d0 100644
--- a/engines/hpl1/penumbra-overture/MainMenu.cpp
+++ b/engines/hpl1/penumbra-overture/MainMenu.cpp
@@ -2000,12 +2000,10 @@ void cMainMenu::SetActive(bool abX) {
mbFadeIn = true;
}
- bool bFirstStart = mpInit->mpConfig->GetBool("Game", "FirstStart", true);
+ bool bFirstStart = mpInit->_firstStart;
if (bFirstStart) {
SetState(eMainMenuState_FirstStart);
mLastState = eMainMenuState_FirstStart;
-
- mpInit->mpConfig->SetBool("Game", "FirstStart", false);
} else {
SetState(eMainMenuState_Start);
mLastState = eMainMenuState_Start;
@@ -2218,7 +2216,7 @@ void cMainMenu::CreateWidgets() {
///////////////////////////////
// First start
//////////////////////////////
- bool bFirstStart = mpInit->mpConfig->GetBool("Game", "FirstStart", true);
+ bool bFirstStart = mpInit->_firstStart;
if (bFirstStart) {
vPos = cVector3f(40, 190, 40);
AddWidgetToState(eMainMenuState_FirstStart, hplNew(cMainMenuWidget_Text, (mpInit, vPos, kTranslate("MainMenu", "Welcome"), 15, eFontAlign_Left)));
More information about the Scummvm-git-logs
mailing list