From: <av...@us...> - 2010-07-31 11:59:25
|
Revision: 34632 http://crystal.svn.sourceforge.net/crystal/?rev=34632&view=rev Author: avoicu Date: 2010-07-31 11:59:14 +0000 (Sat, 31 Jul 2010) Log Message: ----------- Merged with trunk r 34403-34587. Conflicts resolved using theirs. Modified Paths: -------------- CS/branches/soc2010/hair/apps/demo/Jamfile CS/branches/soc2010/hair/apps/demo/demo.cpp CS/branches/soc2010/hair/apps/demo/demo.h CS/branches/soc2010/hair/apps/tests/Jamfile CS/branches/soc2010/hair/apps/tests/avatartest/avatartest.cpp CS/branches/soc2010/hair/apps/tests/avatartest/avatartest.h CS/branches/soc2010/hair/apps/tests/avatartest/frankie.cpp CS/branches/soc2010/hair/apps/tests/avatartest/krystal.cpp CS/branches/soc2010/hair/apps/tests/avatartest/krystal.h CS/branches/soc2010/hair/apps/tests/avatartest/sintel.cpp CS/branches/soc2010/hair/apps/tools/genmeshify/thing/persist/thingldr.cpp CS/branches/soc2010/hair/apps/tools/genmeshify/thing/persist/thingldr.h CS/branches/soc2010/hair/apps/tutorial/phystut/phystut.cpp CS/branches/soc2010/hair/apps/tutorial/phystut/phystut.h CS/branches/soc2010/hair/apps/walktest/lights.cpp CS/branches/soc2010/hair/apps/walktest/lights.h CS/branches/soc2010/hair/apps/walktest/walkcmd.cpp CS/branches/soc2010/hair/apps/waterdemo/waterdemo.cpp CS/branches/soc2010/hair/bin/gen-scf_impl.sh CS/branches/soc2010/hair/data/Jamfile CS/branches/soc2010/hair/data/castle/world CS/branches/soc2010/hair/data/cegui/ice.looknfeel CS/branches/soc2010/hair/data/cegui/ice.scheme CS/branches/soc2010/hair/data/config-app/autoexec.cfg CS/branches/soc2010/hair/data/config-plugins/shadermgr.cfg CS/branches/soc2010/hair/data/shader/lighting/vproc_fixed.xml CS/branches/soc2010/hair/include/csplugincommon/imageloader/commonimagefile.h CS/branches/soc2010/hair/include/csplugincommon/opengl/glextmanager.h CS/branches/soc2010/hair/include/csplugincommon/opengl/glstates.h CS/branches/soc2010/hair/include/csplugincommon/rendermanager/autofx_reflrefr.h CS/branches/soc2010/hair/include/csplugincommon/rendermanager/posteffects.h CS/branches/soc2010/hair/include/csplugincommon/shader/weavercombiner.h CS/branches/soc2010/hair/include/cstool/csdemoapplication.h CS/branches/soc2010/hair/include/csutil/cfgmgr.h CS/branches/soc2010/hair/include/csutil/cseventq.h CS/branches/soc2010/hair/include/csutil/ref.h CS/branches/soc2010/hair/include/csutil/scf_impl.h CS/branches/soc2010/hair/include/csutil/scf_implgen_p.h CS/branches/soc2010/hair/include/csutil/scf_implgen_p_template.h CS/branches/soc2010/hair/include/csutil/threadevent.h CS/branches/soc2010/hair/include/csutil.h CS/branches/soc2010/hair/include/csver.h CS/branches/soc2010/hair/include/iengine/mesh.h CS/branches/soc2010/hair/include/iengine/sector.h CS/branches/soc2010/hair/include/imap/services.h CS/branches/soc2010/hair/include/imesh/ragdoll.h CS/branches/soc2010/hair/include/imesh/skeleton2anim.h CS/branches/soc2010/hair/include/iutil.h CS/branches/soc2010/hair/include/ivaria/bullet.h CS/branches/soc2010/hair/include/ivaria/dynamics.h CS/branches/soc2010/hair/include/ivaria/dynamicsdebug.h CS/branches/soc2010/hair/include/ivaria/ode.h CS/branches/soc2010/hair/include/ivaria/softanim.h CS/branches/soc2010/hair/include/ivideo/graph3d.h CS/branches/soc2010/hair/include/ivideo/txtmgr.h CS/branches/soc2010/hair/include/namespacedocs.h CS/branches/soc2010/hair/libs/csplugincommon/imageloader/commonimagefile.cpp CS/branches/soc2010/hair/libs/csplugincommon/opengl/glstates.cpp CS/branches/soc2010/hair/libs/csplugincommon/rendermanager/posteffects.cpp CS/branches/soc2010/hair/libs/cstool/csdemoapplication.cpp CS/branches/soc2010/hair/libs/csutil/cfgmgr.cpp CS/branches/soc2010/hair/libs/csutil/cseventq.cpp CS/branches/soc2010/hair/libs/csutil/reftrack.cpp CS/branches/soc2010/hair/libs/csutil/scf.cpp CS/branches/soc2010/hair/mk/msvc10/appcsdemo.vcxproj CS/branches/soc2010/hair/mk/msvc10/libcrystalspace.vcxproj CS/branches/soc2010/hair/mk/msvc10/libcrystalspace_staticplugins.vcxproj CS/branches/soc2010/hair/mk/msvc10/plgcscegui.vcxproj CS/branches/soc2010/hair/mk/msvc10/plgrm_rlcompat.vcxproj CS/branches/soc2010/hair/mk/msvc10/plgrm_shadow_pssm.vcxproj CS/branches/soc2010/hair/mk/msvc10/plgrm_unshadowed.vcxproj CS/branches/soc2010/hair/mk/msvc10/wkspytypical.sln CS/branches/soc2010/hair/mk/msvc10/wkstypical.sln CS/branches/soc2010/hair/mk/msvc8/appcsdemo.vcproj CS/branches/soc2010/hair/mk/msvc8/libcrystalspace.vcproj CS/branches/soc2010/hair/mk/msvc8/libcrystalspace_staticplugins.vcproj CS/branches/soc2010/hair/mk/msvc8/plgcscegui.vcproj CS/branches/soc2010/hair/mk/msvc8/plgrm_rlcompat.vcproj CS/branches/soc2010/hair/mk/msvc8/plgrm_shadow_pssm.vcproj CS/branches/soc2010/hair/mk/msvc8/plgrm_unshadowed.vcproj CS/branches/soc2010/hair/mk/msvc8/wkspytypical.sln CS/branches/soc2010/hair/mk/msvc8/wkstypical.sln CS/branches/soc2010/hair/mk/msvc9/appcsdemo.vcproj CS/branches/soc2010/hair/mk/msvc9/libcrystalspace.vcproj CS/branches/soc2010/hair/mk/msvc9/libcrystalspace_staticplugins.vcproj CS/branches/soc2010/hair/mk/msvc9/plgcscegui.vcproj CS/branches/soc2010/hair/mk/msvc9/plgrm_rlcompat.vcproj CS/branches/soc2010/hair/mk/msvc9/plgrm_shadow_pssm.vcproj CS/branches/soc2010/hair/mk/msvc9/plgrm_unshadowed.vcproj CS/branches/soc2010/hair/mk/msvc9/wkspytypical.sln CS/branches/soc2010/hair/mk/msvc9/wkstypical.sln CS/branches/soc2010/hair/plugins/cscript/pyivideo/cs_ivideo.cpp CS/branches/soc2010/hair/plugins/csparser/services/syntxldr.cpp CS/branches/soc2010/hair/plugins/csparser/services/syntxldr.h CS/branches/soc2010/hair/plugins/filesys/vfs/vfs.cfg.template CS/branches/soc2010/hair/plugins/filesys/vfs/vfs.cpp CS/branches/soc2010/hair/plugins/gui/cegui/Jamfile CS/branches/soc2010/hair/plugins/gui/cegui/ceguirenderer.cpp CS/branches/soc2010/hair/plugins/gui/cegui/ceguirenderer.h CS/branches/soc2010/hair/plugins/mesh/animesh/controllers/ragdoll/ragdoll.cpp CS/branches/soc2010/hair/plugins/mesh/animesh/controllers/ragdoll/ragdoll.h CS/branches/soc2010/hair/plugins/mesh/animesh/persist/skeleton2/skeleton2ldr.cpp CS/branches/soc2010/hair/plugins/mesh/animesh/skeleton2/fsmnode.cpp CS/branches/soc2010/hair/plugins/mesh/animesh/skeleton2/fsmnode.h CS/branches/soc2010/hair/plugins/mesh/animesh/skeleton2/skeleton2.cpp CS/branches/soc2010/hair/plugins/physics/bullet/bullet.cpp CS/branches/soc2010/hair/plugins/physics/bullet/bullet.h CS/branches/soc2010/hair/plugins/physics/bullet/colliders.cpp CS/branches/soc2010/hair/plugins/physics/bullet/colliders.h CS/branches/soc2010/hair/plugins/physics/bullet/common.h CS/branches/soc2010/hair/plugins/physics/bullet/joints.cpp CS/branches/soc2010/hair/plugins/physics/bullet/joints.h CS/branches/soc2010/hair/plugins/physics/bullet/rigidbodies.cpp CS/branches/soc2010/hair/plugins/physics/bullet/rigidbodies.h CS/branches/soc2010/hair/plugins/physics/bullet/softbodies.cpp CS/branches/soc2010/hair/plugins/physics/bullet/softbodies.h CS/branches/soc2010/hair/plugins/physics/dyndebug/dyndebug.cpp CS/branches/soc2010/hair/plugins/physics/dyndebug/dyndebug.h CS/branches/soc2010/hair/plugins/physics/softanim/softanim.cpp CS/branches/soc2010/hair/plugins/physics/softanim/softanim.h CS/branches/soc2010/hair/plugins/rendermanager/shadow_pssm/shadow_pssm.cpp CS/branches/soc2010/hair/plugins/rendermanager/shadow_pssm/shadow_pssm.h CS/branches/soc2010/hair/plugins/rendermanager/unshadowed/unshadowed.cpp CS/branches/soc2010/hair/plugins/rendermanager/unshadowed/unshadowed.h CS/branches/soc2010/hair/plugins/video/render3d/opengl/gl_render3d.cpp CS/branches/soc2010/hair/plugins/video/render3d/opengl/gl_render3d.h CS/branches/soc2010/hair/plugins/video/render3d/opengl/gl_txtmgr_basictex.cpp CS/branches/soc2010/hair/plugins/video/render3d/opengl/gl_txtmgr_basictex.h CS/branches/soc2010/hair/plugins/video/render3d/shader/shadercompiler/weaver/combiner_default.h CS/branches/soc2010/hair/plugins/video/render3d/shader/shadercompiler/weaver/shader.cpp CS/branches/soc2010/hair/plugins/video/render3d/shader/shadercompiler/weaver/synth.cpp CS/branches/soc2010/hair/plugins/video/render3d/shader/shadercompiler/xmlshader/forcedprioshader.cpp CS/branches/soc2010/hair/plugins/video/render3d/shader/shaderplugins/glshader_cg/combiner_cg.cpp CS/branches/soc2010/hair/plugins/video/render3d/shader/shaderplugins/glshader_cg/combiner_cg.h CS/branches/soc2010/hair/plugins/video/render3d/shader/shaderplugins/glshader_cg/profile_limits.cpp CS/branches/soc2010/hair/plugins/video/render3d/shader/shaderplugins/glshader_cg/profile_limits.h CS/branches/soc2010/hair/scripts/perl5/cspace.pm CS/branches/soc2010/hair/scripts/perl5/cswigpl5.inc CS/branches/soc2010/hair/scripts/python/frozen/cspace/ivideo.py CS/branches/soc2010/hair/scripts/python/metaglext.xml CS/branches/soc2010/hair/vfs.cfg Added Paths: ----------- CS/branches/soc2010/hair/apps/demo/entity.cpp CS/branches/soc2010/hair/apps/demo/entity.h CS/branches/soc2010/hair/apps/demo/monster.cpp CS/branches/soc2010/hair/apps/demo/monster.h CS/branches/soc2010/hair/apps/demo/player.cpp CS/branches/soc2010/hair/apps/demo/player.h CS/branches/soc2010/hair/apps/demo/weapon.cpp CS/branches/soc2010/hair/apps/demo/weapon.h CS/branches/soc2010/hair/apps/tests/csceguiconftest/ CS/branches/soc2010/hair/apps/tests/csceguiconftest/Jamfile CS/branches/soc2010/hair/apps/tests/csceguiconftest/csceguiconftest.cpp CS/branches/soc2010/hair/apps/tests/csceguiconftest/csceguiconftest.h CS/branches/soc2010/hair/data/bias/ CS/branches/soc2010/hair/data/bias/bias.layout CS/branches/soc2010/hair/data/bias/models/ CS/branches/soc2010/hair/data/bias/models/catscratch/ CS/branches/soc2010/hair/data/bias/models/catscratch/catscratch CS/branches/soc2010/hair/data/bias/models/catscratch/factories/ CS/branches/soc2010/hair/data/bias/models/catscratch/factories/catscratch CS/branches/soc2010/hair/data/bias/models/catscratch/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/catscratch/textures/ CS/branches/soc2010/hair/data/bias/models/catscratch/textures/cat_diffuse.jpg CS/branches/soc2010/hair/data/bias/models/catscratch/textures/cat_normals.jpg CS/branches/soc2010/hair/data/bias/models/catscratch/textures/ice.png CS/branches/soc2010/hair/data/bias/models/crossbow/ CS/branches/soc2010/hair/data/bias/models/crossbow/crossbow CS/branches/soc2010/hair/data/bias/models/crossbow/factories/ CS/branches/soc2010/hair/data/bias/models/crossbow/factories/crossbow CS/branches/soc2010/hair/data/bias/models/crossbow/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/crossbow/textures/ CS/branches/soc2010/hair/data/bias/models/crossbow/textures/crossbow6mi9.png CS/branches/soc2010/hair/data/bias/models/crossbow/textures/normalmap.png CS/branches/soc2010/hair/data/bias/models/iceblocks/ CS/branches/soc2010/hair/data/bias/models/iceblocks/factories/ CS/branches/soc2010/hair/data/bias/models/iceblocks/factories/gibs CS/branches/soc2010/hair/data/bias/models/iceblocks/factories/skelArmature.001 CS/branches/soc2010/hair/data/bias/models/iceblocks/gibs CS/branches/soc2010/hair/data/bias/models/iceblocks/textures/ CS/branches/soc2010/hair/data/bias/models/iceblocks/textures/ice.png CS/branches/soc2010/hair/data/bias/models/iceblocks/textures/normalmap.png CS/branches/soc2010/hair/data/bias/models/iceblocks/textures/smoke2.png CS/branches/soc2010/hair/data/bias/models/knight/ CS/branches/soc2010/hair/data/bias/models/knight/factories/ CS/branches/soc2010/hair/data/bias/models/knight/factories/knight CS/branches/soc2010/hair/data/bias/models/knight/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/knight/knight CS/branches/soc2010/hair/data/bias/models/knight/textures/ CS/branches/soc2010/hair/data/bias/models/knight/textures/MaleCol1.png CS/branches/soc2010/hair/data/bias/models/knight/textures/ice.png CS/branches/soc2010/hair/data/bias/models/knight/textures/normalmap.png CS/branches/soc2010/hair/data/bias/models/knight/textures/strands.png.001 CS/branches/soc2010/hair/data/bias/models/knight/textures/sword.jpg CS/branches/soc2010/hair/data/bias/models/knight/textures/uvmap1.jpg CS/branches/soc2010/hair/data/bias/models/kwartz01/ CS/branches/soc2010/hair/data/bias/models/kwartz01/factories/ CS/branches/soc2010/hair/data/bias/models/kwartz01/factories/kwartz CS/branches/soc2010/hair/data/bias/models/kwartz01/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/kwartz01/kwartz01 CS/branches/soc2010/hair/data/bias/models/kwartz01/textures/ CS/branches/soc2010/hair/data/bias/models/kwartz01/textures/ice.png CS/branches/soc2010/hair/data/bias/models/kwartz01/textures/kwarz_diffuse.jpg CS/branches/soc2010/hair/data/bias/models/kwartz01/textures/kwarz_normals.jpg CS/branches/soc2010/hair/data/bias/models/kwartz02/ CS/branches/soc2010/hair/data/bias/models/kwartz02/factories/ CS/branches/soc2010/hair/data/bias/models/kwartz02/factories/kwartz CS/branches/soc2010/hair/data/bias/models/kwartz02/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/kwartz02/kwartz02 CS/branches/soc2010/hair/data/bias/models/kwartz02/textures/ CS/branches/soc2010/hair/data/bias/models/kwartz02/textures/ice.png CS/branches/soc2010/hair/data/bias/models/kwartz02/textures/kwarz_diffuse2.jpg CS/branches/soc2010/hair/data/bias/models/kwartz02/textures/kwarz_normals.jpg CS/branches/soc2010/hair/data/bias/world.zip CS/branches/soc2010/hair/data/castle-old/ CS/branches/soc2010/hair/data/castle-old/world CS/branches/soc2010/hair/data/config-plugins/emulate_radHD4700.cfg CS/branches/soc2010/hair/data/csceguiconftest/ CS/branches/soc2010/hair/data/csceguiconftest/csceguiconftest.layout CS/branches/soc2010/hair/data/csceguiconftest/options-test.layout CS/branches/soc2010/hair/data/csceguiconftest/options-video.layout CS/branches/soc2010/hair/data/shader/early_z/z_only_instanced.xml CS/branches/soc2010/hair/include/csplugincommon/rendermanager/posteffectssupport.h CS/branches/soc2010/hair/include/csutil/cfgnotifier.h CS/branches/soc2010/hair/include/iutil/cfgnotifier.h CS/branches/soc2010/hair/libs/csplugincommon/rendermanager/posteffectssupport.cpp CS/branches/soc2010/hair/libs/csutil/cfgnotifier.cpp CS/branches/soc2010/hair/mk/msvc/appcsceguiconftest.manifest CS/branches/soc2010/hair/mk/msvc/appcsceguiconftest.rc CS/branches/soc2010/hair/mk/msvc/appsmoketest.manifest CS/branches/soc2010/hair/mk/msvc/appsmoketest.rc CS/branches/soc2010/hair/mk/msvc10/appcsceguiconftest.vcxproj CS/branches/soc2010/hair/mk/msvc10/appsmoketest.vcxproj CS/branches/soc2010/hair/mk/msvc8/appcsceguiconftest.vcproj CS/branches/soc2010/hair/mk/msvc8/appsmoketest.vcproj CS/branches/soc2010/hair/mk/msvc9/appcsceguiconftest.vcproj CS/branches/soc2010/hair/mk/msvc9/appsmoketest.vcproj CS/branches/soc2010/hair/plugins/gui/cegui/config/ CS/branches/soc2010/hair/plugins/gui/cegui/config/Jamfile CS/branches/soc2010/hair/plugins/gui/cegui/config/setting.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/setting.h CS/branches/soc2010/hair/plugins/gui/cegui/config/settingbase.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/settingbase.h CS/branches/soc2010/hair/plugins/gui/cegui/config/settingcombobox.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/settingcombobox.h CS/branches/soc2010/hair/plugins/gui/cegui/config/settingproperties.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/settingproperties.h CS/branches/soc2010/hair/plugins/gui/cegui/config/settingslider.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/settingslider.h CS/branches/soc2010/hair/plugins/gui/cegui/windowfactory.h Removed Paths: ------------- CS/branches/soc2010/hair/apps/demo/demoldr.cpp CS/branches/soc2010/hair/apps/demo/demoldr.h CS/branches/soc2010/hair/apps/demo/demoop.cpp CS/branches/soc2010/hair/apps/demo/demoop.h CS/branches/soc2010/hair/apps/demo/demoseq.cpp CS/branches/soc2010/hair/apps/demo/demoseq.h CS/branches/soc2010/hair/apps/tests/csceguiconftest/Jamfile CS/branches/soc2010/hair/apps/tests/csceguiconftest/csceguiconftest.cpp CS/branches/soc2010/hair/apps/tests/csceguiconftest/csceguiconftest.h CS/branches/soc2010/hair/data/bias/bias.layout CS/branches/soc2010/hair/data/bias/models/ CS/branches/soc2010/hair/data/bias/models/catscratch/catscratch CS/branches/soc2010/hair/data/bias/models/catscratch/factories/ CS/branches/soc2010/hair/data/bias/models/catscratch/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/catscratch/textures/ CS/branches/soc2010/hair/data/bias/models/catscratch/textures/cat_diffuse.jpg CS/branches/soc2010/hair/data/bias/models/catscratch/textures/cat_normals.jpg CS/branches/soc2010/hair/data/bias/models/catscratch/textures/ice.png CS/branches/soc2010/hair/data/bias/models/crossbow/ CS/branches/soc2010/hair/data/bias/models/crossbow/crossbow CS/branches/soc2010/hair/data/bias/models/crossbow/factories/ CS/branches/soc2010/hair/data/bias/models/crossbow/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/crossbow/textures/ CS/branches/soc2010/hair/data/bias/models/crossbow/textures/crossbow6mi9.png CS/branches/soc2010/hair/data/bias/models/crossbow/textures/normalmap.png CS/branches/soc2010/hair/data/bias/models/iceblocks/factories/ CS/branches/soc2010/hair/data/bias/models/iceblocks/factories/skelArmature.001 CS/branches/soc2010/hair/data/bias/models/iceblocks/gibs CS/branches/soc2010/hair/data/bias/models/iceblocks/textures/ CS/branches/soc2010/hair/data/bias/models/iceblocks/textures/ice.png CS/branches/soc2010/hair/data/bias/models/iceblocks/textures/normalmap.png CS/branches/soc2010/hair/data/bias/models/iceblocks/textures/smoke2.png CS/branches/soc2010/hair/data/bias/models/knight/factories/ CS/branches/soc2010/hair/data/bias/models/knight/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/knight/knight CS/branches/soc2010/hair/data/bias/models/knight/textures/ CS/branches/soc2010/hair/data/bias/models/knight/textures/MaleCol1.png CS/branches/soc2010/hair/data/bias/models/knight/textures/ice.png CS/branches/soc2010/hair/data/bias/models/knight/textures/normalmap.png CS/branches/soc2010/hair/data/bias/models/knight/textures/strands.png.001 CS/branches/soc2010/hair/data/bias/models/knight/textures/sword.jpg CS/branches/soc2010/hair/data/bias/models/knight/textures/uvmap1.jpg CS/branches/soc2010/hair/data/bias/models/kwartz01/factories/ CS/branches/soc2010/hair/data/bias/models/kwartz01/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/kwartz01/kwartz01 CS/branches/soc2010/hair/data/bias/models/kwartz01/textures/ CS/branches/soc2010/hair/data/bias/models/kwartz01/textures/ice.png CS/branches/soc2010/hair/data/bias/models/kwartz01/textures/kwarz_diffuse.jpg CS/branches/soc2010/hair/data/bias/models/kwartz01/textures/kwarz_normals.jpg CS/branches/soc2010/hair/data/bias/models/kwartz02/factories/ CS/branches/soc2010/hair/data/bias/models/kwartz02/factories/skelArmature CS/branches/soc2010/hair/data/bias/models/kwartz02/kwartz02 CS/branches/soc2010/hair/data/bias/models/kwartz02/textures/ CS/branches/soc2010/hair/data/bias/models/kwartz02/textures/ice.png CS/branches/soc2010/hair/data/bias/models/kwartz02/textures/kwarz_diffuse2.jpg CS/branches/soc2010/hair/data/bias/models/kwartz02/textures/kwarz_normals.jpg CS/branches/soc2010/hair/data/bias/world.zip CS/branches/soc2010/hair/data/castle-old/world CS/branches/soc2010/hair/data/csceguiconftest/csceguiconftest.layout CS/branches/soc2010/hair/data/csceguiconftest/options-test.layout CS/branches/soc2010/hair/data/csceguiconftest/options-video.layout CS/branches/soc2010/hair/plugins/gui/cegui/config/Jamfile CS/branches/soc2010/hair/plugins/gui/cegui/config/setting.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/setting.h CS/branches/soc2010/hair/plugins/gui/cegui/config/settingbase.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/settingbase.h CS/branches/soc2010/hair/plugins/gui/cegui/config/settingcombobox.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/settingcombobox.h CS/branches/soc2010/hair/plugins/gui/cegui/config/settingproperties.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/settingproperties.h CS/branches/soc2010/hair/plugins/gui/cegui/config/settingslider.cpp CS/branches/soc2010/hair/plugins/gui/cegui/config/settingslider.h Property Changed: ---------------- CS/branches/soc2010/hair/ CS/branches/soc2010/hair/apps/demo/Jamfile CS/branches/soc2010/hair/apps/demo/demo.cpp CS/branches/soc2010/hair/apps/demo/demo.h CS/branches/soc2010/hair/apps/tools/genmeshify/thing/object/textrans.cpp CS/branches/soc2010/hair/apps/tools/genmeshify/thing/object/textrans.h CS/branches/soc2010/hair/bin/guidregistry.py CS/branches/soc2010/hair/data/castle-staticlit/factories/ CS/branches/soc2010/hair/include/csutil/rootedhiercache.h CS/branches/soc2010/hair/include/csutil/scf_implgen_p_template.h CS/branches/soc2010/hair/include/csutil/win32/cachedll.h CS/branches/soc2010/hair/include/csutil/win32/csconfig-msvc.h CS/branches/soc2010/hair/libs/csgfx/imagememory.cpp CS/branches/soc2010/hair/libs/csutil/rootedhiercache.cpp CS/branches/soc2010/hair/plugins/video/canvas/xwindow/xalert_gtk/gtk_alert.cpp CS/branches/soc2010/hair/scripts/msi/CS-all.wxs CS/branches/soc2010/hair/scripts/msi/CS-directory-demo.wxi CS/branches/soc2010/hair/scripts/msi/CS-directory-runtime.wxi CS/branches/soc2010/hair/scripts/msi/CS-directory-sdk.wxi CS/branches/soc2010/hair/scripts/msi/CS-feature-demo.wxi CS/branches/soc2010/hair/scripts/msi/CS-feature-runtime.wxi CS/branches/soc2010/hair/scripts/msi/CS-feature-sdk.wxi Property changes on: CS/branches/soc2010/hair ___________________________________________________________________ Modified: svnmerge-blocked - /CS/branches/feature/rendermanager:29760 /CS/branches/release/V1.4:30277 /CS/branches/soc2008/water:30280,30282-30284,30702,30762,30766,30768,30779,30792,30807,30809,30811,30813-30814 /CS/trunk:29874,29887,29889-29890,29892 + /CS/branches/release/V1.4:30277 /CS/branches/feature/rendermanager:29760 /CS/trunk:29874,29887,29889-29890,29892 /CS/branches/soc2008/water:30280,30282-30284,30702,30762,30766,30768,30779,30792,30807,30809,30811,30813-30814 Modified: svnmerge-integrated - /CS/branches/feature/rendermanager:1-29759,29761-29886 /CS/branches/feature/newanim:1-30040 /CS/branches/feature/jobqueue2:1-33004 /CS/branches/feature/plugin-merge:1-30878,31069-31080,31082-31087,31089-31093,31095-31118,31123,31127-31234,31236-32583,32587-32589,32591 /CS/branches/release/V1.4:1-29935,30181,30333,30463,30946,31900-31902,32131,32539,32541-32551 /CS/branches/feature/pseudoinstancing:1-31930 /CS/branches/soc2008/threadcomm:1-29721,30471,30486,30517,30531,30644-30649,30651-30654,30656-30661,30663-30665,30671,30673-30674,30676,30678,30681,30683-30685,30690-30691,30693-30697,30701,30703-30707,30709,30711-30718,30720-30722,30724-30726,30738-30744,30753,30769-30770,30782-30783,30804,30905,31142-31152,31157-31158,31167-31172,31175,31176-31179 /CS/branches/soc2008/water:1-30279,30281,30285-30701,30703-30761,30763-30791,30793-30806,30808,30810,30812,30815-31994 /CS/branches/soc2009/imposters:1-32331,32566-32670,32679-32801,32807-32843 /CS/branches/soc2009/postprocessing:1-33105 /CS/trunk:1-34402,34553-34555 + /CS/branches/feature/plugin-merge:1-30878,31069-31080,31082-31087,31089-31093,31095-31118,31123,31127-31234,31236-32583,32587-32589,32591 /CS/branches/feature/jobqueue2:1-33004 /CS/branches/feature/newanim:1-30040 /CS/branches/feature/pseudoinstancing:1-31930 /CS/branches/release/V1.4:1-29935,30181,30333,30463,30946,31900-31902,32131,32539,32541-32551 /CS/branches/feature/rendermanager:1-29759,29761-29886 /CS/branches/soc2009/postprocessing:1-33105 /CS/trunk:1-34587 /CS/branches/soc2008/threadcomm:1-29721,30471,30486,30517,30531,30644-30649,30651-30654,30656-30661,30663-30665,30671,30673-30674,30676,30678,30681,30683-30685,30690-30691,30693-30697,30701,30703-30707,30709,30711-30718,30720-30722,30724-30726,30738-30744,30753,30769-30770,30782-30783,30804,30905,31142-31152,31157-31158,31167-31172,31175,31176-31179 /CS/branches/soc2008/water:1-30279,30281,30285-30701,30703-30761,30763-30791,30793-30806,30808,30810,30812,30815-31994 /CS/branches/soc2009/imposters:1-32331,32566-32670,32679-32801,32807-32843 Modified: svn:mergeinfo - /CS/branches/feature/jobqueue2:32936,32954,32969,32978-32979 /CS/branches/feature/plugin-merge:31069,31103,31131-31137,32591 /CS/branches/feature/pseudoinstancing:31877-31928,31930 /CS/branches/release/V1.4:30463,31900-31902,32131,32539,32541-32551 /CS/branches/soc2008/threadcomm:29857,30131-30132,30341,30352-30353,30471,30486,30517,30531,30644-30649,30651-30654,30656-30661,30663-30665,30671,30673-30674,30676,30678,30681,30683-30685,30690-30691,30693-30697,30701,30703-30707,30709,30711-30718,30720-30722,30724-30726,30738-30744,30753,30769-30770,30782-30783,30804,30905,31142-31152,31157-31158,31167-31172,31175-31179 /CS/branches/soc2008/water:29937-29987,30011-30274,30281,30285-30692,30763,30787,30802,30826,30851 /CS/branches/soc2009/imposters:32566,32596-32604,32666-32670,32679-32750,32778-32801,32807-32843 /CS/branches/soc2009/postprocessing:32464-32467,32693-32762,32779-32820,32889,32924-32930,33104-33105 /CS/trunk:33977-34016,34020-34138,34145,34149,34152-34402,34553-34555 + /CS/branches/feature/jobqueue2:32936,32954,32969,32978-32979 /CS/branches/feature/plugin-merge:31069,31103,31131-31137,32591 /CS/branches/feature/pseudoinstancing:31877-31928,31930 /CS/branches/release/V1.4:30463,31900-31902,32131,32539,32541-32551 /CS/branches/soc2008/threadcomm:29857,30131-30132,30341,30352-30353,30471,30486,30517,30531,30644-30649,30651-30654,30656-30661,30663-30665,30671,30673-30674,30676,30678,30681,30683-30685,30690-30691,30693-30697,30701,30703-30707,30709,30711-30718,30720-30722,30724-30726,30738-30744,30753,30769-30770,30782-30783,30804,30905,31142-31152,31157-31158,31167-31172,31175-31179 /CS/branches/soc2008/water:29937-29987,30011-30274,30281,30285-30692,30763,30787,30802,30826,30851 /CS/branches/soc2009/imposters:32566,32596-32604,32666-32670,32679-32750,32778-32801,32807-32843 /CS/branches/soc2009/postprocessing:32464-32467,32693-32762,32779-32820,32889,32924-32930,33104-33105 /CS/trunk:33977-34016,34020-34138,34145,34149,34152-34402,34414-34427,34436-34549,34553-34587 Modified: CS/branches/soc2010/hair/apps/demo/Jamfile =================================================================== --- CS/branches/soc2010/hair/apps/demo/Jamfile 2010-07-31 10:32:31 UTC (rev 34631) +++ CS/branches/soc2010/hair/apps/demo/Jamfile 2010-07-31 11:59:14 UTC (rev 34632) @@ -1,6 +1,11 @@ SubDir TOP apps demo ; +if $(CEGUI.AVAILABLE) = "yes" +{ Description csdemo : "Demo" ; Application csdemo : [ Wildcard *.cpp *.h ] ; +CFlags csdemo : $(COMPILER.C++FLAGS.EXCEPTIONS.ENABLE) ; LinkWith csdemo : crystalspace ; +ExternalLibs csdemo : CEGUI ; FileListEntryApplications csdemo : app-demo ; +} Property changes on: CS/branches/soc2010/hair/apps/demo/Jamfile ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: CS/branches/soc2010/hair/apps/demo/demo.cpp =================================================================== --- CS/branches/soc2010/hair/apps/demo/demo.cpp 2010-07-31 10:32:31 UTC (rev 34631) +++ CS/branches/soc2010/hair/apps/demo/demo.cpp 2010-07-31 11:59:14 UTC (rev 34632) @@ -1,1351 +1,310 @@ /* - Copyright (C) 2001 by Jorrit Tyberghein + Copyright (C) 2010 Jelle Hellemans - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library 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 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 library 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 - Library General Public License for more details. + 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 Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - - csdemo - This is the demo application for crystal space, it reads worlds - and scenes with sequences and animation paths from data files allowing - to produce generic demos. + 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 */ -#include "cssysdef.h" +#include "demo.h" -#include "csqsqrt.h" +#include "csutil/custom_new_disable.h" +#include <CEGUI.h> +#include <CEGUIWindowManager.h> +#include <CEGUILogger.h> +#include "csutil/custom_new_enable.h" -#include "csgeom/path.h" -#include "cstool/csfxscr.h" -#include "cstool/csview.h" -#include "cstool/initapp.h" -#include "csutil/cmdhelp.h" -#include "csutil/cscolor.h" -#include "csutil/event.h" -#include "csutil/csevent.h" -#include "csutil/stringarray.h" -#include "csutil/sysfunc.h" -#include "csutil/common_handlers.h" -#include "iengine/camera.h" -#include "iengine/engine.h" -#include "iengine/halo.h" -#include "iengine/light.h" -#include "iengine/material.h" -#include "iengine/mesh.h" -#include "iengine/movable.h" -#include "iengine/sector.h" -#include "igraphic/imageio.h" -#include "imap/loader.h" -#include "imap/reader.h" -#include "imesh/object.h" -#include "imesh/particle.h" -#include "imesh/sprite2d.h" -#include "imesh/sprite3d.h" -#include "iutil/cmdline.h" -#include "iutil/comp.h" -#include "iutil/csinput.h" -#include "iutil/databuff.h" -#include "iutil/event.h" -#include "iutil/eventh.h" -#include "iutil/eventq.h" -#include "iutil/objreg.h" -#include "iutil/plugin.h" -#include "iutil/stringarray.h" -#include "iutil/virtclk.h" -#include "iutil/vfs.h" -#include "ivideo/graph2d.h" -#include "ivideo/graph3d.h" -#include "ivideo/fontserv.h" -#include "ivideo/natwin.h" -#include "ivaria/conout.h" -#include "ivaria/reporter.h" - - -#include "demo.h" -#include "demoseq.h" - CS_IMPLEMENT_APPLICATION -//----------------------------------------------------------------------------- - -// The global system driver -Demo *System; - -void Demo::Report (int severity, const char* msg, ...) +Demo::Demo() { - va_list arg; - va_start (arg, msg); - csReportV(object_reg, severity, "crystalspace.application.demo", msg, arg); - va_end (arg); -} + SetApplicationName ("Demo"); -Demo::Demo () -{ - seqmgr = 0; + do_freelook = true; } -Demo::~Demo () +Demo::~Demo() { - delete seqmgr; } -void Cleanup () +void Demo::Frame() { - csPrintf ("Cleaning up...\n"); - iObjectRegistry* object_reg = System->object_reg; - delete System; System = 0; - csInitializer::DestroyApplication (object_reg); -} - -static bool DemoEventHandler (iEvent& ev) -{ - if (ev.Name == System->Frame) + // Tell 3D driver we're going to display 3D things. + if (!g3d->BeginDraw(engine->GetBeginDrawFlags() | CSDRAW_3DGRAPHICS)) { - System->SetupFrame (); - return true; - } - else - { - return System ? System->DemoHandleEvent (ev) : false; - } -} - -static void TestDemoFile (const char* zip, iVFS* myVFS, csStringArray& demos) -{ - csRef<iDataBuffer> realpath_db (myVFS->GetRealPath (zip)); - char* realpath = (char*)(realpath_db->GetData ()); - char* testpath = new char [strlen (realpath)+3]; - strcpy (testpath, realpath); - if (testpath[strlen (testpath)-1] == '/') - { - // We have a directory. - size_t l = strlen (testpath); - testpath[l-1] = '$'; - testpath[l] = '/'; - testpath[l+1] = 0; - } - else if (strstr (testpath, ".zip") == 0) - { - delete[] testpath; + ReportError("BeginDraw Failed!"); return; } + + // Tell the camera to render into the frame buffer. + view->Draw (); - myVFS->Mount ("/tmp/csdemo_temp", testpath); - if (myVFS->Exists ("/tmp/csdemo_temp/sequences")) - demos.Push (csStrNew (testpath)); - myVFS->Unmount ("/tmp/csdemo_temp", 0); - delete[] testpath; + if (!do_freelook) cegui->Render (); } -bool Demo::LoadDemoFile (const char* demofile) +bool Demo::OnInitialize(int /*argc*/, char* /*argv*/ []) { - do_demo = 3; - myVFS->Mount ("/data/demo", demofile); + if (!csInitializer::RequestPlugins(GetObjectRegistry(), + CS_REQUEST_VFS, + CS_REQUEST_OPENGL3D, + CS_REQUEST_ENGINE, + CS_REQUEST_FONTSERVER, + CS_REQUEST_IMAGELOADER, + CS_REQUEST_LEVELLOADER, + CS_REQUEST_REPORTER, + CS_REQUEST_REPORTERLISTENER, + CS_REQUEST_PLUGIN ("crystalspace.cegui.wrapper", iCEGUI), + CS_REQUEST_END)) + return ReportError("Failed to initialize plugins!"); - if (!myVFS->ChDir ("/data/demo")) - { - Report (CS_REPORTER_SEVERITY_ERROR, - "The directory on VFS for demo file does not exist!"); - return false; - } + csBaseEventHandler::Initialize(GetObjectRegistry()); - // This can fail, but we don't care :-) - loader->LoadLibraryFile ("library"); + if (!RegisterQueue(GetObjectRegistry(), csevAllEvents(GetObjectRegistry()))) + return ReportError("Failed to set up event handler!"); - if (!loader->LoadMapFile ("world", false, 0, true)) - { - Report (CS_REPORTER_SEVERITY_ERROR, "There was an error loading world!"); - exit (0); - } - - room = engine->GetSectors ()->FindByName ("room"); - seqmgr = new DemoSequenceManager (this); - seqmgr->Setup ("sequences"); - - engine->Prepare (); - engine->PrecacheDraw (); - - view = csPtr<iView> (new csView (engine, myG3D)); - view->GetCamera ()->SetSector (room); - view->GetCamera ()->GetTransform ().SetOrigin ( - csVector3 (0.0f, 0.0f, -900.0f)); - view->GetCamera ()->GetTransform ().RotateThis ( - csVector3 (0.0f, 1.0f, 0.0f), 0.8f); - view->SetRectangle (0, 0, myG2D->GetWidth (), myG2D->GetHeight ()); return true; } -bool Demo::Initialize (int argc, const char* const argv[], - const char *iConfigName) +void Demo::OnExit() { - object_reg = csInitializer::CreateEnvironment (argc, argv); - if (!object_reg) return false; + printer.Invalidate (); +} - if (!csInitializer::SetupConfigManager (object_reg, iConfigName)) - { - Report (CS_REPORTER_SEVERITY_ERROR, "Couldn't initialize app!"); - return false; - } +bool Demo::Application() +{ + if (!OpenApplication(GetObjectRegistry())) + return ReportError("Error opening system!"); - if (!csInitializer::RequestPlugins (object_reg, CS_REQUEST_END)) - { - Report (CS_REPORTER_SEVERITY_ERROR, "Couldn't initialize app!"); - return false; - } + vfs = csQueryRegistry<iVFS> (GetObjectRegistry()); + if (!vfs) return ReportError("Failed to locate VFS!"); - Frame = csevFrame (object_reg); - KeyboardDown = csevKeyboardDown (object_reg); - MouseDown = csevMouseDown (object_reg, 0); - MouseMove = csevMouseMove (object_reg, 0); + g3d = csQueryRegistry<iGraphics3D> (GetObjectRegistry()); + if (!g3d) return ReportError("Failed to locate 3D renderer!"); - csEventID events[] = { - Frame, - KeyboardDown, - MouseDown, - MouseMove, - CS_EVENTLIST_END }; + engine = csQueryRegistry<iEngine> (GetObjectRegistry()); + if (!engine) return ReportError("Failed to locate 3D engine!"); - if (!csInitializer::SetupEventHandler (object_reg, DemoEventHandler, events)) - { - Report (CS_REPORTER_SEVERITY_ERROR, "Couldn't setup event handler!"); - return false; - } + vc = csQueryRegistry<iVirtualClock> (GetObjectRegistry()); + if (!vc) return ReportError("Failed to locate Virtual Clock!"); - // Check for commandline help. - if (csCommandLineHelper::CheckHelp (object_reg)) - { - csCommandLineHelper::Help (object_reg); - exit (0); - } + kbd = csQueryRegistry<iKeyboardDriver> (GetObjectRegistry()); + if (!kbd) return ReportError("Failed to locate Keyboard Driver!"); - // The virtual clock. - vc = csQueryRegistry<iVirtualClock> (object_reg); + loader = csQueryRegistry<iLoader> (GetObjectRegistry()); + if (!loader) return ReportError("Failed to locate Loader!"); - kbd = csQueryRegistry<iKeyboardDriver> (object_reg); - if (!kbd) - { - Report (CS_REPORTER_SEVERITY_ERROR, "No keyboard driver!"); - return false; - } + cegui = csQueryRegistry<iCEGUI> (GetObjectRegistry()); + if (!cegui) return ReportError("Failed to locate CEGUI plugin"); - engine = csQueryRegistry<iEngine> (object_reg); - if (!engine) - { - Report (CS_REPORTER_SEVERITY_ERROR, "No engine!"); - return false; - } + iNativeWindow* nw = g3d->GetDriver2D()->GetNativeWindow (); + if (nw) nw->SetTitle ("Peragro Tempus: Project Bias"); - loader = csQueryRegistry<iLoader> (object_reg); - if (!loader) - { - Report (CS_REPORTER_SEVERITY_ERROR, "No loader!"); - return false; - } - myG3D = csQueryRegistry<iGraphics3D> (object_reg); - if (!myG3D) - { - Report (CS_REPORTER_SEVERITY_ERROR, "No 3D driver!"); - return false; - } + // Initialize CEGUI wrapper + cegui->Initialize (); + + // Set the logging level + cegui->GetLoggerPtr ()->setLoggingLevel(CEGUI::Informative); - myG2D = csQueryRegistry<iGraphics2D> (object_reg); - if (!myG2D) - { - Report (CS_REPORTER_SEVERITY_ERROR, "No 2D driver!"); - return false; - } + vfs->ChDir ("/cegui/"); - myVFS = csQueryRegistry<iVFS> (object_reg); - if (!myVFS) - { - Report (CS_REPORTER_SEVERITY_ERROR, "No VFS!"); - return false; - } + // Load the ice skin (which uses Falagard skinning system) + cegui->GetSchemeManagerPtr ()->create("ice.scheme"); - // Open the main system. This will open all the previously loaded plug-ins. - iNativeWindow* nw = myG2D->GetNativeWindow (); - if (nw) nw->SetTitle ("The Crystal Space Demo."); - if (!csInitializer::OpenApplication (object_reg)) - { - Report (CS_REPORTER_SEVERITY_ERROR, "Error opening system!"); - Cleanup (); - exit (1); - } + cegui->GetSystemPtr ()->setDefaultMouseCursor("ice", "MouseArrow"); - font = myG2D->GetFontServer ()->LoadFont (CSFONT_LARGE); + cegui->GetFontManagerPtr ()->createFreeTypeFont("DejaVuSans", 10, true, "/fonts/ttf/DejaVuSans.ttf"); - // Some commercials... - Report (CS_REPORTER_SEVERITY_NOTIFY, - "The Crystal Space Demo."); + CEGUI::WindowManager* winMgr = cegui->GetWindowManagerPtr (); - // Create our world. - Report (CS_REPORTER_SEVERITY_NOTIFY, "Creating world!..."); + // Load layout and set as root + vfs->ChDir ("/data/bias/"); + cegui->GetSystemPtr ()->setGUISheet(winMgr->loadWindowLayout("bias.layout")); - // Check the demo file and mount it if required. - csRef<iCommandLineParser> cmdline ( - csQueryRegistry<iCommandLineParser> (object_reg)); - const char *val; - if ((val = cmdline->GetName ()) != 0) - { - if (!LoadDemoFile (val)) - return false; - } - else - { - do_demo = 0; - selected_demo = (size_t)-1; - // Here we can't do the demo because no data file was given. - // However we scan for possible data files and present them to the - // user. - csRef<iStringArray> zips = myVFS->FindFiles ("/this/*"); - size_t i; - for (i = 0 ; i < zips->GetSize () ; i++) - { - const char* zip = zips->Get (i); - TestDemoFile (zip, myVFS, demos); - } - myVFS->Mount ("/tmp/csdemo_datadir", "$@data$/"); - zips = myVFS->FindFiles ("/tmp/csdemo_datadir/*"); - for (i = 0 ; i < zips->GetSize () ; i++) - { - const char* zip = zips->Get (i); - TestDemoFile (zip, myVFS, demos); - } - myVFS->Unmount ("/tmp/csdemo_datadir", 0); - } + // Subscribe to the clicked event for the exit button + CEGUI::Window* btn = winMgr->getWindow("Bias/Inventory/Quit"); + btn->subscribeEvent(CEGUI::PushButton::EventClicked, + CEGUI::Event::Subscriber(&Demo::OnExitButtonClicked, this)); - col_red = myG2D->FindRGB (255, 0, 0); - col_blue = myG2D->FindRGB (0, 0, 255); - col_white = myG2D->FindRGB (255, 255, 255); - col_gray = myG2D->FindRGB (50, 50, 50); - col_black = myG2D->FindRGB (0, 0, 0); - col_yellow = myG2D->FindRGB (255, 255, 0); - col_cyan = myG2D->FindRGB (0, 255, 255); - col_green = myG2D->FindRGB (0, 255, 0); + // These are used store the current orientation of the camera. + rotY = rotX = 0; + view.AttachNew(new csView (engine, g3d)); + iGraphics2D* g2d = g3d->GetDriver2D (); + view->SetRectangle(0, 0, g2d->GetWidth(), g2d->GetHeight ()); + + object_reg->Register(view, "iView"); + printer.AttachNew (new FramePrinter (object_reg)); - return true; -} + CreateRoom(); -#define MAP_OFF 0 -#define MAP_OVERLAY 1 -#define MAP_EDIT 2 -#define MAP_EDIT_FORWARD 3 -static int map_enabled = MAP_OFF; -static csVector2 map_tl (-1000, 1000); -static csVector2 map_br (1000, -1000); -static int map_selpoint = 0; -static char map_selpath[255] = { 0 }; + csRef<iPluginManager> plugin_mgr; + csRef<iCollideSystem> collide_system; -void Demo::GfxWrite (int x, int y, int fg, int bg, const char *str, ...) -{ - va_list arg; - csString buf; + plugin_mgr = csQueryRegistry<iPluginManager> (object_reg); - va_start (arg, str); - buf.FormatV (str, arg); - va_end (arg); + const char* p = "crystalspace.collisiondetection.opcode"; + collide_system = csLoadPlugin<iCollideSystem> (plugin_mgr, p); + if (!collide_system) return ReportError ("No Collision Detection plugin found!"); + object_reg->Register (collide_system, "iCollideSystem"); - myG2D->Write (font, x, y, fg, bg, buf); -} + csColliderHelper::InitializeCollisionWrappers (collide_system, engine); -void Demo::FileWrite (iFile* file, const char *str, ...) -{ - va_list arg; - csString buf; + player.AttachNew(new Player(object_reg)); - va_start (arg, str); - buf.FormatV (str, arg); - va_end (arg); + Run(); - file->Write (buf.GetData(), buf.Length()); + return true; } -void Demo::ShowMessage (const char* msg, ...) +bool Demo::OnExitButtonClicked (const CEGUI::EventArgs&) { - message_error = false; - va_list arg; - va_start (arg, msg); - message.Format (msg, arg); - va_end (arg); - message_timer = csGetTicks () + 1500; + csRef<iEventQueue> q = + csQueryRegistry<iEventQueue> (GetObjectRegistry()); + if (q.IsValid()) q->GetEventOutlet()->Broadcast(csevQuit(GetObjectRegistry())); + return true; } -void Demo::ShowError (const char* msg, ...) +bool Demo::OnKeyboard(iEvent& ev) { - message_error = true; - va_list arg; - va_start (arg, msg); - message.Format (msg, arg); - va_end (arg); - message_timer = csGetTicks () + 1500; -} + csKeyEventType eventtype = csKeyEventHelper::GetEventType(&ev); + utf32_char code = csKeyEventHelper::GetCookedCode(&ev); -void Demo::SetupFrame () -{ - if (do_demo == 0) + if (eventtype == csKeyEventTypeDown) { - // Don't do the demo but print out information about - // where to get all stuff. - if (!myG3D->BeginDraw (CSDRAW_2DGRAPHICS)) return; - int col_bg = myG2D->FindRGB (200, 180, 180); - int col_fgdata = myG2D->FindRGB (20, 70, 20); - int col_bgsel = myG2D->FindRGB (255, 255, 255); - int col_fgsel = myG2D->FindRGB (0, 0, 0); - myG2D->Clear (col_bg); - int tx = 10; - int ty = 10; - GfxWrite (tx, ty, col_black, col_bg, - "This is the Crystal Space Demo application"); ty += 10; - GfxWrite (tx, ty, col_black, col_bg, - "To use this demo you need to give a data file."); ty += 10; - GfxWrite (tx, ty, col_black, col_bg, - "Download 'demodata.zip' from"); ty += 10; - GfxWrite (tx, ty, col_fgdata, col_bg, - " http://www.crystalspace3d.org/support/release/cs099/maps/demodata.zip"); ty += 10; - - ty += 10; - - GfxWrite (tx, ty, col_black, col_bg, - "After you downloaded demodata you can rerun this demo as follows:"); ty += 10; - GfxWrite (tx, ty, col_fgdata, col_bg, - " csdemo demodata.zip"); ty += 10; - ty += 10; - GfxWrite (tx, ty, col_black, col_bg, - "or you can run it with a higher resolution:"); ty += 10; - GfxWrite (tx, ty, col_fgdata, col_bg, - " csdemo demodata.zip -mode=800x600"); ty += 10; - - ty += 10; - - if (demos.GetSize () == 0) + if (code == CSKEY_ESC) { - GfxWrite (tx, ty, col_black, col_bg, - "I could not find any data files in this and the data directory!"); - ty += 10; - GfxWrite (tx, ty, col_black, col_bg, - "Press ESC to exit this program."); - ty += 10; + csRef<iEventQueue> q = + csQueryRegistry<iEventQueue> (GetObjectRegistry()); + if (q.IsValid()) q->GetEventOutlet()->Broadcast(csevQuit(GetObjectRegistry())); } - else + else if ((code == CSKEY_UP) || (code == 'w')) { - GfxWrite (tx, ty, col_black, col_bg, - "Here are all the demo data files that I could find in this and the data dir:"); ty += 10; - GfxWrite (tx, ty, col_black, col_bg, - "You can select one to run that demo or press ESC to exit this program."); ty += 10; - ty += 10; - first_y = ty; - size_t i; - for (i = 0 ; i < demos.GetSize () ; i++) - { - int bg = col_bg; - int fg = col_fgdata; - if (selected_demo == i) - { - bg = col_bgsel; - fg = col_fgsel; - myG2D->DrawBox (tx, ty, myG2D->GetWidth ()-2*tx, 10, bg); - } - GfxWrite (tx+30, ty, fg, bg, demos.Get (i)); ty += 10; - } + player->Step(1); } - - return; - } - else if (do_demo == 1) - { - if (!myG3D->BeginDraw (CSDRAW_2DGRAPHICS)) return; - myG2D->Clear (0); - do_demo++; - return; - } - else if (do_demo == 2) - { - if (!myG3D->BeginDraw (CSDRAW_2DGRAPHICS)) return; - myG2D->Clear (0); - if (!LoadDemoFile (demos.Get (selected_demo))) - return; - do_demo++; - return; - } - - csTicks elapsed_time, current_time; - elapsed_time = vc->GetElapsedTicks (); - current_time = vc->GetCurrentTicks (); - - // since no time has passed, the animated screen image stays the same. - // avoid drawing this, it will only fill up queues and cause jerky - // movement on some hardware/drivers. - if (elapsed_time == 0) return; - - // Now rotate the camera according to keyboard state - csReversibleTransform& camtrans = view->GetCamera ()->GetTransform (); - if (map_enabled < MAP_EDIT) - { - float speed = (elapsed_time / 1000.0f) * (0.03f * 20.0f); - if (kbd->GetKeyState (CSKEY_RIGHT)) - camtrans.RotateThis (CS_VEC_ROT_RIGHT, speed); - if (kbd->GetKeyState (CSKEY_LEFT)) - camtrans.RotateThis (CS_VEC_ROT_LEFT, speed); - if (kbd->GetKeyState (CSKEY_PGUP)) - camtrans.RotateThis (CS_VEC_TILT_UP, speed); - if (kbd->GetKeyState (CSKEY_PGDN)) - camtrans.RotateThis (CS_VEC_TILT_DOWN, speed); - if (kbd->GetKeyState (CSKEY_UP)) - view->GetCamera ()->Move (CS_VEC_FORWARD * 400.0f * speed); - if (kbd->GetKeyState (CSKEY_DOWN)) - view->GetCamera ()->Move (CS_VEC_BACKWARD * 400.0f * speed); - } - - if (map_enabled < MAP_EDIT_FORWARD) - seqmgr->ControlPaths (view->GetCamera (), elapsed_time); - else if (map_enabled == MAP_EDIT_FORWARD) - { - csTicks debug_time; - csTicks start, total; - csPath* np = seqmgr->GetSelectedPath (map_selpath, start, total); - if (np) + else if ((code == CSKEY_DOWN) || (code == 's')) { - float r = np->GetTime (map_selpoint); - np->CalculateAtTime (r); - debug_time = csTicks (start + total * r); + player->Step(-1); } - else - debug_time = 0; // Not possible! - seqmgr->DebugPositionObjects (view->GetCamera (), debug_time); - } - - if (map_enabled == MAP_EDIT_FORWARD) - { - csPath* np = seqmgr->GetSelectedPath (map_selpath); - if (np) + else if ((code == CSKEY_LEFT) || (code == 'a')) { - float r = np->GetTime (map_selpoint); - np->CalculateAtTime (r); - csVector3 pos, up, forward; - np->GetInterpolatedPosition (pos); - np->GetInterpolatedUp (up); - np->GetInterpolatedForward (forward); - view->GetCamera ()->GetTransform ().SetOrigin (pos); - view->GetCamera ()->GetTransform ().LookAt (forward.Unit (), up.Unit ()); + player->Strafe(-1); } - } - - // Tell 3D driver we're going to display 3D things. - if (!myG3D->BeginDraw (engine->GetBeginDrawFlags () | CSDRAW_3DGRAPHICS - | CSDRAW_CLEARZBUFFER)) - return; - - if (map_enabled != MAP_EDIT) - { - view->Draw (); - seqmgr->Draw3DEffects (myG3D); - if (map_enabled == MAP_EDIT_FORWARD) - csfxFadeToColor (myG3D, 0.3f, csColor (0.0f, 0.0f, 1.0f)); - } - - // Start drawing 2D graphics. - if (!myG3D->BeginDraw (CSDRAW_2DGRAPHICS)) return; - - if (map_enabled == MAP_EDIT) - myG2D->Clear (0); - else if (map_enabled < MAP_EDIT) - seqmgr->Draw2DEffects (myG2D); - if (map_enabled >= MAP_OVERLAY) - seqmgr->DebugDrawPaths (view->GetCamera (), map_selpath, - map_tl, map_br, map_selpoint); - if (map_enabled == MAP_EDIT) - DrawEditInfo (); - - int fw, fh; - font->GetMaxSize (fw, fh); - int tx = 10; - int ty = myG2D->GetHeight ()-fh-3; - char messageLine[100]; - messageLine[0] = 0; - switch (map_enabled) - { - case MAP_OFF: - if (seqmgr->IsSuspended ()) - GfxWrite (tx, ty, col_black, col_white, "[PAUSED]"); - break; - case MAP_OVERLAY: - GfxWrite (tx, ty, col_black, col_white, "%sOverlay (%s)", - seqmgr->IsSuspended () ? "[PAUSED] " : "", - map_selpath); - break; - case MAP_EDIT: - GfxWrite (tx, ty, col_black, col_white, "Edit (%s)", - map_selpath); - break; - case MAP_EDIT_FORWARD: - GfxWrite (tx, ty, col_black, col_white, "Forward/Up (%s)", - map_selpath); - break; - } - - if (!message.IsEmpty()) - { - GfxWrite (10, 10, col_black, message_error ? col_red : col_white, message); - if (current_time > message_timer) message.Empty(); - } -} - -void Demo::DrawEditInfo () -{ - int fw, fh; - font->GetMaxSize (fw, fh); - fh += 2; - int dim = myG2D->GetHeight ()-10; - myG2D->DrawBox (dim+5, 0, myG2D->GetWidth ()-dim-5, - myG2D->GetHeight (), col_white); - csTicks start, total; - csPath* np = seqmgr->GetSelectedPath (map_selpath, start, total); - if (np) - { - int ww = dim+10; - int hh = 10; - GfxWrite (ww, hh, col_black, col_white, "Point %d", map_selpoint); hh += fh; - csVector3 v, fwd, up; - np->GetPositionVector (map_selpoint, v); - np->GetForwardVector (map_selpoint, fwd); - np->GetUpVector (map_selpoint, up); - GfxWrite (ww, hh, col_black, col_white, "P(%g,%g,%g)", - v.x, v.y, v.z); hh += fh; - GfxWrite (ww, hh, col_black, col_white, "F(%.2g,%.2g,%.2g)", - fwd.x, fwd.y, fwd.z); hh += fh; - GfxWrite (ww, hh, col_black, col_white, "U(%.2g,%.2g,%.2g)", - up.x, up.y, up.z); hh += fh; - float t = np->GetTime (map_selpoint); - csTicks tms = csTicks (t*total); - GfxWrite (ww, hh, col_black, col_white, "tot time %d ms", total); hh += fh; - GfxWrite (ww, hh, col_black, col_white, "rel time %d ms", tms); hh += fh; - GfxWrite (ww, hh, col_black, col_white, "Left Path Info:"); hh += fh; - if (map_selpoint > 0) + else if ((code == CSKEY_RIGHT) || (code == 'd')) { - csVector3 v1; - np->GetPositionVector (map_selpoint-1, v1); - float d = csQsqrt (csSquaredDist::PointPoint (v, v1)); - float t1 = np->GetTime (map_selpoint-1); - float dr = t-t1; - float speed = (float) fabs (dr) / d; - csTicks tms1 = csTicks (t1*total); - GfxWrite (ww+20, hh, col_black, col_white, "len %g", d); hh += fh; - GfxWrite (ww+20, hh, col_black, col_white, "dr %g", dr); hh += fh; - GfxWrite (ww+20, hh, col_black, col_white, "speed %g", speed); hh += fh; - GfxWrite (ww+20, hh, col_black, col_white, "rel time %d ms", - tms-tms1); hh += fh; + player->Strafe(1); } - GfxWrite (ww, hh, col_black, col_white, "Right Path Info:"); hh += fh; - if (map_selpoint < np->Length ()-1) + else if (code == CSKEY_SPACE) { - csVector3 v1; - np->GetPositionVector (map_selpoint+1, v1); - float t1 = np->GetTime (map_selpoint+1); - float dr = t1-t; - float d = csQsqrt (csSquaredDist::PointPoint (v, v1)); - float speed = (float) fabs (dr) / d; - csTicks tms1 = csTicks (t1*total); - GfxWrite (ww+20, hh, col_black, col_white, "len %g", d); hh += fh; - GfxWrite (ww+20, hh, col_black, col_white, "dr %g", dr); hh += fh; - GfxWrite (ww+20, hh, col_black, col_white, "speed %g", speed); hh += fh; - GfxWrite (ww+20, hh, col_black, col_white, "rel time %d ms", - tms1-tms); hh += fh; + player->Jump(); } - } -} - -bool Demo::DemoHandleEvent (iEvent &Event) -{ - if (Event.Name == KeyboardDown) - { - csTicks elapsed_time, current_time; - elapsed_time = vc->GetElapsedTicks (); - current_time = vc->GetCurrentTicks (); - csKeyModifiers m; - csKeyEventHelper::GetModifiers (&Event, m); - bool shift = m.modifiers[csKeyModifierTypeShift] != 0; - bool alt = m.modifiers[csKeyModifierTypeAlt] != 0; - bool ctrl = m.modifiers[csKeyModifierTypeCtrl] != 0; - utf32_char keyCode = csKeyEventHelper::GetCookedCode (&Event); - -#if 0 - if (do_demo != 3) + else if (code == 'i') { - if (keyCode == CSKEY_ESC) + if (do_freelook) { - csRef<iEventQueue> q (csQueryRegistry<iEventQueue> (object_reg)); - if (q) - q->GetEventOutlet()->Broadcast (csevQuit (object_reg)); - return true; + cegui->EnableMouseCapture(); + //cegui->GetMouseCursorPtr()->show(); TODO: Why doesn't this work? + do_freelook = false; } - } - else -#endif - if (map_enabled == MAP_EDIT_FORWARD) - { - //============================== - // Handle keys in path_edit_forward mode. - //============================== - csPath* np = seqmgr->GetSelectedPath (map_selpath); - if (np) + else { - float dx = map_br.x - map_tl.x; - float speed; - if (shift) speed = dx / 20.0f; - else if (ctrl) speed = dx / 600.0f; - else speed = dx / 100.0f; - if (keyCode == CSKEY_UP) - { - csVector3 v; - np->GetPositionVector (map_selpoint, v); - v.y += speed; - np->SetPositionVector (map_selpoint, v); - ShowMessage ("Y location set at '%g'", v.y); - return true; - } - if (keyCode == CSKEY_DOWN) - { - csVector3 v; - np->GetPositionVector (map_selpoint, v); - v.y -= speed; - np->SetPositionVector (map_selpoint, v); - ShowMessage ("Y location set at '%g'", v.y); - return true; - } - if (keyCode == CSKEY_LEFT) - { - csVector3 up, forward; - np->GetUpVector (map_selpoint, up); - np->GetForwardVector (map_selpoint, forward); - csReversibleTransform trans = view->GetCamera ()->GetTransform (); - trans.LookAt (forward.Unit (), up.Unit ()); - trans.RotateThis (csVector3 (0.0f, 0.0f, 1.0f), -0.1f); - up = trans.This2Other (csVector3 (0.0f, 1.0f, 0.0f)) - trans.GetOrigin (); - np->SetUpVector (map_selpoint, up); - ShowMessage ("Up vector set at '%.3g,%.3g,%.3g'", up.x, up.y, up.z); - return true; - } - if (keyCode == CSKEY_RIGHT) - { - csVector3 up, forward; - np->GetUpVector (map_selpoint, up); - np->GetForwardVector (map_selpoint, forward); - csReversibleTransform trans = view->GetCamera ()->GetTransform (); - trans.LookAt (forward.Unit (), up.Unit ()); - trans.RotateThis (csVector3 (0.0f, 0.0f, 1.0f), 0.1f); - up = trans.This2Other (csVector3 (0.0f, 1.0f, 0.0f)) - trans.GetOrigin (); - np->SetUpVector (map_selpoint, up); - ShowMessage ("Up vector set at '%.3g,%.3g,%.3g'", up.x, up.y, up.z); - return true; - } + cegui->DisableMouseCapture(); + //cegui->GetMouseCursorPtr()->hide(); TODO: Why doesn't this work? + do_freelook = true; } - switch (keyCode) - { - case 'c': - map_enabled = MAP_EDIT; - return true; - case 'y': - // Average the 'y' of this point so that it is on a line - // with the previous and next point. - // Make the forward vector look along the path. i.e. let it look - // to an average direction as specified by next and previous point. - if (map_selpoint <= 0 || map_selpoint >= np->Length ()-1) - { - ShowMessage ("The 'y' operation can't work on this point!\n"); - } - else - { - csVector3 v1, v2, v3; - np->GetPositionVector (map_selpoint-1, v1); - np->GetPositionVector (map_selpoint, v2); - np->GetPositionVector (map_selpoint+1, v3); - if (ABS (v1.x-v3.x) > ABS (v1.z-v3.z)) - v2.y = v1.y + (v3.y-v1.y) * (v1.x-v2.x) / (v1.x-v3.x); - else - v2.y = v1.y + (v3.y-v1.y) * (v1.z-v2.z) / (v1.z-v3.z); - ShowMessage ("Y location set at '%g'", v2.y); - np->SetPositionVector (map_selpoint, v2); - } - break; - case '0': - // Let the up vector point really upwards. - { - csVector3 forward; - np->GetForwardVector (map_selpoint, forward); - csVector3 up; - up = csVector3 (0, 1, 0) % forward; - up = - (up % forward); - np->SetUpVector (map_selpoint, up); - } - break; - case CSKEY_BACKSPACE: - // Change direction of the forward vector. - { - csVector3 forward; - np->GetForwardVector (map_selpoint, forward); - np->SetForwardVector (map_selpoint, -forward); - } - break; - case '=': - // Make the forward vector look along the path. i.e. let it look - // to an average direction as specified by next and previous point. - if (map_selpoint <= 0 || map_selpoint >= np->Length ()-1) - { - ShowMessage ("The '=' operation can't work on this point!\n"); - } - else - { - csVector3 v1, v2; - np->GetPositionVector (map_selpoint-1, v1); - np->GetPositionVector (map_selpoint+1, v2); - csVector3 forward = (v2-v1).Unit (); - np->SetForwardVector (map_selpoint, forward); - csVector3 up; - np->GetUpVector (map_selpoint, up); - up = up % forward; - up = - (up % forward); - np->SetUpVector (map_selpoint, up); - } - break; - case '-': - // Make the forward vector look along the path. i.e. let it look - // backward to the previous point in the path if there is one. - if (map_selpoint <= 0) - { - csVector3 v1, v2; - np->GetPositionVector (map_selpoint+1, v1); - np->GetPositionVector (map_selpoint, v2); - csVector3 forward = (v2-v1).Unit (); - np->SetForwardVector (map_selpoint, forward); - csVector3 up; - np->GetUpVector (map_selpoint, up); - up = up % forward; - up = - (up % forward); - np->SetUpVector (map_selpoint, up); - } - else - { - csVector3 v1, v2; - np->GetPositionVector (map_selpoint, v1); - np->GetPositionVector (map_selpoint-1, v2); - csVector3 forward = (v2-v1).Unit (); - np->SetForwardVector (map_selpoint, forward); - csVector3 up; - np->GetUpVector... [truncated message content] |