From 9e161a38db5cacac9ae454fa0083ed0f075ac9f4 Mon Sep 17 00:00:00 2001 From: torcs-ng Date: Sat, 13 Oct 2012 17:14:03 +0000 Subject: [PATCH] - fix name in interface sound - ssggraph.h/cpp and grmain.cpp : still some "sound" strings and code in the comments (removed). git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4995 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 29f9a8288ae328401a0bbd42c481190d453f2fb3 Former-commit-id: d7f64f749eb0572366ca48a9d3c066b42db74da8 --- src/interfaces/isoundengine.h | 11 +++++------ src/modules/graphic/ssggraph/grmain.cpp | 7 ------- src/modules/graphic/ssggraph/ssggraph.cpp | 7 ------- src/modules/graphic/ssggraph/ssggraph.h | 8 +++----- src/modules/sound/snddefault/snddefault.cpp | 6 +++--- src/modules/sound/snddefault/snddefault.h | 6 +++--- src/modules/userinterface/legacymenu/legacymenu.cpp | 8 ++++---- 7 files changed, 18 insertions(+), 35 deletions(-) diff --git a/src/interfaces/isoundengine.h b/src/interfaces/isoundengine.h index dca96c0b5..83804951a 100644 --- a/src/interfaces/isoundengine.h +++ b/src/interfaces/isoundengine.h @@ -1,8 +1,8 @@ /*************************************************************************** isoundengine.h -- Interface for sound engines - created : Mon Mar 28 19:48:14 CEST 2011 - copyright : (C) 2011 by Jean-Philippe Meuret + created : Mon Jul 28 19:48:14 CEST 2012 + copyright : (C) 2012 by Gaëtan André web : http://www.speed-dreams.org version : $Id$ ***************************************************************************/ @@ -34,10 +34,9 @@ class ISoundEngine { public: - //virtual void mute(bool bOn = true) = 0; - virtual void initSound(struct Situation* s) = 0; - virtual void shutdownSound() = 0; - virtual void refreshSound(struct Situation *s, SoundCam *camera) = 0; + virtual void init(struct Situation* s) = 0; + virtual void shutdown() = 0; + virtual void refresh(struct Situation *s, SoundCam *camera) = 0; virtual void mute(bool bOn = true) = 0; }; diff --git a/src/modules/graphic/ssggraph/grmain.cpp b/src/modules/graphic/ssggraph/grmain.cpp index f66f51d43..1499342b8 100644 --- a/src/modules/graphic/ssggraph/grmain.cpp +++ b/src/modules/graphic/ssggraph/grmain.cpp @@ -35,7 +35,6 @@ #include "grcar.h" #include "grscreen.h" #include "grscene.h" -//#include "grsound.h" #include "grloadac.h" #include "grutil.h" #include "grcarlight.h" @@ -523,10 +522,6 @@ refresh(tSituation *s) TRACE_GL("refresh: start"); - /*GfProfStartProfile("grRefreshSound*"); - grRefreshSound(s, grGetCurrentScreen()->getCurCamera()); - GfProfStopProfile("grRefreshSound*");*/ - // Moved car collision damage propagation from grcar::grDrawCar. // Because it has to be done only once per graphics update, whereas grDrawCar // is called once for each car and for each screen. @@ -633,7 +628,6 @@ initCars(tSituation *s) // Initialize other stuff. grInitSmoke(s->_ncars); - //grInitSound(s, s->_ncars); grTrackLightInit(); // Setup the screens (= OpenGL viewports) inside the physical game window. @@ -648,7 +642,6 @@ shutdownCars(void) int i; GfOut("-- shutdownCars\n"); - //grShutdownSound(grNbCars); if (grNbCars) { grShutdownBoardCar(); grShutdownSkidmarks(); diff --git a/src/modules/graphic/ssggraph/ssggraph.cpp b/src/modules/graphic/ssggraph/ssggraph.cpp index eb6abf1e3..1cb89bdbc 100644 --- a/src/modules/graphic/ssggraph/ssggraph.cpp +++ b/src/modules/graphic/ssggraph/ssggraph.cpp @@ -22,7 +22,6 @@ #include "ssggraph.h" #include "grmain.h" -//#include "grsound.h" #include "grtexture.h" @@ -119,12 +118,6 @@ void SsgGraph::shutdownView() { ::shutdownView(); } -// Implementation of ISoundEngine **************************************** - -/*void SsgGraph::mute(bool bOn) -{ - ::grMuteSound(bOn); -}*/ SoundCam * SsgGraph::getCurCam() { SoundCam *cam = new SoundCam; diff --git a/src/modules/graphic/ssggraph/ssggraph.h b/src/modules/graphic/ssggraph/ssggraph.h index 6681de4ed..264bbef72 100644 --- a/src/modules/graphic/ssggraph/ssggraph.h +++ b/src/modules/graphic/ssggraph/ssggraph.h @@ -25,7 +25,6 @@ #define _SSGGRAPH_H_ #include -#include #include @@ -49,7 +48,7 @@ extern "C" int SSGGRAPH_API openGfModule(const char* pszShLibName, void* hShLibH extern "C" int SSGGRAPH_API closeGfModule(); // The module main class -// (Singleton, inherits GfModule, and implements IGraphicsEngine and ISoundEngine). +// (Singleton, inherits GfModule, and implements IGraphicsEngine). class SSGGRAPH_API SsgGraph : public GfModule, public IGraphicsEngine { public: @@ -63,10 +62,9 @@ class SSGGRAPH_API SsgGraph : public GfModule, public IGraphicsEngine virtual void shutdownView(); virtual void unloadCars(); virtual void unloadTrack(); - virtual SoundCam *getCurCam(); + virtual SoundCam *getCurCam(); + - // Implementation of ISoundEngine. - //virtual void mute(bool bOn = true); // Accessor to the singleton. static SsgGraph& self(); diff --git a/src/modules/sound/snddefault/snddefault.cpp b/src/modules/sound/snddefault/snddefault.cpp index f4378df37..4d65ea99e 100644 --- a/src/modules/sound/snddefault/snddefault.cpp +++ b/src/modules/sound/snddefault/snddefault.cpp @@ -69,13 +69,13 @@ sndDefault::~sndDefault() // Implementation of ISoundEngine **************************************** -void sndDefault::initSound(Situation* s){ +void sndDefault::init(Situation* s){ grInitSound(s,s->_ncars); } -void sndDefault::shutdownSound(){ +void sndDefault::shutdown(){ grShutdownSound(); } -void sndDefault::refreshSound(Situation *s, SoundCam *camera){ +void sndDefault::refresh(Situation *s, SoundCam *camera){ grRefreshSound(s, camera); } diff --git a/src/modules/sound/snddefault/snddefault.h b/src/modules/sound/snddefault/snddefault.h index b98fa465a..cbe170007 100644 --- a/src/modules/sound/snddefault/snddefault.h +++ b/src/modules/sound/snddefault/snddefault.h @@ -54,9 +54,9 @@ class SNDDEFAULT_API sndDefault : public GfModule, public ISoundEngine { public: - virtual void initSound(Situation* s); - virtual void shutdownSound(); - virtual void refreshSound(Situation *s, SoundCam*camera); + virtual void init(Situation* s); + virtual void shutdown(); + virtual void refresh(Situation *s, SoundCam*camera); virtual void mute(bool bOn = true); // Accessor to the singleton. diff --git a/src/modules/userinterface/legacymenu/legacymenu.cpp b/src/modules/userinterface/legacymenu/legacymenu.cpp index b39cb2531..be76d7f9c 100644 --- a/src/modules/userinterface/legacymenu/legacymenu.cpp +++ b/src/modules/userinterface/legacymenu/legacymenu.cpp @@ -162,7 +162,7 @@ void LegacyMenu::quit() { void LegacyMenu::shutdown() { // Shutdown graphics in case relevant and not already done. if (_piRaceEngine->inData()->_displayMode == RM_DISP_MODE_NORMAL) { - shutdownSound(); + shutdownSound(); unloadCarsGraphics(); shutdownGraphicsView(); unloadTrackGraphics(); @@ -301,7 +301,7 @@ void LegacyMenu::onRaceSimulationReady() { addLoadingMessage("Loading graphics for all cars ..."); loadCarsGraphics(_piRaceEngine->outData()->s); - _piSoundEngine->initSound(_piRaceEngine->outData()->s); + _piSoundEngine->init(_piRaceEngine->outData()->s); } } @@ -530,7 +530,7 @@ void LegacyMenu::redrawGraphicsView(struct Situation* pSituation) { return; _piGraphicsEngine->redrawView(pSituation); - _piSoundEngine->refreshSound(pSituation,_piGraphicsEngine->getCurCam()); + _piSoundEngine->refresh(pSituation,_piGraphicsEngine->getCurCam()); } @@ -539,7 +539,7 @@ void LegacyMenu::shutdownSound() { return; if (_bfGraphicsState & eCarsLoaded) { - _piSoundEngine->shutdownSound(); + _piSoundEngine->shutdown(); } }