changeset 2160:c68723f7b522

for 3DSoundProvider
author Ritor1
date Mon, 13 Jan 2014 17:30:22 +0600
parents 67a83bc1a7de
children 86c9c8e207d5
files AudioPlayer.cpp Indoor.cpp Outdoor.cpp
diffstat 3 files changed, 22 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/AudioPlayer.cpp	Mon Jan 13 14:31:25 2014 +0600
+++ b/AudioPlayer.cpp	Mon Jan 13 17:30:22 2014 +0600
@@ -2251,7 +2251,8 @@
   char *Str1; // [sp+10h] [bp-8h]@6
   int v14; // [sp+14h] [bp-4h]@5
 
-  //v2 = this;
+  //WriteWindowsRegistryString( "3DSoundProvider", "Aureal A3D Interactive(TM)");//запись в реестр для 3D звука(Microsoft DirectSound3D with Creative Labs EAX(TM))
+
   v3 = 0;
   //this->hWindow = hWnd;
   this->hAILRedbook = 0;
@@ -2672,8 +2673,8 @@
   int v12; // [sp+1Ch] [bp-8h]@1
   //int v13; // [sp+20h] [bp-4h]@6
 
-  __debugbreak();//Ritor1
-  map_id = pMapStats->GetMapInfo(pCurrentMapName);
+  //__debugbreak();//Ritor1
+
   if ( this->b3DSoundInitialized )
   {
     //v5 = &this->uNum3DSamples;
@@ -2706,6 +2707,7 @@
     {
       //v10 = v4;
       //v11 = pMapStats->pInfos[map_id].uEAXEnv;
+      map_id = pMapStats->GetMapInfo(pCurrentMapName);
       v12 = pMapStats->pInfos[map_id].uEAXEnv;
       if ( pMapStats->pInfos[map_id].uEAXEnv >= 0x1A )
       {
--- a/Indoor.cpp	Mon Jan 13 14:31:25 2014 +0600
+++ b/Indoor.cpp	Mon Jan 13 17:30:22 2014 +0600
@@ -6518,7 +6518,7 @@
   int v80; // [sp+34h] [bp-2Ch]@1
   int v82; // [sp+3Ch] [bp-24h]@47
   int _view_angle; // [sp+40h] [bp-20h]@47
-  int bJumping; // [sp+44h] [bp-1Ch]@1
+  bool bJumping; // [sp+44h] [bp-1Ch]@1
   int new_party_y; // [sp+48h] [bp-18h]@1
   int new_party_x; // [sp+4Ch] [bp-14h]@1
   int party_z; // [sp+50h] [bp-10h]@1
@@ -6617,7 +6617,7 @@
   }
 
   if ( party_z > floor_level + 1 )
-    bJumping = 1;
+    bJumping = true;
 
   bool jumping_up = false;
 
@@ -6743,7 +6743,7 @@
       case PARTY_Jump:
         if ( (!bJumping || party_z <= floor_level + 6 && pParty->uFallSpeed <= 0) && pParty->field_24 )
         {
-          bJumping = 1;
+          bJumping = true;
           pParty->uFallSpeed = (signed __int64)((double)(pParty->field_24 << 6) * 1.5 + (double)pParty->uFallSpeed);
         }
         break;
--- a/Outdoor.cpp	Mon Jan 13 14:31:25 2014 +0600
+++ b/Outdoor.cpp	Mon Jan 13 17:30:22 2014 +0600
@@ -3829,7 +3829,7 @@
   {
     switch (pPartyActionQueue->Next())
     {
-      case PARTY_FlyUp:
+      case PARTY_FlyUp://полёт вверх
       {
         if (!pParty->FlyActive() && !bUnderwater)
           break;
@@ -3873,7 +3873,7 @@
       }
       break;
 
-      case PARTY_FlyDown:
+      case PARTY_FlyDown://полёт вниз
         if (pParty->FlyActive() || bUnderwater)
         {
           pParty->bFlying = false;
@@ -3931,7 +3931,7 @@
         _angle_y &= stru_5C6E00->uDoublePiMask;
       break;
 
-      case PARTY_StrafeLeft:
+      case PARTY_StrafeLeft://хождение боком в влево
       {
         *(float *)&v128 = pParty->uWalkSpeed;
 
@@ -3948,7 +3948,7 @@
       }
       break;
 
-      case PARTY_StrafeRight:
+      case PARTY_StrafeRight://хождение боком в вправо
       {
         *(float *)&v128 = pParty->uWalkSpeed;
 
@@ -3965,7 +3965,7 @@
       }
       break;
 
-      case PARTY_WalkForward:
+      case PARTY_WalkForward:// идти вперёд
       {
         *(float *)&v128 = _walk_speed;
 
@@ -3992,7 +3992,7 @@
       }
       break;
 
-      case PARTY_RunForward:
+      case PARTY_RunForward://бежать вперёд
       {
         *(float *)&v128 = _walk_speed;
 
@@ -4029,7 +4029,7 @@
       break;
 
 
-      case PARTY_WalkBackward:
+      case PARTY_WalkBackward://идти назад
       {
         *(float *)&v128 = _walk_speed;
 
@@ -4048,7 +4048,7 @@
       break;
 
 
-      case PARTY_RunBackward:
+      case PARTY_RunBackward://бежать назад
       {
         float sin_y = sinf(2 * 3.141592653589 * _angle_y / 2048.0),
               cos_y = cosf(2 * 3.141592653589 * _angle_y / 2048.0);
@@ -4073,11 +4073,11 @@
       }
       break;
 
-      case PARTY_CenterView:
+      case PARTY_CenterView://смотреть прямо
         _angle_x = 0;
       break;
 
-      case PARTY_LookUp:
+      case PARTY_LookUp://смотреть вверх
         _angle_x += (signed __int64)(flt_6BE150_look_up_down_dangle * 25.0);
         if ( _angle_x > 128 )
           _angle_x = 128;
@@ -4085,7 +4085,7 @@
           pPlayers[uActiveCharacter]->PlaySound(SPEECH_63, 0);
       break;
 
-      case PARTY_LookDown:
+      case PARTY_LookDown://смотреть вниз
         _angle_x += (signed __int64)(flt_6BE150_look_up_down_dangle * -25.0);
         if ( _angle_x < -128 )
           _angle_x = -128;
@@ -4093,8 +4093,8 @@
           pPlayers[uActiveCharacter]->PlaySound(SPEECH_64, 0);
       break;
 
-      case PARTY_Jump:
-        if ( (!partyAtHighSlope || bmodel_standing_on_pid) && !hovering && pParty->field_24 && !(pParty->uFlags & 4) && !(BYTE1(pParty->uFlags) & 2) )
+      case PARTY_Jump://прыжок
+        if ( (!partyAtHighSlope || bmodel_standing_on_pid) && !hovering && pParty->field_24 && !(pParty->uFlags & 4) && !(pParty->uFlags & 0x200) )
         {
           //v126 = pParty->field_24 << 6;
           hovering = true;
@@ -4102,7 +4102,7 @@
         }
       break;
 
-      case PARTY_Land:
+      case PARTY_Land://приземление(клавиша Home)
         if (pParty->bFlying)
         {
           pParty->uFlags |= PARTY_FLAGS_1_LANDING;