diff UI/UIShops.cpp @ 1838:211dfe2d8db1

changing global char* vars to const char* vars
author Grumpy7
date Fri, 11 Oct 2013 09:19:40 +0200
parents 0c75c3e7e436
children 2e6d3cd052e0
line wrap: on
line diff
--- a/UI/UIShops.cpp	Fri Oct 11 07:29:14 2013 +0200
+++ b/UI/UIShops.cpp	Fri Oct 11 09:19:40 2013 +0200
@@ -44,10 +44,10 @@
     {
       if ( HouseUI_CheckIfPlayerCanInteract() )
       {
-        pShopOptions[0] = pGlobalTXT_LocalizationStrings[134];
-        pShopOptions[1] = pGlobalTXT_LocalizationStrings[152];
-        pShopOptions[2] = pGlobalTXT_LocalizationStrings[159];
-        pShopOptions[3] = pGlobalTXT_LocalizationStrings[160];
+        pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[134];
+        pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[152];
+        pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[159];
+        pShopOptions[3] = (char *)pGlobalTXT_LocalizationStrings[160];
         all_text_height = 0;
         for ( int i = 0; i < 4; ++i )
           all_text_height += pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0);
@@ -247,9 +247,9 @@
     {
       draw_leather();
       CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
-      pShopOptions[0] = pGlobalTXT_LocalizationStrings[200];//sell
-      pShopOptions[1] = pGlobalTXT_LocalizationStrings[113];//identify
-      pShopOptions[2] = pGlobalTXT_LocalizationStrings[179];//repair
+      pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[200];//sell
+      pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[113];//identify
+      pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[179];//repair
       all_text_height = 0;
       for ( int i = 0; i < 3; ++i )
         all_text_height += pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0);
@@ -369,10 +369,10 @@
     {
       if ( !HouseUI_CheckIfPlayerCanInteract() )
         return;
-      pShopOptions[0] = pGlobalTXT_LocalizationStrings[134]; //"Buy Standard"
-      pShopOptions[1] = pGlobalTXT_LocalizationStrings[152]; //"Buy Special"
-      pShopOptions[2] = pGlobalTXT_LocalizationStrings[159]; //"Display Inventory"
-      pShopOptions[3] = pGlobalTXT_LocalizationStrings[160];
+      pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[134]; //"Buy Standard"
+      pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[152]; //"Buy Special"
+      pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[159]; //"Display Inventory"
+      pShopOptions[3] = (char *)pGlobalTXT_LocalizationStrings[160];
       all_text_height = 0;
       for( int i = 0; i < 4; ++i )
         all_text_height += pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0);
@@ -522,9 +522,9 @@
     {
       draw_leather();
       CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
-      pShopOptions[0] = pGlobalTXT_LocalizationStrings[200]; //"Sell"
-      pShopOptions[1] = pGlobalTXT_LocalizationStrings[113]; //"Identify"
-      pShopOptions[2] = pGlobalTXT_LocalizationStrings[179]; //"Repair"
+      pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[200]; //"Sell"
+      pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[113]; //"Identify"
+      pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[179]; //"Repair"
       all_text_height = 0;
       for ( int i = 0; i < 3; ++i )
         all_text_height += pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0);
@@ -688,7 +688,7 @@
   int index; // eax@7
   signed int v5; // esi@9
   int v18; // eax@23
-  char *pText; // edx@29
+  const char *pText; // edx@29
   unsigned int product_height_1row; // edi@55
   unsigned int product_width_1row; // esi@57
   unsigned int product_height_2row; // edi@67
@@ -715,10 +715,10 @@
     {
       if ( HouseUI_CheckIfPlayerCanInteract() )
       {
-        pShopOptions[0] = pGlobalTXT_LocalizationStrings[134];
-        pShopOptions[1] = pGlobalTXT_LocalizationStrings[152];
-        pShopOptions[2] = pGlobalTXT_LocalizationStrings[159];
-        pShopOptions[3] = pGlobalTXT_LocalizationStrings[160];
+        pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[134];
+        pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[152];
+        pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[159];
+        pShopOptions[3] = (char *)pGlobalTXT_LocalizationStrings[160];
         all_text_height = 0;
         for ( int i = 0; i < 4; ++i )
           all_text_height += pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0);
@@ -966,8 +966,8 @@
     {
       draw_leather();
       CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
-      pShopOptions[0] = pGlobalTXT_LocalizationStrings[200];
-      pShopOptions[1] = pGlobalTXT_LocalizationStrings[113];
+      pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[200];
+      pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[113];
       all_text_height = 0;
       for ( int i = 0; i < 2; ++i )
         all_text_height += pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0);
@@ -1090,10 +1090,10 @@
   {
     if ( !HouseUI_CheckIfPlayerCanInteract() )
         return;
-    pShopOptions[0] = pGlobalTXT_LocalizationStrings[134]; //"Buy Standard"
-    pShopOptions[1] = pGlobalTXT_LocalizationStrings[152]; //"Buy Special"
-    pShopOptions[2] = pGlobalTXT_LocalizationStrings[159]; //"Display Inventory"
-    pShopOptions[3] = pGlobalTXT_LocalizationStrings[160];
+    pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[134]; //"Buy Standard"
+    pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[152]; //"Buy Special"
+    pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[159]; //"Display Inventory"
+    pShopOptions[3] = (char *)pGlobalTXT_LocalizationStrings[160];
     all_text_height = 0;
     for ( int i = 0; i < 4; ++i )
       all_text_height += pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0);
@@ -1295,9 +1295,9 @@
   {
     draw_leather();
     CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
-    pShopOptions[0] = pGlobalTXT_LocalizationStrings[200];// "Sell"
-    pShopOptions[1] = pGlobalTXT_LocalizationStrings[113];// "Identify"
-    pShopOptions[2] = pGlobalTXT_LocalizationStrings[179];// "Repair"
+    pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[200];// "Sell"
+    pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[113];// "Identify"
+    pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[179];// "Repair"
     all_text_height = 0;
     for ( uint i = 0; i < 3; ++i )
       all_text_height += pFontArrus->CalcTextHeight(pShopOptions[i], &dialog_window, 0, 0);