diff mm7_3.cpp @ 1205:8c02e6f74b29

arrays to std::arrays phase 2 - mm7_data.h converted
author Grumpy7
date Sun, 09 Jun 2013 00:30:48 +0200
parents 0dbf6c4dd029
children ab6560001f5b
line wrap: on
line diff
--- a/mm7_3.cpp	Sat Jun 08 21:47:29 2013 +0200
+++ b/mm7_3.cpp	Sun Jun 09 00:30:48 2013 +0200
@@ -5273,7 +5273,7 @@
             }
           }
         }
-        sr_sub_486B4E_push_outdoor_edges(array_508690, dword_50B638, dword_50B570, v12);
+        sr_sub_486B4E_push_outdoor_edges(array_508690, dword_50B638.data(), dword_50B570.data(), v12);
       }
 LABEL_72:
       ++v79;
@@ -6620,7 +6620,7 @@
   GetAlertStatus();
   if ( qword_A750D8 )
     qword_A750D8 = 0i64;
-  v2 = pMapStats->GetMapInfo(pCurrentMapName);
+  v2 = pMapStats->GetMapInfo(pCurrentMapName.data());
   v3 = 0;
   if ( v2 )
   {
@@ -7517,7 +7517,7 @@
       }
       while ( v5 < (signed int)a3->uNumVertices );
     }
-    result = sr_sub_486B4E_push_outdoor_edges(a1, dword_50B638, dword_50B570, a3);
+    result = sr_sub_486B4E_push_outdoor_edges(a1, dword_50B638.data(), dword_50B570.data(), a3);
   }
   return result;
 }
@@ -12937,7 +12937,7 @@
   v16.uRadius = 32;
   v16.uKind = 3;
   v16.uIndex = v8 + 2 * v9 + v9;
-  v10 = pMapStats->GetMapInfo(pCurrentMapName);
+  v10 = pMapStats->GetMapInfo(pCurrentMapName.data());
   if ( v10 )
   {
     v11 = uNumActors;
@@ -13691,11 +13691,11 @@
   v2 = pMapName;
   pAudioPlayer->StopChannels(-1, -1);
   pGameLoadingUI_ProgressBar->Initialize(GUIProgressBar::TYPE_None);
-  if ( _stricmp(pCurrentMapName, v2) )
+  if ( _stricmp(pCurrentMapName.data(), v2) )
     SaveGame(1, 0);
 
   uGameState = GAME_STATE_2;
-  strcpy(pCurrentMapName, v2);
+  strcpy(pCurrentMapName.data(), v2);
   uLevel_StartingPointType = start_point;
 }
 // 6BE35C: using guessed type int uLevel_StartingPointType;
@@ -13903,12 +13903,12 @@
   int i; // eax@1
 
   v2 = uNumSeconds;
-  strcpy(GameUI_Footer_TimedString, pString);
+  strcpy(GameUI_Footer_TimedString.data(), pString);
   GameUI_Footer_TimeLeft = 1000 * v2 + GetTickCount();
-  for ( i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString);
+  for ( i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data());
         i > 450;
-        i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString) )
-    byte_5C3427[strlen(GameUI_Footer_TimedString)] = 0;
+        i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data()) )
+    byte_5C3427[strlen(GameUI_Footer_TimedString.data())] = 0;
 }
 
 //----- (0044C1D0) --------------------------------------------------------
@@ -13929,7 +13929,7 @@
 {
   bool result; // eax@1
 
-  result = _stricmp("nwc.blv", pCurrentMapName);
+  result = _stricmp("nwc.blv", pCurrentMapName.data());
   if ( result )
   {
     _5B65A8_npcdata_uflags_or_other = 0;
@@ -14405,8 +14405,8 @@
     v33 = 30;
     ai_arrays_size = 30;
   }
-  memcpy(ai_near_actors_ids, ai_array_4F6638_actor_ids, 4 * v33);
-  memcpy(ai_near_actors_distances, ai_array_4F5E68, 4 * ai_arrays_size);
+  memcpy(ai_near_actors_ids.data(), ai_array_4F6638_actor_ids.data(), 4 * v33);
+  memcpy(ai_near_actors_distances.data(), ai_array_4F5E68.data(), 4 * ai_arrays_size);
   v34 = (unsigned int)ai_arrays_size;
   if ( ai_arrays_size > 0 )
   {
@@ -15389,7 +15389,7 @@
   v40b = v35;
   if ( v40b < v40b + ai_arrays_size )
   {
-    v34 = (int *)ai_near_actors_ids;
+    v34 = (int *)ai_near_actors_ids.data();
     do
     {
       v37 = *v34;