From: <la...@us...> - 2011-06-17 06:03:16
|
Revision: 7424 http://planeshift.svn.sourceforge.net/planeshift/?rev=7424&view=rev Author: landson Date: 2011-06-17 06:03:05 +0000 (Fri, 17 Jun 2011) Log Message: ----------- Merged with trunk Modified Paths: -------------- soc/2011/combat/configure.ac soc/2011/combat/data/gui/charcreate.xml soc/2011/combat/data/gui/charpick.xml soc/2011/combat/data/gui/gmspawn.xml soc/2011/combat/data/gui/inventory.xml soc/2011/combat/data/gui/petstatwindow.xml soc/2011/combat/data/gui/skillwindow.xml soc/2011/combat/data/gui/summary.xml soc/2011/combat/docs/credit.txt soc/2011/combat/eedit.cfg soc/2011/combat/include/ibgloader.h soc/2011/combat/include/isoundmngr.h soc/2011/combat/mk/msvc10/plgdbmysql.vcxproj soc/2011/combat/npcclient.cfg soc/2011/combat/pawseditor.cfg soc/2011/combat/psclient.cfg soc/2011/combat/pslaunch.cfg soc/2011/combat/src/client/Jamfile soc/2011/combat/src/client/cmdadmin.cpp soc/2011/combat/src/client/cmdutil.cpp soc/2011/combat/src/client/gui/chatwindow.cpp soc/2011/combat/src/client/gui/pawscharcreatemain.cpp soc/2011/combat/src/client/gui/pawscharpick.cpp soc/2011/combat/src/client/gui/pawsconfigsound.cpp soc/2011/combat/src/client/gui/pawsconfigtooltips.cpp soc/2011/combat/src/client/gui/pawsconfigtooltips.h soc/2011/combat/src/client/gui/pawscreditswindow.cpp soc/2011/combat/src/client/gui/pawsloginwindow.cpp soc/2011/combat/src/client/gui/pawspetitiongmwindow.cpp soc/2011/combat/src/client/gui/pawsslot.cpp soc/2011/combat/src/client/modehandler.cpp soc/2011/combat/src/client/pscelclient.h soc/2011/combat/src/client/psclientchar.cpp soc/2011/combat/src/client/psengine.cpp soc/2011/combat/src/client/psengine.h soc/2011/combat/src/client/psslotmgr.cpp soc/2011/combat/src/client/weather.cpp soc/2011/combat/src/common/effects/pseffectmanager.cpp soc/2011/combat/src/common/effects/pseffectmanager.h soc/2011/combat/src/common/effects/pseffectobjsound.cpp soc/2011/combat/src/common/effects/pseffectobjsound.h soc/2011/combat/src/common/paws/Jamfile soc/2011/combat/src/common/paws/pawsbutton.cpp soc/2011/combat/src/common/paws/pawsmanager.cpp soc/2011/combat/src/common/paws/pawsmanager.h soc/2011/combat/src/common/paws/pawsobjectview.cpp soc/2011/combat/src/common/util/pscssetup.h soc/2011/combat/src/common/util/strutil.cpp soc/2011/combat/src/common/util/strutil.h soc/2011/combat/src/eedit/Jamfile soc/2011/combat/src/eedit/eeditapp.cpp soc/2011/combat/src/eedit/eeditapp.h soc/2011/combat/src/npcclient/Jamfile soc/2011/combat/src/npcclient/main.cpp soc/2011/combat/src/npcclient/npcclient.cpp soc/2011/combat/src/plugins/common/Jamfile soc/2011/combat/src/plugins/common/bgloader/loader.h soc/2011/combat/src/plugins/common/bgloader/parser.cpp soc/2011/combat/src/plugins/common/recast/celnavmesh.cpp soc/2011/combat/src/plugins/database/postgresql/dal.h soc/2011/combat/src/pslaunch/Jamfile soc/2011/combat/src/pslaunch/pawslauncherwindow.cpp soc/2011/combat/src/pslaunch/pslaunch.cpp soc/2011/combat/src/pslaunch/pslaunch.h soc/2011/combat/src/pslaunch/updaterengine.h soc/2011/combat/src/server/entitymanager.cpp soc/2011/combat/src/server/lootrandomizer.cpp soc/2011/combat/src/server/psserver.cpp soc/2011/combat/src/tools/fparser/docs/fparser.html soc/2011/combat/src/tools/fparser/fparser.cpp soc/2011/combat/src/tools/fparser/fparser.h soc/2011/combat/src/tools/fparser/fparser_gmpint.h soc/2011/combat/src/tools/fparser/fparser_mpfr.h soc/2011/combat/src/tools/fparser/fpconfig.h soc/2011/combat/src/tools/fparser/fpoptimizer.cpp soc/2011/combat/src/tools/navgen/navgen.cpp soc/2011/combat/src/tools/pawseditor/Jamfile soc/2011/combat/src/tools/pawseditor/pawseditorapp.cpp soc/2011/combat/src/worldeditor/Jamfile soc/2011/combat/src/worldeditor/worldeditor.cpp soc/2011/combat/worldeditor.cfg Added Paths: ----------- soc/2011/combat/include/isoundctrl.h soc/2011/combat/src/plugins/common/dummysndmngr/ soc/2011/combat/src/plugins/common/dummysndmngr/Jamfile soc/2011/combat/src/plugins/common/dummysndmngr/dummysndctrl.cpp soc/2011/combat/src/plugins/common/dummysndmngr/dummysndctrl.h soc/2011/combat/src/plugins/common/dummysndmngr/dummysndmngr.cpp soc/2011/combat/src/plugins/common/dummysndmngr/dummysndmngr.csplugin soc/2011/combat/src/plugins/common/dummysndmngr/dummysndmngr.h soc/2011/combat/src/plugins/common/soundmanager/ soc/2011/combat/src/plugins/common/soundmanager/Jamfile soc/2011/combat/src/plugins/common/soundmanager/data.cpp soc/2011/combat/src/plugins/common/soundmanager/data.h soc/2011/combat/src/plugins/common/soundmanager/handle.cpp soc/2011/combat/src/plugins/common/soundmanager/handle.h soc/2011/combat/src/plugins/common/soundmanager/manager.cpp soc/2011/combat/src/plugins/common/soundmanager/manager.h soc/2011/combat/src/plugins/common/soundmanager/psemitter.cpp soc/2011/combat/src/plugins/common/soundmanager/psemitter.h soc/2011/combat/src/plugins/common/soundmanager/psentity.cpp soc/2011/combat/src/plugins/common/soundmanager/psentity.h soc/2011/combat/src/plugins/common/soundmanager/psmusic.cpp soc/2011/combat/src/plugins/common/soundmanager/psmusic.h soc/2011/combat/src/plugins/common/soundmanager/pssound.h soc/2011/combat/src/plugins/common/soundmanager/pssoundsector.cpp soc/2011/combat/src/plugins/common/soundmanager/pssoundsector.h soc/2011/combat/src/plugins/common/soundmanager/queue.cpp soc/2011/combat/src/plugins/common/soundmanager/queue.h soc/2011/combat/src/plugins/common/soundmanager/sound.h soc/2011/combat/src/plugins/common/soundmanager/soundctrl.cpp soc/2011/combat/src/plugins/common/soundmanager/soundctrl.h soc/2011/combat/src/plugins/common/soundmanager/soundmanager.cpp soc/2011/combat/src/plugins/common/soundmanager/soundmanager.h soc/2011/combat/src/plugins/common/soundmanager/soundmngr.csplugin soc/2011/combat/src/plugins/common/soundmanager/system.cpp soc/2011/combat/src/plugins/common/soundmanager/system.h soc/2011/combat/src/tools/fparser/extrasrc/ soc/2011/combat/src/tools/fparser/extrasrc/fp_identifier_parser.inc soc/2011/combat/src/tools/fparser/extrasrc/fp_opcode_add.inc soc/2011/combat/src/tools/fparser/extrasrc/fpaux.h soc/2011/combat/src/tools/fparser/extrasrc/fptypes.h Removed Paths: ------------- soc/2011/combat/src/plugins/common/dummysndmngr/Jamfile soc/2011/combat/src/plugins/common/dummysndmngr/dummysndctrl.cpp soc/2011/combat/src/plugins/common/dummysndmngr/dummysndctrl.h soc/2011/combat/src/plugins/common/dummysndmngr/dummysndmngr.cpp soc/2011/combat/src/plugins/common/dummysndmngr/dummysndmngr.csplugin soc/2011/combat/src/plugins/common/dummysndmngr/dummysndmngr.h soc/2011/combat/src/plugins/common/soundmanager/Jamfile soc/2011/combat/src/plugins/common/soundmanager/data.cpp soc/2011/combat/src/plugins/common/soundmanager/data.h soc/2011/combat/src/plugins/common/soundmanager/handle.cpp soc/2011/combat/src/plugins/common/soundmanager/handle.h soc/2011/combat/src/plugins/common/soundmanager/manager.cpp soc/2011/combat/src/plugins/common/soundmanager/manager.h soc/2011/combat/src/plugins/common/soundmanager/psemitter.cpp soc/2011/combat/src/plugins/common/soundmanager/psemitter.h soc/2011/combat/src/plugins/common/soundmanager/psentity.cpp soc/2011/combat/src/plugins/common/soundmanager/psentity.h soc/2011/combat/src/plugins/common/soundmanager/psmusic.cpp soc/2011/combat/src/plugins/common/soundmanager/psmusic.h soc/2011/combat/src/plugins/common/soundmanager/pssound.h soc/2011/combat/src/plugins/common/soundmanager/pssoundsector.cpp soc/2011/combat/src/plugins/common/soundmanager/pssoundsector.h soc/2011/combat/src/plugins/common/soundmanager/queue.cpp soc/2011/combat/src/plugins/common/soundmanager/queue.h soc/2011/combat/src/plugins/common/soundmanager/sound.h soc/2011/combat/src/plugins/common/soundmanager/soundctrl.cpp soc/2011/combat/src/plugins/common/soundmanager/soundctrl.h soc/2011/combat/src/plugins/common/soundmanager/soundmanager.cpp soc/2011/combat/src/plugins/common/soundmanager/soundmanager.h soc/2011/combat/src/plugins/common/soundmanager/soundmngr.csplugin soc/2011/combat/src/plugins/common/soundmanager/system.cpp soc/2011/combat/src/plugins/common/soundmanager/system.h soc/2011/combat/src/tools/fparser/extrasrc/fp_identifier_parser.inc soc/2011/combat/src/tools/fparser/extrasrc/fp_opcode_add.inc soc/2011/combat/src/tools/fparser/extrasrc/fpaux.h soc/2011/combat/src/tools/fparser/extrasrc/fptypes.h soc/2011/combat/src/tools/fparser/fp_identifier_parser.inc soc/2011/combat/src/tools/fparser/fp_opcode_add.inc soc/2011/combat/src/tools/fparser/fpaux.h soc/2011/combat/src/tools/fparser/fptypes.h Property Changed: ---------------- soc/2011/combat/data/renderlayers/ soc/2011/combat/data/shader/ soc/2011/combat/lang/1337/ soc/2011/combat/lang/englishtemplate/ soc/2011/combat/lang/french/ soc/2011/combat/lang/italian/ soc/2011/combat/src/tools/ccheck/ Modified: soc/2011/combat/configure.ac =================================================================== --- soc/2011/combat/configure.ac 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/configure.ac 2011-06-17 06:03:05 UTC (rev 7424) @@ -11,7 +11,7 @@ #---------------------------------------------------------------------------- # Initialize autoconf #---------------------------------------------------------------------------- -AC_INIT([PlaneShift], [0.5.7], [http://www.hydlaaplaza.com/flyspray/]) +AC_INIT([PlaneShift], [0.5.7.2], [http://www.hydlaaplaza.com/flyspray/]) CS_PACKAGEINFO([PlaneShift a 3d MMORPG], [Copyright (C)2001-2011 Atomic Blue], [http://www.planeshift.it/]) Modified: soc/2011/combat/data/gui/charcreate.xml =================================================================== --- soc/2011/combat/data/gui/charcreate.xml 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/data/gui/charcreate.xml 2011-06-17 06:03:05 UTC (rev 7424) @@ -30,7 +30,7 @@ <widget name="ModelView" factory="pawsObjectView"> <frame x="94" y="98" width="306" height="424" border="no" /> <mask resource="charborder"/> - <map file="podium" sector="room"/> + <map file="podium" sector="podium"/> <distance value="3.0"/> <cameramod x="-0.025" y="1.0" z="0.0"/> </widget> Modified: soc/2011/combat/data/gui/charpick.xml =================================================================== --- soc/2011/combat/data/gui/charpick.xml 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/data/gui/charpick.xml 2011-06-17 06:03:05 UTC (rev 7424) @@ -47,7 +47,7 @@ <widget name="PaperDollView" factory="pawsObjectView"> <frame x="94" y="98" width="306" height="424" border="no" /> <mask resource="charborder"/> - <map file="podium" sector="room"/> + <map file="podium" sector="podium"/> <distance value="3.0"/> <cameramod x="-0.025" y="1.0" z="0.0"/> </widget> Modified: soc/2011/combat/data/gui/gmspawn.xml =================================================================== --- soc/2011/combat/data/gui/gmspawn.xml 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/data/gui/gmspawn.xml 2011-06-17 06:03:05 UTC (rev 7424) @@ -6,7 +6,7 @@ <widget name="ItemView" factory="pawsObjectView"> <frame x="300" y="10" width="200" height="200" border="yes" /> - <map file="podium" sector="room" /> + <map file="podium" sector="podium" /> <distance value="3"/> </widget> Modified: soc/2011/combat/data/gui/inventory.xml =================================================================== --- soc/2011/combat/data/gui/inventory.xml 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/data/gui/inventory.xml 2011-06-17 06:03:05 UTC (rev 7424) @@ -107,7 +107,7 @@ <widget name="InventoryDoll" factory="pawsInventoryDollView" > <frame x="50" y="50" width="148" height="180" border="no"/> <!--<mask resource="invborder" />--> - <map file="podium" sector="room" /> + <map file="podium" sector="podium" /> <distance value="3.0"/> <cameramod x="-0.025" y="1.0" z="0.0"/> <subscriptions> Modified: soc/2011/combat/data/gui/petstatwindow.xml =================================================================== --- soc/2011/combat/data/gui/petstatwindow.xml 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/data/gui/petstatwindow.xml 2011-06-17 06:03:05 UTC (rev 7424) @@ -93,7 +93,7 @@ <!--Doll--> <widget name="Doll" factory="pawsObjectView" > <frame x="285" y="31" width="113" height="171" border="no"/> - <map file="podium" sector="room" /> + <map file="podium" sector="podium" /> <distance value="7"/> <subscriptions> <subscribe data="sigActorUpdate" /> Modified: soc/2011/combat/data/gui/skillwindow.xml =================================================================== --- soc/2011/combat/data/gui/skillwindow.xml 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/data/gui/skillwindow.xml 2011-06-17 06:03:05 UTC (rev 7424) @@ -103,7 +103,7 @@ <!-- Doll --> <widget name="Doll" factory="pawsInventoryDollView" visible="no"> <frame x="0" y="0" width="0" height="0" border="no"/> - <map file="podium" sector="room" /> + <map file="podium" sector="podium" /> <distance value="7"/> <subscriptions> <subscribe data="sigActorUpdate" /> Modified: soc/2011/combat/data/gui/summary.xml =================================================================== --- soc/2011/combat/data/gui/summary.xml 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/data/gui/summary.xml 2011-06-17 06:03:05 UTC (rev 7424) @@ -121,7 +121,7 @@ <widget name="ModelView" factory="pawsObjectView"> <frame x="300" y="106" width="150" height="247" border="no" /> <mask resource="charborder2"/> - <map file="podium" sector="room"/> + <map file="podium" sector="podium"/> <distance value="5.0"/> <cameramod x="-0.025" y="1.0" z="0.0"/> </widget> Property changes on: soc/2011/combat/data/renderlayers ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/data/renderlayers:7178-7341 + /soc/2011/sound/data/renderlayers:7354,7363,7366-7367,7369,7373-7374,7376,7380,7382-7384,7386,7390,7392-7393,7396,7398-7399 /trunk/data/renderlayers:7178-7423 Property changes on: soc/2011/combat/data/shader ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/data/shader:7178-7341 + /soc/2011/sound/data/shader:7354,7363,7366-7367,7369,7373-7374,7376,7380,7382-7384,7386,7390,7392-7393,7396,7398-7399 /trunk/data/shader:7178-7423 Modified: soc/2011/combat/docs/credit.txt =================================================================== --- soc/2011/combat/docs/credit.txt 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/docs/credit.txt 2011-06-17 06:03:05 UTC (rev 7424) @@ -1,4 +1,4 @@ -@PlaneShift Team at Arcane Chrysalis 0.5.6 Release (released February 2010) +@PlaneShift Team at Arcane Chrysalis 0.5.7 Release (released June 2011) &Project Leader, Director @@ -12,12 +12,12 @@ &Client and Server engine +Stefano "weltall" Angeleri, for massive amounts of bug hunting and bug fixing, feature request implementation, and the loan of his personal server for testing. + Andrew "Acraig" Craig, for client gui foundation, char creation screens, equipment, inventory, overall coordination ... Michael "Xordan" Gist, for a new updater system and game launcher, a background loader, graphical enhancements, many performance improvements and more... -Stefano "weltall" Angeleri, for massive amounts of bug hunting and bug fixing, feature request implementation, and the loan of his personal server for testing. - Anders "Magodra" Reggestad, for magic system implementation, NPC AI, tribes and a lot more. @@ -43,7 +43,7 @@ Christophe "Nynn" Lehay, for player skins, robes, items, and more. -Joel "Xoel" McLeay, for the modeling of Dsar Kore. +Joel "Xoel" McLeay, for the modeling of Dsar Kore and Ojaveda guild. &Game Masters @@ -76,10 +76,10 @@ &Testing Team +Fr\xE9d\xE9ric "f-rd" Delcorso, for testing many bugs and making even weird ones reproducible. + Bas "Lanarel" van den Broek, for leading the testing team, helping out with many issues, and fixing and closing many bugs. -Fr\xE9d\xE9ric "f-rd" Delcorso, for testing many bugs and making even weird ones reproducible. - Mario "LigH" Rohkrämer, for reporting and testing many art bugs, and work on bug prevention. Modified: soc/2011/combat/eedit.cfg =================================================================== --- soc/2011/combat/eedit.cfg 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/eedit.cfg 2011-06-17 06:03:05 UTC (rev 7424) @@ -86,6 +86,10 @@ System.Plugins.iBgLoader = crystalspace.bgloader +; Planeshift plugins +System.Plugins.iSoundManager = crystalspace.planeshift.sound.soundmngr +;System.Plugins.iSoundManager = crystalspace.planeshift.sound.dummy + ; ****************** ; * Part 2: Config * ; ****************** Modified: soc/2011/combat/include/ibgloader.h =================================================================== --- soc/2011/combat/include/ibgloader.h 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/include/ibgloader.h 2011-06-17 06:03:05 UTC (rev 7424) @@ -52,7 +52,7 @@ */ struct iBgLoader : public virtual iBase { - SCF_INTERFACE(iBgLoader, 2, 2, 0); + SCF_INTERFACE(iBgLoader, 2, 3, 0); /** * Start loading a material into the engine. Check return for finished state/success. @@ -85,12 +85,10 @@ * Pass a data file to be cached. This method will parse your data and add it to it's * internal world representation. You may then request that these objects are loaded. * @param path path to the file to be cached. - * @param recursive Mark true if this is a recursive call (no vfs chdir needed). - * If you don't know, set this to false. * This call will be dispatched to a thread, so it will return immediately. * You should wait for parsing to finish before calling UpdatePosition(). */ - THREADED_INTERFACE2(PrecacheData, const char* path, bool recursive); + THREADED_INTERFACE1(PrecacheData, const char* path); /** * Clean up any intermediate data that was required parse time. Copied: soc/2011/combat/include/isoundctrl.h (from rev 7423, trunk/include/isoundctrl.h) =================================================================== --- soc/2011/combat/include/isoundctrl.h (rev 0) +++ soc/2011/combat/include/isoundctrl.h 2011-06-17 06:03:05 UTC (rev 7424) @@ -0,0 +1,108 @@ +/* +* isoundctrl.h, Author: Andrea Rizzi <88w...@gm...> +* +* Copyright (C) 2001-2011 Atomic Blue (in...@pl..., http://www.atomicblue.org) +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation (version 2 of the License) +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +*/ + +#ifndef _ISOUNDCONTROL_H_ +#define _ISOUNDCONTROL_H_ + + +/** This interface defines the sound controller used by the application. + * + * The API allows the user to control the volume and the state of a group + * of sounds. The user can define a different SoundControl for each type + * of sound is needed to be controlled differently. For example one can + * use a SoundControl to manage voices and another one for the GUI's sounds. + * + * @see iSoundManager creates SoundControls. + */ +struct iSoundControl +{ + /** + * Every SoundControl has a type as defined in this enum. There are two + * special types: AMBIENT and MUSIC that control the ambient and the music + * sounds respectively. There can be only one SoundControl of these two + * types at the same time while there can be an unlimited number of sound + * controllers with type NORMAL. + */ + enum SndCtrlType + { + NORMAL, + AMBIENT, + MUSIC + }; + + /** + * Get the SoundControl's ID. + * @return the Soundcontrol's ID. + */ + virtual int GetID() const = 0; + + /** + * Get the SoundControl's type. + * @return the SoundControl's type. + */ + virtual int GetType() const = 0; + + /** + * Get the current volume of the sounds controlled by this SoundControl. + * @return the volume as a float. + */ + virtual float GetVolume() const = 0; + + /** + * Set the volume of the sounds controlled by this SoundControl. + * @param vol the volume to be set. + */ + virtual void SetVolume(float vol) = 0; + + /** + * Unmute sounds controlled by this SoundControl. + */ + virtual void Unmute() = 0; + + /** + * Mute sounds controlled by this SoundControl. + */ + virtual void Mute() = 0; + + /** + * Get the current Toggle state. + * @return true if sounds controlled by this SoundControl are activated, + * false otherwise. + */ + virtual bool GetToggle() const = 0; + + /** + * Set the current Toggle state. + * @param toggle true to activate the sounds controlled by this SoundControl, + * false otherwise. + */ + virtual void SetToggle(bool toggle) = 0; + + /** + * Deactivate sounds controlled by this SoundControl. + */ + virtual void DeactivateToggle() = 0; + + /** + * Activate sounds controlled by this SoundControl. + */ + virtual void ActivateToggle() = 0; +}; + +#endif // _ISOUNDCONTROL_H_ Modified: soc/2011/combat/include/isoundmngr.h =================================================================== --- soc/2011/combat/include/isoundmngr.h 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/include/isoundmngr.h 2011-06-17 06:03:05 UTC (rev 7424) @@ -1,212 +1,369 @@ /* - * isoundmngr.h -- Saul Leite <le...@en...> - * - * Copyright (C) 2001 PlaneShift Team (in...@pl..., - * http://www.planeshift.it) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation (version 2 of the License) - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - */ -#ifndef I_SOUND_H -#define I_SOUND_H +* isoundmngr.h, Author: Andrea Rizzi <88w...@gm...> +* +* Copyright (C) 2001-2011 Atomic Blue (in...@pl..., http://www.atomicblue.org) +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation (version 2 of the License) +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +*/ +#ifndef _ISOUNDMANAGER_H_ +#define _ISOUNDMANAGER_H_ - +//==================================================================================== +// Crystal Space Includes +//==================================================================================== #include <csutil/scf.h> -#include <csutil/csstring.h> -#include <iengine/engine.h> +#include <csutil/scf_implementation.h> +//==================================================================================== +// Local Includes +//==================================================================================== +#include "isoundctrl.h" -#include "isndsys/ss_structs.h" -#include "isndsys/ss_source.h" -#include "isndsys/ss_stream.h" -#include "isndsys/ss_loader.h" -#include "isndsys/ss_renderer.h" -#include "isndsys/ss_listener.h" -#include "isndsys/ss_data.h" +//------------------------------------------------------------------------------------ +// Forward Declarations +//------------------------------------------------------------------------------------ +struct iView; +class csVector3; -// A few helper macros which were used during conversion to the new system -// these can all be migrated out of source code and then undefined as convenient -#define SOUND_STREAM_TYPE iSndSysStream -#define SOUND_SOURCE_TYPE iSndSysSource -#define SOUND_SOURCE3D_TYPE iSndSysSource3D -#define SOUND_LOADER_TYPE iSndSysLoader -#define SOUND_RENDER_TYPE iSndSysRenderer -#define SOUND_LISTENER_TYPE iSndSysListener -#define SOUND_DATA_TYPE iSndSysData - -enum Fade_Direction +/** This interface defines a sound manager. + * + * The sound manager controls all the sound related aspects. It manages the + * background music and the ambient sounds and it handles the music changes + * when crossing between sectors or entrying in combat mode for example. + * + * The sound manager can be used to play a sound. + */ +struct iSoundManager: public virtual iBase { - FADE_UP, - FADE_DOWN -}; + SCF_INTERFACE(iSoundManager, 1, 0, 0); + /** + * The sound manager initializes by default the SoundControls with the IDs + * in this enum. AMBIENT_SNDCTRL and MUSIC_SNDCTRL have type AMBIENT and + * MUSIC respectively. + */ + enum SndCtrlID + { + AMBIENT_SNDCTRL , + MUSIC_SNDCTRL, + VOICE_SNDCTRL, + ACTION_SNDCTRL, + EFFECT_SNDCTRL, + GUI_SNDCTRL + }; -struct iView; + /** + * The sound manager initialize by default the queues with the IDs specified + * in this enum. + */ + enum QueueID + { + VOICE_QUEUE + }; -struct iSoundManager : public virtual iBase -{ - SCF_INTERFACE(iSoundManager, 0, 0, 1); - - enum + /** + * In this enum are listed the possible state of a player. + */ + enum CombatStance { - NO_LOOP = 0, - LOOP_SOUND = 1 + PEACE, + COMBAT, + DEAD }; - /// Load soundlib.xml into memory and initialize the sound renderer. - virtual bool Setup() = 0; - virtual void ChangeTimeOfDay( int newTime ) = 0; + //------------------// + // SECTORS MANAGING // + //------------------// - /// Get current volume of renderer, between 0 and 1. - virtual float GetVolume() =0; + /** + * Load the sectors information into memory. If this method is not called + * the other sector related methods have no effects. If one does not need + * the sectors' features this method is not necessary. + * + * @return true if the sectors are loaded correctly, false otherwise. + */ + virtual bool InitializeSectors() = 0; - /// Set current volume of renderer, between 0 and 1. - virtual void SetVolume(float vol) =0; + /** + * Set the sector indicated as the current one. It is neither necessary nor + * suggested to unload the previous active sector with UnloadActiveSector() + * because the transition would result less smooth. + * + * The method uses the information about the sector to manage the music and + * the ambient's sounds. If the sector has not been loaded properly with + * InitializeSectors(), the method does nothing. + * + * @param sector the sector's name. + */ + virtual void LoadActiveSector(const char* sector) = 0; - /// Get current volume of renderer, between 0 and 1. - virtual float GetMusicVolume() =0; + /** + * Unload the current active sector. The method stops both the music and all + * the ambient's sounds. + */ + virtual void UnloadActiveSector() = 0; - /// Set current volume of renderer, between 0 and 1. - virtual void SetMusicVolume(float vol) =0; + /** + * Reload all the sectors information in the memory. + */ + virtual void ReloadSectors() = 0; - /// Get current volume of renderer, between 0 and 1. - virtual float GetAmbientVolume() =0; + //-------------------------// + // SOUND CONTROLS MANAGING // + //-------------------------// - /// Set current volume of renderer, between 0 and 1. - virtual void SetAmbientVolume(float vol) =0; + /** + * Create and return a new SoundControl with the indicated ID and type. If a + * SoundControl with the same ID already exists nothing happens. To use a + * SoundControl with the same ID of an existing one, it must be first removed + * with RemoveSndCtrl(iSoundControl* sndCtrl). + * + * Only one SoundControl of type AMBIENT or MUSIC can exist at the same time. + * If an ambient(music) sound control already exists and the user tries to + * create a new SoundControl with the same type, the previous ambient(music) + * SoundControl's type becomes NORMAL. + * + * @see iSoundControl::SndCtrl_Type for more information about types. + * @param ctrlID the new SoundControl's identifier. + * @param type the new SoundControl's type. + * @return a pointer to the new SoundControl or a null pointer if a sound + * controller with the same ID already exists. + */ + virtual iSoundControl* AddSndCtrl(int ctrlID, int type) = 0; - /// Get current volume of renderer, between 0 and 1. - virtual float GetActionsVolume() =0; + /** + * Remove a SoundControl. + * @param sndCtrl the SoundControl to be removed. + */ + virtual void RemoveSndCtrl(iSoundControl* sndCtrl) = 0; - /// Set current volume of renderer, between 0 and 1. - virtual void SetActionsVolume(float vol) =0; + /** + * Get the SoundControl with the given ID. + * @param ctrlID the SoundControl's ID. + * @return the sound controller with that ID. + */ + virtual iSoundControl* GetSndCtrl(int ctrlID) = 0; - /// Get current volume of renderer, between 0 and 1. - virtual float GetGUIVolume() =0; + /** + * Get the main SoundControl that affects the overall volume and the sound's + * general state. + * @return the main SoundControl. + */ + virtual iSoundControl* GetMainSndCtrl() = 0; - /// Set current volume of renderer, between 0 and 1. - virtual void SetGUIVolume(float vol) =0; + //-----------------// + // QUEUES MANAGING // + //-----------------// - /// Get current volume of renderer, between 0 and 1. - virtual float GetVoicesVolume() =0; + /** + * Create a new sound queue with the given ID. The sounds of the queue are + * played with first-in-first-out order and they are controlled by the given + * SoundControl. + * + * If a queue with the same ID already exists nothing happens. To create a + * new queue with its same ID one has to remove the old one with the method + * RemoveSndQueue(int queueID). + * + * @param queueID the queue's ID. + * @param sndCtrl the SoundControl of the queue's sounds. + * @return true if the queue is created, false if another one with the same + * ID already exists. + */ + virtual bool AddSndQueue(int queueID, iSoundControl* sndCtrl) = 0; - /// Set current volume of renderer, between 0 and 1. - virtual void SetVoicesVolume(float vol) =0; + /** + * Remove the queue with the given ID. + * @param queueID the queue's ID. + */ + virtual void RemoveSndQueue(int queueID) = 0; /** - * Play a named sound and optionally loop it. If it is looped, - * the caller must save the csRef returned by this function and - * call Stop() later itself. + * Push a new sound in the queue with the given ID. The sound is played when + * all the item pushed before it have been played. + * + * @param queueID the queue's ID. + * @param fileName the file's name of the sound to play. + * @return true if a queue with that ID exists, false otherwise. */ - virtual csRef<SOUND_SOURCE_TYPE> StartMusicSound(const char* name,bool loop = NO_LOOP) = 0; - virtual csRef<SOUND_SOURCE_TYPE> StartAmbientSound(const char* name,bool loop = NO_LOOP) = 0; - virtual csRef<SOUND_SOURCE_TYPE> StartActionsSound(const char* name,bool loop = NO_LOOP) = 0; - virtual csRef<SOUND_SOURCE_TYPE> StartGUISound(const char* name,bool loop = NO_LOOP) = 0; - virtual csRef<SOUND_SOURCE_TYPE> StartVoiceSound(const char* name,bool loop = NO_LOOP) = 0; + virtual bool PushQueueItem(int queueID, const char* fileName) = 0; - // Playback of GUI sounds can also be performed through the PawsManager. + //----------------// + // STATE MANAGING // + //----------------// - // This one used to be the main one. Please avoid unless necessary. - virtual csRef<SOUND_SOURCE_TYPE> StartSound(const char* name,float volume,bool loop = NO_LOOP) = 0; + /** + * Set the new combat stance and starts the combat music if the combat toggle + * is on. The new value should be one of the enum CombatStance. + * @param newCombatStance the new combat state of the player. + */ + virtual void SetCombatStance(int newCombatStance) = 0; + /** + * Get the current combat stance. + * @return the combat stance. + */ + virtual int GetCombatStance() const = 0; - /// Stop playing the background sound and start another one. - virtual bool OverrideBGSong(const char* name, - bool loop = true, - float fadeTime = 2.0 ) = 0; - virtual void StopOverrideBG() = 0; + /** + * Set the player's position. + * @param playerPosition the player's position. + */ + virtual void SetPosition(csVector3 playerPosition) = 0; - /// Set whether music will be played or not, based on toggle parm. - virtual void ToggleMusic(bool toggle) = 0; + /** + * Get the player's position. + * @return the player's position. + */ + virtual csVector3 GetPosition() const = 0; - /// Set whether ambient sounds will actually be played or not. - virtual void ToggleAmbient(bool toggle) = 0; + /** + * Set the time of the day. The method works only if sectors have been + * initialized. + * @param newTimeOfDay the new time of the day. + */ + virtual void SetTimeOfDay(int newTimeOfDay) = 0; - /// Set whether actions sounds will actually be played or not. - virtual void ToggleActions(bool toggle) = 0; + /** + * Get the current time of the day. The method works only if sectors have + * been initialized. + * @return the time of the day or -1 if the sectors are not initialized. + */ + virtual int GetTimeOfDay() const = 0; - /// Set whether gui sounds will actually be played or not. - virtual void ToggleGUI(bool toggle) = 0; + /** + * Set the weather's state. + * @param newWeather the weather to be set. + */ + virtual void SetWeather(int newWeather) = 0; - /// Set whether voices will actually be played or not. - virtual void ToggleVoices(bool toggle) = 0; + /** + * Get the weather's state. + * @return the weather's state. + */ + virtual int GetWeather() const = 0; - virtual void ToggleLoop(bool toggle) = 0; - virtual bool LoopBGM() = 0; + //------------------// + // TOGGLES MANAGING // + //------------------// - virtual void ToggleCombatMusic(bool toggle) = 0; - virtual bool PlayingCombatMusic() = 0; + /** + * Set the value of background music toggle. If set to true the background + * music loops, otherwise it does not. + * @param toggle true to activate the background music loop, false otherwise. + */ + virtual void SetLoopBGMToggle(bool toggle) = 0; - /// This returns if we are playing music as a setting or not - virtual bool PlayingMusic() = 0; + /** + * Get the value of LoopBGMToggle. + * @return true if the background music loop is activated, false otherwise. + */ + virtual bool IsLoopBGMToggleOn() = 0; - /// This returns if we are playing ambient sounds as a setting or not - virtual bool PlayingAmbient() = 0; + /** + * Set the value of the combat music toggle. If set to true a change in the + * combat stance changes the sector's music accordingly. + * @param toggle true to allow the music change, false otherwise. + */ + virtual void SetCombatMusicToggle(bool toggle) = 0; - /// This returns if we are playing actions sounds as a setting or not - virtual bool PlayingActions() = 0; + /** + * Get the value of the combat music toggle. + * @return true if the music change with the combat stance, false otherwise. + */ + virtual bool IsCombatMusicToggleOn() = 0; - /// This returns if we are playing gui sounds as a setting or not - virtual bool PlayingGUI() = 0; + /** + * Set the value of the listener on camera toggle. If set to true the + * listener takes the camera's position, otherwise the player's one. + * @param toggle true to place the listener on the camera, false otherwise. + */ + virtual void SetListenerOnCameraToggle(bool toggle) = 0; - /// This returns if we are playing npc voice sounds as a setting or not - virtual bool PlayingVoices() = 0; + /** + * Get the value of the listener on camera toggle. + * @return true if the listener is placed on the camera, false otherwise. + */ + virtual bool IsListenerOnCameraToggleOn() = 0; - /** Change the mode if the player is fighting - * @param combat TRUE if we have to set combat music, otherwise FALSE + /** + * Set the value of the chat toggle needed to keep track of the chat's sound state. */ - virtual void SetCombatMusicMode(bool combat) = 0; - - /** Get the mode if the player is fighting - * @return TRUE if we have combat music, otherwise FALSE + virtual void SetChatToggle(bool toggle) = 0; + + /** + * Get the chat toggle value. */ - virtual bool GetCombatMusicMode() = 0; + virtual bool IsChatToggleOn() = 0; - ///This returns the song name that is overriding - virtual const char* GetSongName() = 0; + //------------// + // PLAY SOUND // + //------------// - /// Play a sound effect based on message type - virtual void HandleSoundType(int type) = 0; + /** + * Play a 2D sound. + * @param fileName the name of the file where the sound is stored. + * @param loop true if the sound have to loop, false otherwise. + * @param ctrl the SoundControl that handle the sound. + */ + virtual void PlaySound(const char* fileName, bool loop, iSoundControl* &ctrl) = 0; + /** + * Play a 3D sound. + * @param fileName the name of the file where the sound is stored. + * @param loop true if the sound have to loop, false otherwise. + * @param ctrl the SoundControl that handle the sound. + * @param pos the position of the sound source. + * @param dir the direction of the sound. + * @param minDist the minimum distance at which the player can hear it. + * @param maxDist the maximum distance at which the player can hear it. + */ + virtual void PlaySound(const char* fileName, bool loop, iSoundControl* &ctrl, csVector3 pos, csVector3 dir, float minDist, float maxDist) = 0; - virtual void Update( csVector3 pos ) = 0; - virtual void Update( iView* view ) = 0; - /** Update the current weather. This will trigger WEATHER sounds in - * the current sector - * @param weather New weather from the WeatherSound enum (weather.h) - */ - virtual void UpdateWeather(int weather,const char* sector) = 0; - virtual void UpdateWeather(int weather) = 0; + /** + * Stop a sound with the given name. + * @param fileName the name of the file where the sound is stored. + * @return true if a sound with that name exists, false otherwise. + */ + virtual bool StopSound(const char* fileName) = 0; - /** Retrieves a iSoundHandle for a given resource name. - * If the resource is not loaded and cannot be loaded an invalid csRef<> is returned. - * (ref.IsValid() == false). - * - * @param name The resource name of the sound file. - * + /** + * Set the sound source position. + * @param fileName the name of the file where the sound is stored. + * @param position the new position of the sound source. + * @return true if a sound with that name exists, false otherwise. */ - virtual csRef<SOUND_DATA_TYPE> GetSoundResource(const char *name) = 0; + virtual bool SetSoundSource(const char* fileName, csVector3 position) = 0; - /// Retrieves a pointer to the sound renderer - the main interface of the sound system - virtual csRef<SOUND_RENDER_TYPE> GetSoundSystem() = 0; + //--------// + // UPDATE // + //--------// - virtual void StartMapSoundSystem() = 0; - virtual void EnterSector( const char* sectorName, int timeOfDay, int weather, csVector3& position ) = 0; + /** + * Update the sound manager. Update all non event based things. + */ + virtual void Update() = 0; - virtual void FadeSectorSounds( Fade_Direction dir ) = 0; + /** + * Update the position of the listener. If the listener on camera toggle + * is on, the listener's position is set on the camera otherwise on the + * player's position. + * + * @param the view of the camera. + */ + virtual void UpdateListener(iView* view) = 0; }; -#endif // I_SOUND_H - - +#endif // _ISOUNDMANAGER_H_ Property changes on: soc/2011/combat/lang/1337 ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/lang/1337:7178-7341 + /soc/2011/sound/lang/1337:7354,7363,7366-7367,7369,7373-7374,7376,7380,7382-7384,7386,7390,7392-7393,7396,7398-7399 /trunk/lang/1337:7178-7423 Property changes on: soc/2011/combat/lang/englishtemplate ___________________________________________________________________ Modified: svn:mergeinfo - /personal/Kayden/lang/english:2590-3147 /personal/Xordan/lang/english:1745,1752,1812,1838,1887,1894,2012,2014-2017,2055-2056,2062,2064,2270,2272-2273,2277-2278,2283-2284,2286-2287,2290-2291,2330,2333-2334,2336,2424,2592,2595-2596,2598-2603,2613 /trunk/lang/englishtemplate:7178-7341 + /personal/Kayden/lang/english:2590-3147 /personal/Xordan/lang/english:1745,1752,1812,1838,1887,1894,2012,2014-2017,2055-2056,2062,2064,2270,2272-2273,2277-2278,2283-2284,2286-2287,2290-2291,2330,2333-2334,2336,2424,2592,2595-2596,2598-2603,2613 /soc/2011/sound/lang/englishtemplate:7354,7363,7366-7367,7369,7373-7374,7376,7380,7382-7384,7386,7390,7392-7393,7396,7398-7399 /trunk/lang/englishtemplate:7178-7423 Property changes on: soc/2011/combat/lang/french ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/lang/french:7178-7341 + /soc/2011/sound/lang/french:7354,7363,7366-7367,7369,7373-7374,7376,7380,7382-7384,7386,7390,7392-7393,7396,7398-7399 /trunk/lang/french:7178-7423 Property changes on: soc/2011/combat/lang/italian ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/lang/italian:7178-7341 + /soc/2011/sound/lang/italian:7354,7363,7366-7367,7369,7373-7374,7376,7380,7382-7384,7386,7390,7392-7393,7396,7398-7399 /trunk/lang/italian:7178-7423 Modified: soc/2011/combat/mk/msvc10/plgdbmysql.vcxproj =================================================================== --- soc/2011/combat/mk/msvc10/plgdbmysql.vcxproj 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/mk/msvc10/plgdbmysql.vcxproj 2011-06-17 06:03:05 UTC (rev 7424) @@ -286,6 +286,8 @@ <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugPSReleaseCSCELWithDlls|x64'">..\..\out\debug10-x64\build\plgdbmysql\</IntDir> <TargetName Condition="'$(Configuration)|$(Platform)'=='DebugPSReleaseCSCELWithDlls|x64'">dbmysql</TargetName> <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='DebugPSReleaseCSCELWithDlls|x64'">true</IgnoreImportLibrary> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='DebugPSReleaseCSCELWithDlls|Win32'">c:\development\PlaneShift\out\debug10\libs;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='DebugWithDlls|Win32'">c:\development\PlaneShift\out\debug10\libs;$(LibraryPath)</LibraryPath> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithStaticLibs|Win32'"> <ClCompile> @@ -464,7 +466,7 @@ <DelayLoadDLLs>;%(DelayLoadDLLs)</DelayLoadDLLs> <ImportLibrary>..\..\out\debug10\build\plgdbmysql\Win32\plgdbmysql.lib</ImportLibrary> <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>delayimp.lib;libcrystalspace_d.lib;ws2_32.lib;zlib.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>delayimp.lib;libcrystalspace_d.lib;ws2_32.lib;zlib.lib;libmysql.lib;libpsutil_d.lib;%(AdditionalDependencies)</AdditionalDependencies> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\CS\out\debug10\libs;..\..\..\CS\winlibs\x86\lib;..\..\..\CS\win32libs\lib;$(CRYSTAL)\out\debug10\libs;$(CRYSTAL)\winlibs\x86\lib;$(CRYSTAL)\win32libs\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <TargetMachine>MachineX86</TargetMachine> @@ -848,7 +850,7 @@ <DelayLoadDLLs>;%(DelayLoadDLLs)</DelayLoadDLLs> <ImportLibrary>..\..\out\debug10\build\plgdbmysql\Win32\plgdbmysql.lib</ImportLibrary> <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>delayimp.lib;libcrystalspace.lib;ws2_32.lib;zlib.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>delayimp.lib;libcrystalspace.lib;ws2_32.lib;zlib.lib;libmysql.lib;libpsutil_d.lib;%(AdditionalDependencies)</AdditionalDependencies> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\CS\out\release10\libs;..\..\..\CS\winlibs\x86\lib;..\..\..\CS\win32libs\lib;$(CRYSTAL)\out\release10\libs;$(CRYSTAL)\winlibs\x86\lib;$(CRYSTAL)\win32libs\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <TargetMachine>MachineX86</TargetMachine> Modified: soc/2011/combat/npcclient.cfg =================================================================== --- soc/2011/combat/npcclient.cfg 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/npcclient.cfg 2011-06-17 06:03:05 UTC (rev 7424) @@ -32,6 +32,8 @@ ; PlaneShift plugins System.Plugins.iConnection = planeshift.database.mysql ;System.Plugins.iConnection = planeshift.database.dummy +System.Plugins.iSoundManager = crystalspace.planeshift.sound.soundmngr +;System.Plugins.iSoundManager = crystalspace.planeshift.sound.dummy ;;;;;;;;;;;;;;;;; ; Configuration ; Modified: soc/2011/combat/pawseditor.cfg =================================================================== --- soc/2011/combat/pawseditor.cfg 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/pawseditor.cfg 2011-06-17 06:03:05 UTC (rev 7424) @@ -77,6 +77,10 @@ System.Plugins.iFontServer.2 = crystalspace.font.server.default Fontplex.Fonts.Default.*Fallback = /this/data/ttf/LiberationSans-Regular.ttf +; Planeshift plugins +System.Plugins.iSoundManager = crystalspace.planeshift.sound.soundmngr +;System.Plugins.iSoundManager = crystalspace.planeshift.sound.dummy + ; ****************** ; * Part 2: Config * ; ****************** Modified: soc/2011/combat/psclient.cfg =================================================================== --- soc/2011/combat/psclient.cfg 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/psclient.cfg 2011-06-17 06:03:05 UTC (rev 7424) @@ -82,10 +82,15 @@ System.Plugins.iFontServer.2 = crystalspace.font.server.default ; Fallback to Arial Unicode (Mac/Windows) and Free Serif (Linux) for the widest coverage Fontplex.Fonts.Default.*Fallback = /this/data/ttf/LiberationSans-Regular.ttf,/fonts/ttf/Arial Unicode.ttf,/fonts/ttf/arialuni.ttf,/fonts/ttf/FreeSerif.ttf,/fonts/ttf/LastResort.ttf,/fonts/unifont/unifont.csf + System.Plugins.iBgLoader = crystalspace.bgloader System.Plugins.joystick = crystalspace.device.joystick +; Planeshift plugins +System.Plugins.iSoundManager = crystalspace.planeshift.sound.soundmngr +;System.Plugins.iSoundManager = crystalspace.planeshift.sound.dummy + ; ****************** ; * Part 2: Config * ; ****************** Modified: soc/2011/combat/pslaunch.cfg =================================================================== --- soc/2011/combat/pslaunch.cfg 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/pslaunch.cfg 2011-06-17 06:03:05 UTC (rev 7424) @@ -7,6 +7,10 @@ System.Plugins.iSndSysRenderer = crystalspace.sndsys.renderer.openal Fontplex.Fonts.Default.*Fallback = /this/data/ttf/LiberationSans-Regular.ttf +; Planeshift plugins +System.Plugins.iSoundManager = crystalspace.planeshift.sound.soundmngr +;System.Plugins.iSoundManager = crystalspace.planeshift.sound.dummy + Video.ScreenWidth = 1024 Video.ScreenHeight = 768 Video.ScreenDepth = 32 Modified: soc/2011/combat/src/client/Jamfile =================================================================== --- soc/2011/combat/src/client/Jamfile 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/src/client/Jamfile 2011-06-17 06:03:05 UTC (rev 7424) @@ -20,8 +20,8 @@ CFlags psclient : [ FDefines $(HUNSPELLDEF) ] ; ExternalLibs psclient : CRYSTAL CAL3D BREAKPAD $(HUNSPELLDEF) ; CompileGroups psclient : client ; -COMMONLIBS = gui psnet psengine psrpgrules psutil paws pssound sound effects fparser ; -LinkWith psclient : gui psnet psengine psrpgrules psutil paws sound effects fparser ; +COMMONLIBS = gui psnet psengine psrpgrules psutil paws effects fparser ; +LinkWith psclient : gui psnet psengine psrpgrules psutil paws effects fparser ; if $(REPORTER) { if $(TARGET.OS) = "MACOS_X" { COMMONLIBS += crashreport ; } @@ -137,7 +137,9 @@ ; LinkStaticPlugins psclient_static : - bgloader + bgloader + soundmngr + dummysndmngr ; ExternalLibs psclient_static : CRYSTAL CAL3D BREAKPAD $(HUNSPELLDEF) ; Modified: soc/2011/combat/src/client/cmdadmin.cpp =================================================================== --- soc/2011/combat/src/client/cmdadmin.cpp 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/src/client/cmdadmin.cpp 2011-06-17 06:03:05 UTC (rev 7424) @@ -26,6 +26,7 @@ #include "net/cmdhandler.h" #include "net/clientmsghandler.h" #include "net/messages.h" +#include "net/connection.h" #include "util/strutil.h" @@ -59,6 +60,8 @@ psAdminCommands::~psAdminCommands() { msgqueue->Unsubscribe(this, MSGTYPE_ADMINCMD); + msgqueue->Unsubscribe(this, MSGTYPE_ORDEREDTEST); + cmdsource->UnsubscribeAll(this); } Modified: soc/2011/combat/src/client/cmdutil.cpp =================================================================== --- soc/2011/combat/src/client/cmdutil.cpp 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/src/client/cmdutil.cpp 2011-06-17 06:03:05 UTC (rev 7424) @@ -199,7 +199,7 @@ { if (words[1] == "sound") { - psengine->GetSoundManager()->Reload(); + psengine->GetSoundManager()->ReloadSectors(); return "Soundmanager reloaded"; } return "try /reload sound"; Modified: soc/2011/combat/src/client/gui/chatwindow.cpp =================================================================== --- soc/2011/combat/src/client/gui/chatwindow.cpp 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/src/client/gui/chatwindow.cpp 2011-06-17 06:03:05 UTC (rev 7424) @@ -37,6 +37,8 @@ #include <iutil/evdefs.h> #include <iutil/databuff.h> +#include <iutil/virtclk.h> +#include <iutil/stringarray.h> //============================================================================= // Project Includes @@ -406,11 +408,17 @@ csRef<iDocumentNode> option = oNodes->Next(); if (option->GetType() == CS_NODE_TEXT) { - csString s = option->GetValue(); - for (char *word = strtok((char*)s.GetData(), " \r\n\t"); word; word = strtok(NULL, " \r\n\t")) + csStringArray words; + words.SplitString(option->GetValue(), " \r\n\t", csStringArray::delimIgnore); + for(size_t pos = 0; pos < words.GetSize(); pos++) { - if ( settings.badWords.Find(word)==csArrayItemNotFound ) { - settings.badWords.Push(word); + //Empty bad words will make the badword parser go in a deadloop + if(csString(words.Get(pos)).IsEmpty()) + continue; + + if(settings.badWords.Find(words.Get(pos)) == csArrayItemNotFound) + { + settings.badWords.Push(words.Get(pos)); settings.goodWords.Push(""); } } @@ -419,7 +427,13 @@ { csString bad = option->GetAttributeValue("bad"); csString good = option->GetAttributeValue("good"); - if ( settings.badWords.Find(bad)==csArrayItemNotFound ) { + + //Empty bad words will make the badword parser go in a deadloop + if(bad.IsEmpty()) + continue; + + if(settings.badWords.Find(bad) == csArrayItemNotFound) + { settings.badWords.Push(bad); settings.goodWords.Push(good); } @@ -1399,10 +1413,11 @@ case CHAT_SERVER_TELL: case CHAT_TELLSELF: case CHAT_TELL: - if (psengine->GetSoundManager()->chatToggle.GetToggle() == true) + if (psengine->GetSoundManager()->IsChatToggleOn() == true) { // Hardcoded Resource considered as FIXME - psengine->GetSoundManager()->PlayGUISound("sound.standardButtonClick"); + iSoundControl* guiSndCtrl = psengine->GetSoundManager()->GetSndCtrl(iSoundManager::GUI_SNDCTRL); + psengine->GetSoundManager()->PlaySound("sound.standardButtonClick", false, guiSndCtrl); } case CHAT_AWAY: case CHAT_ADVICE: Modified: soc/2011/combat/src/client/gui/pawscharcreatemain.cpp =================================================================== --- soc/2011/combat/src/client/gui/pawscharcreatemain.cpp 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/src/client/gui/pawscharcreatemain.cpp 2011-06-17 06:03:05 UTC (rev 7424) @@ -972,9 +972,8 @@ void pawsCreationMain::Show() { // Play some music + psengine->GetSoundManager()->LoadActiveSector("charcreation"); - psengine->GetSoundManager()->Load("charcreation"); - pawsWidget::Show(); UpdateCP(); } Modified: soc/2011/combat/src/client/gui/pawscharpick.cpp =================================================================== --- soc/2011/combat/src/client/gui/pawscharpick.cpp 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/src/client/gui/pawscharpick.cpp 2011-06-17 06:03:05 UTC (rev 7424) @@ -19,6 +19,7 @@ #include <psconfig.h> #include <imesh/spritecal3d.h> #include <csutil/md5.h> +#include <iutil/cfgmgr.h> #include "util/log.h" #include "globals.h" @@ -451,9 +452,8 @@ } // Play some music + psengine->GetSoundManager()->LoadActiveSector("main"); - psengine->GetSoundManager()->Load("main"); - PawsManager::GetSingleton().SetCurrentFocusedWidget(this); pawsWidget::Show(); Modified: soc/2011/combat/src/client/gui/pawsconfigsound.cpp =================================================================== --- soc/2011/combat/src/client/gui/pawsconfigsound.cpp 2011-06-17 02:24:47 UTC (rev 7423) +++ soc/2011/combat/src/client/gui/pawsconfigsound.cpp 2011-06-17 06:03:05 UTC (rev 7424) @@ -142,25 +142,25 @@ } bool pawsConfigSound::LoadConfig() { - generalVol->SetCurrentValue(psengine->GetSoundManager()->mainSndCtrl->GetVolume()*100,false); - musicVol->SetCurrentValue(psengine->GetSoundManager()->musicSndCtrl->GetVolume()*100,false); - ambientVol->SetCurrentValue(psengine->GetSoundManager()->ambientSndCtrl->GetVolume()*100,false); - guiVol->SetCurrentValue(psengine->GetSoundManager()->guiSndCtrl->GetVolume()*100,false); - voicesVol->SetCurrentValue(psengine->GetSoundManager()->voiceSndCtrl->GetVolume()*100,false); - actionsVol->SetCurrentValue(psengine->GetSoundManager()->actionSndCtrl->GetVolume()*100,false); + generalVol->SetCurrentValue(psengine->GetSoundManager()->GetMainSndCtrl()->GetVolume()*100,false); + musicVol->SetCurrentValue(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::MUSIC_SNDCTRL)->GetVolume()*100,false); + ambientVol->SetCurrentValue(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::AMBIENT_SNDCTRL)->GetVolume()*100,false); + guiVol->SetCurrentValue(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::GUI_SNDCTRL)->GetVolume()*100,false); + voicesVol->SetCurrentValue(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::VOICE_SNDCTRL)->GetVolume()*100,false); + actionsVol->SetCurrentValue(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::ACTION_SNDCTRL)->GetVolume()*100,false); - ambient->SetState(psengine->GetSoundManager()->ambientSndCtrl->GetToggle()); - actions->SetState(psengine->GetSoundManager()->actionSndCtrl->GetToggle()); - music->SetState(psengine->GetSoundManager()->musicSndCtrl->GetToggle()); - gui->SetState(psengine->GetSoundManager()->guiSndCtrl->GetToggle()); - voices->SetState(psengine->GetSoundManager()->voiceSndCtrl->GetToggle()); + ambient->SetState(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::AMBIENT_SNDCTRL)->GetToggle()); + actions->SetState(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::ACTION_SNDCTRL)->GetToggle()); + music->SetState(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::MUSIC_SNDCTRL)->GetToggle()); + gui->SetState(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::GUI_SNDCTRL)->GetToggle()); + voices->SetState(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::VOICE_SNDCTRL)->GetToggle()); muteOnFocusLoss->SetState(psengine->GetMuteSoundsOnFocusLoss()); - loopBGM->SetState(psengine->GetSoundManager()->loopBGM.GetToggle()); - combatMusic->SetState(psengine->GetSoundManager()->combatMusic.GetToggle()); - chatSound->SetState(psengine->GetSoundManager()->chatToggle.GetToggle()); + loopBGM->SetState(psengine->GetSoundManager()->IsLoopBGMToggleOn()); + combatMusic->SetState(psengine->GetSoundManager()->IsCombatMusicToggleOn()); + chatSound->SetState(psengine->GetSoundManager()->IsChatTogg... [truncated message content] |