[Gcblue-commits] gcb_wx/src/common simmath.cpp,1.16,1.17 tcSoundConsole.cpp,1.8,1.9
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-10-29 02:51:25
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17989/src/common Modified Files: simmath.cpp tcSoundConsole.cpp Log Message: A few more changes related to GDI+ replacement Index: tcSoundConsole.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcSoundConsole.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcSoundConsole.cpp 7 Oct 2004 22:01:45 -0000 1.8 --- tcSoundConsole.cpp 29 Oct 2004 02:50:43 -0000 1.9 *************** *** 28,31 **** --- 28,32 ---- #include "tcConsoleBox.h" #include "tcSound.h" + #include "tcTime.h" #include "common/tinyxml.h" *************** *** 36,42 **** void tcSoundConsole::Draw() { if (textBox->Redraw()) { ! tcSound::Get()->PlayEffect(mnSoundEffect); } --- 37,49 ---- void tcSoundConsole::Draw() { + if (textBox->Redraw()) { ! unsigned int counter = tcTime::Get()->Get30HzCount(); ! if (counter - lastEffect > 4) ! { ! tcSound::Get()->PlayEffect(mnSoundEffect); ! lastEffect = counter; ! } } *************** *** 89,95 **** const wxString& configFile, const wxString& name) : ! tcXmlWindow(parent, pos, size, configFile, name) { - mnSoundEffect = SEFFECT_CONSOLE; if (!config) --- 96,103 ---- const wxString& configFile, const wxString& name) : ! tcXmlWindow(parent, pos, size, configFile, name), ! mnSoundEffect(SEFFECT_CONSOLE), ! lastEffect(0) { if (!config) Index: simmath.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/simmath.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** simmath.cpp 16 Aug 2004 01:43:30 -0000 1.16 --- simmath.cpp 29 Oct 2004 02:50:43 -0000 1.17 *************** *** 102,115 **** } /******************************* tcGeoRect ********************************/ /** * @return true if point (lon,lat) in radians is within * @return region. */ ! bool tcGeoRect::ContainsPoint(float lon, float lat) { tsGeoPoint p; ! p.Set(lon, lat, 0); return GeoWithinRegion(p, this) != 0; } --- 102,122 ---- } + bool tcRect::ContainsPoint(float x, float y) + { + return (x >= left) && (x < right) && (y >= bottom) && (y < top); + } + /******************************* tcGeoRect ********************************/ /** + * @param x longitude in radians + * @param y latitude in radians * @return true if point (lon,lat) in radians is within * @return region. */ ! bool tcGeoRect::ContainsPoint(float x, float y) { tsGeoPoint p; ! p.Set(x, y, 0); return GeoWithinRegion(p, this) != 0; } |