mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Fix: Correct offsets in laptop zoom in/out animation in all 3 resolutions
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@359 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+41
-4
@@ -1792,9 +1792,28 @@ extern BOOLEAN gfPrintFrameBuffer;
|
||||
// WANNE 2 <change laptop zooming>
|
||||
UINT32 LaptopScreenHandle()
|
||||
{
|
||||
INT16 sYOffset = 0;
|
||||
INT16 sXOffset = 0;
|
||||
|
||||
//User just changed modes. This is determined by the button callbacks
|
||||
//created in LaptopScreenInit()
|
||||
|
||||
// Correct the minor cosmetic bug (laptop zooming start not correct)
|
||||
if (iResolution == 0)
|
||||
{
|
||||
sXOffset = -2;
|
||||
sYOffset = -2;
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
sYOffset = -1;
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
sXOffset = 2;
|
||||
sYOffset = 1;
|
||||
}
|
||||
|
||||
// Set mouse region values
|
||||
LaptopScreenRect.iLeft = LAPTOP_UL_X;
|
||||
LaptopScreenRect.iTop = LAPTOP_UL_Y - 5;
|
||||
@@ -1840,8 +1859,8 @@ UINT32 LaptopScreenHandle()
|
||||
DstRect.iTop = iScreenHeightOffset; //0
|
||||
DstRect.iRight = iScreenWidthOffset + 640; //640
|
||||
DstRect.iBottom = iScreenHeightOffset + 480; //480
|
||||
iLaptopMonitorCenterX = SCREEN_WIDTH - 184 + 19;
|
||||
iLaptopMonitorCenterY = SCREEN_HEIGHT - 70 + 16;
|
||||
iLaptopMonitorCenterX = SCREEN_WIDTH - 184 + 19 + sXOffset;
|
||||
iLaptopMonitorCenterY = SCREEN_HEIGHT - 70 + 16 + sYOffset; // WANNE 2
|
||||
uiTimeRange = 1000;
|
||||
iPercentage = iRealPercentage = 0;
|
||||
uiStartTime = GetJA2Clock();
|
||||
@@ -2427,6 +2446,24 @@ BtnOnCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
BOOLEAN LeaveLapTopScreen( void )
|
||||
{
|
||||
INT16 sYOffset = 0;
|
||||
INT16 sXOffset = 0;
|
||||
|
||||
// Correct the minor cosmetic bug (laptop zooming start not correct)
|
||||
if (iResolution == 0)
|
||||
{
|
||||
sXOffset = -2;
|
||||
sYOffset = -2;
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
sYOffset = -1;
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
sXOffset = 2;
|
||||
sYOffset = 1;
|
||||
}
|
||||
|
||||
if( ExitLaptopDone( ) )
|
||||
{
|
||||
@@ -2478,8 +2515,8 @@ BOOLEAN LeaveLapTopScreen( void )
|
||||
DstRect.iTop = iScreenHeightOffset + 0; // 0
|
||||
DstRect.iRight = iScreenWidthOffset + 640; // 640
|
||||
DstRect.iBottom = iScreenHeightOffset + 480; // 480
|
||||
iLaptopMonitorCenterX = SCREEN_WIDTH - 184 + 19;
|
||||
iLaptopMonitorCenterY = SCREEN_HEIGHT - 70 + 16;
|
||||
iLaptopMonitorCenterX = SCREEN_WIDTH - 184 + 19 + sXOffset;
|
||||
iLaptopMonitorCenterY = SCREEN_HEIGHT - 70 + 16 + sYOffset;
|
||||
uiTimeRange = 1000;
|
||||
iPercentage = iRealPercentage = 100;
|
||||
uiStartTime = GetJA2Clock();
|
||||
|
||||
Reference in New Issue
Block a user