diff mm7_5.cpp @ 990:087a9af8e0ec

MessageParam
author Ritor1
date Mon, 13 May 2013 18:03:55 +0600
parents 9e132060ada3
children 3a3ab572eff5 bdbbdfa77ea6
line wrap: on
line diff
--- a/mm7_5.cpp	Mon May 13 09:39:58 2013 +0600
+++ b/mm7_5.cpp	Mon May 13 18:03:55 2013 +0600
@@ -975,35 +975,31 @@
           back_to_game();
           if ( pMessageQueue_50CBD0->uNumMessages )
             pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
-          if ( pCurrentScreen > SCREEN_CHEST_INVENTORY )
-          {
-            if ( pCurrentScreen >= SCREEN_CHANGE_LOCATION && (pCurrentScreen <= SCREEN_INPUT_BLV || pCurrentScreen == SCREEN_QUICK_REFERENCE) )
-            {
+          switch ( pCurrentScreen )
+          {
+            case SCREEN_E:
+				__debugbreak();
+            case SCREEN_NPC_DIALOGUE:
+            case SCREEN_CHEST:
+            case SCREEN_CHEST_INVENTORY:
+            case SCREEN_CHANGE_LOCATION:
+            case SCREEN_INPUT_BLV:
+            case SCREEN_QUICK_REFERENCE:
               if ( dword_50CDC8 )
-                goto LABEL_232;
+                break;
               CloseWindowBackground();
               uMessageParam = 1;
-              goto LABEL_232;
-            }
-          }
-          else
-          {
-            if ( pCurrentScreen >= SCREEN_E || pCurrentScreen == SCREEN_NPC_DIALOGUE || pCurrentScreen == SCREEN_CHEST )
-            {
-              if ( dword_50CDC8 )
-                goto LABEL_232;
-              CloseWindowBackground();
-              uMessageParam = 1;
-              goto LABEL_232;
-            }
-            if ( pCurrentScreen == SCREEN_HOUSE && !dword_50CDC8 && !dword_5C35C8 )
-            {
-              CloseWindowBackground();
-              dword_5C35C8 = 0;
-              uMessageParam = 1;
-            }
-          }
-LABEL_232:
+              break;
+            case SCREEN_HOUSE:
+              if ( !dword_50CDC8 && !dword_5C35C8 )
+              {
+                CloseWindowBackground();
+                dword_5C35C8 = 0;
+                uMessageParam = 1;
+                break;
+              }
+              break;
+          }
           if ( !ptr_507BDC )
           {
             pRenderer->ClearZBuffer(0, 479);
@@ -1014,7 +1010,36 @@
               if ( pCurrentScreen > SCREEN_67 )
               {
                 if ( pCurrentScreen == SCREEN_QUICK_REFERENCE )
-                  goto LABEL_321;
+                {
+                  pIcons_LOD->_4114F2();
+                  if ( pGUIWindow_Settings )
+                  {
+                    if ( pCurrentScreen == SCREEN_CHARACTERS )
+                    {
+                      pMouse->SetCursorBitmap("MICON2");
+                    }
+                    else
+                    {
+                      pGUIWindow_Settings->Release();
+                      pGUIWindow_Settings = 0;
+                      pMouse->SetCursorBitmap("MICON1");
+                      GameUI_Footer_TimeLeft = 0;
+                      unk_50C9A0 = 0;
+                      back_to_game();
+                    }
+                  }
+                  if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 )
+                    uActiveCharacter = pParty->GetNextActiveCharacter();
+                  pGUIWindow_CurrentMenu->Release();
+                  if ( pGUIWindow_CurrentMenu == window_SpeakInHouse )
+                    window_SpeakInHouse = 0;
+                  pGUIWindow_CurrentMenu = 0;
+                  pEventTimer->Resume();
+                  pCurrentScreen = SCREEN_GAME;
+                  viewparams->bRedrawGameUI = 1;
+                  pIcons_LOD->_4355F7();
+                  continue;
+                }
               }
               else
               {
@@ -1380,7 +1405,36 @@
                       pVideoPlayer->Unload();
                       continue;
                     case SCREEN_CHARACTERS:
-                      goto LABEL_319;
+                      sub_4196A0();
+                      sub_419379();
+                      pIcons_LOD->_4114F2();
+                      if ( pGUIWindow_Settings )
+                      {
+                        if ( pCurrentScreen == SCREEN_CHARACTERS )
+                        {
+                          pMouse->SetCursorBitmap("MICON2");
+                        }
+                        else
+                        {
+                          pGUIWindow_Settings->Release();
+                          pGUIWindow_Settings = 0;
+                          pMouse->SetCursorBitmap("MICON1");
+                          GameUI_Footer_TimeLeft = 0;
+                          unk_50C9A0 = 0;
+                          back_to_game();
+                        }
+                      }
+                      if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 )
+                        uActiveCharacter = pParty->GetNextActiveCharacter();
+                      pGUIWindow_CurrentMenu->Release();
+                      if ( pGUIWindow_CurrentMenu == window_SpeakInHouse )
+                        window_SpeakInHouse = 0;
+                      pGUIWindow_CurrentMenu = 0;
+                      pEventTimer->Resume();
+                      pCurrentScreen = SCREEN_GAME;
+                      viewparams->bRedrawGameUI = 1;
+                      pIcons_LOD->_4355F7();
+                      continue;
                     default:
                       if ( pGUIWindow_Settings )
                       {
@@ -1438,10 +1492,8 @@
                   pIcons_LOD->_4355F7();
                   continue;
                 }
-LABEL_319:
                 sub_4196A0();
                 sub_419379();
-LABEL_321:
                 pIcons_LOD->_4114F2();
               }
               if ( pGUIWindow_Settings )
@@ -1839,9 +1891,10 @@
           unk_50C9A0 = 0;
           back_to_game();
           continue;
+        case UIMSG_CastSpell_8F:
+			__debugbreak();
         case UIMSG_CastSpell_SPIRIT_Preservation://and blessing, treatment paralysis, hand hammers(individual upgrade)
         case UIMSG_CastSpell_SPIRIT_Fate:
-        case UIMSG_CastSpell_8F://???
           if ( pMessageQueue_50CBD0->uNumMessages )
             pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
           if ( unk_50C9A0 )
@@ -1905,7 +1958,7 @@
           //goto LABEL_434;
           /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
           {
-            pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
+            pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape;
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0;
             *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
             ++pMessageQueue_50CBD0->uNumMessages;
@@ -1962,7 +2015,7 @@
           pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
           /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
             continue;
-          pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
+          pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape;
           pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
           *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
           ++pMessageQueue_50CBD0->uNumMessages;*/
@@ -2108,12 +2161,10 @@
                     *((int *)v67 + 17) = 1;
                   else
                     pParty->pPlayers[(unsigned __int8)town_portal_caster_id].CanCastSpell(0x14u);
-//LABEL_434:
                   /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
                   {
-                    pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
+                    pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape;
                     pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0;
-//LABEL_771:
                     *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
                     ++pMessageQueue_50CBD0->uNumMessages;
                   }*/
@@ -2247,9 +2298,8 @@
 			__debugbreak();
           uGameState = GAME_STATE_PLAYING;
           strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2");
-          goto LABEL_524;
         case UIMSG_DD:
-LABEL_524:
+			__debugbreak();
           sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer);
           memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216));
           if ( v216.uPropCount == 1 )
@@ -2258,10 +2308,7 @@
             v70 = atoi(v216.pProperties[0]);
             if ( v70 <= 0 || v70 >= 77 )
             {
-//LABEL_90:
               v1 = "";
-//LABEL_91:
-              //v0 = 1;
               continue;
             }
             v71 = v70;
@@ -2284,9 +2331,7 @@
                 dword_6BE364_game_settings_1 |= 1u;
                 uGameState = GAME_STATE_2;
                 OnMapLeave();
-                //goto LABEL_90;
                 v1 = "";
-                //v0 = 1;
                 continue;
               }
             }
@@ -2296,10 +2341,8 @@
           else
           {
             if ( v216.uPropCount != 3 )
-              //goto LABEL_90;
             {
               v1 = "";
-              //v0 = 1;
               continue;
             }
             v74 = atoi(v216.pProperties[0]);
@@ -2311,14 +2354,11 @@
               if ( pIndoor->GetSector(v74, thisi, v75) )
               {
                 v77 = thisi;
-//LABEL_544:
                 pParty->vPosition.x = v74;
                 pParty->vPosition.y = v77;
                 pParty->vPosition.z = v76;
                 pParty->uFallStartY = v76;
-                //goto LABEL_90;
                 v1 = "";
-                //v0 = 1;
                 continue;
               }
             }
@@ -2332,15 +2372,12 @@
                   if ( thisi > -32768 )
                   {
                     if ( thisi < 32768 && v76 >= 0 && v76 < 10000 )
-                      //goto LABEL_544;
                     {
                       pParty->vPosition.x = v74;
                       pParty->vPosition.y = v77;
                       pParty->vPosition.z = v76;
                       pParty->uFallStartY = v76;
-                      //goto LABEL_90;
                       v1 = "";
-                      //v0 = 1;
                       continue;
                     }
                   }
@@ -2351,9 +2388,7 @@
             v73 = "Can't jump to that location!";
           }
           ShowStatusBarString(v73, 6u);
-          //goto LABEL_90;
           v1 = "";
-          //v0 = 1;
           continue;
         case UIMSG_CastQuickSpell:
           if ( bUnderwater == 1 )
@@ -2363,16 +2398,15 @@
             continue;
           }
           if ( !uActiveCharacter || (pPlayer2 = pPlayers[uActiveCharacter], pPlayer2->uTimeToRecovery) )
-            //goto LABEL_90;
           {
             v1 = "";
-            //v0 = 1;
             continue;
           }
           _42777D_CastSpell_UseWand_ShootArrow(pPlayer2->uQuickSpell, uActiveCharacter - 1, 0, 0, uActiveCharacter);
           continue;
+        case UIMSG_CastSpell_GreatShot://???
+			__debugbreak();
         case UIMSG_CastSpell_SmallShot://FireBlow, Lightning, Ice Lightning, Swarm, 
-        case UIMSG_CastSpell_GreatShot://???
           if ( pRenderer->pRenderD3D )
           {
             v81 = pGame->pVisInstance->get_picked_object_zbuf_val();
@@ -2403,7 +2437,6 @@
             else
               HIBYTE(v51->field_8) &= 0xFDu;
           }
-          //goto LABEL_416;
           v51->uPlayerID_2 = uMessageParam;
           v51->spell_target_pid = v44;
           pParty->pPlayers[v51->uPlayerID].SetRecoveryTime(300);
@@ -2429,14 +2462,11 @@
         case UIMSG_1B:
 			__debugbreak();
           if ( !uActiveCharacter )
-            //goto LABEL_90;
           {
             v1 = "";
-            //v0 = 1;
             continue;
           }
           if ( pParty->bTurnBasedModeOn != 1 )
-            //goto LABEL_569;
           {
             if ( pActors[uMessageParam].uAIState == 5 )
               stru_50C198.LootActor(&pActors[uMessageParam]);
@@ -2445,15 +2475,12 @@
             continue;
           }
           if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3 )
-            //goto LABEL_90;
           {
             v1 = "";
-            //v0 = 1;
             continue;
           }
           if ( !(pTurnEngine->field_18 & 2) )
           {
-//LABEL_569:
             if ( pActors[uMessageParam].uAIState == 5 )
               stru_50C198.LootActor(&pActors[uMessageParam]);
             else
@@ -2463,27 +2490,21 @@
 
         case UIMSG_Attack:
           if ( !uActiveCharacter )
-            //goto LABEL_90;
           {
             v1 = "";
-            //v0 = 1;
             continue;
           }
           if ( pParty->bTurnBasedModeOn != 1 )
-            //goto LABEL_577;
           {
             _42ECB5_PlayerAttacksActor();
             continue;
           }
           if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3 )
-            //goto LABEL_90;
           {
             v1 = "";
-            //v0 = 1;
             continue;
           }
           if ( !(pTurnEngine->field_18 & 2) )
-//LABEL_577:
             _42ECB5_PlayerAttacksActor();
           continue;
         case UIMSG_ExitRest:
@@ -2547,7 +2568,6 @@
             if ( !uActiveCharacter )
             {
               v1 = "";
-              //v0 = 1;
               continue;
             }
             pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)13, 0);
@@ -2575,7 +2595,6 @@
           if ( !uActiveCharacter )
           {
             v1 = "";
-            //v0 = 1;
             continue;
           }
           pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)13, 0);
@@ -2625,7 +2644,7 @@
                 dword_506F14 = 0;
                 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
                 {
-                  pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
+                  pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape;
                   pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
                   *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
                   ++pMessageQueue_50CBD0->uNumMessages;
@@ -2695,7 +2714,6 @@
           }
           sprintfex(pTmpBuf, v161, v178);
           sub_41C0B8_set_status_string(pTmpBuf);
-          //v0 = 1;
           continue;
         case UIMSG_ClickInstallRemoveQuickSpellBtn:
           GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, WINDOW_PressedButton2, (int)pBtn_InstallRemoveSpell, 0);
@@ -2834,7 +2852,6 @@
             if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery )
             {
               if ( !pCurrentScreen )
-                //goto LABEL_693;
               {
                 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0);
                 pCurrentScreen = SCREEN_SPELL_BOOK;
@@ -2897,7 +2914,7 @@
 //LABEL_453:
           /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
             continue;
-          pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
+          pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape;
           //goto LABEL_770;
           pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
           *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
@@ -2912,11 +2929,11 @@
           continue;
         case UIMSG_ClickAwardsUpBtn:
           GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, WINDOW_CharactersPressedButton, (int)pBtn_Up, 0);
-          dword_506548 = 1;
+          BtnUp_flag = 1;
           continue;
         case UIMSG_ClickAwardsDownBtn:
           GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, WINDOW_CharactersPressedButton, (int)pBtn_Down, 0);
-          dword_506544 = 1;
+          BtnDown_flag = 1;
           continue;
         case UIMSG_ChangeDetaliz:
           bRingsShownInCharScreen ^= 1;
@@ -2998,57 +3015,59 @@
           GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, WINDOW_CharactersPressedButton, (int)pCharacterScreen_AwardsBtn, 0);
           FillAwardsData();
           continue;
-        case UIMSG_AutonotesBook:
+        case UIMSG_AutonotesBook://не только Автозаметки (в процессе)
           switch ( uMessageParam )
           {
-            default:
-              continue;
-            case 11:
-              dword_506548 = 1;
-              continue;
-            case 10:
-              dword_506544 = 1;
-              continue;
+            case 11://Page UP
+              BtnUp_flag = 1;
+              pButton = pBtn_Book_2;
+              break;
+            case 10://Page DOWN
+              BtnDown_flag = 1;
+              pButton = pBtn_Book_1;
+              break;
             case 0:
               pButton = pBtn_Book_1;
-              dword_506544 = 1;
+              BtnDown_flag = 1;
               break;
             case 1:
-              pButton = pBtn_Book_2;
-              dword_506548 = 1;
+              pButton = pBtn_Book_2;//увеличить в MapsBook
+              BtnUp_flag = 1;
               break;
-            case 2:
-              dword_506540 = 1;
+            case 2://Potions
+              Book_PageBtn3_flag = 1;
               if ( dword_506364 )
                 continue;
               pButton = pBtn_Book_3;
               break;
-            case 3:
-              dword_50653C = 1;
+            case 3://fountains
+              Book_PageBtn4_flag = 1;
               if ( dword_506364 )
                 continue;
               pButton = pBtn_Book_4;
               break;
-            case 4:
-              dword_506538 = 1;
+            case 4://obelisks
+              Book_PageBtn5_flag = 1;//Autonotes_Obelisks_page_flag
               if ( dword_506364 )
                 continue;
               pButton = pBtn_Book_5;
               break;
-            case 5:
-              dword_506534 = 1;
+            case 5://seer
+              Book_PageBtn6_flag = 1;//Autonotes_Seer_page_flag
               if ( dword_506364 )
                 continue;
               pButton = pBtn_Book_6;
               break;
-            case 6:
+            case 6://misc
               pButton = pBtn_Autonotes_Misc;
-              dword_506530 = 1;
+              Autonotes_Misc_page_flag = 1;
               break;
-            case 7:
+            case 7://Instructors
               pButton = pBtn_Autonotes_Instructors;
-              dword_50652C = 1;
+              Autonotes_Instructors_page_flag = 1;
               break;
+            default:
+              continue;
           }
           GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1);
           continue;
@@ -3128,11 +3147,11 @@
           if ( !pMessageQueue_50CBD0->uNumMessages )
             //goto LABEL_768;
           {
-            pMessageQueue_50CBD0->AddMessage(UIMSG_E, 0, 0);
+            pMessageQueue_50CBD0->AddMessage(UIMSG_MouseLeftClickInScreen, 0, 0);
             /*if ( (signed int)v115 < 40 )
             //goto LABEL_769;
             {
-              pMessageQueue_50CBD0->pMessages[v115].eType = (UIMessageType)14;
+              pMessageQueue_50CBD0->pMessages[v115].eType = UIMSG_MouseLeftClickInScreen;
               pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
               *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
               ++pMessageQueue_50CBD0->uNumMessages;
@@ -3143,10 +3162,10 @@
           if ( pMessageQueue_50CBD0->pMessages[0].field_8 )
           {
             pMessageQueue_50CBD0->uNumMessages = 1;
-            pMessageQueue_50CBD0->AddMessage(UIMSG_E, 0, 0);
+            pMessageQueue_50CBD0->AddMessage(UIMSG_MouseLeftClickInScreen, 0, 0);
             /*v115 = v0;
             pMessageQueue_50CBD0->uNumMessages = v0;
-            pMessageQueue_50CBD0->pMessages[v115].eType = (UIMessageType)14;
+            pMessageQueue_50CBD0->pMessages[v115].eType = UIMSG_MouseLeftClickInScreen;
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
             //goto LABEL_771;
             *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
@@ -3155,19 +3174,18 @@
           }
           v115 = 0;
           pMessageQueue_50CBD0->uNumMessages = 0;
-          pMessageQueue_50CBD0->AddMessage(UIMSG_E, 0, 0);
+          pMessageQueue_50CBD0->AddMessage(UIMSG_MouseLeftClickInScreen, 0, 0);
           /*if ( (signed int)v115 < 40 )
             //goto LABEL_769;
           {
-            pMessageQueue_50CBD0->pMessages[v115].eType = (UIMessageType)14;
+            pMessageQueue_50CBD0->pMessages[v115].eType = UIMSG_MouseLeftClickInScreen;
             pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
             *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
             ++pMessageQueue_50CBD0->uNumMessages;
             continue;
           }*/
           continue;
-        case UIMSG_E:
-			__debugbreak();//срабатывает при нажатии на правую кнопку мыши после UIMSG_MouseLeftClickInGame
+        case UIMSG_MouseLeftClickInScreen://срабатывает при нажатии на правую кнопку мыши после UIMSG_MouseLeftClickInGame
           if ( pMessageQueue_50CBD0->uNumMessages )
             pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
           OnGameViewportClick();
@@ -3190,7 +3208,7 @@
         case UIMSG_54:
 			__debugbreak();
           pButton2 = (GUIButton *)uMessageParam;
-          GUIWindow::Create(0, 0, 0, 0, (WindowType)22, (int)pButton2, 0);
+          GUIWindow::Create(0, 0, 0, 0, WINDOW_22, (int)pButton2, 0);
           continue;
         case UIMSG_Game_Action:
           if ( pMessageQueue_50CBD0->uNumMessages )
@@ -10912,7 +10930,7 @@
       pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
       /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
       {
-        pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
+        pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape;
         pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
         *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
         ++pMessageQueue_50CBD0->uNumMessages;
@@ -10988,7 +11006,7 @@
       pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
       /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
       {
-        pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
+        pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape;
         pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
         *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
         ++pMessageQueue_50CBD0->uNumMessages;
@@ -11304,7 +11322,7 @@
   {
     /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
     {
-      pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)27;
+      pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_1B;
       pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v6 >> 3;
       *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
       ++pMessageQueue_50CBD0->uNumMessages;