- 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
This commit is contained in:
parent
512c1dd5b6
commit
9e161a38db
7 changed files with 18 additions and 35 deletions
|
@ -1,8 +1,8 @@
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
isoundengine.h -- Interface for sound engines
|
isoundengine.h -- Interface for sound engines
|
||||||
|
|
||||||
created : Mon Mar 28 19:48:14 CEST 2011
|
created : Mon Jul 28 19:48:14 CEST 2012
|
||||||
copyright : (C) 2011 by Jean-Philippe Meuret
|
copyright : (C) 2012 by Gaëtan André
|
||||||
web : http://www.speed-dreams.org
|
web : http://www.speed-dreams.org
|
||||||
version : $Id$
|
version : $Id$
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
@ -34,10 +34,9 @@ class ISoundEngine
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//virtual void mute(bool bOn = true) = 0;
|
virtual void init(struct Situation* s) = 0;
|
||||||
virtual void initSound(struct Situation* s) = 0;
|
virtual void shutdown() = 0;
|
||||||
virtual void shutdownSound() = 0;
|
virtual void refresh(struct Situation *s, SoundCam *camera) = 0;
|
||||||
virtual void refreshSound(struct Situation *s, SoundCam *camera) = 0;
|
|
||||||
virtual void mute(bool bOn = true) = 0;
|
virtual void mute(bool bOn = true) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include "grcar.h"
|
#include "grcar.h"
|
||||||
#include "grscreen.h"
|
#include "grscreen.h"
|
||||||
#include "grscene.h"
|
#include "grscene.h"
|
||||||
//#include "grsound.h"
|
|
||||||
#include "grloadac.h"
|
#include "grloadac.h"
|
||||||
#include "grutil.h"
|
#include "grutil.h"
|
||||||
#include "grcarlight.h"
|
#include "grcarlight.h"
|
||||||
|
@ -523,10 +522,6 @@ refresh(tSituation *s)
|
||||||
|
|
||||||
TRACE_GL("refresh: start");
|
TRACE_GL("refresh: start");
|
||||||
|
|
||||||
/*GfProfStartProfile("grRefreshSound*");
|
|
||||||
grRefreshSound(s, grGetCurrentScreen()->getCurCamera());
|
|
||||||
GfProfStopProfile("grRefreshSound*");*/
|
|
||||||
|
|
||||||
// Moved car collision damage propagation from grcar::grDrawCar.
|
// Moved car collision damage propagation from grcar::grDrawCar.
|
||||||
// Because it has to be done only once per graphics update, whereas grDrawCar
|
// Because it has to be done only once per graphics update, whereas grDrawCar
|
||||||
// is called once for each car and for each screen.
|
// is called once for each car and for each screen.
|
||||||
|
@ -633,7 +628,6 @@ initCars(tSituation *s)
|
||||||
|
|
||||||
// Initialize other stuff.
|
// Initialize other stuff.
|
||||||
grInitSmoke(s->_ncars);
|
grInitSmoke(s->_ncars);
|
||||||
//grInitSound(s, s->_ncars);
|
|
||||||
grTrackLightInit();
|
grTrackLightInit();
|
||||||
|
|
||||||
// Setup the screens (= OpenGL viewports) inside the physical game window.
|
// Setup the screens (= OpenGL viewports) inside the physical game window.
|
||||||
|
@ -648,7 +642,6 @@ shutdownCars(void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
GfOut("-- shutdownCars\n");
|
GfOut("-- shutdownCars\n");
|
||||||
//grShutdownSound(grNbCars);
|
|
||||||
if (grNbCars) {
|
if (grNbCars) {
|
||||||
grShutdownBoardCar();
|
grShutdownBoardCar();
|
||||||
grShutdownSkidmarks();
|
grShutdownSkidmarks();
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#include "ssggraph.h"
|
#include "ssggraph.h"
|
||||||
|
|
||||||
#include "grmain.h"
|
#include "grmain.h"
|
||||||
//#include "grsound.h"
|
|
||||||
#include "grtexture.h"
|
#include "grtexture.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,12 +118,6 @@ void SsgGraph::shutdownView() {
|
||||||
::shutdownView();
|
::shutdownView();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implementation of ISoundEngine ****************************************
|
|
||||||
|
|
||||||
/*void SsgGraph::mute(bool bOn)
|
|
||||||
{
|
|
||||||
::grMuteSound(bOn);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
SoundCam * SsgGraph::getCurCam() {
|
SoundCam * SsgGraph::getCurCam() {
|
||||||
SoundCam *cam = new SoundCam;
|
SoundCam *cam = new SoundCam;
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#define _SSGGRAPH_H_
|
#define _SSGGRAPH_H_
|
||||||
|
|
||||||
#include <igraphicsengine.h>
|
#include <igraphicsengine.h>
|
||||||
#include <isoundengine.h>
|
|
||||||
|
|
||||||
#include <tgf.hpp>
|
#include <tgf.hpp>
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ extern "C" int SSGGRAPH_API openGfModule(const char* pszShLibName, void* hShLibH
|
||||||
extern "C" int SSGGRAPH_API closeGfModule();
|
extern "C" int SSGGRAPH_API closeGfModule();
|
||||||
|
|
||||||
// The module main class
|
// 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
|
class SSGGRAPH_API SsgGraph : public GfModule, public IGraphicsEngine
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -63,10 +62,9 @@ class SSGGRAPH_API SsgGraph : public GfModule, public IGraphicsEngine
|
||||||
virtual void shutdownView();
|
virtual void shutdownView();
|
||||||
virtual void unloadCars();
|
virtual void unloadCars();
|
||||||
virtual void unloadTrack();
|
virtual void unloadTrack();
|
||||||
virtual SoundCam *getCurCam();
|
virtual SoundCam *getCurCam();
|
||||||
|
|
||||||
|
|
||||||
// Implementation of ISoundEngine.
|
|
||||||
//virtual void mute(bool bOn = true);
|
|
||||||
|
|
||||||
// Accessor to the singleton.
|
// Accessor to the singleton.
|
||||||
static SsgGraph& self();
|
static SsgGraph& self();
|
||||||
|
|
|
@ -69,13 +69,13 @@ sndDefault::~sndDefault()
|
||||||
|
|
||||||
// Implementation of ISoundEngine ****************************************
|
// Implementation of ISoundEngine ****************************************
|
||||||
|
|
||||||
void sndDefault::initSound(Situation* s){
|
void sndDefault::init(Situation* s){
|
||||||
grInitSound(s,s->_ncars);
|
grInitSound(s,s->_ncars);
|
||||||
}
|
}
|
||||||
void sndDefault::shutdownSound(){
|
void sndDefault::shutdown(){
|
||||||
grShutdownSound();
|
grShutdownSound();
|
||||||
}
|
}
|
||||||
void sndDefault::refreshSound(Situation *s, SoundCam *camera){
|
void sndDefault::refresh(Situation *s, SoundCam *camera){
|
||||||
grRefreshSound(s, camera);
|
grRefreshSound(s, camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ class SNDDEFAULT_API sndDefault : public GfModule, public ISoundEngine
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void initSound(Situation* s);
|
virtual void init(Situation* s);
|
||||||
virtual void shutdownSound();
|
virtual void shutdown();
|
||||||
virtual void refreshSound(Situation *s, SoundCam*camera);
|
virtual void refresh(Situation *s, SoundCam*camera);
|
||||||
virtual void mute(bool bOn = true);
|
virtual void mute(bool bOn = true);
|
||||||
|
|
||||||
// Accessor to the singleton.
|
// Accessor to the singleton.
|
||||||
|
|
|
@ -162,7 +162,7 @@ void LegacyMenu::quit() {
|
||||||
void LegacyMenu::shutdown() {
|
void LegacyMenu::shutdown() {
|
||||||
// Shutdown graphics in case relevant and not already done.
|
// Shutdown graphics in case relevant and not already done.
|
||||||
if (_piRaceEngine->inData()->_displayMode == RM_DISP_MODE_NORMAL) {
|
if (_piRaceEngine->inData()->_displayMode == RM_DISP_MODE_NORMAL) {
|
||||||
shutdownSound();
|
shutdownSound();
|
||||||
unloadCarsGraphics();
|
unloadCarsGraphics();
|
||||||
shutdownGraphicsView();
|
shutdownGraphicsView();
|
||||||
unloadTrackGraphics();
|
unloadTrackGraphics();
|
||||||
|
@ -301,7 +301,7 @@ void LegacyMenu::onRaceSimulationReady() {
|
||||||
addLoadingMessage("Loading graphics for all cars ...");
|
addLoadingMessage("Loading graphics for all cars ...");
|
||||||
|
|
||||||
loadCarsGraphics(_piRaceEngine->outData()->s);
|
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;
|
return;
|
||||||
|
|
||||||
_piGraphicsEngine->redrawView(pSituation);
|
_piGraphicsEngine->redrawView(pSituation);
|
||||||
_piSoundEngine->refreshSound(pSituation,_piGraphicsEngine->getCurCam());
|
_piSoundEngine->refresh(pSituation,_piGraphicsEngine->getCurCam());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ void LegacyMenu::shutdownSound() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_bfGraphicsState & eCarsLoaded) {
|
if (_bfGraphicsState & eCarsLoaded) {
|
||||||
_piSoundEngine->shutdownSound();
|
_piSoundEngine->shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue