Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
feat(gameengine): show the main menu buttons without waiting for input
Olcay Seygan999ecbcd1866
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 30ee98ddb..63f775386 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -925,6 +925,7 @@ found and fixed — EA's own, not port damage.**honoured now, so the picture holds to your monitor's refresh rate unless you turn it off.- No disc, no registry keys, no retail installer — a normal install works.- The startup screen is this build's own, so you can see which one you launched before the menu loads.+- The main menu buttons are there when the menu is. On the first visit they used to stay hidden, pointer and all, until you nudged the mouse or pressed a key, so a freshly started game looked stuck on the background battle.- The zip installs itself and takes itself back off. `install.bat` asks where the game is, offeringwhatever the registry says, and copies the build there; anything it is about to write over goesinto a zip in `ZHReborn-Uninstall` first, and anything it adds that was not there is written downdiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cppindex acd7ceedf..d379bab4d 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp@@ -452,6 +452,18 @@ GameWindow *win = NULL;win->winHide(TRUE);}++// EA held the buttons back on the first entry until the mouse moved 20 pixels or a key went down.+// They now come up with the menu.+static void revealMainMenu( void )+{+ initialGadgetDelay = 1;+ dropDownWindows[DROPDOWN_MAIN]->winHide(FALSE);+ TheTransitionHandler->setGroup("MainMenuFade", TRUE);+ TheTransitionHandler->setGroup("MainMenuDefaultMenu");+ TheMouse->setVisibility(TRUE);+ notShown = FALSE;+}//-------------------------------------------------------------------------------------------------/** Initialize the main menu *///-------------------------------------------------------------------------------------------------@@ -666,6 +678,7 @@ void MainMenuInit( WindowLayout *layout, void *userData )TheTransitionHandler->reverse("FadeWholeScreen");FirstTimeRunningTheGame = FALSE;+ revealMainMenu();}else{@@ -1003,59 +1016,6 @@ WindowMsgHandledType MainMenuInput( GameWindow *window, UnsignedInt msg,WindowMsgData mData1, WindowMsgData mData2 ){- if(!notShown)- return MSG_IGNORED;-- switch( msg )- {-- // --------------------------------------------------------------------------------------------- case GWM_MOUSE_POS:- {- ICoord2D mouse;- mouse.x = mData1 & 0xFFFF;- mouse.y = mData1 >> 16;- if( mouse.x == 0 && mouse.y == 0)- break;-- static Int mousePosX = mouse.x;- static Int mousePosY = mouse.y;- if(abs(mouse.x - mousePosX) > 20 || abs(mouse.y - mousePosY) > 20)- {-- DEBUG_LOG(("Mouse X:%d, Y:%d\n", mouse.x, mouse.y));- if(notShown)- {- initialGadgetDelay = 1;- dropDownWindows[DROPDOWN_MAIN]->winHide(FALSE);- TheTransitionHandler->setGroup("MainMenuFade", TRUE);- TheTransitionHandler->setGroup("MainMenuDefaultMenu");- TheMouse->setVisibility(TRUE);- notShown = FALSE;- return MSG_HANDLED;- }- }-- } // end char- break;- case GWM_CHAR:- {- if(notShown)- {- initialGadgetDelay = 1;- dropDownWindows[DROPDOWN_MAIN]->winHide(FALSE);- TheTransitionHandler->setGroup("MainMenuFade", TRUE);- TheTransitionHandler->setGroup("MainMenuDefaultMenu");- TheMouse->setVisibility(TRUE);- notShown = FALSE;- return MSG_HANDLED;- }-- } // end char-- } // end switch( msg )--return MSG_IGNORED;} // end MainMenuInput