comparison AudioPlayer.cpp @ 1202:0dbf6c4dd029

arrays to std::arrays phase 1
author Grumpy7
date Sat, 08 Jun 2013 21:33:22 +0200
parents 29a8defbad9e
children 8c02e6f74b29
comparison
equal deleted inserted replaced
1196:44f37efc159c 1202:0dbf6c4dd029
34 int Aureal3D_SplashScreen; 34 int Aureal3D_SplashScreen;
35 int Aureal3D_SplashAudio; 35 int Aureal3D_SplashAudio;
36 int uFindSound_BinSearch_ResultID; // weak 36 int uFindSound_BinSearch_ResultID; // weak
37 int uLastLoadedSoundID; // weak 37 int uLastLoadedSoundID; // weak
38 int sLastTrackLengthMS; 38 int sLastTrackLengthMS;
39 Sound pSounds[3000]; 39 std::array<Sound, 3000> pSounds;
40 AudioPlayer *pAudioPlayer; 40 AudioPlayer *pAudioPlayer;
41 SoundList *pSoundList; 41 SoundList *pSoundList;
42 42
43 43
44 stru339_spell_sound stru_A750F8[4]; 44 std::array<stru339_spell_sound, 4> stru_A750F8;
45 stru339_spell_sound stru_AA1058[4]; 45 std::array<stru339_spell_sound, 4> stru_AA1058;
46 46
47 47
48 48
49 unsigned __int8 uSoundVolumeMultiplier = 4; 49 unsigned __int8 uSoundVolumeMultiplier = 4;
50 unsigned __int8 uVoicesVolumeMultiplier = 4; 50 unsigned __int8 uVoicesVolumeMultiplier = 4;
51 unsigned __int8 uMusicVolimeMultiplier = 4; 51 unsigned __int8 uMusicVolimeMultiplier = 4;
52 int bWalkSound; // idb 52 int bWalkSound; // idb
53 53
54 float pSoundVolumeLevels[10] = 54 std::array<float, 10> pSoundVolumeLevels =
55 { 55 {
56 0.0000000f, 0.1099999f, 0.2199999f, 0.3300000f, 0.4399999f, 56 0.0000000f, 0.1099999f, 0.2199999f, 0.3300000f, 0.4399999f,
57 0.5500000f, 0.6600000f, 0.7699999f, 0.8799999f, 0.9900000f 57 0.5500000f, 0.6600000f, 0.7699999f, 0.8799999f, 0.9900000f
58 }; 58 };
59 59
1679 break; 1679 break;
1680 1680
1681 case OBJECT_Actor: 1681 case OBJECT_Actor:
1682 { 1682 {
1683 assert(source_id < uNumActors); 1683 assert(source_id < uNumActors);
1684 auto actor = pActors + source_id; 1684 auto actor = &pActors[source_id];
1685 1685
1686 source_x = actor->vPosition.x; 1686 source_x = actor->vPosition.x;
1687 source_y = actor->vPosition.y; 1687 source_y = actor->vPosition.y;
1688 source_z = actor->vPosition.z; 1688 source_z = actor->vPosition.z;
1689 } 1689 }