changeset 6:71a230891861

15.01.13
author Ritor1
date Tue, 15 Jan 2013 18:42:05 +0600
parents 07b2770e7891
children bf019a7475f3
files AIL.cpp AudioPlayer.cpp GUIWindow.h Game.cpp GameUIs.cpp MM7.sdf
diffstat 6 files changed, 40 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/AIL.cpp	Tue Jan 15 18:40:50 2013 +0600
+++ b/AIL.cpp	Tue Jan 15 18:42:05 2013 +0600
@@ -153,7 +153,7 @@
 }
 
 // sub_4D834C: using guessed type int __stdcall AIL_waveOutOpen(_DWORD, _DWORD, _DWORD, _DWORD);
-int __stdcall AIL_waveOutOpen(HDIGDRIVER *drv, HWAVEOUT *phWaveOut, int wDeviceID, WAVEFORMAT *pFormat)
+int __stdcall AIL_waveOutOpen(_DIG_DRIVER **drv, HWAVEOUT *phWaveOut, int wDeviceID, WAVEFORMAT *pFormat)
 {
  return (mss32_AIL_waveOutOpen)(drv, phWaveOut, wDeviceID, pFormat);
 }
--- a/AudioPlayer.cpp	Tue Jan 15 18:40:50 2013 +0600
+++ b/AudioPlayer.cpp	Tue Jan 15 18:42:05 2013 +0600
@@ -2091,73 +2091,73 @@
 // 4ABC9B: inconsistent function type and number of purged bytes
 
 //----- (004ABD5B) --------------------------------------------------------
-void AudioPlayer::Release()
+void AudioPlayer::Release() //Освободить
 {
-  AudioPlayer *v1; // esi@1
+  AudioPlayer *pAudioPlayer; // esi@1
   int v2; // edi@1
-  MixerChannel *v3; // ebx@3
+  MixerChannel *pMixerChannel; // ebx@3
   char v4; // dl@5
   int v5; // ebx@6
-  AudioPlayer_3DSample *v6; // edi@7
+  AudioPlayer_3DSample *p3DSample; // edi@7
   int v7; // edx@14
   int v8; // ecx@14
   void *v9; // ecx@15
 
-  v1 = this;
+  pAudioPlayer = this;
   v2 = 0;
   if ( this->bPlayerReady )
   {
     CloseHandle(pVideoPlayer->hMagicVid);
     CloseHandle(pVideoPlayer->hMightVid);
-    v1->StopChannels(-1, -1);
-    if ( v1->uMixerChannels > 0 )
+    pAudioPlayer->StopChannels(-1, -1);
+    if ( pAudioPlayer->uMixerChannels > 0 )
     {
-      v3 = v1->pMixerChannels;
+      pMixerChannel = pAudioPlayer->pMixerChannels;
       do
       {
-        AIL_release_sample_handle(v3->hSample);
+        AIL_release_sample_handle(pMixerChannel->hSample);
         ++v2;
-        ++v3;
+        ++pMixerChannel;
       }
-      while ( v2 < v1->uMixerChannels );
+      while ( v2 < pAudioPlayer->uMixerChannels );
     }
     if ( ReadWindowsRegistryInt("Disable3DSound", 0) != 1 )
     {
       v5 = 0;
-      v1->CheckA3DSupport(v4);
-      if ( v1->uNum3DSamples > 0 )
+      pAudioPlayer->CheckA3DSupport(v4);
+      if ( pAudioPlayer->uNum3DSamples > 0 )
       {
-        v6 = v1->p3DSamples;
+        p3DSample = pAudioPlayer->p3DSamples;
         do
         {
-          if ( v6->hSample )
+          if ( p3DSample->hSample )
           {
-            AIL_release_3D_sample_handle(v6->hSample);
-            v6->hSample = 0;
+            AIL_release_3D_sample_handle(p3DSample->hSample);
+            p3DSample->hSample = 0;
           }
           ++v5;
-          ++v6;
+          ++p3DSample;
         }
-        while ( v5 < v1->uNum3DSamples );
+        while ( v5 < pAudioPlayer->uNum3DSamples );
       }
-      if ( v1->h3DSoundProvider )
+      if ( pAudioPlayer->h3DSoundProvider )
       {
-        AIL_close_3D_provider(v1->h3DSoundProvider);
-        v1->h3DSoundProvider = 0;
+        AIL_close_3D_provider(pAudioPlayer->h3DSoundProvider);
+        pAudioPlayer->h3DSoundProvider = 0;
       }
     }
-    if ( v1->hAILRedbook )
+    if ( pAudioPlayer->hAILRedbook )
     {
-      AIL_redbook_stop(v1->hAILRedbook);
+      AIL_redbook_stop(pAudioPlayer->hAILRedbook);
       AIL_redbook_set_volume((HREDBOOK)v8, v7);
-      AIL_redbook_close(v1->hAILRedbook);
+      AIL_redbook_close(pAudioPlayer->hAILRedbook);
     }
     AIL_shutdown();
     pSoundList->Release();
-    v9 = *(void **)&v1->field_C78[0];
+    v9 = *(void **)&pAudioPlayer->field_C78[0];
     if ( v9 )
       ReleaseSoundData(v9);
-    CloseHandle(v1->hAudioSnd);
+    CloseHandle(pAudioPlayer->hAudioSnd);
   }
 }
 
--- a/GUIWindow.h	Tue Jan 15 18:40:50 2013 +0600
+++ b/GUIWindow.h	Tue Jan 15 18:42:05 2013 +0600
@@ -51,6 +51,8 @@
   WINDOW_FinalWindow = 0x46,
   WINDOW_5A = 0x5A,
   WINDOW_5E = 0x5E,
+  WINDOW_5F = 0x5F,
+  WINDOW_60 = 0x60,
   WINDOW_KeyMappingOptions = 0x69,
   WINDOW_VideoOptions = 0x6A
 };
--- a/Game.cpp	Tue Jan 15 18:40:50 2013 +0600
+++ b/Game.cpp	Tue Jan 15 18:42:05 2013 +0600
@@ -243,7 +243,7 @@
     dword_6BE364_game_settings_1 |= 0x80;
     dword_6BE340 = 2;
     // uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0;
-	pCurrentScreen = 0;
+    pCurrentScreen = 0;
     if (pAsyncMouse)
       pAsyncMouse->Resume();
     if (pGame->pKeyboardInstance->bUsingAsynKeyboard && pAsyncKeyboard )
@@ -324,10 +324,10 @@
       //pAudioPlayer->_4AAFCF();Ritor1: it's temporarily
       if (uGameState == 1)
         //goto LABEL_96;
-	  {
-		bLoadinga = 1;
+      {
+        bLoadinga = 1;
         continue;
-	  }
+      }
       if (uGameState == 2)
       {
         pAudioPlayer->StopChannels(-1, -1);
@@ -337,8 +337,10 @@
       }
       if ( (signed int)uGameState <= 2 )
         //goto LABEL_85;
-		pGame->Draw();
+      {
+        pGame->Draw();
         continue;
+      }
       if ( (signed int)uGameState <= 5 || uGameState == 7 )
       {
 //LABEL_96:
@@ -357,10 +359,10 @@
         GUI_UpdateWindows();
         pRenderer->EndScene();
         //goto LABEL_89;
-		pRenderer->Present();
+        pRenderer->Present();
         continue;
       }
-      pAudioPlayer->StopChannels(-1, -1);
+      pAudioPlayer->StopChannels(-1, -1);//далее в случае смерти группы
       memset(pParty->pHirelings, 0, 0x4Cu);
       memset(&pParty->pHirelings[1], 0, 0x4Cu);
       pNewNPCsCount = 0;
--- a/GameUIs.cpp	Tue Jan 15 18:40:50 2013 +0600
+++ b/GameUIs.cpp	Tue Jan 15 18:42:05 2013 +0600
@@ -99,7 +99,7 @@
       fread(&pSavegameHeader[i], 0x64, 1, v4);
     if ( !_strcmpi(pSavegameList->pSavesNames[i], pGlobalTXT_LocalizationStrings[613]) )// "AutoSave.MM7"
       strcpy(pSavegameList->pSavesNames[i], pGlobalTXT_LocalizationStrings[16]);// "Autosave"
-	v5 = pLODFile.FindContainer("image.pcx", true);
+    v5 = pLODFile.FindContainer("image.pcx", true);
     if ( !v5 )
     {
       pSavegameUsedSlots[i] = 0;
@@ -273,5 +273,4 @@
   pBtnDownArrow = pGUIWindow_CurrentMenu->CreateButton( 0xD7u, 0x143u, 0x11u, 0x11u, 1, 0, 0xA3u, 0x22u, 0, "",
          (Texture *)(uTextureID_AR_DN_DN != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_AR_DN_DN] : 0), 0);
   v12 = -1;
-  //pBtnDownArrow = v7;
 }
\ No newline at end of file
Binary file MM7.sdf has changed