diff mm7_4.cpp @ 169:d1dde383af89

Merge
author Nomad
date Thu, 14 Feb 2013 14:03:17 +0200
parents ee11772d0ad2 90521fb9766c
children 91fa025e6ca6
line wrap: on
line diff
--- a/mm7_4.cpp	Thu Feb 14 13:58:34 2013 +0200
+++ b/mm7_4.cpp	Thu Feb 14 14:03:17 2013 +0200
@@ -3059,7 +3059,7 @@
 
     for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i)
     {
-      if (pNPCStats->pNewNPCData[i].uFlags & 0x80)
+      if (pNPCStats->pNewNPCData[i].uFlags == 128)
       {
         if (!pParty->pHirelings[0].pName || strcmp(pNPCStats->pNewNPCData[i].pName, pParty->pHirelings[0].pName))
         {
@@ -4178,7 +4178,7 @@
   v51 = v65;
   if ( v65 )
     goto LABEL_135;
-  if ( pCurrentScreen != 5 )
+  if ( pCurrentScreen != SCREEN_REST )
   {
     v52 = (signed int)&pPlayers[1];
     while ( 1 )
@@ -4194,13 +4194,13 @@
     *(int *)(v53 + 20) = 0;
     v51 = 1;
 LABEL_135:
-    if ( pCurrentScreen != 5
+    if ( pCurrentScreen != SCREEN_REST
       && (!v51 || dword_5C35C0) )
       uGameState = 8;
   }
   if ( uActiveCharacter )
   {
-    if ( pCurrentScreen != 5 )
+    if ( pCurrentScreen != SCREEN_REST )
     {
       v54 = pPlayers[uActiveCharacter];
       if ( v54->pConditions[2]
@@ -5450,7 +5450,7 @@
           {
             pGUIWindow_CurrentMenu->field_40 = 0;
             pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 124, 0, player->pName, 130, 0);
-            SetCurrentMenuID(MENU_7);
+            SetCurrentMenuID(MENU_NAMEPANELESC);
           }
         }
         else
@@ -5705,7 +5705,7 @@
   ++pIcons_LOD->uTexturePacksCount;
   if ( !pIcons_LOD->uNumPrevLoadedFiles )
     pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
-  pCurrentScreen = 21;//окно Создания группы
+  pCurrentScreen = SCREEN_PARTY_CREATION;
   uPlayerCreationUI_ArrowAnim = 0;
   uPlayerCreationUI_SkySliderPos = 0;
   uPlayerCreationUI_SelectedCharacter = 0;
@@ -6207,8 +6207,8 @@
   free(pString);
   pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, (int)ptr);
   pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, 0x71u, 0, 0x1Bu, "", 0);
-  pCurrentScreen = 9; // окно Credits
-  SetCurrentMenuID(MENU_Credits);
+  pCurrentScreen = SCREEN_CREATORS;
+  SetCurrentMenuID(MENU_CREDITSPROC);
   do
   {
     while ( PeekMessageA(&Msg, 0, 0, 0, 1) )
@@ -6236,11 +6236,11 @@
       if ( a5 >= (signed __int16)pTexture2.uHeight )
         SetCurrentMenuID(MENU_MAIN);
       pRenderer->Present();
-	  pCurrentScreen = 0;//Ritor1: temporarily, must be corrected GUI_MainMenuMessageProc()
+      pCurrentScreen = SCREEN_GAME;//Ritor1: temporarily, must be corrected GUI_MainMenuMessageProc()
       GUI_MainMenuMessageProc();
     }
   }
-  while ( GetCurrentMenuID() == MENU_Credits );
+  while ( GetCurrentMenuID() == MENU_CREDITSPROC );
   pAudioPlayer->_4AA258(1);
   pAllocator->FreeChunk(ptr);
   pAllocator->FreeChunk(pFontQuick);
@@ -9670,7 +9670,8 @@
     }
     Party::TakeGold(v21);
   }
-  LOBYTE(v2->uFlags) |= 0x80u;
+  //LOBYTE(v2->uFlags) |= 0x80u;
+  v2->uFlags = 128;
   pParty->field_709 = 0;
   sub_44A56A();
   if ( pParty->pHirelings[0].pName )
@@ -11081,42 +11082,20 @@
 {
   NPCData *v0; // ST40_4@1
   signed int v1; // edi@1
-  GUIWindow *v2; // ecx@1
-
+  //GUIWindow *v2; // ecx@1
+
+  __debugbreak();
   v0 = GetNPCData(uDialogue_SpeakingActorNPC_ID);
   v1 = 0;
   pDialogueWindow->eWindowType = WINDOW_MainMenu;
   pDialogueWindow->Release();
-  v2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_A, 1, 0);
-  pDialogueWindow = v2;
+  pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, 1, 0);
   if ( *(&pNPCStats->field_13A5C + 5 * v0->uProfession) )
   {
-    v2->CreateButton(
-      0x1E0u,
-      0xA0u,
-      0x8Cu,
-      0x1Eu,
-      1,
-      0,
-      0x88u,
-      0x4Du,
-      0,
-      pGlobalTXT_LocalizationStrings[407],
-      0);
+    pDialogueWindow->CreateButton(480, 160, 140, 28, 1, 0, 136, 77, 0, pGlobalTXT_LocalizationStrings[407], 0);
     v1 = 1;
   }
-  pDialogueWindow->CreateButton(
-    0x1E0u,
-    30 * v1 + 160,
-    0x8Cu,
-    0x1Eu,
-    1,
-    0,
-    0x88u,
-    0x4Cu,
-    0,
-    pGlobalTXT_LocalizationStrings[406],
-    0);
+  pDialogueWindow->CreateButton(480, 30 * v1 + 160, 140, 30, 1, 0, 136, 76, 0, pGlobalTXT_LocalizationStrings[406], 0);//Нанять
   pDialogueWindow->_41D08F(v1 + 1, 1, 0, 1);
 }
 
@@ -11310,8 +11289,8 @@
                    (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0),
                    0);
     pDialogueWindow->CreateButton(
-      _4E5E50_transui_x,
-      _4E5EE0_transui_y,
+      pNPCPortraits_x,
+      pNPCPortraits_y,
       63u,
       73u,
       1,