changeset 1996:f7e8c4d4a01b

sound id fix
author zipi
date Sun, 03 Nov 2013 14:29:45 +0000
parents 25e3772e3650
children 1175adbf8c58
files mm7_2.cpp mm7_data.cpp mm7_data.h
diffstat 3 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_2.cpp	Sun Nov 03 13:33:37 2013 +0000
+++ b/mm7_2.cpp	Sun Nov 03 14:29:45 2013 +0000
@@ -6011,7 +6011,7 @@
               v16 = (signed __int16)pSpriteObjects[uLayingItemID].uSoundID + 4;
             v124 = 8 * v153;
             LOBYTE(v124) = v124 | 2;
-            v125 = word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id - 1] + 1;
+            v125 = word_4EE088_sound_ids[pSpriteObjects[uLayingItemID].spell_id] + 1;
             pAudioPlayer->PlaySound((SoundID)v125, v124, 0, -1, 0, v16, 0, 0);
             return 0;
           }
--- a/mm7_data.cpp	Sun Nov 03 13:33:37 2013 +0000
+++ b/mm7_data.cpp	Sun Nov 03 14:29:45 2013 +0000
@@ -787,7 +787,7 @@
 std::array<unsigned int, 2> pHiredNPCsIconsOffsetsY = {152, 152};
 std::array<int, 2> dword_4EE07C; // weak
 _UNKNOWN unk_4EE084; // weak
-std::array<__int16, 100> word_4EE088_sound_ids =
+std::array<__int16, 101> word_4EE088_sound_ids =
 {{
       0, 10000, 10010, 10020, 10030, 10040, 10050, 10060, 10070, 10080,
   10090, 10100, 11000, 11010, 11020, 11030, 11040, 11050, 11060, 11070,
@@ -798,7 +798,8 @@
   15040, 15050, 15060, 15070, 15080, 15090, 15100, 16000, 16010, 16020,
   16030, 16040, 16050, 16060, 16070, 16080, 16090, 16100, 17000, 17010,
   17020, 17030, 17040, 17050, 17060, 17070, 17080, 17090, 17100, 18000,
-  18010, 18020, 18030, 18040, 18050, 18060, 18070, 18080, 18090, 18100
+  18010, 18020, 18030, 18040, 18050, 18060, 18070, 18080, 18090, 18100,
+	  1
 }};
 std::array<short, 28> word_4EE150 =
 {{
--- a/mm7_data.h	Sun Nov 03 13:33:37 2013 +0000
+++ b/mm7_data.h	Sun Nov 03 14:29:45 2013 +0000
@@ -478,7 +478,7 @@
 extern std::array<unsigned int, 2> pHiredNPCsIconsOffsetsY;
 extern std::array<int, 2> dword_4EE07C; // weak
 extern _UNKNOWN unk_4EE084; // weak
-extern std::array<__int16, 100> word_4EE088_sound_ids; // weak
+extern std::array<__int16, 101> word_4EE088_sound_ids; // weak
 extern std::array<short, 28> word_4EE150;
 extern int dword_4EED78; // weak
 extern _UNKNOWN unk_4EED80; // weak