changeset 2217:744ed51880ed

expand button
author Ritor1
date Sat, 15 Feb 2014 22:00:13 +0600
parents 3f375342de12
children e8f9a06c7bcb
files Game.cpp Mouse.cpp OSWindow.cpp Render.cpp
diffstat 4 files changed, 35 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/Game.cpp	Sat Feb 15 16:00:19 2014 +0600
+++ b/Game.cpp	Sat Feb 15 22:00:13 2014 +0600
@@ -2094,16 +2094,16 @@
                       }
                       if ( pGUIWindow_Settings )
                       {
-                       if ( pCurrentScreen == SCREEN_CHARACTERS )
-                        pMouse->SetCursorBitmap("MICON2");
-                       else
-                       {
-                         pGUIWindow_Settings->Release();
-                         pGUIWindow_Settings = 0;
-                         pMouse->SetCursorBitmap("MICON1");
-                         GameUI_Footer_TimeLeft = 0;
-                         _50C9A0_IsEnchantingInProgress = 0;
-                         back_to_game();
+                        if ( pCurrentScreen == SCREEN_CHARACTERS )
+                          pMouse->SetCursorBitmap("MICON2");
+                        else
+                        {
+                          pGUIWindow_Settings->Release();
+                          pGUIWindow_Settings = 0;
+                          pMouse->SetCursorBitmap("MICON1");
+                          GameUI_Footer_TimeLeft = 0;
+                          _50C9A0_IsEnchantingInProgress = 0;
+                          back_to_game();
                         }
                        }
                        if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 )
@@ -2125,15 +2125,15 @@
                       if ( pGUIWindow_Settings )
                       {
                         if ( pCurrentScreen == SCREEN_CHARACTERS )
-                         pMouse->SetCursorBitmap("MICON2");
+                          pMouse->SetCursorBitmap("MICON2");
                         else
                         {
-                         pGUIWindow_Settings->Release();
-                         pGUIWindow_Settings = 0;
-                         pMouse->SetCursorBitmap("MICON1");
-                         GameUI_Footer_TimeLeft = 0;
-                         _50C9A0_IsEnchantingInProgress = 0;
-                         back_to_game();
+                          pGUIWindow_Settings->Release();
+                          pGUIWindow_Settings = 0;
+                          pMouse->SetCursorBitmap("MICON1");
+                          GameUI_Footer_TimeLeft = 0;
+                          _50C9A0_IsEnchantingInProgress = 0;
+                          back_to_game();
                         }
                       }
                       if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 )
@@ -2307,7 +2307,7 @@
                           GameUI_Footer_TimeLeft = 0;
                           _50C9A0_IsEnchantingInProgress = 0;
                           back_to_game();
-                         }
+                        }
                       }
                       if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 )
                         uActiveCharacter = pParty->GetNextActiveCharacter();
--- a/Mouse.cpp	Sat Feb 15 16:00:19 2014 +0600
+++ b/Mouse.cpp	Sat Feb 15 22:00:13 2014 +0600
@@ -54,7 +54,7 @@
 {
   if ( !this->bInitialized || !pName )
     return;
-  if ( _stricmp("MICON2", pName) )
+  if ( _stricmp("MICON2", pName) )//если кусор не мишень
     pGame->uFlags2 &= 0xFFFFFFEFu;
   else
     pGame->uFlags2 |= 0x10;
--- a/OSWindow.cpp	Sat Feb 15 16:00:19 2014 +0600
+++ b/OSWindow.cpp	Sat Feb 15 22:00:13 2014 +0600
@@ -479,7 +479,7 @@
   else if (!strcmp(cursor_name, "MICON3") )
     SetClassLongPtrW(api_handle, GCLP_HCURSOR, (LONG)LoadCursorW(GetModuleHandleW(nullptr), IDC_WAIT));
 
-  //ClientToScreen(api_handle, &cursor_pos);
+  //ClientToScreen(api_handle, &cursor_pos); //кидает курсор в другую часть экрана
   SetCursorPos(cursor_pos.x, cursor_pos.y);
 }
 
--- a/Render.cpp	Sat Feb 15 16:00:19 2014 +0600
+++ b/Render.cpp	Sat Feb 15 22:00:13 2014 +0600
@@ -1612,8 +1612,8 @@
 
   v5.left = 0;
   v5.top = 0;
-  v5.bottom = window->GetHeight();
-  v5.right = window->GetWidth();
+  v5.bottom = 480;//window->GetHeight(); //Ritor1: проблема с кнопкой "развернуть"
+  v5.right = 640; //window->GetWidth();
 
   if (bWindowed || bForceBlit)
   {
@@ -2666,31 +2666,28 @@
 //----- (0049FC37) --------------------------------------------------------
 void Render::Present()
 {
-  Render *v1; // esi@1
-  struct tagRECT Rect; // [sp+8h] [bp-28h]@11
-  RECT a4; // [sp+18h] [bp-18h]@11
-  struct tagPOINT Point; // [sp+28h] [bp-8h]@11
-
-  v1 = this;
+  //struct tagRECT Rect; // [sp+8h] [bp-28h]@11
+  //RECT a4; // [sp+18h] [bp-18h]@11
+  //struct tagPOINT Point; // [sp+28h] [bp-8h]@11
+
   if ( !pRenderer->pRenderD3D || this->using_software_screen_buffer )
   {
     this->pBeforePresentFunction();
-    if ( v1->pRenderD3D )
-    {
-      if ( v1->using_software_screen_buffer )
-      {
+    if ( this->pRenderD3D )
+    {
+      if ( this->using_software_screen_buffer )
         pRenderD3D->Present(false);
-      }
-    }
-    else __debugbreak(); // no sr
+    }
+    else
+      __debugbreak(); // no sr
     /*{
-      if ( v1->bWindowMode )
+      if ( this->bWindowMode )
       {
         RestoreFrontBuffer();
-        GetClientRect(v1->hWnd, &Rect);
+        GetClientRect(this->hWnd, &Rect);
         Point.y = 0;
         Point.x = 0;
-        ClientToScreen(v1->hWnd, &Point);
+        ClientToScreen(this->hWnd, &Point);
         OffsetRect(&Rect, Point.x, Point.y);
         a4.top = 0;
         a4.bottom = 480;