From 1bb9ed5be54f5d68f66a64eda67a44566aaeed9b Mon Sep 17 00:00:00 2001 From: Wanne Date: Wed, 29 Feb 2012 00:28:03 +0000 Subject: [PATCH] MERGED bugfixes from revision: 4916 - Bugfix: If DISABLE_LAPTOP_TRANSITION is TRUE, some laptop initialization methods (e.g: BobbyR methods) were not executed - Removed the hardcoded setting from 3 ja2_options.ini values for a multiplayer game git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4972 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Laptop/laptop.cpp | 54 ++++++++++++++++++++++-------------------- Multiplayer/client.cpp | 10 ++++---- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/Laptop/laptop.cpp b/Laptop/laptop.cpp index 831bc0db..9919db3e 100644 --- a/Laptop/laptop.cpp +++ b/Laptop/laptop.cpp @@ -2090,12 +2090,24 @@ UINT32 LaptopScreenHandle() if( gfStartMapScreenToLaptopTransition ) { + SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR ); + gfStartMapScreenToLaptopTransition = FALSE; + //Step 1: Build the laptop image into the save buffer. + RestoreBackgroundRects(); + RenderLapTopImage(); + HighLightRegion(giCurrentRegion); + RenderLaptop(); + RenderButtons(); + PrintDate( ); + PrintBalance( ); + PrintNumberOnTeam( ); + ShowLights(); + if (!gGameExternalOptions.fDisableLaptopTransition) { //Everything is set up to start the transition animation. - //SGPRect SrcRect1; SGPRect SrcRect2, DstRect; INT32 iPercentage, iScalePercentage, iFactor; UINT32 uiStartTime, uiTimeRange, uiCurrTime; @@ -2104,18 +2116,6 @@ UINT32 LaptopScreenHandle() INT32 iRealPercentage; - SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR ); - //Step 1: Build the laptop image into the save buffer. - RestoreBackgroundRects(); - RenderLapTopImage(); - HighLightRegion(giCurrentRegion); - RenderLaptop(); - RenderButtons(); - PrintDate( ); - PrintBalance( ); - PrintNumberOnTeam( ); - ShowLights(); - //Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER // Start transitioning the screen. DstRect.iLeft = iScreenWidthOffset; //0 @@ -2399,6 +2399,7 @@ UINT32 LaptopScreenHandle() + UINT32 RenderLaptopPanel() { @@ -2808,6 +2809,19 @@ BOOLEAN LeaveLapTopScreen( void ) { gfDontStartTransitionFromLaptop = TRUE; + SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR ); + + //Step 1: Build the laptop image into the save buffer. + RestoreBackgroundRects(); + RenderLapTopImage(); + HighLightRegion(giCurrentRegion); + RenderLaptop(); + RenderButtons(); + PrintDate( ); + PrintBalance( ); + PrintNumberOnTeam( ); + ShowLights(); + if (!gGameExternalOptions.fDisableLaptopTransition) { SGPRect SrcRect1, SrcRect2, DstRect; @@ -2817,19 +2831,6 @@ BOOLEAN LeaveLapTopScreen( void ) INT32 iRealPercentage; INT32 iLaptopMonitorCenterX, iLaptopMonitorCenterY; - - SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR ); - //Step 1: Build the laptop image into the save buffer. - RestoreBackgroundRects(); - RenderLapTopImage(); - HighLightRegion(giCurrentRegion); - RenderLaptop(); - RenderButtons(); - PrintDate( ); - PrintBalance( ); - PrintNumberOnTeam( ); - ShowLights(); - //Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER // Start transitioning the screen. DstRect.iLeft = iScreenWidthOffset + 0; // 0 @@ -2900,6 +2901,7 @@ BOOLEAN LeaveLapTopScreen( void ) return( TRUE ); } + BOOLEAN HandleExit( void ) { // static BOOLEAN fSentImpWarningAlready = FALSE; diff --git a/Multiplayer/client.cpp b/Multiplayer/client.cpp index e0a9260f..6080aaa3 100644 --- a/Multiplayer/client.cpp +++ b/Multiplayer/client.cpp @@ -2424,10 +2424,11 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = false; gGameExternalOptions.fQuietRealTimeSneak = false; + // WANNE: Take the settings from the ja2_options.ini // WANNE: Enable fast loading - gGameExternalOptions.fDisableLaptopTransition = true; + /*gGameExternalOptions.fDisableLaptopTransition = true; gGameExternalOptions.fFastWWWSitesLoading = true; - gGameExternalOptions.fDisableStrategicTransition = true; + gGameExternalOptions.fDisableStrategicTransition = true;*/ // WANNE: fix HOT DAY in night at arrival by night. // Explanation: If game starting time + first arrival delay < 07:00 (111600) -> we arrive before the sun rises or @@ -2636,10 +2637,11 @@ void reapplySETTINGS() gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = false; gGameExternalOptions.fQuietRealTimeSneak = false; + // WANNE: Take the settings from the ja2_options.ini // WANNE: Enable fast loading - gGameExternalOptions.fDisableLaptopTransition = true; + /*gGameExternalOptions.fDisableLaptopTransition = true; gGameExternalOptions.fFastWWWSitesLoading = true; - gGameExternalOptions.fDisableStrategicTransition = true; + gGameExternalOptions.fDisableStrategicTransition = true;*/ // WANNE: fix HOT DAY in night at arrival by night. // Explanation: If game starting time + first arrival delay < 07:00 (111600) -> we arrive before the sun rises or