changeset 2389:6a7309a847ea

removing some (const char *) casts
author Grumpy7
date Wed, 02 Jul 2014 15:13:39 +0200
parents 41025c0eb414
children c631b1877204
files GUIWindow.cpp Game.cpp Keyboard.h LOD.cpp UI/Books/UINotesBooks.cpp UI/UIHouses.cpp UI/UIPartyCreation.cpp UI/UISaveLoad.cpp UI/UIShops.cpp UI/UiGame.cpp
diffstat 10 files changed, 53 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/GUIWindow.cpp	Mon Jun 30 10:22:31 2014 +0100
+++ b/GUIWindow.cpp	Wed Jul 02 15:13:39 2014 +0200
@@ -1870,8 +1870,8 @@
         if ( ptr_507BD0->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS)
         {
           ptr_507BD0->DrawMessageBox(0);
-          ptr_507BD0->DrawText(pFontCreate, 30, 40, v27, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
-          v31 = pFontCreate->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer);
+          ptr_507BD0->DrawText(pFontCreate, 30, 40, v27, pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
+          v31 = pFontCreate->GetLineWidth(pKeyActionMap->pPressedKeysBuffer);
           ptr_507BD0->DrawFlashingInputCursor(v31 + 30, 40, pFontCreate);
           continue;
         }
@@ -1897,7 +1897,7 @@
       {
         pWindow->DrawMessageBox(0);
         pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
-        pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
+        pWindow->DrawText(pFontLucida, 10, 40, 0, pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
         if ( !pKeyActionMap->field_204 )
         {
           ItemGen2.Reset();
@@ -1905,7 +1905,7 @@
           pEventTimer->Resume();
           pCurrentScreen = 0;
           viewparams->bRedrawGameUI = true;
-          v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
+          v26 = atoi(pKeyActionMap->pPressedKeysBuffer);
           if ( v26 > 0 )
           {
             if ( v26 < 800 )
@@ -2088,7 +2088,7 @@
       {
         pWindow->DrawMessageBox(0);
         pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
-        pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
+        pWindow->DrawText(pFontLucida, 10, 40, 0, pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
         if ( !pKeyActionMap->field_204 )
         {
           ItemGen2.Reset();
@@ -2096,7 +2096,7 @@
           pEventTimer->Resume();
           pCurrentScreen = SCREEN_GAME;
           viewparams->bRedrawGameUI = 1;
-          v39 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
+          v39 = atoi(pKeyActionMap->pPressedKeysBuffer);
           if ( v39 > 0 )
           {
             if ( v39 < 800 )
--- a/Game.cpp	Mon Jun 30 10:22:31 2014 +0100
+++ b/Game.cpp	Wed Jul 02 15:13:39 2014 +0200
@@ -1513,9 +1513,9 @@
           else
           {
             pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu);
-            if ( strcmp((const char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], pGlobalTXT_LocalizationStrings[72]) )// "Empty"
-              strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader[uLoadGameUI_SelectedSlot]);
-            pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer);
+            if ( strcmp(pSavegameHeader[uLoadGameUI_SelectedSlot].pName, pGlobalTXT_LocalizationStrings[72]) )// "Empty"
+              strcpy(pKeyActionMap->pPressedKeysBuffer, pSavegameHeader[uLoadGameUI_SelectedSlot].pName);
+            pKeyActionMap->uNumKeysPressed = strlen(pKeyActionMap->pPressedKeysBuffer);
           }
           continue;
         case UIMSG_LoadGame:
@@ -1530,7 +1530,7 @@
           if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS)
           {
             pKeyActionMap->SetWindowInputStatus(WINDOW_INPUT_NONE);
-            strcpy((char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], (const char *)pKeyActionMap->pPressedKeysBuffer);
+            strcpy((char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], pKeyActionMap->pPressedKeysBuffer);
           }
           DoSavegame(uLoadGameUI_SelectedSlot);
           stru_506E40.Release();
@@ -3068,7 +3068,7 @@
               continue;
             for ( thisg = 0; thisg < (signed int)pGames_LOD->uNumSubDirs / 2; ++thisg )
             {
-              if ( !_stricmp((const char *)pGames_LOD->pSubIndices[thisg].pFilename, pCurrentMapName) )
+              if ( !_stricmp(pGames_LOD->pSubIndices[thisg].pFilename, pCurrentMapName) )
                 pPlayer9->pInstalledBeacons[uMessageParam].SaveFileID = thisg;
             }
           }
@@ -3269,7 +3269,7 @@
         case UIMSG_DD:
 			__debugbreak();
           sprintf(pTmpBuf.data(), "%s", pKeyActionMap->pPressedKeysBuffer);
-          memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216));
+          memcpy(&v216, txt_file_frametable_parser(pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216));
           if ( v216.uPropCount == 1 )
           {
             pNPCData4 = (NPCData *)((signed int)pGames_LOD->uNumSubDirs / 2);
@@ -3284,7 +3284,7 @@
               thish = 0;
               do
               {
-                if ( !_stricmp((const char *)&pGames_LOD->pSubIndices[thish], Str2) )
+                if ( !_stricmp(pGames_LOD->pSubIndices[thish].pFilename, Str2) )
                   break;
                 ++thish;
                 pNPCData3 = (NPCData *)((char *)pNPCData3 + 1);
@@ -3292,7 +3292,7 @@
               while ( (signed int)pNPCData3 < (signed int)pNPCData4 );
               if ( (signed int)pNPCData3 < (signed int)pNPCData4 )
               {
-                strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)pNPCData3]);
+                strcpy(pCurrentMapName, pGames_LOD->pSubIndices[(int)pNPCData3].pFilename);
                 dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001;
                 uGameState = GAME_STATE_CHANGE_LOCATION;
                 OnMapLeave();
@@ -4431,8 +4431,8 @@
           {
             //typing in the line
               pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu);
-              strcpy((char *)pKeyActionMap->pPressedKeysBuffer, pSavegameHeader[uLoadGameUI_SelectedSlot].pName);
-              pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer);
+              strcpy(pKeyActionMap->pPressedKeysBuffer, pSavegameHeader[uLoadGameUI_SelectedSlot].pName);
+              pKeyActionMap->uNumKeysPressed = strlen(pKeyActionMap->pPressedKeysBuffer);
           }
           break;
         case UIMSG_SaveLoadBtn:
--- a/Keyboard.h	Mon Jun 30 10:22:31 2014 +0100
+++ b/Keyboard.h	Wed Jul 02 15:13:39 2014 +0200
@@ -67,7 +67,7 @@
   unsigned int pVirtualKeyCodesMapping[30];
   KeyToggleType pToggleTypes[30];
   int max_input_string_len;
-  unsigned __int8 pPressedKeysBuffer[257];
+  __int8 pPressedKeysBuffer[257];
   unsigned __int8 uNumKeysPressed;
   char field_202;
   char field_203;
--- a/LOD.cpp	Mon Jun 30 10:22:31 2014 +0100
+++ b/LOD.cpp	Wed Jul 02 15:13:39 2014 +0200
@@ -1862,7 +1862,7 @@
           v9 = v4;
           do
           {
-            result = _stricmp((const char *)pContainerName, (const char *)&v10->pSubIndices[v9]);
+            result = _stricmp(pContainerName, v10->pSubIndices[v9].pFilename);
             if ( !result )
               goto LABEL_21;
             ++v7;
@@ -1886,7 +1886,7 @@
   v8 = v4;
   while ( 1 )
   {
-    result = _stricmp((const char *)pContainerName, (const char *)&v10->pSubIndices[v8]);
+    result = _stricmp(pContainerName, v10->pSubIndices[v8].pFilename);
     if ( !result )
       break;
     ++v7;
@@ -1919,7 +1919,7 @@
   }
   else
   {
-    while ( _stricmp((const char *)pContainer, (const char *)&this_dup->pSubIndices[i]) )
+    while ( _stricmp(pContainer, this_dup->pSubIndices[i].pFilename) )
     {
       ++i_dup;
       ++i;
--- a/UI/Books/UINotesBooks.cpp	Mon Jun 30 10:22:31 2014 +0100
+++ b/UI/Books/UINotesBooks.cpp	Wed Jul 02 15:13:39 2014 +0200
@@ -405,7 +405,7 @@
     journal_window.uFrameZ = game_viewport_z;
     journal_window.uFrameW = game_viewport_w;
     if ( pStorylineText->StoreLine[achieved_awards[books_primary_item_per_page]].pPageTitle )
-      journal_window.DrawTitleText(pBook2Font, 0, 22, ui_book_journal_title_color, (const char *)pStorylineText->StoreLine[achieved_awards[books_primary_item_per_page]].pPageTitle, 3);
+      journal_window.DrawTitleText(pBook2Font, 0, 22, ui_book_journal_title_color, pStorylineText->StoreLine[achieved_awards[books_primary_item_per_page]].pPageTitle, 3);
   }
 
   //for other text
@@ -441,7 +441,7 @@
     pDialogueString = BuildDialogueString(pStorylineText->StoreLine[ achieved_awards[books_primary_item_per_page]].pText, uActiveCharacter - 1,
                                           0, 0, 0, &pParty->PartyTimes.HistoryEventTimes[index]);
     pStringOnPage = pAutonoteFont->GetPageTop(pDialogueString, &journal_window, 1, (unsigned __int8)Journal_limitation_factor[books_primary_item_per_page]);
-    journal_window.DrawText(pAutonoteFont, 1, 0, ui_book_journal_text_color, (const char *)pStringOnPage, 0,
+    journal_window.DrawText(pAutonoteFont, 1, 0, ui_book_journal_text_color, pStringOnPage, 0,
                             journal_window.uFrameY + journal_window.uFrameHeight, ui_book_journal_text_shadow);
     ++num_achieved_awards;
   }
--- a/UI/UIHouses.cpp	Mon Jun 30 10:22:31 2014 +0100
+++ b/UI/UIHouses.cpp	Wed Jul 02 15:13:39 2014 +0200
@@ -1721,14 +1721,14 @@
       {
         sprintfex(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[606], pGlobalTXT_LocalizationStrings[112]); // "Pay"   "How Much?"
         townHall_window.DrawTitleText(pFontArrus, 0, 146, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3);
-        townHall_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3);
-        townHall_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus);
+        townHall_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), pKeyActionMap->pPressedKeysBuffer, 3);
+        townHall_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth(pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus);
         return;
       }
       if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
       {
-        v1 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
-        v2 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
+        v1 = atoi(pKeyActionMap->pPressedKeysBuffer);
+        v2 = atoi(pKeyActionMap->pPressedKeysBuffer);
         if ( v1 <= 0 )
         {
           pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
@@ -1795,13 +1795,13 @@
       {
         sprintf(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[60], pGlobalTXT_LocalizationStrings[112]);//"Положить" "Сколько?"
         bank_window.DrawTitleText(pFontArrus, 0, 146, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3);
-        bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3);
-        bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus);
+        bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), pKeyActionMap->pPressedKeysBuffer, 3);
+        bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth(pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus);
         return;
       }
       if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
       {
-        entered_sum = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
+        entered_sum = atoi(pKeyActionMap->pPressedKeysBuffer);
         takes_sum = entered_sum;
         if ( !entered_sum )
         {
@@ -1837,14 +1837,14 @@
       {
         sprintfex(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[244], pGlobalTXT_LocalizationStrings[112]);//"Снять" "Сколько?"
         bank_window.DrawTitleText(pFontArrus, 0, 146, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3);
-        bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3);
-        bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus);
+        bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), pKeyActionMap->pPressedKeysBuffer, 3);
+        bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth(pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus);
         return;
       }
       if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
       {
         window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
-        entered_sum = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
+        entered_sum = atoi(pKeyActionMap->pPressedKeysBuffer);
         takes_sum = entered_sum;
         if ( entered_sum )
         {
@@ -2183,14 +2183,14 @@
         {
           pButton = pDialogueWindow->GetControl(pItemNum);
           pButton->uY = all_text_height + v54;
-          pTextHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0);
+          pTextHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0);
           pButton->uHeight = pTextHeight;
           v54 = pButton->uY + pTextHeight - 1;
           pButton->uW = v54;
           pColorText = Color16(0xFFu, 0xFFu, 0x9Bu);
           if ( pDialogueWindow->pCurrentPosActiveItem != pItemNum )
             pColorText = Color16(0xFFu, 0xFFu, 0xFFu);
-          dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3);
+          dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3);
           ++pNumString;
         }
       }
--- a/UI/UIPartyCreation.cpp	Mon Jun 30 10:22:31 2014 +0100
+++ b/UI/UIPartyCreation.cpp	Wed Jul 02 15:13:39 2014 +0200
@@ -154,19 +154,19 @@
       switch ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 )
       {
         case WINDOW_INPUT_IN_PROGRESS://press name panel
-          v17 = pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, 159 * (int)pGUIWindow_CurrentMenu->ptr_1C + 18, 124, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 120, 1);
+          v17 = pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, 159 * (int)pGUIWindow_CurrentMenu->ptr_1C + 18, 124, 0, pKeyActionMap->pPressedKeysBuffer, 120, 1);
           pGUIWindow_CurrentMenu->DrawFlashingInputCursor(159 * (unsigned int)pGUIWindow_CurrentMenu->ptr_1C + v17 + 20, 124, pFontCreate);
           break;
         case WINDOW_INPUT_CONFIRMED: // press enter
           pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
           v126 = 0;
-          for ( int i = 0; i < strlen((const char *)pKeyActionMap->pPressedKeysBuffer); ++i )//edit name
+          for ( int i = 0; i < strlen(pKeyActionMap->pPressedKeysBuffer); ++i )//edit name
           {
             if ( pKeyActionMap->pPressedKeysBuffer[i] == ' ' )
               ++v126;
           }
-          if ( strlen((const char *)pKeyActionMap->pPressedKeysBuffer) && v126 != strlen((const char *)pKeyActionMap->pPressedKeysBuffer) )
-            strcpy(pParty->pPlayers[i].pName, (const char *)pKeyActionMap->pPressedKeysBuffer);
+          if ( strlen(pKeyActionMap->pPressedKeysBuffer) && v126 != strlen(pKeyActionMap->pPressedKeysBuffer) )
+            strcpy(pParty->pPlayers[i].pName, pKeyActionMap->pPressedKeysBuffer);
           pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, pParty->pPlayers[i].pName, 130, 0);
           pParty->pPlayers[i].field_1988[27] = 1;
           break;
--- a/UI/UISaveLoad.cpp	Mon Jun 30 10:22:31 2014 +0100
+++ b/UI/UISaveLoad.cpp	Wed Jul 02 15:13:39 2014 +0200
@@ -95,7 +95,7 @@
   if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
   {
     pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
-    strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, (const char *)pKeyActionMap->pPressedKeysBuffer);
+    strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pKeyActionMap->pPressedKeysBuffer);
     pMessageQueue_50CBD0->AddMessage(UIMSG_SaveGame, 0, 0);
   }
   else
@@ -108,7 +108,7 @@
     pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, pFontSmallnum->AlignText_Center(186, pGlobalTXT_LocalizationStrings[135]) + 25,
         220, 0, pGlobalTXT_LocalizationStrings[135], 0, 0, 0);//Загрузка
     pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, pFontSmallnum->AlignText_Center(186,
-        (const char *)pSavegameHeader.data() + 100 * uLoadGameUI_SelectedSlot) + 25, 0x106, 0, pSavegameHeader[uLoadGameUI_SelectedSlot].pName, 185, 0);
+		pSavegameHeader[uLoadGameUI_SelectedSlot].pName) + 25, 0x106, 0, pSavegameHeader[uLoadGameUI_SelectedSlot].pName, 185, 0);
     pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, pFontSmallnum->AlignText_Center(186, pGlobalTXT_LocalizationStrings[165]) + 25,
         304, 0, pGlobalTXT_LocalizationStrings[165], 0, 0, 0);//"Пожалуйста, пожождите"
   }
--- a/UI/UIShops.cpp	Mon Jun 30 10:22:31 2014 +0100
+++ b/UI/UIShops.cpp	Wed Jul 02 15:13:39 2014 +0200
@@ -61,13 +61,13 @@
         {
           pButton = pDialogueWindow->GetControl(i);
           pButton->uY = v103 + v19;
-          pButton->uHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0);
-          v19 = pButton->uY + pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0) - 1;
+          pButton->uHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0);
+          v19 = pButton->uY + pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0) - 1;
           pButton->uW = v19;
           pColorText = Color16(0xE1u, 0xCDu, 0x23u);
           if ( pDialogueWindow->pCurrentPosActiveItem != i )
             pColorText = Color16(0xFFu, 0xFFu, 0xFFu);
-          dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3);
+          dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3);
           ++pNumString;
         }
       }
@@ -263,13 +263,13 @@
       {
         pButton = pDialogueWindow->GetControl(i);
         pButton->uY = v103 + v19;
-        pButton->uHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0);
-        v19 = pButton->uY + pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0) - 1;
+        pButton->uHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0);
+        v19 = pButton->uY + pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0) - 1;
         pButton->uW = v19;
         pColorText = Color16(0xE1u, 0xCDu, 0x23u);
         if ( pDialogueWindow->pCurrentPosActiveItem != i )
           pColorText = Color16(0xFFu, 0xFFu, 0xFFu);
-        dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3);
+        dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3);
         ++pNumString;
         }
       break;
@@ -733,13 +733,13 @@
         {
           pButton = pDialogueWindow->GetControl(i);
           pButton->uY = v18 + v105;
-          pButton->uHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0);
-          v105 = pButton->uY + pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0) - 1;
+          pButton->uHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0);
+          v105 = pButton->uY + pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0) - 1;
           pButton->uW = v105;
           pColorText = Color16(0xE1u, 0xCDu, 0x23u);
           if ( pDialogueWindow->pCurrentPosActiveItem != i )
             pColorText = Color16(0xFFu, 0xFFu, 0xFFu);
-          dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3);
+          dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3);
           ++pNumString;
         }
       }
@@ -982,13 +982,13 @@
       {
         pButton = pDialogueWindow->GetControl(i);
         pButton->uY = v18 + v105;
-        pButton->uHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0);
-        v105 = pButton->uY + pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0) - 1;
+        pButton->uHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0);
+        v105 = pButton->uY + pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0) - 1;
         pButton->uW = v105;
         pColorText = Color16(0xE1u, 0xCDu, 0x23u);
         if ( pDialogueWindow->pCurrentPosActiveItem != i )
           pColorText = Color16(0xFFu, 0xFFu, 0xFFu);
-        dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3);
+        dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3);
         ++pNumString;
       }
       return;
--- a/UI/UiGame.cpp	Mon Jun 30 10:22:31 2014 +0100
+++ b/UI/UiGame.cpp	Wed Jul 02 15:13:39 2014 +0200
@@ -660,7 +660,7 @@
     if ( pGUIWindow2->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED)
     {
       pGUIWindow2->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
-      strcpy(GameUI_Footer_TimedString.data(), (const char *)pKeyActionMap->pPressedKeysBuffer);
+      strcpy(GameUI_Footer_TimedString.data(), pKeyActionMap->pPressedKeysBuffer);
       sub_4452BB();
       return;
     }