From: <mg...@us...> - 2008-05-02 11:15:09
|
Revision: 1437 http://planeshift.svn.sourceforge.net/planeshift/?rev=1437&view=rev Author: mgist Date: 2008-05-02 04:15:16 -0700 (Fri, 02 May 2008) Log Message: ----------- - Bumped CS and CEL version to v1.3 (trunk). Revisions 29523 and 3337. - Fixed a few bugs (patch from Vornne) triggered by this bump. - Changed our sound to use the OpenAL renderer. - Replaced regions with collections. - Added initial (currently expensive) support for character shaders. - Some code cleanups and warning fixes. Modified Paths: -------------- trunk/docs/compiling.html trunk/docs/history.txt trunk/mk/jam/crystalspace_staticplugins_msvc7.jam trunk/mk/jam/crystalspace_staticplugins_msvc71.jam trunk/mk/jam/crystalspace_staticplugins_msvc8.jam trunk/mk/jam/crystalspace_staticplugins_msvc9.jam trunk/psclient.cfg trunk/src/client/charapp.cpp trunk/src/client/clientcachemanager.cpp trunk/src/client/clientcachemanager.h trunk/src/client/gui/pawscharpick.cpp trunk/src/client/gui/pawsquestwindow.cpp trunk/src/client/gui/pawsquestwindow.h trunk/src/client/iclient/isoundmngr.h trunk/src/client/pscelclient.cpp trunk/src/client/pscelclient.h trunk/src/client/psclientchar.cpp trunk/src/client/psclientchar.h trunk/src/client/psengine.cpp trunk/src/client/psengine.h trunk/src/client/sound/pssoundmngr.cpp trunk/src/client/sound/pssoundmngr.h trunk/src/client/zonehandler.cpp trunk/src/common/effects/pseffectlight.cpp trunk/src/common/effects/pseffectlight.h trunk/src/common/effects/pseffectmanager.cpp trunk/src/common/effects/pseffectmanager.h trunk/src/common/effects/pseffectobj.cpp trunk/src/common/effects/pseffectobj.h trunk/src/common/effects/pseffectobjdecal.cpp trunk/src/common/effects/pseffectobjlabel.cpp trunk/src/common/effects/pseffectobjmesh.cpp trunk/src/common/effects/pseffectobjparticles.cpp trunk/src/common/effects/pseffectobjquad.cpp trunk/src/common/effects/pseffectobjsimpmesh.cpp trunk/src/common/effects/pseffectobjsound.cpp trunk/src/common/effects/pseffectobjsound.h trunk/src/common/effects/pseffectobjspire.cpp trunk/src/common/effects/pseffectobjstar.cpp trunk/src/common/effects/pseffectobjtext2d.cpp trunk/src/common/effects/pseffectobjtrail.cpp trunk/src/common/engine/linmove.cpp trunk/src/common/engine/psworld.cpp trunk/src/common/engine/psworld.h trunk/src/common/net/msghandler.cpp trunk/src/common/paws/pawsgenericview.cpp trunk/src/common/paws/pawsgenericview.h trunk/src/common/paws/pawsmanager.cpp trunk/src/common/paws/pawsobjectview.cpp trunk/src/common/paws/pawsobjectview.h trunk/src/common/paws/pawstextbox.h trunk/src/server/adminmanager.cpp trunk/src/server/command.cpp trunk/src/server/entitymanager.cpp trunk/src/server/psproxlist.cpp trunk/src/server/psserverdr.cpp trunk/src/server/usermanager.cpp Removed Paths: ------------- trunk/src/common/util/psmeshutil.cpp trunk/src/common/util/psmeshutil.h Modified: trunk/docs/compiling.html =================================================================== --- trunk/docs/compiling.html 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/docs/compiling.html 2008-05-02 11:15:16 UTC (rev 1437) @@ -12,12 +12,13 @@ var CSrev = "29388"; // CS_SOURCE_REV var CELrev = "3331"; // CEL_SOURCE_REV var CAL3Drev = "493"; // CAL3D_SOURCE_REV - var CSrev_HEAD = "29388"; // CS_SOURCE_REV_HEAD - var CELrev_HEAD = "3331"; // CEL_SOURCE_REV_HEAD + var CSrev_HEAD = "29523"; // CS_SOURCE_REV_HEAD + var CELrev_HEAD = "3337"; // CEL_SOURCE_REV_HEAD var CAL3Drev_HEAD = "493"; // CAL3D_SOURCE_REV_HEAD - var csWinLibsVersion = "1.2_002"; // cs win32 libs version. + var csWinLibsVersionStab = "1.2_002"; // cs win32 libs version. + var csWinLibsVersion = "1.3_003"; // cs win32 libs version. //Update date and author, to be changed everytime and updates occurred - var UpdateDate = "27 April 2008"; //Date when the update occurred + var UpdateDate = "2 May 2008"; //Date when the update occurred var UpdateAuthor = "Mike Gist"; //Author of the update --> </script> @@ -226,6 +227,7 @@ replace(/CS_SOURCE_REV/g, CSrev). replace(/CEL_SOURCE_REV/g, CELrev). replace(/UPDATE_DATE/g, UpdateDate). + replace(/LIBS_VER_STAB/g, csWinLibsVersionStab). replace(/LIBS_VER/g, csWinLibsVersion). replace(/UPDATE_AUTHOR/g, UpdateAuthor); @@ -358,17 +360,10 @@ <p> Currently compatible with trunk of PS:<br> <b>CAL3D SVN revision:</b> CAL3D_SOURCE_REV_HEAD <br> - <b>CS 1.2 SVN revision:</b> CS_SOURCE_REV_HEAD <br> - <b>CEL 1.2 SVN revision:</b> CEL_SOURCE_REV_HEAD <br> + <b>CS SVN revision:</b> CS_SOURCE_REV_HEAD <br> + <b>CEL SVN revision:</b> CEL_SOURCE_REV_HEAD <br> </p> </div> - - <p><div ID="forked"> <!-- only shown if the CS dates are different --> - If you want to use latest PS (HEAD) for testing or developing purposes:<br> - <b><i>CS V1.2 SVN revision for latest PS:</i></b> CS_SOURCE_REV_HEAD <br> - <b><i>CEL V1.2 SVN revision for latest PS:</i></b> CEL_SOURCE_REV_HEAD <br> - Note that this version of PS is <b>NOT</b> compatible with Laanx, yet. - </div></p> </p> <!----------------------------------------------------------------------------------------------------> @@ -789,7 +784,7 @@ <p><i class="command">/home/user/development$ svn co -r CS_SOURCE_REV https://crystal.svn.sourceforge.net/svnroot/crystal/CS/branches/release/V1.2 cs</i></p> </div> <div class="Developer"> - <p><i class="command">/home/user/development$ svn co -r CS_SOURCE_REV_HEAD https://crystal.svn.sourceforge.net/svnroot/crystal/CS/branches/release/V1.2 cs</i></p> + <p><i class="command">/home/user/development$ svn co -r CS_SOURCE_REV_HEAD https://crystal.svn.sourceforge.net/svnroot/crystal/CS/trunk cs</i></p> </div> <h3>Crystal Entity Layer (CEL)</h3> @@ -798,7 +793,7 @@ <p><i class="command">/home/user/development$ svn co -r CEL_SOURCE_REV https://cel.svn.sourceforge.net/svnroot/cel/cel/branches/release/V1.2 cel</i></p> </div> <div class="Developer"> - <p><i class="command">/home/user/development$ svn co -r CEL_SOURCE_REV_HEAD https://cel.svn.sourceforge.net/svnroot/cel/cel/branches/release/V1.2 cel</i></p> + <p><i class="command">/home/user/development$ svn co -r CEL_SOURCE_REV_HEAD https://cel.svn.sourceforge.net/svnroot/cel/cel/trunk cel</i></p> </div> <h3>PlaneShift</h3> @@ -862,7 +857,12 @@ <div class="Static"> <a href="http://www.crystalspace3d.org/downloads/cs-win32libs/static/">http://www.crystalspace3d.org/downloads/cs-win32libs/static/</a><br/> </div> - The currently used CS revision needs version <b>LIBS_VER</b>. Don't mix up with other versions!</p> + <div class="User"> + The currently used CS revision needs version <b>LIBS_VER_STAB</b>. Don't mix up with other versions! + </div> + <div class="Developer"> + The currently used CS revision needs version <b>LIBS_VER</b>. Don't mix up with other versions! + </div></p> <div class="MSVC"> <p>Run the program and install the libraries. The Default name is fine. </p></div> <div class="MINGW"> Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/docs/history.txt 2008-05-02 11:15:16 UTC (rev 1437) @@ -1,3 +1,11 @@ +*** 2008-05-02 by Mike Gist +- Bumped CS and CEL version to v1.3 (trunk). Revisions 29523 and 3337. +- Fixed a few bugs (patch from Vornne) triggered by this bump. +- Changed our sound to use the OpenAL renderer. +- Replaced regions with collections. +- Added initial (currently expensive) support for character shaders. +- Some code cleanups and warning fixes. + *** 2008-05-01 by Dave Bentham - Fixed FS#1425 - cannot reward personalised items in events. Modified: trunk/mk/jam/crystalspace_staticplugins_msvc7.jam =================================================================== --- trunk/mk/jam/crystalspace_staticplugins_msvc7.jam 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/mk/jam/crystalspace_staticplugins_msvc7.jam 2008-05-02 11:15:16 UTC (rev 1437) @@ -133,6 +133,26 @@ STATICPLUGIN.cscegui.CFLAGS.release.7 = ; STATICPLUGIN.cscegui.LFLAGS.debug.7 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib CEGUIBase-vc7_d.lib ; STATICPLUGIN.cscegui.LFLAGS.release.7 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib CEGUIBase-vc7.lib ; +STATICPLUGINS.AVAILABLE += animesh ; +STATICPLUGIN.animesh.CFLAGS.debug.7 = ; +STATICPLUGIN.animesh.CFLAGS.release.7 = ; +STATICPLUGIN.animesh.LFLAGS.debug.7 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.animesh.LFLAGS.release.7 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += skeleton2ldr ; +STATICPLUGIN.skeleton2ldr.CFLAGS.debug.7 = ; +STATICPLUGIN.skeleton2ldr.CFLAGS.release.7 = ; +STATICPLUGIN.skeleton2ldr.LFLAGS.debug.7 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.skeleton2ldr.LFLAGS.release.7 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += animeshldr ; +STATICPLUGIN.animeshldr.CFLAGS.debug.7 = ; +STATICPLUGIN.animeshldr.CFLAGS.release.7 = ; +STATICPLUGIN.animeshldr.LFLAGS.debug.7 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.animeshldr.LFLAGS.release.7 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += skeleton2 ; +STATICPLUGIN.skeleton2.CFLAGS.debug.7 = ; +STATICPLUGIN.skeleton2.CFLAGS.release.7 = ; +STATICPLUGIN.skeleton2.LFLAGS.debug.7 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.skeleton2.LFLAGS.release.7 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; STATICPLUGINS.AVAILABLE += bezier ; STATICPLUGIN.bezier.CFLAGS.debug.7 = ; STATICPLUGIN.bezier.CFLAGS.release.7 = ; @@ -536,8 +556,8 @@ STATICPLUGINS.AVAILABLE += gl3d ; STATICPLUGIN.gl3d.CFLAGS.debug.7 = ; STATICPLUGIN.gl3d.CFLAGS.release.7 = ; -STATICPLUGIN.gl3d.LFLAGS.debug.7 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib opengl32.lib ; -STATICPLUGIN.gl3d.LFLAGS.release.7 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib opengl32.lib ; +STATICPLUGIN.gl3d.LFLAGS.debug.7 = libcrystalspace_staticplugins_d.lib libcrystalspace_opengl_d.lib libcrystalspace_d.lib opengl32.lib zlib.lib ; +STATICPLUGIN.gl3d.LFLAGS.release.7 = libcrystalspace_staticplugins.lib libcrystalspace_opengl.lib libcrystalspace.lib opengl32.lib zlib.lib ; STATICPLUGINS.AVAILABLE += soft3d ; STATICPLUGIN.soft3d.CFLAGS.debug.7 = ; STATICPLUGIN.soft3d.CFLAGS.release.7 = ; Modified: trunk/mk/jam/crystalspace_staticplugins_msvc71.jam =================================================================== --- trunk/mk/jam/crystalspace_staticplugins_msvc71.jam 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/mk/jam/crystalspace_staticplugins_msvc71.jam 2008-05-02 11:15:16 UTC (rev 1437) @@ -133,6 +133,26 @@ STATICPLUGIN.cscegui.CFLAGS.release.71 = ; STATICPLUGIN.cscegui.LFLAGS.debug.71 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib CEGUIBase-vc71_d.lib ; STATICPLUGIN.cscegui.LFLAGS.release.71 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib CEGUIBase-vc71.lib ; +STATICPLUGINS.AVAILABLE += animesh ; +STATICPLUGIN.animesh.CFLAGS.debug.71 = ; +STATICPLUGIN.animesh.CFLAGS.release.71 = ; +STATICPLUGIN.animesh.LFLAGS.debug.71 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.animesh.LFLAGS.release.71 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += skeleton2ldr ; +STATICPLUGIN.skeleton2ldr.CFLAGS.debug.71 = ; +STATICPLUGIN.skeleton2ldr.CFLAGS.release.71 = ; +STATICPLUGIN.skeleton2ldr.LFLAGS.debug.71 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.skeleton2ldr.LFLAGS.release.71 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += animeshldr ; +STATICPLUGIN.animeshldr.CFLAGS.debug.71 = ; +STATICPLUGIN.animeshldr.CFLAGS.release.71 = ; +STATICPLUGIN.animeshldr.LFLAGS.debug.71 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.animeshldr.LFLAGS.release.71 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += skeleton2 ; +STATICPLUGIN.skeleton2.CFLAGS.debug.71 = ; +STATICPLUGIN.skeleton2.CFLAGS.release.71 = ; +STATICPLUGIN.skeleton2.LFLAGS.debug.71 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.skeleton2.LFLAGS.release.71 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; STATICPLUGINS.AVAILABLE += bezier ; STATICPLUGIN.bezier.CFLAGS.debug.71 = ; STATICPLUGIN.bezier.CFLAGS.release.71 = ; @@ -536,8 +556,8 @@ STATICPLUGINS.AVAILABLE += gl3d ; STATICPLUGIN.gl3d.CFLAGS.debug.71 = ; STATICPLUGIN.gl3d.CFLAGS.release.71 = ; -STATICPLUGIN.gl3d.LFLAGS.debug.71 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib opengl32.lib ; -STATICPLUGIN.gl3d.LFLAGS.release.71 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib opengl32.lib ; +STATICPLUGIN.gl3d.LFLAGS.debug.71 = libcrystalspace_staticplugins_d.lib libcrystalspace_opengl_d.lib libcrystalspace_d.lib opengl32.lib zlib.lib ; +STATICPLUGIN.gl3d.LFLAGS.release.71 = libcrystalspace_staticplugins.lib libcrystalspace_opengl.lib libcrystalspace.lib opengl32.lib zlib.lib ; STATICPLUGINS.AVAILABLE += soft3d ; STATICPLUGIN.soft3d.CFLAGS.debug.71 = ; STATICPLUGIN.soft3d.CFLAGS.release.71 = ; Modified: trunk/mk/jam/crystalspace_staticplugins_msvc8.jam =================================================================== --- trunk/mk/jam/crystalspace_staticplugins_msvc8.jam 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/mk/jam/crystalspace_staticplugins_msvc8.jam 2008-05-02 11:15:16 UTC (rev 1437) @@ -133,6 +133,26 @@ STATICPLUGIN.cscegui.CFLAGS.release.8 = ; STATICPLUGIN.cscegui.LFLAGS.debug.8 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib CEGUIBase-vc8_d.lib ; STATICPLUGIN.cscegui.LFLAGS.release.8 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib CEGUIBase-vc8.lib ; +STATICPLUGINS.AVAILABLE += animesh ; +STATICPLUGIN.animesh.CFLAGS.debug.8 = ; +STATICPLUGIN.animesh.CFLAGS.release.8 = ; +STATICPLUGIN.animesh.LFLAGS.debug.8 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.animesh.LFLAGS.release.8 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += skeleton2ldr ; +STATICPLUGIN.skeleton2ldr.CFLAGS.debug.8 = ; +STATICPLUGIN.skeleton2ldr.CFLAGS.release.8 = ; +STATICPLUGIN.skeleton2ldr.LFLAGS.debug.8 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.skeleton2ldr.LFLAGS.release.8 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += animeshldr ; +STATICPLUGIN.animeshldr.CFLAGS.debug.8 = ; +STATICPLUGIN.animeshldr.CFLAGS.release.8 = ; +STATICPLUGIN.animeshldr.LFLAGS.debug.8 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.animeshldr.LFLAGS.release.8 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += skeleton2 ; +STATICPLUGIN.skeleton2.CFLAGS.debug.8 = ; +STATICPLUGIN.skeleton2.CFLAGS.release.8 = ; +STATICPLUGIN.skeleton2.LFLAGS.debug.8 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.skeleton2.LFLAGS.release.8 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; STATICPLUGINS.AVAILABLE += bezier ; STATICPLUGIN.bezier.CFLAGS.debug.8 = ; STATICPLUGIN.bezier.CFLAGS.release.8 = ; @@ -536,8 +556,8 @@ STATICPLUGINS.AVAILABLE += gl3d ; STATICPLUGIN.gl3d.CFLAGS.debug.8 = ; STATICPLUGIN.gl3d.CFLAGS.release.8 = ; -STATICPLUGIN.gl3d.LFLAGS.debug.8 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib opengl32.lib ; -STATICPLUGIN.gl3d.LFLAGS.release.8 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib opengl32.lib ; +STATICPLUGIN.gl3d.LFLAGS.debug.8 = libcrystalspace_staticplugins_d.lib libcrystalspace_opengl_d.lib libcrystalspace_d.lib opengl32.lib zlib.lib ; +STATICPLUGIN.gl3d.LFLAGS.release.8 = libcrystalspace_staticplugins.lib libcrystalspace_opengl.lib libcrystalspace.lib opengl32.lib zlib.lib ; STATICPLUGINS.AVAILABLE += soft3d ; STATICPLUGIN.soft3d.CFLAGS.debug.8 = ; STATICPLUGIN.soft3d.CFLAGS.release.8 = ; Modified: trunk/mk/jam/crystalspace_staticplugins_msvc9.jam =================================================================== --- trunk/mk/jam/crystalspace_staticplugins_msvc9.jam 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/mk/jam/crystalspace_staticplugins_msvc9.jam 2008-05-02 11:15:16 UTC (rev 1437) @@ -131,8 +131,28 @@ STATICPLUGINS.AVAILABLE += cscegui ; STATICPLUGIN.cscegui.CFLAGS.debug.9 = ; STATICPLUGIN.cscegui.CFLAGS.release.9 = ; -STATICPLUGIN.cscegui.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib CEGUIBase-vc8_d.lib ; -STATICPLUGIN.cscegui.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib CEGUIBase-vc8.lib ; +STATICPLUGIN.cscegui.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib CEGUIBase-vc9_d.lib ; +STATICPLUGIN.cscegui.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib CEGUIBase-vc9.lib ; +STATICPLUGINS.AVAILABLE += animesh ; +STATICPLUGIN.animesh.CFLAGS.debug.9 = ; +STATICPLUGIN.animesh.CFLAGS.release.9 = ; +STATICPLUGIN.animesh.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.animesh.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += skeleton2ldr ; +STATICPLUGIN.skeleton2ldr.CFLAGS.debug.9 = ; +STATICPLUGIN.skeleton2ldr.CFLAGS.release.9 = ; +STATICPLUGIN.skeleton2ldr.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.skeleton2ldr.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += animeshldr ; +STATICPLUGIN.animeshldr.CFLAGS.debug.9 = ; +STATICPLUGIN.animeshldr.CFLAGS.release.9 = ; +STATICPLUGIN.animeshldr.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.animeshldr.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; +STATICPLUGINS.AVAILABLE += skeleton2 ; +STATICPLUGIN.skeleton2.CFLAGS.debug.9 = ; +STATICPLUGIN.skeleton2.CFLAGS.release.9 = ; +STATICPLUGIN.skeleton2.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib ; +STATICPLUGIN.skeleton2.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib ; STATICPLUGINS.AVAILABLE += bezier ; STATICPLUGIN.bezier.CFLAGS.debug.9 = ; STATICPLUGIN.bezier.CFLAGS.release.9 = ; @@ -266,13 +286,13 @@ STATICPLUGINS.AVAILABLE += sprcal3d ; STATICPLUGIN.sprcal3d.CFLAGS.debug.9 = "/D CS_HAVE_CAL3D" ; STATICPLUGIN.sprcal3d.CFLAGS.release.9 = "/D CS_HAVE_CAL3D" ; -STATICPLUGIN.sprcal3d.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib cal3d-vc8_d.lib ; -STATICPLUGIN.sprcal3d.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib cal3d-vc8.lib ; +STATICPLUGIN.sprcal3d.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib cal3d-vc9_d.lib ; +STATICPLUGIN.sprcal3d.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib cal3d-vc9.lib ; STATICPLUGINS.AVAILABLE += sprcal3dldr ; STATICPLUGIN.sprcal3dldr.CFLAGS.debug.9 = "/D CS_HAVE_CAL3D" ; STATICPLUGIN.sprcal3dldr.CFLAGS.release.9 = "/D CS_HAVE_CAL3D" ; -STATICPLUGIN.sprcal3dldr.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib cal3d-vc8_d.lib ; -STATICPLUGIN.sprcal3dldr.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib cal3d-vc8.lib ; +STATICPLUGIN.sprcal3dldr.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib cal3d-vc9_d.lib ; +STATICPLUGIN.sprcal3dldr.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib cal3d-vc9.lib ; STATICPLUGINS.AVAILABLE += bruteblock ; STATICPLUGIN.bruteblock.CFLAGS.debug.9 = ; STATICPLUGIN.bruteblock.CFLAGS.release.9 = ; @@ -336,8 +356,8 @@ STATICPLUGINS.AVAILABLE += bullet ; STATICPLUGIN.bullet.CFLAGS.debug.9 = ; STATICPLUGIN.bullet.CFLAGS.release.9 = ; -STATICPLUGIN.bullet.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib bulletcollision-vc8_d.lib bulletdynamics-vc8_d.lib bulletmath-vc8_d.lib ; -STATICPLUGIN.bullet.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib bulletcollision-vc8.lib bulletdynamics-vc8.lib bulletmath-vc8.lib ; +STATICPLUGIN.bullet.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib bulletcollision-vc9_d.lib bulletdynamics-vc9_d.lib bulletmath-vc9_d.lib ; +STATICPLUGIN.bullet.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib bulletcollision-vc9.lib bulletdynamics-vc9.lib bulletmath-vc9.lib ; STATICPLUGINS.AVAILABLE += ptanimimg ; STATICPLUGIN.ptanimimg.CFLAGS.debug.9 = ; STATICPLUGIN.ptanimimg.CFLAGS.release.9 = ; @@ -536,8 +556,8 @@ STATICPLUGINS.AVAILABLE += gl3d ; STATICPLUGIN.gl3d.CFLAGS.debug.9 = ; STATICPLUGIN.gl3d.CFLAGS.release.9 = ; -STATICPLUGIN.gl3d.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_d.lib zlib.lib opengl32.lib ; -STATICPLUGIN.gl3d.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace.lib zlib.lib opengl32.lib ; +STATICPLUGIN.gl3d.LFLAGS.debug.9 = libcrystalspace_staticplugins_d.lib libcrystalspace_opengl_d.lib libcrystalspace_d.lib opengl32.lib zlib.lib ; +STATICPLUGIN.gl3d.LFLAGS.release.9 = libcrystalspace_staticplugins.lib libcrystalspace_opengl.lib libcrystalspace.lib opengl32.lib zlib.lib ; STATICPLUGINS.AVAILABLE += soft3d ; STATICPLUGIN.soft3d.CFLAGS.debug.9 = ; STATICPLUGIN.soft3d.CFLAGS.release.9 = ; Modified: trunk/psclient.cfg =================================================================== --- trunk/psclient.cfg 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/psclient.cfg 2008-05-02 11:15:16 UTC (rev 1437) @@ -37,7 +37,7 @@ ;System.PlugIns.iGraphics3D = crystalspace.graphics3d.software ;Sound renderer -System.PlugIns.iSndSysRenderer = crystalspace.sndsys.renderer.software +System.PlugIns.iSndSysRenderer = crystalspace.sndsys.renderer.openal ; Sound Loader System.PlugIns.iSndSysLoader = crystalspace.sndsys.element.loader Modified: trunk/src/client/charapp.cpp =================================================================== --- trunk/src/client/charapp.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/charapp.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -358,6 +358,7 @@ if(state->FindSocket(slotname)) { psengine->GetCelClient()->HandleItemEffect(mesh, state->FindSocket(slotname)->GetMeshWrapper(), false, slotname, &effectids, &lightids); + psengine->GetCelClient()->UpdateShader(baseMesh); } // This is a subMesh on the model change so change the mesh for that part. Modified: trunk/src/client/clientcachemanager.cpp =================================================================== --- trunk/src/client/clientcachemanager.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/clientcachemanager.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -20,6 +20,7 @@ //============================================================================= // Crystal Space Includes //============================================================================= +#include <iengine/collection.h> #include <iengine/engine.h> #include <iengine/mesh.h> #include <imap/loader.h> @@ -40,10 +41,12 @@ ClientCacheManager::ClientCacheManager() { + cache = psengine->GetEngine()->CreateCollection("psclientcache"); } ClientCacheManager::~ClientCacheManager() { + psengine->GetEngine()->RemoveCollection(cache); } void ClientCacheManager::LoadNewFactory(const char* filename) @@ -128,8 +131,7 @@ if (indexEntry->factory == NULL) { - iBase* result = NULL; - psengine->GetLoader()->Load (root, result, false, true); + psengine->GetLoader()->Load (root, cache, false); iMeshFactoryWrapper* meshW = psengine->GetEngine()->GetMeshFactories()->FindByName(name); indexEntry->factory = meshW; } Modified: trunk/src/client/clientcachemanager.h =================================================================== --- trunk/src/client/clientcachemanager.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/clientcachemanager.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -17,6 +17,9 @@ * */ +#ifndef CLIENT_CACHE_MANAGER_HEADER +#define CLIENT_CACHE_MANAGER_HEADER + //============================================================================= // Crystal Space Includes //============================================================================= @@ -32,10 +35,8 @@ //============================================================================= #include "globals.h" +struct iCollection; -#ifndef CLIENT_CACHE_MANAGER_HEADER -#define CLIENT_CACHE_MANAGER_HEADER - /** Holds details on a mesh factory. */ struct FactoryIndexEntry { @@ -69,6 +70,7 @@ FactoryIndexEntry* GetFactoryEntry(const char* filename); private: + csRef<iCollection> cache; csPDelArray<FactoryIndexEntry> factIndex; }; Modified: trunk/src/client/gui/pawscharpick.cpp =================================================================== --- trunk/src/client/gui/pawscharpick.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/gui/pawscharpick.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -470,6 +470,7 @@ } charApp->ClearEquipment(); charApp->SetMesh(mesh); + psengine->GetCelClient()->UpdateShader(mesh); csRef<iSpriteCal3DState> spstate = @@ -557,6 +558,7 @@ charApp->SetMesh(view->GetObject()); charApp->ApplyTraits(traits); charApp->ApplyEquipment(equipment); + psengine->GetCelClient()->UpdateShader(mesh); csRef<iSpriteCal3DState> spstate = scfQueryInterface<iSpriteCal3DState> (mesh->GetMeshObject()); Modified: trunk/src/client/gui/pawsquestwindow.cpp =================================================================== --- trunk/src/client/gui/pawsquestwindow.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/gui/pawsquestwindow.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -453,7 +453,7 @@ { int previousQuestID = questID; size_t numOfQuests; - unsigned int topLine = 0; + size_t topLine = 0; int idColumn; if (topTab == questTab) Modified: trunk/src/client/gui/pawsquestwindow.h =================================================================== --- trunk/src/client/gui/pawsquestwindow.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/gui/pawsquestwindow.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -37,7 +37,7 @@ struct QuestNote { int id; - unsigned int topLine; + size_t topLine; csString notes; }; Modified: trunk/src/client/iclient/isoundmngr.h =================================================================== --- trunk/src/client/iclient/isoundmngr.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/iclient/isoundmngr.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -39,7 +39,7 @@ // 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 iSndSysSourceSoftware3D +#define SOUND_SOURCE3D_TYPE iSndSysSource3D #define SOUND_LOADER_TYPE iSndSysLoader #define SOUND_RENDER_TYPE iSndSysRenderer #define SOUND_LISTENER_TYPE iSndSysListener Modified: trunk/src/client/pscelclient.cpp =================================================================== --- trunk/src/client/pscelclient.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/pscelclient.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -60,7 +60,6 @@ #include "net/msghandler.h" #include "util/psconst.h" -#include "util/psmeshutil.h" #include "gui/pawsinfowindow.h" #include "gui/pawsconfigkeys.h" @@ -296,6 +295,8 @@ entities.Push(actor); entities_hash.Put(actor->GetID(), actor); + + UpdateShader(actor); } void psCelClient::HandleMainActor( psPersistActor& mesg ) @@ -389,6 +390,7 @@ // Handle item effect if there is one. HandleItemEffect(newItem->GetFactName(), newItem->GetMesh()); + UpdateShader(newItem->GetMesh()); entities.Push(newItem); entities_hash.Put(newItem->GetID(), newItem); @@ -774,11 +776,90 @@ for(size_t i =0; i < entities.GetSize();i++) { entities[i]->Update(); + GEMClientActor* actor = dynamic_cast<GEMClientActor*>(entities[i]); + UpdateShader(actor); } shadowManager->UpdateShadows(); } +void psCelClient::UpdateShader(GEMClientActor* actor) +{ + if(actor) + { + UpdateShader(actor->GetMesh()); + } +} + +void psCelClient::UpdateShader(iMeshWrapper* mesh) +{ + if(psengine->GetGFXFeatures() & useNormalMaps) + { + csRef<iStringSet> strings = csQueryRegistryTagInterface<iStringSet> + (object_reg, "crystalspace.shared.stringset"); + + iSector* sector = mesh->GetMovable()->GetSectors()->Get(0); + csVector3 pos = mesh->GetMovable()->GetFullPosition(); + iLightList* list = sector->GetLights(); + bool remove = true; + if(list->GetCount()) + { + remove = false; + iLight* firstLight = list->Get(0); + csVector3 closest = firstLight->GetFullCenter(); + csColor colour = firstLight->GetColor(); + size_t outOfRangeCount = 0; + float cutoff = 1.0f; + for(int i=0; i<list->GetCount(); i++) + { + iLight* light = list->Get(i); + csVector3 center = list->Get(i)->GetFullCenter(); + csVector3 mag = center - pos; + + if(list->Get(i)->GetCutoffDistance() < mag.Norm()) + { + outOfRangeCount++; + continue; + } + + csVector3 mag2 = closest - pos; + if(mag.Norm() <= mag2.Norm()) + { + closest = center; + cutoff = list->Get(i)->GetCutoffDistance(); + colour = list->Get(i)->GetColor(); + } + } + + if(outOfRangeCount == list->GetCount()) + remove = true; + + csShaderVariable* shadvar = new csShaderVariable(); + shadvar->SetName(strings->Request("LightPos")); + shadvar->SetValue(closest); + //printf("Light Pos: %f, %f, %f\n", closest.x, closest.y, closest.z); + mesh->GetFactory()->GetSVContext()->AddVariable(shadvar); + + shadvar = new csShaderVariable(); + shadvar->SetName(strings->Request("LightColour")); + shadvar->SetValue(colour); + printf("Light Colour: %f, %f, %f\n", colour.red, colour.green, colour.blue); + mesh->GetFactory()->GetSVContext()->AddVariable(shadvar); + + closest -= pos; + shadvar = new csShaderVariable(); + shadvar->SetName(strings->Request("LightAtten")); + shadvar->SetValue((cutoff-closest.Norm())/closest.Norm()); + mesh->GetFactory()->GetSVContext()->AddVariable(shadvar); + } + + if(remove) + { + mesh->GetFactory()->GetSVContext()->RemoveVariable(strings->Request("LightPos")); + } + } +} + void psCelClient::HandleMessage(MsgEntry *me) { switch ( me->GetType() ) @@ -855,7 +936,7 @@ local_player->ready = flag; } -void psCelClient::OnRegionsDeleted(csArray<iRegion*>& regions) +void psCelClient::OnRegionsDeleted(csArray<iCollection*>& regions) { size_t entNum; @@ -876,7 +957,7 @@ for(int i = 0;i<sectors->GetCount();i++) { // Get the iRegion this sector belongs to - csRef<iRegion> region = scfQueryInterfaceSafe<iRegion> (sectors->Get(i)->QueryObject()->GetObjectParent()); + csRef<iCollection> region = scfQueryInterfaceSafe<iCollection> (sectors->Get(i)->QueryObject()->GetObjectParent()); if(regions.Find(region)==csArrayItemNotFound) { // We've found a sector that won't be unloaded so the mesh won't need to be moved @@ -1016,7 +1097,7 @@ void psCelClient::UnattachObject( iObject* object, GEMClientObject* clientObject) { - csRef<psGemMeshAttach> attacher (CS_GET_CHILD_OBJECT (object, psGemMeshAttach)); + csRef<psGemMeshAttach> attacher (CS::GetChildObject<psGemMeshAttach>(object)); if (attacher) { if ( attacher->GetObject () == clientObject ) @@ -1031,7 +1112,7 @@ { GEMClientObject* found = 0; - csRef<psGemMeshAttach> attacher (CS_GET_CHILD_OBJECT (object, psGemMeshAttach)); + csRef<psGemMeshAttach> attacher (CS::GetChildObject<psGemMeshAttach>(object)); if (attacher) { found = attacher->GetObject(); @@ -1133,6 +1214,20 @@ } +csVector3 GEMClientObject::GetPosition() +{ + return pcmesh->GetMovable ()->GetFullPosition(); +} + +iSector* GEMClientObject::GetSector() +{ + if(pcmesh->GetMovable()->InSector()) + { + return pcmesh->GetMovable()->GetSectors()->Get(0); + } + return NULL; +} + void GEMClientObject::Update() { } Modified: trunk/src/client/pscelclient.h =================================================================== --- trunk/src/client/pscelclient.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/pscelclient.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -26,7 +26,7 @@ #include <csutil/refarr.h> #include <csutil/list.h> #include <csutil/hash.h> -#include <iengine/region.h> +#include <iengine/collection.h> //============================================================================= // Project Includes @@ -170,7 +170,7 @@ /** Called when a region of the world is deleted from the client (because we don't need it loaded now) CelClient removes all GEMClientObjects that are in this region */ - void OnRegionsDeleted(csArray<iRegion *>& regions); + void OnRegionsDeleted(csArray<iCollection *>& regions); psWorld* GetWorld() { return gameWorld; } @@ -229,6 +229,9 @@ * @return A csArray<> of all the objects in the given radius. */ csArray<GEMClientObject*> FindNearbyEntities (iSector* sector, const csVector3& pos, float radius, bool doInvisible = false); + + void UpdateShader(GEMClientActor* actor); + void UpdateShader(iMeshWrapper* mesh); protected: void QueueNewActor(MsgEntry *me); @@ -310,6 +313,12 @@ /** Set position of entity */ virtual bool SetPosition(const csVector3 & pos, float rot, iSector * sector); + + /** Get position of entity */ + virtual csVector3 GetPosition(); + + /** Get sector of entity */ + virtual iSector* GetSector(); PS_ID GetID() { return id; } csRef<iMeshWrapper> pcmesh; Modified: trunk/src/client/psclientchar.cpp =================================================================== --- trunk/src/client/psclientchar.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/psclientchar.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -45,8 +45,6 @@ #include "net/msghandler.h" #include "net/charmessages.h" -#include "util/psmeshutil.h" - #include "engine/netpersist.h" #include "iclient/isoundmngr.h" @@ -405,102 +403,6 @@ Error1("Received TagetUpdateMessage with invalid target."); } - -void psClientCharManager::Equip( iMeshWrapper* object, - csString& slotname, - csString& mesh, - csString& part, - csString& partMesh, - csString& texture - ) -{ - psMeshUtil * meshutil = psengine->GetMeshUtil(); - - - if ( mesh.Length() ) - { - meshutil->Attach( object, slotname, mesh ); - } - - // This is a part mesh (ie Mesh) change so change the mesh for that part. - if ( partMesh.Length() ) - { - meshutil->ChangeMesh( object, part, partMesh ); - if ( texture.Length() ) - { - meshutil->ChangeMaterial( object, - meshutil->ParseStrings(object,part,partMesh), - texture, texture ); - } - } - else - { - if ( part.Length() ) - { - meshutil->ChangeMaterial( object, part, texture, texture ); - } - } -} - -void psClientCharManager::Dequip( iMeshWrapper* object, - csString& slotname, - csString& mesh, - csString& part, - csString& partMesh, - csString& mat, - csString& txt - ) -{ - psMeshUtil * meshutil = psengine->GetMeshUtil(); - - if ( mesh.Length() ) - { - meshutil->Detach( object, slotname ); - } - - // This is a part mesh (ie Mesh) set default mesh for that part. - if ( partMesh.Length() ) - { - meshutil->DefaultMesh( object, part ); - } - - if ( part.Length() ) - { - if ( mat.Length() ) - { - meshutil->ChangeMaterial( object, part, mat, txt); - } - else - { - meshutil->DefaultMaterial( object, part ); - } - } -} - - -void psClientCharManager::Equip( iMeshWrapper * object, psEquipmentMessage * equip, csString slotname, csPDelArray<Trait>& list) -{ - if ( equip->type == psEquipmentMessage::EQUIP ) - { - Equip(object,slotname,equip->mesh,equip->part,equip->partMesh,equip->texture); - } - else - { - csString mat(""); - csString txt(""); - for (size_t z = 0; z < list.GetSize(); z++ ) - { - if ( list[z]->mesh == equip->part ) - { - mat = list[z]->material; - txt = list[z]->texture; - } - } - Dequip(object,slotname,equip->mesh,equip->part,equip->partMesh,mat,txt); - } -} - - void psClientCharManager::HandleEquipment( MsgEntry* me ) { psEquipmentMessage equip( me ); Modified: trunk/src/client/psclientchar.h =================================================================== --- trunk/src/client/psclientchar.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/psclientchar.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -109,21 +109,6 @@ */ GEMClientObject * GetTarget() { return target; } - /** Used to build up an equipment on a object. - * This should only be used for initial construction and is only for putting things on. - * - * @param object The mesh we want to build the item onto. - * @param slotname Where we want to put the equipment - * @param mesh The mesh we want to attach in that slot - * @param part The part on the model we want to change - * @param partMesh The new mesh we want to change on the model. - * @param texture The texture for the equipment we want to use. - */ - void Equip( iMeshWrapper* object, csString& slotname, csString& mesh, csString& part, csString& partMesh, csString& texture); - - /// Opposite of Equip() - void Dequip( iMeshWrapper* object, csString& slotname, csString& mesh, csString& part, csString& partMesh, csString& mat, csString& txt); - protected: /// Change a trait on a character. void ChangeTrait( MsgEntry* me ); @@ -131,9 +116,6 @@ /// Handle animation changes for things from the server. void HandleAction( MsgEntry* me ); - /// Equip a object from the equip message. - void Equip( iMeshWrapper * object, psEquipmentMessage * equip, csString slotname, csPDelArray<Trait>& list); - /// Handle the equipment messages comming from the server. void HandleEquipment( MsgEntry* me ); Modified: trunk/src/client/psengine.cpp =================================================================== --- trunk/src/client/psengine.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/psengine.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -114,7 +114,6 @@ #include "engine/psworld.h" #include "engine/materialmanager.h" #include "util/psutil.h" -#include "util/psmeshutil.h" #include "util/consoleout.h" #include "entitylabels.h" #include "chatbubbles.h" @@ -219,7 +218,6 @@ cachemanager = NULL; charmanager = NULL; - meshUtil = NULL; guiHandler = NULL; charController = NULL; mouseBinds = NULL; @@ -287,7 +285,6 @@ delete questionclient; delete cachemanager; delete slotManager; - delete meshUtil; delete mouseBinds; delete guiHandler; delete inventoryCache; @@ -532,7 +529,6 @@ inventoryCache = new psInventoryCache(); guiHandler = new GUIHandler(); - meshUtil = new psMeshUtil(object_reg); celclient = csPtr<psCelClient> (new psCelClient()); slotManager = new psSlotManager(); modehandler = csPtr<ModeHandler> (new ModeHandler (soundmanager, celclient,netmanager->GetMsgHandler(),object_reg)); Modified: trunk/src/client/psengine.h =================================================================== --- trunk/src/client/psengine.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/psengine.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -71,7 +71,6 @@ class psNetManager; class psSlotManager; -class psMeshUtil; class GEMClientObject; class GEMClientActor; class GUIHandler; @@ -182,7 +181,6 @@ psEffectManager* GetEffectManager() { return effectManager; } psChatBubbles* GetChatBubbles() { return chatBubbles; } psOptions* GetOptions() { return options; } - psMeshUtil* GetMeshUtil() { return meshUtil; } ModeHandler* GetModeHandler() { return modehandler; } ActionHandler* GetActionHandler() { return actionhandler; } psCharController* GetCharControl() { return charController; } @@ -356,7 +354,7 @@ /// Unload order. bool UnloadingLast() { return unloadLast; } - /// Using post proc effects? + /// The graphics features that are enabled/disabled. uint GetGFXFeatures() { return gfxFeatures; } private: @@ -401,7 +399,6 @@ csRef<psCal3DCallbackLoader> cal3DCallbackLoader; csRef<MaterialManager> materialmanager; ///< Handles loading of materials/textures. psClientCharManager* charmanager; ///< Holds the charactermanager - psMeshUtil* meshUtil; GUIHandler* guiHandler; psCharController* charController; psMouseBinds* mouseBinds; Modified: trunk/src/client/sound/pssoundmngr.cpp =================================================================== --- trunk/src/client/sound/pssoundmngr.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/sound/pssoundmngr.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -2084,7 +2084,7 @@ soundStream->Unpause(); } -csRef<iSndSysSourceSoftware3D> psSndStreamHandle::GetSource3D() +csRef<SOUND_SOURCE3D_TYPE> psSndStreamHandle::GetSource3D() { return scfQueryInterface<SOUND_SOURCE3D_TYPE> (soundSource); } Modified: trunk/src/client/sound/pssoundmngr.h =================================================================== --- trunk/src/client/sound/pssoundmngr.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/sound/pssoundmngr.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -337,7 +337,7 @@ void SetVolume(float volume); - csRef<iSndSysSourceSoftware3D> GetSource3D(); + csRef<SOUND_SOURCE3D_TYPE> GetSource3D(); bool IsValid() { return soundSource.IsValid(); } }; @@ -439,7 +439,7 @@ void UpdateWeather(int weather); psSndStreamHandle stream; - csRef<iSndSysSourceSoftware3D> soundSource3D; + csRef<SOUND_SOURCE3D_TYPE> soundSource3D; csString resourceName; csString attachedMesh; Modified: trunk/src/client/zonehandler.cpp =================================================================== --- trunk/src/client/zonehandler.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/client/zonehandler.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -323,7 +323,7 @@ } else { - csArray<iRegion*> deletedRegions; + csArray<iCollection*> deletedRegions; world->GetNotNeededRegions(deletedRegions); loadProgressBar->SetTotalValue(zone->regions.GetSize() + deletedRegions.GetSize()); } @@ -356,7 +356,7 @@ if(!found->transitional) { - csArray<iRegion*> deletedRegions; + csArray<iCollection*> deletedRegions; world->GetNotNeededRegions(deletedRegions); celclient->OnRegionsDeleted(deletedRegions); } Modified: trunk/src/common/effects/pseffectlight.cpp =================================================================== --- trunk/src/common/effects/pseffectlight.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectlight.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -38,14 +38,21 @@ psLight::~psLight() { + if(sector) + { + sector->GetLights()->Remove(light); + } } unsigned int psLight::AttachLight(csRef<iLight> newLight, csRef<iMeshWrapper> mw) { light = newLight; + //light->QuerySceneNode()->SetParent(mw->QuerySceneNode()); movable = mw->GetMovable(); lightBasePos = light->GetCenter(); - light->GetMovable()->SetSector(movable->GetSectors()->Get(0)); + sector = movable->GetSectors()->Get(0); + light->GetMovable()->SetSector(sector); + sector->GetLights()->Add(light); light->SetCenter(lightBasePos+movable->GetFullPosition()); light->Setup(); @@ -59,8 +66,8 @@ iSectorList* sectors = movable->GetSectors(); if(sectors->GetCount()) { - csString sector(sectors->Get(0)->QueryObject()->GetName()); - if(sector.Compare("SectorWhereWeKeepEntitiesResidingInUnloadedMaps")) + csString sectorname(sectors->Get(0)->QueryObject()->GetName()); + if(sectorname.Compare("SectorWhereWeKeepEntitiesResidingInUnloadedMaps")) return true; csVector3 newPos(movable->GetFullTransform().GetT2O()*lightBasePos); @@ -68,8 +75,12 @@ if(light->GetCenter() != newPos) { - if(sectors) + if(sectors && (!sector || sector != sectors->Get(0))) { + if(sector) + { + sector->GetLights()->Remove(light); + } light->GetMovable()->SetSector(sectors->Get(0)); } light->SetCenter(newPos); Modified: trunk/src/common/effects/pseffectlight.h =================================================================== --- trunk/src/common/effects/pseffectlight.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectlight.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -44,6 +44,7 @@ csRef<iLight> light; csVector3 lightBasePos; csWeakRef<iMovable> movable; + csWeakRef<iSector> sector; }; #endif Modified: trunk/src/common/effects/pseffectmanager.cpp =================================================================== --- trunk/src/common/effects/pseffectmanager.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectmanager.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -26,7 +26,6 @@ #include <iengine/movable.h> #include <imesh/object.h> #include <imesh/sprite3d.h> -#include <iengine/region.h> #include <csutil/syspath.h> #include "pseffectmanager.h" @@ -97,7 +96,7 @@ #ifndef DONT_DO_EFFECTS csRef<iEngine> engine = csQueryRegistry<iEngine> (psCSSetup::object_reg); - region = engine->CreateRegion("effects"); + effectsCollection = engine->CreateCollection("effects"); #endif } @@ -120,7 +119,7 @@ delete tmpEffect; } actualEffects.DeleteAll(); - region->DeleteAll(); + effectsCollection->ReleaseAllObjects(); #endif effectLoader->SetManager(NULL); psCSSetup::object_reg->Unregister((psEffectLoader *)effectLoader, "PSEffects"); @@ -134,7 +133,7 @@ view = parentView; csRef<iLoader> loader = csQueryRegistry<iLoader> (psCSSetup::object_reg); - if (!loader->LoadLibraryFile(fileName, region, true, true)) + if (!loader->LoadLibraryFile(fileName, effectsCollection, true, true)) { Error2("Failed to load %s",fileName.GetDataSafe()); return false; @@ -434,16 +433,6 @@ #endif } -bool psEffectManager::Prepare() -{ -#ifndef DONT_DO_EFFECTS - if (!region) - return false; - - return region->Prepare(); -#endif -} - void psEffectManager::Clear() { #ifndef DONT_DO_EFFECTS @@ -456,9 +445,8 @@ while (itActual.HasNext()) delete itActual.Next(); actualEffects.DeleteAll(); - - region->DeleteAll(); - region->Clear(); + + effectsCollection->ReleaseAllObjects(); #endif } Modified: trunk/src/common/effects/pseffectmanager.h =================================================================== --- trunk/src/common/effects/pseffectmanager.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectmanager.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -26,6 +26,7 @@ #include <csutil/array.h> #include <csutil/parray.h> #include <csutil/ref.h> +#include <iengine/collection.h> #include <iutil/virtclk.h> #include <csutil/hash.h> #include <imap/reader.h> @@ -37,7 +38,6 @@ struct iSector; struct iSectorList; struct iMeshWrapper; -struct iRegion; struct iView; struct iMovable; class psEffect; @@ -154,11 +154,6 @@ */ void Update(csTicks elapsed = 0); - /** Prepares the effects -- do this once after load, but before render loop. - * @return true if effects are successfully prepared, false otherwise - */ - bool Prepare(); - /** Clears all effects. */ void Clear(); @@ -210,8 +205,8 @@ csHash<psEffect *, unsigned int> actualEffects; // csPDelArray<psEffect> actualEffects; - /// effects have their own region to make them easier to manage - csRef<iRegion> region; + /// Effects are stored in a collection to make them easier to manage. + csRef<iCollection> effectsCollection; iView * view; Modified: trunk/src/common/effects/pseffectobj.cpp =================================================================== --- trunk/src/common/effects/pseffectobj.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectobj.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -288,7 +288,7 @@ scale = 1.0f; aspect = 1.0f; - region = engine->GetRegions()->FindByName("effects"); + effectsCollection = engine->GetCollection("effects"); keyFrames.AttachNew(new psEffectObjKeyFrameGroup); baseScale = 1.0f; @@ -445,7 +445,7 @@ bool psEffectObj::Update(csTicks elapsed) { - if (!anchor || !anchor->IsReady()) // wait for anchor to be ready + if (!anchor || !anchor->IsReady() || !anchorMesh->GetMovable()->GetSectors()->GetCount()) // wait for anchor to be ready return true; const static csMatrix3 UP_FIX(1,0,0, 0,0,1, 0,1,0); Modified: trunk/src/common/effects/pseffectobj.h =================================================================== --- trunk/src/common/effects/pseffectobj.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectobj.h 2008-05-02 11:15:16 UTC (rev 1437) @@ -37,7 +37,7 @@ struct iView; struct iMeshFactoryWrapper; struct iSector; -struct iRegion; +struct iCollection; class psEffect2DRenderer; class psEffectAnchor; @@ -353,7 +353,7 @@ csRef<iView> view; /// region to store the CS objects - csRef<iRegion> region; + csRef<iCollection> effectsCollection; float scale; float aspect; Modified: trunk/src/common/effects/pseffectobjdecal.cpp =================================================================== --- trunk/src/common/effects/pseffectobjdecal.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectobjdecal.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -129,7 +129,7 @@ } // load material - csRef<iMaterialWrapper> mat = region->FindMaterial(materialName); + csRef<iMaterialWrapper> mat = effectsCollection->FindMaterial(materialName); if (!mat) { csReport(psCSSetup::object_reg, CS_REPORTER_SEVERITY_ERROR, "planeshift_effects", "Attempting to create an effect obj with no name.\n"); Modified: trunk/src/common/effects/pseffectobjlabel.cpp =================================================================== --- trunk/src/common/effects/pseffectobjlabel.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectobjlabel.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -174,7 +174,7 @@ facName += uniqueID++; meshFact = engine->CreateMeshFactory ("crystalspace.mesh.object.genmesh", facName.GetData()); - region->Add(meshFact->QueryObject()); + effectsCollection->Add(meshFact->QueryObject()); iMeshObjectFactory * fact = meshFact->GetMeshObjectFactory(); facState = scfQueryInterface<iGeneralFactoryState> (fact); @@ -185,7 +185,7 @@ } // setup the material - csRef<iMaterialWrapper> mat = region->FindMaterial(materialName); + csRef<iMaterialWrapper> mat = effectsCollection->FindMaterial(materialName); if (mat) { fact->SetMaterialWrapper(mat); Modified: trunk/src/common/effects/pseffectobjmesh.cpp =================================================================== --- trunk/src/common/effects/pseffectobjmesh.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectobjmesh.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -107,7 +107,7 @@ // add the custom material if set if (!materialName.IsEmpty()) { - csRef<iMaterialWrapper> mat = region->FindMaterial(materialName); + csRef<iMaterialWrapper> mat = effectsCollection->FindMaterial(materialName); if (mat != 0) { mesh->GetMeshObject()->SetMaterialWrapper(mat); @@ -176,7 +176,7 @@ csString facName = "effect_mesh_fac_"; facName += uniqueID++; - meshFact = region->FindMeshFactory(factName); + meshFact = effectsCollection->FindMeshFactory(factName); if (!meshFact) { csReport(psCSSetup::object_reg, CS_REPORTER_SEVERITY_ERROR, "planeshift_effects", "Couldn't find mesh factory %s in effect %s\n", factName.GetData(), name.GetData()); Modified: trunk/src/common/effects/pseffectobjparticles.cpp =================================================================== --- trunk/src/common/effects/pseffectobjparticles.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectobjparticles.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -129,7 +129,7 @@ // add the custom material if set if (!materialName.IsEmpty()) { - csRef<iMaterialWrapper> mat = region->FindMaterial(materialName); + csRef<iMaterialWrapper> mat = effectsCollection->FindMaterial(materialName); if (mat != 0) mesh->GetMeshObject()->SetMaterialWrapper(mat); } @@ -186,7 +186,7 @@ csString facName = "effect_particles_fac_"; facName += uniqueID++; - meshFact = region->FindMeshFactory(factName); + meshFact = effectsCollection->FindMeshFactory(factName); if (!meshFact) { csReport(psCSSetup::object_reg, CS_REPORTER_SEVERITY_ERROR, "planeshift_effects", Modified: trunk/src/common/effects/pseffectobjquad.cpp =================================================================== --- trunk/src/common/effects/pseffectobjquad.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectobjquad.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -212,7 +212,7 @@ facName += uniqueID++; meshFact = engine->CreateMeshFactory ("crystalspace.mesh.object.genmesh", facName.GetData()); - region->Add(meshFact->QueryObject()); + effectsCollection->Add(meshFact->QueryObject()); // create the actual sprite3d data iMeshObjectFactory * fact = meshFact->GetMeshObjectFactory(); @@ -224,7 +224,7 @@ } // setup the material - mat = region->FindMaterial(materialName); + mat = effectsCollection->FindMaterial(materialName); if (mat) fact->SetMaterialWrapper(mat); Modified: trunk/src/common/effects/pseffectobjsimpmesh.cpp =================================================================== --- trunk/src/common/effects/pseffectobjsimpmesh.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectobjsimpmesh.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -163,7 +163,7 @@ { csRef<iLoader> loader = csQueryRegistry<iLoader> (psCSSetup::object_reg); - loader->LoadLibraryFile(fileName, region); + loader->LoadLibraryFile(fileName, effectsCollection, false, true); /* // setup the material Modified: trunk/src/common/effects/pseffectobjsound.cpp =================================================================== --- trunk/src/common/effects/pseffectobjsound.cpp 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/effects/pseffectobjsound.cpp 2008-05-02 11:15:16 UTC (rev 1437) @@ -149,13 +149,13 @@ return false; } - csRef<SOUND_SOURCE_TYPE> src = soundmanager->GetSoundSystem()->CreateSource(sndStream); - if (!src.IsValid()) + sndSource = soundmanager->GetSoundSystem()->CreateSource(sndStream); + if (!sndSource.IsValid()) { csReport(psCSSetup::object_reg, CS_REPORTER_SEVERITY_ERROR, "planeshift_effects", "Could not create %s effect obj sound source.\n", name.GetData()); return false; } - sndSource= scfQueryInterface<SOUND_SOURCE3D_TYPE> (src); + sndSource3d= scfQueryInterface<SOUND_SOURCE3D_TYPE> (sndSource); if (!sndSource.IsValid()) { csReport(psCSSetup::object_reg, CS_REPORTER_SEVERITY_ERROR, "planeshift_effects", "Could not create %s effect obj sound 3D source.\n", name.GetData()); @@ -172,10 +172,10 @@ volumeMultiplier = soundmanager->GetActionsVolume(); sndSource->SetVolume(volumeMultiplier); - sndSource->SetPosition(csVector3(0,0,0)); + sndSource3d->SetPosition(csVector3(0,0,0)); - sndSource->SetMinimumDistance(sqrt(minDistSquared)); - sndSource->SetMaximumDistance(sqrt(maxDistSquared)); + sndSource3d->SetMinimumDistance(sqrt(minDistSquared)); + sndSource3d->SetMaximumDistance(sqrt(maxDistSquared)); isAlive = false; @@ -226,7 +226,7 @@ sndSource->SetVolume(LERP_KEY(KA_SCALE) * volumeMultiplier); } - sndSource->SetPosition(view->GetCamera()->GetTransform().Other2This(soundPos)); + sndSource3d->SetPosition(view->GetCamera()->GetTransform().Other2This(soundPos)); if (killTime <= 0) return true; Modified: trunk/src/common/effects/pseffectobjsound.h =================================================================== --- trunk/src/common/effects/pseffectobjsound.h 2008-05-01 22:58:51 UTC (rev 1436) +++ trunk/src/common/e... [truncated message content] |