diff AudioPlayer.cpp @ 1288:7adc8b9b6a25

Слияние
author Ritor1
date Mon, 10 Jun 2013 09:30:21 +0600
parents 8c02e6f74b29
children 0aeac0b9ca30
line wrap: on
line diff
--- a/AudioPlayer.cpp	Mon Jun 10 09:30:12 2013 +0600
+++ b/AudioPlayer.cpp	Mon Jun 10 09:30:21 2013 +0600
@@ -36,13 +36,13 @@
 int uFindSound_BinSearch_ResultID; // weak
 int uLastLoadedSoundID; // weak
 int sLastTrackLengthMS;
-Sound pSounds[3000];
+std::array<Sound, 3000> pSounds;
 AudioPlayer *pAudioPlayer;
 SoundList *pSoundList;
 
 
-stru339_spell_sound stru_A750F8[4];
-stru339_spell_sound stru_AA1058[4];
+std::array<stru339_spell_sound, 4> stru_A750F8;
+std::array<stru339_spell_sound, 4> stru_AA1058;
 
 
 
@@ -51,7 +51,7 @@
 unsigned __int8 uMusicVolimeMultiplier = 4;
 int bWalkSound; // idb
 
-float pSoundVolumeLevels[10] = 
+std::array<float, 10> pSoundVolumeLevels = 
 {
   0.0000000f, 0.1099999f, 0.2199999f, 0.3300000f, 0.4399999f,
  0.5500000f, 0.6600000f, 0.7699999f, 0.8799999f, 0.9900000f
@@ -1681,7 +1681,7 @@
       case OBJECT_Actor:
       {
         assert(source_id < uNumActors);
-        auto actor = pActors + source_id;
+        auto actor = &pActors[source_id];
 
         source_x = actor->vPosition.x;
         source_y = actor->vPosition.y;
@@ -2413,7 +2413,7 @@
 {
   unsigned int v0; // eax@1
 
-  v0 = pMapStats->GetMapInfo(pCurrentMapName);
+  v0 = pMapStats->GetMapInfo(pCurrentMapName.data());
   if ( v0 )
     pAudioPlayer->PlayMusicTrack((MusicID)pMapStats->pInfos[v0].uRedbookTrackID);
 }
@@ -2447,7 +2447,7 @@
   int v3; // [sp+4h] [bp-4h]@3
 
   v1 = this;
-  v2 = pMapStats->GetMapInfo(pCurrentMapName);
+  v2 = pMapStats->GetMapInfo(pCurrentMapName.data());
   if ( v1->b3DSoundInitialized && v1->bEAXSupported )
   {
     v3 = pMapStats->pInfos[v2].uEAXEnv;
@@ -2482,7 +2482,7 @@
   int v13; // [sp+20h] [bp-4h]@6
 
   v1 = this;
-  v2 = pMapStats->GetMapInfo(pCurrentMapName);
+  v2 = pMapStats->GetMapInfo(pCurrentMapName.data());
   v3 = v1->b3DSoundInitialized == 0;
   v4 = v2;
   v12 = v2;