You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(140) |
Feb
(98) |
Mar
(152) |
Apr
(104) |
May
(71) |
Jun
(94) |
Jul
(169) |
Aug
(83) |
Sep
(47) |
Oct
(134) |
Nov
(7) |
Dec
(20) |
2004 |
Jan
(41) |
Feb
(14) |
Mar
(42) |
Apr
(47) |
May
(68) |
Jun
(143) |
Jul
(65) |
Aug
(29) |
Sep
(40) |
Oct
(34) |
Nov
(33) |
Dec
(97) |
2005 |
Jan
(29) |
Feb
(30) |
Mar
(9) |
Apr
(37) |
May
(13) |
Jun
(31) |
Jul
(22) |
Aug
(23) |
Sep
|
Oct
(37) |
Nov
(34) |
Dec
(117) |
2006 |
Jan
(48) |
Feb
(6) |
Mar
(2) |
Apr
(71) |
May
(10) |
Jun
(16) |
Jul
(7) |
Aug
(1) |
Sep
(14) |
Oct
(17) |
Nov
(25) |
Dec
(26) |
2007 |
Jan
(8) |
Feb
(2) |
Mar
(7) |
Apr
(26) |
May
|
Jun
(12) |
Jul
(30) |
Aug
(14) |
Sep
(9) |
Oct
(4) |
Nov
(7) |
Dec
(6) |
2008 |
Jan
(10) |
Feb
(10) |
Mar
(6) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(18) |
Aug
(15) |
Sep
(16) |
Oct
(5) |
Nov
(3) |
Dec
(10) |
2009 |
Jan
(11) |
Feb
(2) |
Mar
|
Apr
(15) |
May
(31) |
Jun
(18) |
Jul
(11) |
Aug
(26) |
Sep
(52) |
Oct
(17) |
Nov
(4) |
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ww...> - 2006-11-30 18:46:50
|
Author: hedo Date: 2006-11-30 10:46:43 -0800 (Thu, 30 Nov 2006) New Revision: 2022 Added: trunk/csp/data/models/vehicles/ trunk/csp/data/models/vehicles/Hmmwv01/ trunk/csp/data/models/vehicles/Hmmwv01/hmmwv01.jpg trunk/csp/data/models/vehicles/Hmmwv01/hmmwv01.osg trunk/csp/data/models/vehicles/Hmmwv01/hmmwv01_shadow.osg trunk/csp/data/xml/theater/balkan/hmmwv01.xml trunk/csp/data/xml/theater/balkan/hmmwv01/ trunk/csp/data/xml/theater/balkan/hmmwv01/model.xml Log: - Add a Hummer (with animate wheels) (feel free to check my work and tell me the probably mistakes) Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2022 Diff omitted (192197 bytes). |
From: <sv...@ww...> - 2006-11-29 11:24:03
|
Author: hedo Date: 2006-11-29 03:23:51 -0800 (Wed, 29 Nov 2006) New Revision: 2021 Added: trunk/csp/data/models/airbase/extinguisher01/ trunk/csp/data/models/airbase/extinguisher01/extinguisher01.jpg trunk/csp/data/models/airbase/extinguisher01/extinguisher01.osg trunk/csp/data/models/airbase/extinguisher01/extinguisher01_shadow.osg trunk/csp/data/xml/theater/balkan/extinguisher01.xml trunk/csp/data/xml/theater/balkan/extinguisher01/ trunk/csp/data/xml/theater/balkan/extinguisher01/model.xml Log: - Add an extinguisher (3D model). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2021 Diff omitted (465477 bytes). |
From: <sv...@ww...> - 2006-11-27 02:06:03
|
Author: hedo Date: 2006-11-26 18:05:53 -0800 (Sun, 26 Nov 2006) New Revision: 2020 Added: trunk/csp/data/models/airbase/ladder01/ trunk/csp/data/models/airbase/ladder01/ladder01.jpg trunk/csp/data/models/airbase/ladder01/ladder01.osg trunk/csp/data/models/airbase/ladder01/ladder01_shadow.osg trunk/csp/data/xml/theater/balkan/ladder01.xml trunk/csp/data/xml/theater/balkan/ladder01/ trunk/csp/data/xml/theater/balkan/ladder01/model.xml Modified: trunk/csp/data/models/airbase/hangar07/hangar07.jpg Log: - reduce the hangar07 texture to 1024X1024. - add a ladder (3D model). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2020 Diff omitted (46810 bytes). |
From: <sv...@ww...> - 2006-11-26 22:11:44
|
Author: hedo Date: 2006-11-26 14:11:36 -0800 (Sun, 26 Nov 2006) New Revision: 2019 Added: trunk/csp/data/models/airbase/hangar07/ trunk/csp/data/models/airbase/hangar07/hangar07.jpg trunk/csp/data/models/airbase/hangar07/hangar07.osg trunk/csp/data/models/airbase/hangar07/hangar07_windows.png trunk/csp/data/xml/theater/balkan/hangar07.xml trunk/csp/data/xml/theater/balkan/hangar07/ trunk/csp/data/xml/theater/balkan/hangar07/model.xml Log: - add a big hangar model (texture is enormous by default (2048X2048) but will be easily resized if troubles) Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2019 Diff omitted (269915 bytes). |
From: <sv...@ww...> - 2006-11-26 14:39:18
|
Author: nsmoooose Date: 2006-11-26 06:39:04 -0800 (Sun, 26 Nov 2006) New Revision: 2018 Added: trunk/csp/cspsim/wf/CheckBox.cpp trunk/csp/cspsim/wf/CheckBox.h trunk/csp/cspsim/wf/MessageBox.cpp trunk/csp/cspsim/wf/MessageBox.h Modified: trunk/csp/cspsim/CSPSim.cpp trunk/csp/cspsim/CSPSim.h trunk/csp/cspsim/Config.cpp trunk/csp/cspsim/Config.h trunk/csp/cspsim/GameScreen.cpp trunk/csp/cspsim/SConscript trunk/csp/cspsim/wf/Control.cpp trunk/csp/cspsim/wf/ListBox.cpp trunk/csp/cspsim/wf/ListBox.h trunk/csp/cspsim/wf/ListBoxItem.cpp trunk/csp/cspsim/wf/Theme.h trunk/csp/cspsim/wf/Window.cpp trunk/csp/cspsim/wf/Window.h trunk/csp/cspsim/wf/WindowManager.h trunk/csp/cspsim/wf/themes/Default.cpp trunk/csp/cspsim/wf/themes/Default.h trunk/csp/cspsim/windows/DisplayOptions.cpp trunk/csp/cspsim/windows/DisplayOptions.h trunk/csp/cspsim/windows/Options.cpp Log: GUI changes: * New checkbox control. * New MessageBox class. * Display settings (resolution and fullscreen) is now saved using the options window. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2018 Diff omitted (42756 bytes). |
From: <sv...@ww...> - 2006-11-21 20:23:38
|
Author: nsmoooose Date: 2006-11-21 12:23:21 -0800 (Tue, 21 Nov 2006) New Revision: 2017 Added: trunk/csp/cspsim/wf/ListBox.cpp trunk/csp/cspsim/wf/ListBox.h trunk/csp/cspsim/wf/ListBoxItem.cpp trunk/csp/cspsim/wf/ListBoxItem.h Modified: trunk/csp/cspsim/SConscript trunk/csp/cspsim/wf/Tab.cpp trunk/csp/cspsim/wf/Theme.h trunk/csp/cspsim/wf/themes/Default.cpp trunk/csp/cspsim/wf/themes/Default.h trunk/csp/cspsim/windows/DisplayOptions.cpp Log: A very basic listbox implementation with support for selection of a single item. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2017 Diff omitted (19779 bytes). |
From: <sv...@ww...> - 2006-11-21 18:44:31
|
Author: nsmoooose Date: 2006-11-21 10:44:21 -0800 (Tue, 21 Nov 2006) New Revision: 2016 Modified: trunk/csp/csplib/xml/XmlParser.cpp Log: Removed call to MessageBoxA since this resulted in an unresolved external in windows. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2016 Modified: trunk/csp/csplib/xml/XmlParser.cpp =================================================================== --- trunk/csp/csplib/xml/XmlParser.cpp 2006-11-19 07:39:49 UTC (rev 2015) +++ trunk/csp/csplib/xml/XmlParser.cpp 2006-11-21 18:44:21 UTC (rev 2016) @@ -378,15 +378,7 @@ ,filename,XMLNode::getError(pResults.error),pResults.nLine,pResults.nColumn,s1,s2,s3); // display message -#ifdef WIN32 -#ifndef _XMLPARSER_NO_MESSAGEBOX_ - MessageBoxA(NULL,message,"XML Parsing error",MB_OK|MB_ICONERROR|MB_TOPMOST); -#else printf("%s",message); -#endif -#else - printf("%s",message); -#endif exit(255); } return xnode; |
From: <sv...@ww...> - 2006-11-19 07:39:56
|
Author: mkrose Date: 2006-11-18 23:39:49 -0800 (Sat, 18 Nov 2006) New Revision: 2015 Modified: trunk/csp/csplib/SConscript trunk/csp/csplib/xml/XmlParser.cpp trunk/csp/csplib/xml/XmlParser.h Log: Integrate XmlParser with csplib. Enclose in csp namespace, prefix macros with CSP_, convert leading spaces to tabs, miscellaneous whitespace cleanup, include path cleanup, copyright notice, add to the build. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2015 Diff omitted (192020 bytes). |
From: <sv...@ww...> - 2006-11-19 07:36:18
|
Author: mkrose Date: 2006-11-18 23:36:10 -0800 (Sat, 18 Nov 2006) New Revision: 2014 Added: trunk/csp/csplib/xml/ trunk/csp/csplib/xml/XmlParser.cpp trunk/csp/csplib/xml/XmlParser.h Log: Add xmlParser v2.14 by Frank Vanden Berghen to csplib. This is a very compact XML parser suitable for use in CSP. See http://www.applied-mathematics.net/tools/xmlParser.html Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2014 Diff omitted (116496 bytes). |
From: <sv...@ww...> - 2006-11-15 06:57:23
|
Author: mkrose Date: 2006-11-14 22:57:16 -0800 (Tue, 14 Nov 2006) New Revision: 2013 Modified: trunk/csp/cspsim/wf/themes/Default.cpp Log: Oops, commented the wrong unused argument. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2013 Modified: trunk/csp/cspsim/wf/themes/Default.cpp =================================================================== --- trunk/csp/cspsim/wf/themes/Default.cpp 2006-11-15 06:29:00 UTC (rev 2012) +++ trunk/csp/cspsim/wf/themes/Default.cpp 2006-11-15 06:57:16 UTC (rev 2013) @@ -432,12 +432,12 @@ return Point(0, 0 - (getCaptionHeight() / 2)); } -Size Default::getTabPageClientAreaSize(const Tab* /*tab*/) const { +Size Default::getTabPageClientAreaSize(const Tab* tab) const { Size tabSize = tab->getSize(); return Size(tabSize.m_W, tabSize.m_H - m_Colors.tabButtonHeight); } -Point Default::getTabPageClientAreaLocation(const Tab* tab) const { +Point Default::getTabPageClientAreaLocation(const Tab* /*tab*/) const { return Point(0.0f, 0.0f - (m_Colors.tabButtonHeight / 2)); } |
From: <sv...@ww...> - 2006-11-15 06:29:08
|
Author: mkrose Date: 2006-11-14 22:29:00 -0800 (Tue, 14 Nov 2006) New Revision: 2012 Modified: trunk/csp/cspsim/wf/Button.cpp trunk/csp/cspsim/wf/Theme.h trunk/csp/cspsim/wf/themes/Default.cpp trunk/csp/cspsim/wf/themes/Default.h Log: Fix minor compile errors and warnings. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2012 Modified: trunk/csp/cspsim/wf/Button.cpp =================================================================== --- trunk/csp/cspsim/wf/Button.cpp 2006-11-14 23:00:06 UTC (rev 2011) +++ trunk/csp/cspsim/wf/Button.cpp 2006-11-15 06:29:00 UTC (rev 2012) @@ -44,8 +44,8 @@ } private: + ButtonClickedSignal& m_ButtonClicked; Button* m_Button; - ButtonClickedSignal& m_ButtonClicked; }; Button::Button(Theme* theme) : SingleControlContainer(theme), m_ChildControl(new Label(theme)) { Modified: trunk/csp/cspsim/wf/Theme.h =================================================================== --- trunk/csp/cspsim/wf/Theme.h 2006-11-14 23:00:06 UTC (rev 2011) +++ trunk/csp/cspsim/wf/Theme.h 2006-11-15 06:29:00 UTC (rev 2012) @@ -75,7 +75,7 @@ const Button& button // The button to generate geometry for. )=0; */ - virtual ~Theme()=0{}; + virtual ~Theme() {} }; } // namespace wf Modified: trunk/csp/cspsim/wf/themes/Default.cpp =================================================================== --- trunk/csp/cspsim/wf/themes/Default.cpp 2006-11-14 23:00:06 UTC (rev 2011) +++ trunk/csp/cspsim/wf/themes/Default.cpp 2006-11-15 06:29:00 UTC (rev 2012) @@ -270,7 +270,7 @@ return group.release(); } -osg::Group* Default::buildTabPage(const TabPage* page) const { +osg::Group* Default::buildTabPage(const TabPage* /*page*/) const { return NULL; } @@ -428,11 +428,11 @@ return Size(windowSize.m_W - getBorderWidth(), windowSize.m_H - getBorderWidth() - getCaptionHeight()); } -Point Default::getWindowClientAreaLocation(const Window* window) const { +Point Default::getWindowClientAreaLocation(const Window* /*window*/) const { return Point(0, 0 - (getCaptionHeight() / 2)); } -Size Default::getTabPageClientAreaSize(const Tab* tab) const { +Size Default::getTabPageClientAreaSize(const Tab* /*tab*/) const { Size tabSize = tab->getSize(); return Size(tabSize.m_W, tabSize.m_H - m_Colors.tabButtonHeight); } Modified: trunk/csp/cspsim/wf/themes/Default.h =================================================================== --- trunk/csp/cspsim/wf/themes/Default.h 2006-11-14 23:00:06 UTC (rev 2011) +++ trunk/csp/cspsim/wf/themes/Default.h 2006-11-15 06:29:00 UTC (rev 2012) @@ -38,13 +38,13 @@ Default(); virtual ~Default(); - virtual osg::Geometry* Default::BuildRectangle( + virtual osg::Geometry* BuildRectangle( float x1, float y1, float x2, float y2, float z, const osg::Vec4& c1, const osg::Vec4& c2, const osg::Vec4& c3, const osg::Vec4& c4) const; virtual float getBorderWidth() const; virtual float getCaptionHeight() const; - virtual std::string Default::getCaptionFont() const; + virtual std::string getCaptionFont() const; virtual osg::Group* buildLabel(const Label* label) const; virtual osg::Group* buildButton(const Button* button) const; @@ -73,7 +73,7 @@ windowBackgroundColor(0.349f, 0.576f, 0.298f, 0.8f), windowCaptionTextColor(1.0f, 1.0f, 1.0f, 1.0f), - windowCaptionBackgroundColor1(0.5f, 0.0f, 0.0f, 1.0f), + windowCaptionBackgroundColor1(0.5f, 0.0f, 0.0f, 1.0f), windowCaptionBackgroundColor2(0.1f, 0.0f, 0.0f, 0.4f), windowCaptionBorderColor1(0.0f, 0.0f, 0.0f, 1.0f), windowCaptionBorderColor2(0.0f, 0.0f, 0.0f, 0.0f), @@ -115,9 +115,9 @@ } m_Colors; - virtual osg::Geometry* Default::BuildRectangle( + virtual osg::Geometry* BuildRectangle( float x1, float y1, float x2, float y2, float z, float lineWidth, - const osg::Vec4& outerColor, const osg::Vec4& innerColor, + const osg::Vec4& outerColor, const osg::Vec4& innerColor, bool left=true, bool top=true, bool right=true, bool bottom=true) const; protected: |
From: <sv...@ww...> - 2006-11-14 23:00:17
|
Author: stormbringer Date: 2006-11-14 15:00:06 -0800 (Tue, 14 Nov 2006) New Revision: 2011 Modified: trunk/csp/cspsim/wf/themes/Default.cpp trunk/csp/cspsim/wf/themes/Default.h Log: Default GUI theme added Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2011 Diff omitted (21884 bytes). |
From: <sv...@ww...> - 2006-11-14 22:59:22
|
Author: stormbringer Date: 2006-11-14 14:59:16 -0800 (Tue, 14 Nov 2006) New Revision: 2010 Modified: trunk/csp/cspsim/wf/Button.cpp trunk/csp/cspsim/wf/Button.h trunk/csp/cspsim/wf/Control.cpp trunk/csp/cspsim/wf/Control.h trunk/csp/cspsim/wf/Theme.h trunk/csp/cspsim/wf/Window.cpp trunk/csp/cspsim/wf/Window.h trunk/csp/cspsim/wf/WindowManager.cpp trunk/csp/cspsim/wf/WindowManager.h Log: Update to widgets Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2010 Diff omitted (14417 bytes). |
From: <sv...@ww...> - 2006-11-14 22:58:03
|
Author: stormbringer Date: 2006-11-14 14:57:56 -0800 (Tue, 14 Nov 2006) New Revision: 2009 Added: trunk/csp/cspsim/wf/Container.cpp trunk/csp/cspsim/wf/Container.h trunk/csp/cspsim/wf/Label.cpp trunk/csp/cspsim/wf/Label.h trunk/csp/cspsim/wf/MultiControlContainer.cpp trunk/csp/cspsim/wf/MultiControlContainer.h trunk/csp/cspsim/wf/Padding.h trunk/csp/cspsim/wf/SingleControlContainer.cpp trunk/csp/cspsim/wf/SingleControlContainer.h trunk/csp/cspsim/wf/Tab.cpp trunk/csp/cspsim/wf/Tab.h trunk/csp/cspsim/wf/TabPage.cpp trunk/csp/cspsim/wf/TabPage.h trunk/csp/cspsim/wf/TableControlContainer.cpp trunk/csp/cspsim/wf/TableControlContainer.h Log: New widget types added Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2009 Diff omitted (35499 bytes). |
From: <sv...@ww...> - 2006-11-14 22:54:53
|
Author: stormbringer Date: 2006-11-14 14:54:43 -0800 (Tue, 14 Nov 2006) New Revision: 2008 Added: trunk/csp/cspsim/windows/DisplayOptions.cpp trunk/csp/cspsim/windows/DisplayOptions.h trunk/csp/cspsim/windows/Options.cpp trunk/csp/cspsim/windows/Options.h trunk/csp/cspsim/windows/SoundOptions.h Log: Additional code for "options" dialog Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2008 Added: trunk/csp/cspsim/windows/DisplayOptions.cpp =================================================================== --- trunk/csp/cspsim/windows/DisplayOptions.cpp 2006-11-14 22:53:09 UTC (rev 2007) +++ trunk/csp/cspsim/windows/DisplayOptions.cpp 2006-11-14 22:54:43 UTC (rev 2008) @@ -0,0 +1,65 @@ +// Combat Simulator Project +// Copyright (C) 2002 The Combat Simulator Project +// http://csp.sourceforge.net +// +// 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; either version 2 +// of the License, or (at your option) any later version. +// +// 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. + + +/** + * @file DisplayOptions.cpp + * + **/ + +#include <csp/cspsim/wf/Label.h> +#include <csp/cspsim/wf/TableControlContainer.h> +#include <csp/cspsim/windows/DisplayOptions.h> + +#include <osg/Vec4> + +CSP_NAMESPACE + +namespace windows { + +DisplayOptions::DisplayOptions(wf::Theme* theme) : wf::TabPage(theme) { + setText("Display"); + + Ref<wf::TableControlContainer> table = new wf::TableControlContainer(theme, 2, 5); + table->getColumns()[0].setWidth(0.3f); + table->getColumns()[1].setWidth(0.7f); + + table->setControl(0, 0, new wf::Label(theme, "Resolution:")); + table->setControl(1, 0, new wf::Label(theme, "TODO: 1024x768")); + + table->setControl(0, 1, new wf::Label(theme, "Terrain:")); + table->setControl(1, 1, new wf::Label(theme, "TODO: Low")); + + table->setControl(0, 2, new wf::Label(theme, "Texture:")); + table->setControl(1, 2, new wf::Label(theme, "TODO: Very high")); + + table->setControl(0, 3, new wf::Label(theme, "Effects:")); + table->setControl(1, 3, new wf::Label(theme, "TODO: Ultra realistic")); + + table->setControl(0, 4, new wf::Label(theme, "Shadows:")); + table->setControl(1, 4, new wf::Label(theme, "TODO: Dark")); + + setControl(table.get()); +} + +DisplayOptions::~DisplayOptions() { +} + +} // namespace windows + +CSP_NAMESPACE_END Added: trunk/csp/cspsim/windows/DisplayOptions.h =================================================================== --- trunk/csp/cspsim/windows/DisplayOptions.h 2006-11-14 22:53:09 UTC (rev 2007) +++ trunk/csp/cspsim/windows/DisplayOptions.h 2006-11-14 22:54:43 UTC (rev 2008) @@ -0,0 +1,46 @@ +// Combat Simulator Project +// Copyright (C) 2002 The Combat Simulator Project +// http://csp.sourceforge.net +// +// 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; either version 2 +// of the License, or (at your option) any later version. +// +// 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. + + +/** + * @file DisplayOptions.h + * + **/ + +#ifndef __CSPSIM_WINDOWS_DISPLAYOPTIONS_H__ +#define __CSPSIM_WINDOWS_DISPLAYOPTIONS_H__ + +#include <csp/cspsim/wf/TabPage.h> + +CSP_NAMESPACE + +namespace windows { + +class DisplayOptions : public wf::TabPage { +public: + DisplayOptions(wf::Theme* theme); + virtual ~DisplayOptions(); + +private: +}; + +} // namespace windows + +CSP_NAMESPACE_END + +#endif // __CSPSIM_WINDOWS_DISPLAYOPTIONS_H__ Added: trunk/csp/cspsim/windows/Options.cpp =================================================================== --- trunk/csp/cspsim/windows/Options.cpp 2006-11-14 22:53:09 UTC (rev 2007) +++ trunk/csp/cspsim/windows/Options.cpp 2006-11-14 22:54:43 UTC (rev 2008) @@ -0,0 +1,84 @@ +// Combat Simulator Project +// Copyright (C) 2002 The Combat Simulator Project +// http://csp.sourceforge.net +// +// 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; either version 2 +// of the License, or (at your option) any later version. +// +// 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. + + +/** + * @file Options.cpp + * + **/ + +#include <csp/cspsim/wf/Button.h> +#include <csp/cspsim/wf/Tab.h> +#include <csp/cspsim/wf/TableControlContainer.h> +#include <csp/cspsim/windows/DisplayOptions.h> +#include <csp/cspsim/windows/Options.h> +#include <csp/cspsim/windows/SoundOptions.h> +#include <csp/csplib/data/ObjectInterface.h> + +#include <osg/Vec4> + +CSP_NAMESPACE + +namespace windows { + +Options::Options(wf::Theme* theme) : wf::Window(theme) { + setSize(wf::Size(140.0, 120.0)); + setCaption("Options"); + + Ref<wf::TableControlContainer> topTable = new wf::TableControlContainer(getTheme(), 1, 2); + topTable->getRows()[0].setHeight(0.85f); + topTable->getRows()[1].setHeight(0.15f); + setControl(topTable.get()); + + // Add the tab page. + Ref<wf::Tab> tab = new wf::Tab(getTheme()); + m_DisplayOptionsPage = new DisplayOptions(getTheme()); + tab->addPage(m_DisplayOptionsPage.get()); + m_SoundOptionsPage = new SoundOptions(getTheme()); + tab->addPage(m_SoundOptionsPage.get()); + + topTable->setControl(0,0, tab.get()); + + Ref<wf::TableControlContainer> okCancelTable = new wf::TableControlContainer(getTheme(), 3, 1); + topTable->setControl(0, 1, okCancelTable.get()); + okCancelTable->getColumns()[0].setWidth(0.6f); + okCancelTable->getColumns()[1].setWidth(0.2f); + okCancelTable->getColumns()[2].setWidth(0.2f); + Ref<wf::Button> cancelButton = new wf::Button(getTheme(), "Cancel"); + cancelButton->addButtonClickedHandler(sigc::mem_fun(*this, &Options::onCancel)); + okCancelTable->setControl(1, 0, cancelButton.get()); + + Ref<wf::Button> okButton = new wf::Button(getTheme(), "OK"); + okButton->addButtonClickedHandler(sigc::mem_fun(*this, &Options::onOK)); + okCancelTable->setControl(2, 0, okButton.get()); +} + +void Options::onOK() { + close(); +} + +void Options::onCancel() { + close(); +} + +Options::~Options() { +} + +} // namespace windows + +CSP_NAMESPACE_END Added: trunk/csp/cspsim/windows/Options.h =================================================================== --- trunk/csp/cspsim/windows/Options.h 2006-11-14 22:53:09 UTC (rev 2007) +++ trunk/csp/cspsim/windows/Options.h 2006-11-14 22:54:43 UTC (rev 2008) @@ -0,0 +1,54 @@ +// Combat Simulator Project +// Copyright (C) 2002 The Combat Simulator Project +// http://csp.sourceforge.net +// +// 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; either version 2 +// of the License, or (at your option) any later version. +// +// 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. + + +/** + * @file Options.h + * + **/ + +#ifndef __CSPSIM_WINDOWS_OPTIONS_H__ +#define __CSPSIM_WINDOWS_OPTIONS_H__ + +#include <csp/cspsim/wf/Window.h> + +CSP_NAMESPACE + +namespace windows { + +class DisplayOptions; +class SoundOptions; + +class Options : public wf::Window { +public: + Options(wf::Theme* theme); + virtual ~Options(); + +private: + void onOK(); + void onCancel(); + + Ref<DisplayOptions> m_DisplayOptionsPage; + Ref<SoundOptions> m_SoundOptionsPage; +}; + +} // namespace windows + +CSP_NAMESPACE_END + +#endif // __CSPSIM_WINDOWS_OPTIONS_H__ Added: trunk/csp/cspsim/windows/SoundOptions.h =================================================================== --- trunk/csp/cspsim/windows/SoundOptions.h 2006-11-14 22:53:09 UTC (rev 2007) +++ trunk/csp/cspsim/windows/SoundOptions.h 2006-11-14 22:54:43 UTC (rev 2008) @@ -0,0 +1,46 @@ +// Combat Simulator Project +// Copyright (C) 2002 The Combat Simulator Project +// http://csp.sourceforge.net +// +// 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; either version 2 +// of the License, or (at your option) any later version. +// +// 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. + + +/** + * @file SoundOptions.h + * + **/ + +#ifndef __CSPSIM_WINDOWS_SOUNDOPTIONS_H__ +#define __CSPSIM_WINDOWS_SOUNDOPTIONS_H__ + +#include <csp/cspsim/wf/TabPage.h> + +CSP_NAMESPACE + +namespace windows { + +class SoundOptions : public wf::TabPage { +public: + SoundOptions(wf::Theme* theme); + virtual ~SoundOptions(); + +private: +}; + +} // namespace windows + +CSP_NAMESPACE_END + +#endif // __CSPSIM_WINDOWS_SOUNDOPTIONS_H__ |
From: <sv...@ww...> - 2006-11-14 22:53:15
|
Author: stormbringer Date: 2006-11-14 14:53:09 -0800 (Tue, 14 Nov 2006) New Revision: 2007 Added: trunk/csp/cspsim/windows/SoundOptions.cpp Log: More code for "options" dialog Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2007 Added: trunk/csp/cspsim/windows/SoundOptions.cpp =================================================================== --- trunk/csp/cspsim/windows/SoundOptions.cpp 2006-11-14 22:50:53 UTC (rev 2006) +++ trunk/csp/cspsim/windows/SoundOptions.cpp 2006-11-14 22:53:09 UTC (rev 2007) @@ -0,0 +1,42 @@ +// Combat Simulator Project +// Copyright (C) 2002 The Combat Simulator Project +// http://csp.sourceforge.net +// +// 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; either version 2 +// of the License, or (at your option) any later version. +// +// 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. + + +/** + * @file SoundOptions.cpp + * + **/ + +#include <csp/cspsim/windows/SoundOptions.h> + +#include <osg/Vec4> + +CSP_NAMESPACE + +namespace windows { + +SoundOptions::SoundOptions(wf::Theme* theme) : wf::TabPage(theme) { + setText("Sound"); +} + +SoundOptions::~SoundOptions() { +} + +} // namespace windows + +CSP_NAMESPACE_END |
From: <sv...@ww...> - 2006-11-14 22:51:01
|
Author: stormbringer Date: 2006-11-14 14:50:53 -0800 (Tue, 14 Nov 2006) New Revision: 2006 Modified: trunk/csp/cspsim/windows/QuitResume.cpp trunk/csp/cspsim/windows/QuitResume.h Log: Add "Options" to "quit" dialog Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2006 Modified: trunk/csp/cspsim/windows/QuitResume.cpp =================================================================== --- trunk/csp/cspsim/windows/QuitResume.cpp 2006-11-14 22:48:32 UTC (rev 2005) +++ trunk/csp/cspsim/windows/QuitResume.cpp 2006-11-14 22:50:53 UTC (rev 2006) @@ -24,6 +24,9 @@ #include <csp/cspsim/CSPSim.h> #include <csp/cspsim/wf/Button.h> +#include <csp/cspsim/wf/TableControlContainer.h> +#include <csp/cspsim/wf/WindowManager.h> +#include <csp/cspsim/windows/Options.h> #include <csp/cspsim/windows/QuitResume.h> #include <csp/csplib/data/ObjectInterface.h> @@ -33,29 +36,25 @@ namespace windows { -QuitResume::QuitResume() { - // Completely white and opaque background. - setBackgroundColor(osg::Vec4(0.1f, 0.3f, 0.15f, 0.75f)); - setSize(wf::Size(80.0, 30.0)); +QuitResume::QuitResume(wf::Theme* theme) : wf::Window(theme) { + setSize(wf::Size(100.0, 25.0)); setZPos(0.0); setCaption("Combat Simulator Project"); - Ref<wf::Button> quitButton = new wf::Button; - quitButton->setLocation(wf::Point(-17.5, -2.0f)); - quitButton->setSize(wf::Size(25, 10)); - quitButton->setZPos(getZPos() - 0.1f); - quitButton->setText("Quit"); - addControl(quitButton.get()); + Ref<wf::TableControlContainer> table = new wf::TableControlContainer(getTheme(), 3, 1); + setControl(table.get()); + + Ref<wf::Button> resumeButton = new wf::Button(getTheme(), "Resume"); + resumeButton->addButtonClickedHandler(sigc::mem_fun(*this, &QuitResume::onResume)); + table->setControl(0, 0, resumeButton.get()); - Ref<wf::Button> resumeButton = new wf::Button; - resumeButton->setLocation(wf::Point(17.5, -2.0f)); - resumeButton->setSize(wf::Size(25, 10)); - resumeButton->setZPos(getZPos() - 0.1f); - resumeButton->setText("Resume"); - addControl(resumeButton.get()); - + Ref<wf::Button> optionsButton = new wf::Button(getTheme(), "Options"); + optionsButton->addButtonClickedHandler(sigc::mem_fun(*this, &QuitResume::onOptions)); + table->setControl(1, 0, optionsButton.get()); + + Ref<wf::Button> quitButton = new wf::Button(getTheme(), "Quit"); quitButton->addButtonClickedHandler(sigc::mem_fun(*this, &QuitResume::onQuit)); - resumeButton->addButtonClickedHandler(sigc::mem_fun(*this, &QuitResume::onResume)); + table->setControl(2, 0, quitButton.get()); } void QuitResume::onResume() { @@ -66,6 +65,18 @@ CSPSim::theSim->quit(); } +void QuitResume::onOptions() { + wf::WindowManager* manager = getWindowManager(); + if(manager != NULL) { + if(!manager->windowIsOpen<Options>()) { + Ref<Window> options = new Options(getTheme()); + manager->show(options.get()); + } + } + + close(); +} + QuitResume::~QuitResume() { } Modified: trunk/csp/cspsim/windows/QuitResume.h =================================================================== --- trunk/csp/cspsim/windows/QuitResume.h 2006-11-14 22:48:32 UTC (rev 2005) +++ trunk/csp/cspsim/windows/QuitResume.h 2006-11-14 22:50:53 UTC (rev 2006) @@ -33,12 +33,13 @@ class QuitResume : public wf::Window { public: - QuitResume(); + QuitResume(wf::Theme* theme); virtual ~QuitResume(); private: void onResume(); void onQuit(); + void onOptions(); }; } // namespace windows |
From: <sv...@ww...> - 2006-11-14 22:48:41
|
Author: stormbringer Date: 2006-11-14 14:48:32 -0800 (Tue, 14 Nov 2006) New Revision: 2005 Modified: trunk/csp/cspsim/Engine.cpp trunk/csp/cspsim/GameScreen.cpp trunk/csp/cspsim/HID.cpp trunk/csp/cspsim/SConscript Log: Update to GUI code Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2005 Modified: trunk/csp/cspsim/Engine.cpp =================================================================== --- trunk/csp/cspsim/Engine.cpp 2006-11-01 21:07:56 UTC (rev 2004) +++ trunk/csp/cspsim/Engine.cpp 2006-11-14 22:48:32 UTC (rev 2005) @@ -237,14 +237,14 @@ fPitch = 1.999; } (*i)->m_EngineSound->state()->setPitch(fPitch); - (*i)->m_EngineSound->state()->setGain(fBlend); - (*i)->m_EngineSound->state()->apply(); + (*i)->m_EngineSound->state()->setGain(fBlend / 3); +// (*i)->m_EngineSound->state()->apply(); } // the afterburner sound is played when fBlend is between 2 and 3 // ToDo: check whether this is the right parameter to determine if burner is running if((*i)->m_AfterburnerSound.valid()) { - (*i)->m_AfterburnerSound->state()->setGain(fBlend); + (*i)->m_AfterburnerSound->state()->setGain(fBlend / 3); isPlaying = (*i)->m_AfterburnerSound->state()->getPlay(); if (fBlend > 2.0 && !isPlaying) { (*i)->m_AfterburnerSound->play(); Modified: trunk/csp/cspsim/GameScreen.cpp =================================================================== --- trunk/csp/cspsim/GameScreen.cpp 2006-11-01 21:07:56 UTC (rev 2004) +++ trunk/csp/cspsim/GameScreen.cpp 2006-11-14 22:48:32 UTC (rev 2005) @@ -291,7 +291,7 @@ void GameScreen::on_Quit() { wf::WindowManager* manager = CSPSim::theSim->getScene()->getWindowManager(); if(!manager->windowIsOpen<windows::QuitResume>()) { - Ref<wf::Window> quitResumeWindow = new windows::QuitResume; + Ref<wf::Window> quitResumeWindow = new windows::QuitResume(manager->getTheme()); manager->show(quitResumeWindow.get()); } } Modified: trunk/csp/cspsim/HID.cpp =================================================================== --- trunk/csp/cspsim/HID.cpp 2006-11-01 21:07:56 UTC (rev 2004) +++ trunk/csp/cspsim/HID.cpp 2006-11-14 22:48:32 UTC (rev 2005) @@ -108,6 +108,7 @@ m_Map = 0; m_VirtualMode = 0; m_JoystickModifier = 0; + m_Object = 0; m_ActiveScript = 0; } Modified: trunk/csp/cspsim/SConscript =================================================================== --- trunk/csp/cspsim/SConscript 2006-11-01 21:07:56 UTC (rev 2004) +++ trunk/csp/cspsim/SConscript 2006-11-14 22:48:32 UTC (rev 2005) @@ -374,8 +374,22 @@ 'wf/Button.cpp', 'wf/Button.h', + 'wf/Container.cpp', + 'wf/Container.h', 'wf/Control.cpp', 'wf/Control.h', + 'wf/Label.cpp', + 'wf/Label.h', + 'wf/MultiControlContainer.cpp', + 'wf/MultiControlContainer.h', + 'wf/SingleControlContainer.cpp', + 'wf/SingleControlContainer.h', + 'wf/Tab.cpp', + 'wf/Tab.h', + 'wf/TableControlContainer.cpp', + 'wf/TableControlContainer.h', + 'wf/TabPage.cpp', + 'wf/TabPage.h', 'wf/Window.cpp', 'wf/Window.h', 'wf/WindowManager.cpp', @@ -384,8 +398,14 @@ 'wf/themes/Default.cpp', 'wf/themes/Default.h', + 'windows/DisplayOptions.cpp', + 'windows/DisplayOptions.h', 'windows/QuitResume.cpp', 'windows/QuitResume.h', + 'windows/Options.cpp', + 'windows/Options.h', + 'windows/SoundOptions.cpp', + 'windows/SoundOptions.h', ], deps = ['csplib', 'opengl', 'osg', 'sdl', 'sound']) |
From: Mark R. <mk...@gm...> - 2006-11-12 04:27:26
|
test (ignore) |
From: Mark R. <mk...@gm...> - 2006-11-12 04:19:00
|
test (ignore) |
From: Ataullah C. <urb...@ch...> - 2006-11-10 07:46:37
|
Hi, Nice PHffARMACY http://www.punhertionkadesun.com =20 up there now in orbit about this planet. You and I will grab some |
From: Jacobo I. <gl...@al...> - 2006-11-10 07:25:55
|
Hi, Nice PHffARMACY http://www.punhertionkadesun.com =20 I know that, mon Amiral, because this artifact emits tachyons and I |
From: <sv...@ww...> - 2006-11-01 21:08:02
|
Author: stormbringer Date: 2006-11-01 13:07:56 -0800 (Wed, 01 Nov 2006) New Revision: 2004 Added: trunk/csp/cspsim/wf/ trunk/csp/cspsim/wf/Button.cpp trunk/csp/cspsim/wf/Button.h trunk/csp/cspsim/wf/Control.cpp trunk/csp/cspsim/wf/Control.h trunk/csp/cspsim/wf/Point.h trunk/csp/cspsim/wf/Size.h trunk/csp/cspsim/wf/Theme.h trunk/csp/cspsim/wf/Window.cpp trunk/csp/cspsim/wf/Window.h trunk/csp/cspsim/wf/WindowManager.cpp trunk/csp/cspsim/wf/WindowManager.h trunk/csp/cspsim/wf/themes/ trunk/csp/cspsim/wf/themes/Default.cpp trunk/csp/cspsim/wf/themes/Default.h trunk/csp/cspsim/windows/ trunk/csp/cspsim/windows/QuitResume.cpp trunk/csp/cspsim/windows/QuitResume.h Log: More GUI code Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2004 Diff omitted (41430 bytes). |
From: <sv...@ww...> - 2006-11-01 21:04:26
|
Author: stormbringer Date: 2006-11-01 13:04:20 -0800 (Wed, 01 Nov 2006) New Revision: 2003 Modified: trunk/csp/cspsim/GameScreen.cpp trunk/csp/cspsim/SConscript trunk/csp/cspsim/StateStack.h trunk/csp/cspsim/VirtualScene.cpp trunk/csp/cspsim/VirtualScene.h Log: Introduce GUI system Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2003 Modified: trunk/csp/cspsim/GameScreen.cpp =================================================================== --- trunk/csp/cspsim/GameScreen.cpp 2006-11-01 21:02:07 UTC (rev 2002) +++ trunk/csp/cspsim/GameScreen.cpp 2006-11-01 21:04:20 UTC (rev 2003) @@ -35,6 +35,8 @@ #include <csp/cspsim/views/CameraAgent.h> #include <csp/cspsim/views/CameraCommand.h> #include <csp/cspsim/views/View.h> +#include <csp/cspsim/wf/WindowManager.h> +#include <csp/cspsim/windows/QuitResume.h> #include <csp/csplib/util/FileUtility.h> #include <csp/csplib/util/Log.h> @@ -287,7 +289,11 @@ } void GameScreen::on_Quit() { - CSPSim::theSim->quit(); + wf::WindowManager* manager = CSPSim::theSim->getScene()->getWindowManager(); + if(!manager->windowIsOpen<windows::QuitResume>()) { + Ref<wf::Window> quitResumeWindow = new windows::QuitResume; + manager->show(quitResumeWindow.get()); + } } void GameScreen::on_Pause() { Modified: trunk/csp/cspsim/SConscript =================================================================== --- trunk/csp/cspsim/SConscript 2006-11-01 21:02:07 UTC (rev 2002) +++ trunk/csp/cspsim/SConscript 2006-11-01 21:04:20 UTC (rev 2003) @@ -371,6 +371,21 @@ 'views/InternalView.h', 'views/View.cpp', 'views/View.h', + + 'wf/Button.cpp', + 'wf/Button.h', + 'wf/Control.cpp', + 'wf/Control.h', + 'wf/Window.cpp', + 'wf/Window.h', + 'wf/WindowManager.cpp', + 'wf/WindowManager.h', + + 'wf/themes/Default.cpp', + 'wf/themes/Default.h', + + 'windows/QuitResume.cpp', + 'windows/QuitResume.h', ], deps = ['csplib', 'opengl', 'osg', 'sdl', 'sound']) Modified: trunk/csp/cspsim/StateStack.h =================================================================== --- trunk/csp/cspsim/StateStack.h 2006-11-01 21:02:07 UTC (rev 2002) +++ trunk/csp/cspsim/StateStack.h 2006-11-01 21:04:20 UTC (rev 2003) @@ -34,6 +34,10 @@ #include <map> #include <vector> +#ifdef _WIN32 +#include <assert.h> +#endif + CSP_NAMESPACE // This class duplicates some of the code in osg::State to track cumulative Modified: trunk/csp/cspsim/VirtualScene.cpp =================================================================== --- trunk/csp/cspsim/VirtualScene.cpp 2006-11-01 21:02:07 UTC (rev 2002) +++ trunk/csp/cspsim/VirtualScene.cpp 2006-11-01 21:04:20 UTC (rev 2003) @@ -50,6 +50,8 @@ #include <csp/cspsim/theater/FeatureGroup.h> #include <csp/cspsim/theater/FeatureSceneGroup.h> +#include <csp/cspsim/wf/WindowManager.h> + #include <csp/csplib/util/Log.h> #include <csp/csplib/data/Types.h> #include <csp/csplib/util/Math.h> @@ -444,6 +446,7 @@ createFarView(); createNearView(); createInfoView(); + createWindowView(); } osgUtil::SceneView *VirtualScene::makeSceneView(unsigned mask) { @@ -504,6 +507,22 @@ m_InfoView->setSceneData(m_InfoGroup.get()); } +wf::WindowManager* VirtualScene::getWindowManager() { + return m_WindowManager.get(); +} + +void VirtualScene::createWindowView() { + m_WindowView = makeSceneView(0); + m_WindowView->getRenderStage()->setClearMask(GL_DEPTH_BUFFER_BIT); + + // eye, center, up + osg::Matrix view_matrix; + view_matrix.makeLookAt(osg::Vec3(0, -200, 0.0), osg::Vec3(0.0, 0.0, 0.0), osg::Vec3(0, 0, 1)); + m_WindowView->setViewMatrix(view_matrix); + + m_WindowManager = new wf::WindowManager(m_WindowView.get()); +} + void VirtualScene::buildScene() { CSPLOG(INFO, APP) << "VirtualScene::buildScene() "; @@ -660,12 +679,19 @@ m_InfoView->draw(); } +void VirtualScene::drawWindowView() { + m_WindowView->update(); + m_WindowView->cull(); + m_WindowView->draw(); +} + int VirtualScene::drawScene() { CSPLOG(DEBUG, APP) << "VirtualScene::drawScene()..."; drawVeryFarView(); drawFarView(); drawNearView(); drawInfoView(); + drawWindowView(); if (m_Terrain.valid()) m_Terrain->endDraw(); return 1; } @@ -1019,6 +1045,9 @@ } bool VirtualScene::pick(int x, int y) { + if(m_WindowManager->pick(x, y)) + return true; + if (m_NearObjectGroup->getNumChildren() > 0) { assert(m_NearObjectGroup->getNumChildren() == 1); osg::Vec3 var_near; Modified: trunk/csp/cspsim/VirtualScene.h =================================================================== --- trunk/csp/cspsim/VirtualScene.h 2006-11-01 21:02:07 UTC (rev 2002) +++ trunk/csp/cspsim/VirtualScene.h 2006-11-01 21:04:20 UTC (rev 2003) @@ -53,6 +53,9 @@ class FeatureGroup; class Sky; +namespace wf { + class WindowManager; +} /** * The purpose of this simple class is to provide a new opengl context id @@ -150,6 +153,8 @@ bool pick(int x, int y); + wf::WindowManager* getWindowManager(); + void drawPlayerInterface(); osg::Group *getInfoGroup(); @@ -181,11 +186,13 @@ void createFarView(); void createNearView(); void createInfoView(); + void createWindowView(); void drawVeryFarView(); void drawFarView(); void drawNearView(); void drawInfoView(); + void drawWindowView(); protected: void _updateFog(Vector3 const &lookPos, Vector3 const &eyePos); @@ -196,6 +203,7 @@ osg::ref_ptr<osgUtil::SceneView> m_NearView; osg::ref_ptr<osgUtil::SceneView> m_FarView; osg::ref_ptr<osgUtil::SceneView> m_VeryFarView; + osg::ref_ptr<osgUtil::SceneView> m_WindowView; osg::ref_ptr<osg::State> m_GlobalState; osg::ref_ptr<osg::StateSet> m_GlobalStateSet; @@ -203,6 +211,8 @@ osg::ref_ptr<osg::FrameStamp> m_FrameStamp; Ref<ContextIDFactory> m_ContextIDFactory; + + Ref<wf::WindowManager> m_WindowManager; float m_ViewDistance; float m_ViewAngle; |
From: <sv...@ww...> - 2006-11-01 21:02:23
|
Author: stormbringer Date: 2006-11-01 13:02:07 -0800 (Wed, 01 Nov 2006) New Revision: 2002 Modified: trunk/csp/cspsim/sound/SoundEngine.cpp Log: Catch initialization errors of sound system. This patch was posted at the forum a few months ago. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2002 Modified: trunk/csp/cspsim/sound/SoundEngine.cpp =================================================================== --- trunk/csp/cspsim/sound/SoundEngine.cpp 2006-10-25 07:39:07 UTC (rev 2001) +++ trunk/csp/cspsim/sound/SoundEngine.cpp 2006-11-01 21:02:07 UTC (rev 2002) @@ -1,96 +1,119 @@ -// Combat Simulator Project -// Copyright (C) 2005 The Combat Simulator Project -// http://csp.sourceforge.net -// -// 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; either version 2 -// of the License, or (at your option) any later version. -// -// 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. - - -/** - * @file SoundEngine.h - * - **/ - - -#include <csp/cspsim/sound/SoundEngine.h> -#include <csp/csplib/util/Log.h> - -#include <osgAL/SoundManager> -#include <osgAL/SoundRoot> -#include <csp/csplib/util/undef.h> - -#include <cassert> - -CSP_NAMESPACE - - -SoundEngine &SoundEngine::getInstance() { - static SoundEngine *engine = 0; - if (!engine) { - CSPLOG(DEBUG, APP) << "Creating SoundEngine"; - engine = new SoundEngine; - } - return *engine; -} - - -SoundEngine::SoundEngine() { -} - -SoundEngine::~SoundEngine() { -} - -osgAL::SoundManager *SoundEngine::getManager() { - return osgAL::SoundManager::instance(); -} - -void SoundEngine::initialize() { - CSPLOG(DEBUG, APP) << "SoundEngine::initialize"; - osgAL::SoundManager *manager = getManager(); - CSPLOG(DEBUG, APP) << "SoundEngine::initialize manager = " << manager; - assert(manager); - manager->init(32); - CSPLOG(DEBUG, APP) << "SoundEngine::initialize manager init"; - CSPLOG(DEBUG, APP) << "SoundEngine::initialize env = " << manager->getEnvironment(); - manager->getEnvironment()->setDistanceModel(openalpp::InverseDistanceClamped); - manager->getEnvironment()->setDopplerFactor(0.3); // full doppler produces artifacts - manager->setMaxVelocity(200); - //manager->setClampVelocity(true); (not available in 20041121-3 debian package) - CSPLOG(DEBUG, APP) << "SoundEngine::initialize done"; -} - -void SoundEngine::shutdown() { - getManager()->shutdown(); -} - -osgAL::SoundRoot *SoundEngine::getSoundRoot() { - if (!m_SoundRoot) createSoundRoot(); - return m_SoundRoot.get(); -} - -void SoundEngine::createSoundRoot() { - assert(!m_SoundRoot); - m_SoundRoot = new osgAL::SoundRoot(); -} - -void SoundEngine::mute() { - getManager()->getEnvironment()->setGain(0.0); -} - -void SoundEngine::unmute() { - getManager()->getEnvironment()->setGain(1.0); -} - -CSP_NAMESPACE_END - +// Combat Simulator Project +// Copyright (C) 2005 The Combat Simulator Project +// http://csp.sourceforge.net +// +// 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; either version 2 +// of the License, or (at your option) any later version. +// +// 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. + + +/** + * @file SoundEngine.h + * + **/ + + +#include <csp/cspsim/sound/SoundEngine.h> +#include <csp/csplib/util/Log.h> + +#include <osgAL/SoundManager> +#include <osgAL/SoundRoot> +#include <csp/csplib/util/undef.h> + +#include <cassert> + +CSP_NAMESPACE + +// Local log macro + +#define LOG(P) CSPLOG(P, AUDIO) + +#define ERR LOG(ERROR) +#define DEB LOG(DEBUG) +#define INF LOG(INFO) + +SoundEngine &SoundEngine::getInstance() { + static SoundEngine *engine = 0; + if (!engine) { + CSPLOG(DEBUG, APP) << "Creating SoundEngine"; + engine = new SoundEngine; + } + return *engine; +} + + +SoundEngine::SoundEngine() { +} + +SoundEngine::~SoundEngine() { +} + +osgAL::SoundManager *SoundEngine::getManager() { + return osgAL::SoundManager::instance(); +} + + +void SoundEngine::initialize () +{ + DEB << "Initializing the sound engine"; + try { + assert (getManager ()); + osgAL::SoundManager& manager = *getManager (); + + DEB << "Initializing osgAL::SoundManager"; + manager.init (32); // num_soundsources + assert (manager.initialized ()); + + DEB << "Setting sound environment parameters"; + assert (manager.getEnvironment ()); + openalpp::AudioEnvironment& env = *manager.getEnvironment (); + env.setDistanceModel (openalpp::InverseDistanceClamped); + env.setDopplerFactor (0.3); // full doppler produces artifacts + manager.setMaxVelocity (200); + manager.setClampVelocity (true); + } + catch (const std::exception& x) { + ERR << "Sound engine initialization failed (" << x.what() << ")"; + throw; // Don't know how to continue without sound. + } + catch (...) { + ERR << "Sound engine initialization failed (unknown exception)"; + throw; // Don't know how to continue without sound. + } + INF << "Sound engine initialization succeeded"; +} + +void SoundEngine::shutdown() { + getManager()->shutdown(); +} + +osgAL::SoundRoot *SoundEngine::getSoundRoot() { + if (!m_SoundRoot) createSoundRoot(); + return m_SoundRoot.get(); +} + +void SoundEngine::createSoundRoot() { + assert(!m_SoundRoot); + m_SoundRoot = new osgAL::SoundRoot(); +} + +void SoundEngine::mute() { + getManager()->getEnvironment()->setGain(0.0); +} + +void SoundEngine::unmute() { + getManager()->getEnvironment()->setGain(1.0); +} + +CSP_NAMESPACE_END + |