From ee5ed829b38cfc50d6c5d1806488d76d9899c829 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 19 Sep 2017 11:39:43 +0000 Subject: [PATCH] Some more misc fixes git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1495 353e56fe-9613-0410-8469-b96ad8e6f29c --- script/win_installer/readme.txt | 1 + source/GUI/GameMenu.cpp | 3 ++- source/GUI/MainMenu.cpp | 12 ++++++++---- source/dink/dink.cpp | 21 +++++++++++++++++---- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/script/win_installer/readme.txt b/script/win_installer/readme.txt index 6d7d0f2..89fd2a1 100644 --- a/script/win_installer/readme.txt +++ b/script/win_installer/readme.txt @@ -135,6 +135,7 @@ www.rtsoft.com * Space no longer selects dialog, you'll have to use ENTER or CONTROL like on 1.08 * Mouse can now be used to select dialog options * Fixed mouse issue with Bugmania in the town where it wasn't sending button down messages +* Made escape open the Dink HD menu even when wait_for_button is being used. This may be a problem if any DMODs require ESCAPE to be a button that is used though diff --git a/source/GUI/GameMenu.cpp b/source/GUI/GameMenu.cpp index dd0d3c5..4f4cac4 100644 --- a/source/GUI/GameMenu.cpp +++ b/source/GUI/GameMenu.cpp @@ -56,7 +56,8 @@ void GameOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity sent fr g_dglo.m_dirInput[DINK_INPUT_BUTTON5] = true; g_dglo.m_dirInputFinished[DINK_INPUT_BUTTON5] = true; - return; + //if we ONLY want the game to handle this, we'd enable this return... + //return; } if (!pMenu->GetEntityByName("PauseMenu")) diff --git a/source/GUI/MainMenu.cpp b/source/GUI/MainMenu.cpp index db4b29b..82bfae9 100644 --- a/source/GUI/MainMenu.cpp +++ b/source/GUI/MainMenu.cpp @@ -464,12 +464,16 @@ void CheckForNewVersion(Entity *pMenu) //pComp->GetFunction("Init")->sig_function(&v); - GetMessageManager()->CallComponentFunction(pComp,1000, "Init", &v); //call it in a bit + GetMessageManager()->CallComponentFunction(pComp,100, "Init", &v); //call it in a bit - Entity *pEnt = VersionShowScoreMessage(pMenu, "`6"); + + + + Entity *pEnt = VersionShowScoreMessage(pMenu, "`wChecking for updates.."); EntityComponent *pTyper = pEnt->AddComponent(new TyperComponent); - pTyper->GetVar("text")->Set("Checking rtsoft.com for updates..."); - pTyper->GetVar("speedMS")->Set(uint32(30)); + pTyper->GetVar("text")->Set("..................."); + pTyper->GetVar("speedMS")->Set(uint32(200)); + } diff --git a/source/dink/dink.cpp b/source/dink/dink.cpp index 890d3b3..637e981 100644 --- a/source/dink/dink.cpp +++ b/source/dink/dink.cpp @@ -6250,7 +6250,7 @@ void BuildScreenBackground( bool bFullRebuild, bool bBuildImageFromScratch ) if (g_forceBuildBackgroundFromScratch) { bBuildImageFromScratch = true; - g_forceBuildBackgroundFromScratch = false; + } if (bFullRebuild) @@ -6279,7 +6279,7 @@ void BuildScreenBackground( bool bFullRebuild, bool bBuildImageFromScratch ) restart: - if (g_dglos.g_gameMode > 2) + if (g_dglos.g_gameMode > 2 || g_dglos.m_bRenderBackgroundOnLoad || bBuildImageFromScratch) { //we want to render tiles to the BG too @@ -6312,6 +6312,8 @@ restart: } } + g_forceBuildBackgroundFromScratch = false; + if (bFullRebuild) { if (strlen(g_dglos.g_smallMap.script) > 1) @@ -7209,6 +7211,7 @@ pass: if (g_dglos.g_gameMode == 1 || g_dglos.g_gameMode == 2) { g_dglos.m_bRenderBackgroundOnLoad = true; + g_forceBuildBackgroundFromScratch = true; } else { g_dglos.m_bRenderBackgroundOnLoad = false; @@ -7652,6 +7655,7 @@ pass: if (compare(ev[1], (char*)"draw_background")) { + g_forceBuildBackgroundFromScratch = true; BuildScreenBackground(false, true); strcpy(pLineIn, h); return(0); @@ -7932,7 +7936,7 @@ pass: fill_screen(g_nlist[0]); SetBitmapCopy(""); //no bitmap, but it will trigger the no status bar rendering until "something happens" - g_dglos.m_bRenderBackgroundOnLoad = true; + //g_dglos.m_bRenderBackgroundOnLoad = true; } @@ -17232,7 +17236,7 @@ bool LoadState(string const &path, bool bLoadPathsOnly) return false; } -// if ( g_dglos.g_gameMode > 2 || g_dglos.m_bRenderBackgroundOnLoad) + if ( g_dglos.g_gameMode > 2 || g_dglos.m_bRenderBackgroundOnLoad) { BuildScreenBackground(false, true); } @@ -17241,6 +17245,11 @@ bool LoadState(string const &path, bool bLoadPathsOnly) { CopyBitmapToBackBuffer(g_dglos.g_lastBitmapShown); } + + if (g_dglos.copy_bmp_to_screen[0] != 0) + { + copy_bmp(g_dglos.copy_bmp_to_screen); + } return bOk; //success } @@ -17530,6 +17539,10 @@ void DinkOnForeground() //reinit any lost surfaces that we need to if ( g_dglos.g_gameMode > 2 || g_dglos.m_bRenderBackgroundOnLoad) { + if (g_dglos.m_bRenderBackgroundOnLoad) + { + g_forceBuildBackgroundFromScratch = true; + } BuildScreenBackground(false); }