From: <sv...@ww...> - 2005-01-03 10:38:43
|
Author: delta Date: 2005-01-03 02:38:31 -0800 (Mon, 03 Jan 2005) New Revision: 1435 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/GameScreen.cpp Log: * Snapshot is now saved as jpeg. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1435 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-01-02 09:17:56 UTC (rev 1434) +++ trunk/CSP/CSPSim/CHANGES.current 2005-01-03 10:38:31 UTC (rev 1435) @@ -1,5 +1,9 @@ Version 0.4.0 (in progress) =========================== + +2005-01-03: delta + * Snapshot is now saved as jpeg. + 2005-01-01: onsight * Fixed a sign error on the server time offset that made it impossible to correct significant clock skew between peers. Also simplified the Modified: trunk/CSP/CSPSim/Source/GameScreen.cpp =================================================================== --- trunk/CSP/CSPSim/Source/GameScreen.cpp 2005-01-02 09:17:56 UTC (rev 1434) +++ trunk/CSP/CSPSim/Source/GameScreen.cpp 2005-01-03 10:38:31 UTC (rev 1435) @@ -106,10 +106,9 @@ return day + '-' + hour; } public: - // XXX: next release of osg should allow saving to jpg instead of bmp - SnapImageDrawCallback(const std::string& filename = "CSP",const std::string& ext = ".bmp"): + SnapImageDrawCallback(const std::string& filename = "CSP",const std::string& ext = ".jpg"): m_Filename(filename), - m_Ext(".bmp"), + m_Ext(ext), m_SnapImageOnNextFrame(false){ } void setSnapImageOnNextFrame(bool flag) { @@ -130,7 +129,7 @@ osg::ref_ptr<osg::Image> image = new osg::Image; image->readPixels(x,y,width,height,GL_RGB,GL_UNSIGNED_BYTE); - // save the file in the form CSPScreenmmddyy-hhmmss.ext + // save the file in the form CSPmmddyy-hhmmss.ext osgDB::writeImageFile(*image,m_Filename + getDate() + m_Ext); m_SnapImageOnNextFrame = false; } @@ -187,6 +186,10 @@ m_OnPlayerJoin(this, &GameScreen::onPlayerJoin), m_OnPlayerQuit(this, &GameScreen::onPlayerQuit) { + //typedef void (GameScreen::*OPJ)(int, const std::string&); + //OPJ opj; + //m_OnPlayerJoin = simcore::ScopedCallback2<int, const std::string&>(this, opj); + //m_OnPlayerQuit = simcore::ScopedCallback2(this, &GameScreen::onPlayerQuit); initInterface(); } |