changeset 2511:fb1c61a82a55

uHouseID - 1
author Ritor1
date Thu, 02 Oct 2014 17:35:50 +0600
parents ae2b7048b3eb
children 28afacb08f76
files Engine/Events.cpp Engine/Game.cpp Engine/LOD.cpp Engine/MMT.cpp GUI/UI/UIHouses.cpp Media/Audio/AudioPlayer.cpp
diffstat 6 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Engine/Events.cpp	Thu Oct 02 13:39:42 2014 +0600
+++ b/Engine/Events.cpp	Thu Oct 02 17:35:50 2014 +0600
@@ -431,7 +431,7 @@
             if ( v128 == 3 )
               pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen;
             if ( v128 == 13 )
-              pMediaPlayer->OpenHouseMovie(pAnimatedRooms[uCurrentHouse_Animation].video_name, 1u);
+              pMediaPlayer->OpenHouseMovie(pAnimatedRooms[uCurrentHouse_Animation].video_name, 1);
           }
           ++curr_seq_num;
           break;
--- a/Engine/Game.cpp	Thu Oct 02 13:39:42 2014 +0600
+++ b/Engine/Game.cpp	Thu Oct 02 17:35:50 2014 +0600
@@ -4976,9 +4976,9 @@
 
 	bool use_d3d11 = false;
 	if (use_d3d11)
-      pRenderer = RenderD3D11::Create();
+		pRenderer = RenderD3D11::Create();
 	else
-      pRenderer = Render::Create();//Create DirectX
+		pRenderer = Render::Create();//Create DirectX
 	if (!pRenderer)
 	{
 		Log::Warning(L"Render creation failed");
--- a/Engine/LOD.cpp	Thu Oct 02 13:39:42 2014 +0600
+++ b/Engine/LOD.cpp	Thu Oct 02 17:35:50 2014 +0600
@@ -1442,7 +1442,7 @@
     pFile = fopen(pFilename, "rb+");
   if (!pFile)
   {
-	  __debugbreak();
+	 // __debugbreak();
     return false;// возможно файл не закрыт, поэтому не открывается
   }
 
--- a/Engine/MMT.cpp	Thu Oct 02 13:39:42 2014 +0600
+++ b/Engine/MMT.cpp	Thu Oct 02 17:35:50 2014 +0600
@@ -93,6 +93,7 @@
         if (!FileExists("Music\\14.mp3"))
 		{
           Log::Warning(L"File 14.mp3 in Music\\ folder not found");
+		  //Error("File 14.mp3 in Music\\ folder not found");
 		  return;
 		}
 	    PlayAudio(L"Music\\14.mp3");
--- a/GUI/UI/UIHouses.cpp	Thu Oct 02 13:39:42 2014 +0600
+++ b/GUI/UI/UIHouses.cpp	Thu Oct 02 17:35:50 2014 +0600
@@ -987,8 +987,8 @@
 //----- (004B1E92) --------------------------------------------------------
 void PlayHouseSound(unsigned int uHouseID, HouseSoundID sound)
 {
-  if ( pAnimatedRooms[p2DEvents[uHouseID].uAnimationID].uRoomSoundId )
-    pAudioPlayer->PlaySound((SoundID)(sound + 100 * (pAnimatedRooms[p2DEvents[uHouseID].uAnimationID].uRoomSoundId + 300)),
+  if ( pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].uRoomSoundId )
+    pAudioPlayer->PlaySound((SoundID)(sound + 100 * (pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].uRoomSoundId + 300)),
         806, 0, -1, 0, 0, 0, 0);
 }
 
--- a/Media/Audio/AudioPlayer.cpp	Thu Oct 02 13:39:42 2014 +0600
+++ b/Media/Audio/AudioPlayer.cpp	Thu Oct 02 17:35:50 2014 +0600
@@ -439,8 +439,8 @@
 //----- (004AA13F) --------------------------------------------------------
 void AudioPlayer::PlayMusicTrack(MusicID eTrack)
 {
- char string[256];
- wchar_t *wStr = new wchar_t;
+  char string[256];
+  wchar_t *wStr = new wchar_t;
   if (!bNoSound && bPlayerReady && uMusicVolimeMultiplier)
   {
     if ( use_music_folder )
@@ -455,6 +455,7 @@
 	  char2wchar_t(string,wStr);
 	  PlayAudio(wStr);
 	  alSourcef (mSourceID, AL_GAIN, pSoundVolumeLevels[uMusicVolimeMultiplier]);
+	  delete [] wStr;
 	}
 	else if ( hAILRedbook )
 	{