Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit b89b59d

Browse files
authored
Merge pull request #90 from cortex-command-community/GI72-fmod-update
Gi72 fmod update
2 parents 81c91c1 + 06147c6 commit b89b59d

File tree

107 files changed

+4857
-6035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+4857
-6035
lines changed

Activities/GameActivity.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ bool GameActivity::CreateDelivery(int player, int mode, Vector &waypoint, Actor
786786

787787
// Go 'ding!', but only if player is human, or it may be confusing
788788
if (PlayerHuman(player))
789-
g_GUISound.ConfirmSound().Play(0, player);
789+
g_GUISound.ConfirmSound()->Play(player);
790790

791791
// Clear out the override purchase list, whether anything was in there or not, it should not override twice.
792792
m_PurchaseOverride[player].clear();
@@ -1472,7 +1472,7 @@ void GameActivity::Update()
14721472
// Switch back to normal view
14731473
m_ViewState[player] = NORMAL;
14741474
// Play err sound to indicate cancellation
1475-
g_GUISound.UserErrorSound().Play(0, player);
1475+
g_GUISound.UserErrorSound()->Play(player);
14761476
// Flash the same actor, jsut to show the control went back to him
14771477
m_pPieMenu[player]->DisableAnim();
14781478
}
@@ -1488,7 +1488,7 @@ void GameActivity::Update()
14881488
SwitchToActor(pMarkedActor, player, team);
14891489
// If not, boop
14901490
else
1491-
g_GUISound.UserErrorSound().Play(0, player);
1491+
g_GUISound.UserErrorSound()->Play(player);
14921492

14931493
// Switch back to normal view
14941494
m_ViewState[player] = NORMAL;
@@ -1734,18 +1734,18 @@ void GameActivity::Update()
17341734
if (m_PlayerController[player].IsState(PRESS_DOWN))// || m_PlayerController[player].IsState(PRESS_SECONDARY))
17351735
{
17361736
if (m_AIReturnCraft[player])
1737-
g_GUISound.SelectionChangeSound().Play(0, player);
1737+
g_GUISound.SelectionChangeSound()->Play(player);
17381738
else
1739-
g_GUISound.UserErrorSound().Play(0, player);
1739+
g_GUISound.UserErrorSound()->Play(player);
17401740

17411741
m_AIReturnCraft[player] = false;
17421742
}
17431743
else if (m_PlayerController[player].IsState(PRESS_UP))// || m_PlayerController[player].IsState(PRESS_SECONDARY))
17441744
{
17451745
if (!m_AIReturnCraft[player])
1746-
g_GUISound.SelectionChangeSound().Play(0, player);
1746+
g_GUISound.SelectionChangeSound()->Play(player);
17471747
else
1748-
g_GUISound.UserErrorSound().Play(0, player);
1748+
g_GUISound.UserErrorSound()->Play(player);
17491749

17501750
m_AIReturnCraft[player] = true;
17511751
}
@@ -1758,7 +1758,7 @@ void GameActivity::Update()
17581758
// Play err sound to indicate cancellation
17591759
g_FrameMan.SetScreenText("Order canceled!", ScreenOfPlayer(player), 333);
17601760
m_MsgTimer[player].Reset();
1761-
g_GUISound.UserErrorSound().Play(0, player);
1761+
g_GUISound.UserErrorSound()->Play(player);
17621762
// Flash the same actor, jsut to show the control went back to him
17631763
m_pPieMenu[player]->DisableAnim();
17641764
}

Activities/MultiplayerGame.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ namespace RTE {
339339
m_pGUIController->EnableMouse(false);
340340
m_Mode = CONNECTION;
341341
m_ConnectionWaitTimer.Reset();
342-
g_GUISound.ButtonPressSound().Play();
342+
g_GUISound.ButtonPressSound()->Play();
343343
}
344344

345345

@@ -403,7 +403,7 @@ namespace RTE {
403403
m_pGUIController->EnableMouse(false);
404404
m_Mode = CONNECTION;
405405
m_ConnectionWaitTimer.Reset();
406-
g_GUISound.ButtonPressSound().Play();
406+
g_GUISound.ButtonPressSound()->Play();
407407
}
408408
}
409409
// Notifications

Activities/MultiplayerServerLobby.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ namespace RTE {
704704
// m_aapPlayerBoxes[PLAYER_CPU][TEAM_DISABLED]->SetDrawImage(new AllegroBitmap(pIcon->GetBitmaps8()[0]));
705705
}
706706
}
707-
//g_GUISound.FocusChangeSound().Play();
707+
//g_GUISound.FocusChangeSound()->Play();
708708

709709
//Check if we need to clear or set CPU disabled team icon
710710
bool noCPUs = true;
@@ -733,7 +733,7 @@ namespace RTE {
733733
else if (m_aapPlayerBoxes[player][team]->GetDrawColor() != c_PlayerSlotColorHovered)
734734
{
735735
m_aapPlayerBoxes[player][team]->SetDrawColor(c_PlayerSlotColorHovered);
736-
//g_GUISound.SelectionChangeSound().Play();
736+
//g_GUISound.SelectionChangeSound()->Play();
737737
}
738738
}
739739
// Un-highlight all other cells
@@ -1240,10 +1240,10 @@ namespace RTE {
12401240
//HideAllScreens();
12411241
// m_MenuScreen = SCENESELECT;
12421242
// m_ScreenChange = true;
1243-
//g_GUISound.ButtonPressSound().Play();
1243+
//g_GUISound.ButtonPressSound()->Play();
12441244
}
12451245
else
1246-
g_GUISound.UserErrorSound().Play();
1246+
g_GUISound.UserErrorSound()->Play();
12471247
}
12481248
}
12491249

@@ -1282,7 +1282,7 @@ namespace RTE {
12821282

12831283
// Update the scene info box
12841284
//UpdateScenesBox();
1285-
//g_GUISound.ItemChangeSound().Play();
1285+
//g_GUISound.ItemChangeSound()->Play();
12861286
}
12871287
}
12881288

Entities/ACrab.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,7 +2346,7 @@ void ACrab::Update()
23462346
if (!pDevice->IsFull() && m_Controller.IsState(WEAPON_RELOAD))
23472347
{
23482348
pDevice->Reload();
2349-
m_DeviceSwitchSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
2349+
m_DeviceSwitchSound.Play(m_Pos);
23502350

23512351
// Interrupt sharp aiming
23522352
m_SharpAimTimer.Reset();
@@ -2581,7 +2581,7 @@ void ACrab::Update()
25812581

25822582
// Play the stride sound, if applicable
25832583
if (playStride)
2584-
m_StrideSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
2584+
m_StrideSound.Play(m_Pos);
25852585
}
25862586
// JUMPING
25872587
else if ((m_pRFGLeg || m_pRBGLeg) && m_MoveState == JUMP)

Entities/ACrab.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ ENTITYALLOCATION(ACrab)
725725
AtomGroup *m_pRFGFootGroup;
726726
AtomGroup *m_pRBGFootGroup;
727727
// The sound of the actor taking a step (think robot servo)
728-
Sound m_StrideSound;
728+
SoundContainer m_StrideSound;
729729
// Jetpack booster.
730730
AEmitter *m_pJetpack;
731731
// The max total time, in ms, that the jetpack can be used without pause

Entities/ACraft.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ void ACraft::OpenHatch()
591591
m_HatchTimer.Reset();
592592

593593
// PSCHHT
594-
m_HatchOpenSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
594+
m_HatchOpenSound.Play(m_Pos);
595595
}
596596
}
597597

@@ -618,7 +618,7 @@ void ACraft::CloseHatch()
618618
m_NewInventory.clear();
619619

620620
// PSCHHT
621-
m_HatchOpenSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
621+
m_HatchOpenSound.Play(m_Pos);
622622
}
623623
}
624624

@@ -777,7 +777,7 @@ void ACraft::DropAllInventory()
777777
{
778778
if (m_HatchState != OPENING)
779779
{
780-
m_HatchOpenSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
780+
m_HatchOpenSound.Play(m_Pos);
781781
g_MovableMan.RegisterAlarmEvent(AlarmEvent(m_Pos, m_Team, 0.4));
782782
m_HatchTimer.Reset();
783783
}
@@ -846,7 +846,7 @@ void ACraft::Update()
846846
// TODO: HELLA GHETTO, REWORK
847847
if (m_CrashTimer.GetElapsedSimTimeMS() > 500)
848848
{
849-
m_CrashSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
849+
m_CrashSound.Play(m_Pos);
850850
m_CrashTimer.Reset();
851851
}
852852
}
@@ -918,7 +918,7 @@ void ACraft::Update()
918918
m_Status = DYING;
919919
m_HatchState = OPENING;
920920
m_HatchTimer.Reset();
921-
m_HatchOpenSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
921+
m_HatchOpenSound.Play(m_Pos);
922922
}
923923
*/
924924
/////////////////////////////////////////

Entities/ACraft.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ enum
728728
// The time it takes to open or close the hatch, in ms.
729729
int m_HatchDelay;
730730
// Sound for opening the hatch
731-
Sound m_HatchOpenSound;
731+
SoundContainer m_HatchOpenSound;
732732
// The new intermediate inventory of things that have been thrown into the craft while the doors are open,
733733
// but they shouldn't be ejected until the doors are closed and then opened again.
734734
std::deque<MovableObject *> m_NewInventory;
@@ -751,7 +751,7 @@ enum
751751
// Timer to measure how long ago a crash sound was played
752752
Timer m_CrashTimer;
753753
// Crash sound
754-
Sound m_CrashSound;
754+
SoundContainer m_CrashSound;
755755
// The recomended, not absolute, maximum number of actors that fit in the inventory
756756
int m_MaxPassengers;
757757

Entities/ADoor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ ENTITYALLOCATION(ADoor)
604604
// The time it takes to open or close the door, in ms.
605605
int m_DoorMoveTime;
606606
// Sound for opening the hatch
607-
Sound m_DoorOpenSound;
607+
SoundContainer m_DoorOpenSound;
608608
// Whether the clsoed position is the default
609609
bool m_ClosedByDefault;
610610
// How long the door stays in the non-default state before returning to the default

Entities/AEmitter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ void AEmitter::Destroy(bool notInherited)
294294
*/
295295
// Stop playback of sounds gracefully
296296
if (m_EmissionSound.IsBeingPlayed())
297-
m_EndSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
297+
m_EndSound.Play(m_Pos);
298298
else
299299
m_EndSound.Stop();
300300

@@ -434,15 +434,15 @@ void AEmitter::Update()
434434
if (!m_WasEmitting)
435435
{
436436
// Start playing the sound
437-
m_EmissionSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
437+
m_EmissionSound.Play(m_Pos);
438438

439439
// Reset the timers of all emissions so they will start/stop at the correct relative offsets from now
440440
for (list<Emission *>::iterator eItr = m_EmissionList.begin(); eItr != m_EmissionList.end(); ++eItr)
441441
(*eItr)->ResetEmissionTimers();
442442
}
443443
// Update the distance attenuation
444444
else
445-
m_EmissionSound.UpdateAttenuation(g_SceneMan.TargetDistanceScalar(m_Pos));
445+
m_EmissionSound.SetPosition(m_Pos);
446446

447447
// Get the parent root of this AEmitter
448448
// TODO: Potentially get this once outside instead, like in attach/detach")
@@ -461,7 +461,7 @@ void AEmitter::Update()
461461
if (m_BurstTriggered && (m_BurstSpacing <= 0 || m_BurstTimer.IsPastSimMS(m_BurstSpacing)))
462462
{
463463
// Play burst sound
464-
m_BurstSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
464+
m_BurstSound.Play(m_Pos);
465465
// Start timing until next burst
466466
m_BurstTimer.Reset();
467467
}
@@ -617,7 +617,7 @@ void AEmitter::Update()
617617
{
618618
m_EmissionSound.Stop();
619619
m_BurstSound.Stop();
620-
m_EndSound.Play(g_SceneMan.TargetDistanceScalar(m_Pos));
620+
m_EndSound.Play(m_Pos);
621621
m_WasEmitting = false;
622622
}
623623
}

Entities/AEmitter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,9 @@ ENTITYALLOCATION(AEmitter)
635635
// The list of MO instances that get emitted
636636
std::list<Emission *> m_EmissionList;
637637
// Sounds
638-
Sound m_EmissionSound;
639-
Sound m_BurstSound;
640-
Sound m_EndSound;
638+
SoundContainer m_EmissionSound;
639+
SoundContainer m_BurstSound;
640+
SoundContainer m_EndSound;
641641
// Whether emitting is currently enabled or not.
642642
bool m_EmitEnabled;
643643
// Whether or not the it was emitting last frame or not.

0 commit comments

Comments
 (0)