You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(38) |
Jun
(25) |
Jul
(16) |
Aug
(52) |
Sep
(1) |
Oct
(3) |
Nov
(18) |
Dec
(7) |
---|
From: <zcc...@us...> - 2009-06-17 17:31:45
|
Revision: 69 http://sirrf.svn.sourceforge.net/sirrf/?rev=69&view=rev Author: zccdark203 Date: 2009-06-17 17:31:40 +0000 (Wed, 17 Jun 2009) Log Message: ----------- Added the __COMPILE_WITH_SFML_AUDIO__ and __COMPILE_WITH_ANGELSCRIPT__ compilation flags. With these flags the user can exclude certain features from compilation without having to remove them completely. Please note that functions such as refFactory, refAdd and refRemove are not affected by __COMPILE_WITH_ANGELSCRIPT__ flag as these functions can be also useful for other uses. Modified Paths: -------------- trunk/CHANGES trunk/build/CodeBlocks/sirrf.cbp trunk/src/components/scene/BillboardComponent.cpp trunk/src/components/scene/SceneComponent.cpp trunk/src/components/sound/SoundListenerComponent.cpp trunk/src/components/sound/SoundListenerComponent.h trunk/src/components/sound/SoundSourceComponent.cpp trunk/src/components/sound/SoundSourceComponent.h trunk/src/core/DataStack.cpp trunk/src/core/DataStack.h trunk/src/core/DataStore.cpp trunk/src/core/Entity.cpp trunk/src/core/EntityManager.cpp trunk/src/core/GameManager.cpp trunk/src/core/GameManager.h trunk/src/dependencies.h trunk/src/scripting/Script.cpp trunk/src/scripting/Script.h trunk/src/scripting/ScriptHelper.h trunk/src/scripting/ScriptManager.cpp trunk/src/scripting/ScriptManager.h trunk/src/scripting/components/asComponents.cpp trunk/src/scripting/components/asComponents.h trunk/src/scripting/components/scene/asAnimatedMeshComponent.cpp trunk/src/scripting/components/scene/asAnimatedMeshComponent.h trunk/src/scripting/components/scene/asBillboardComponent.cpp trunk/src/scripting/components/scene/asBillboardComponent.h trunk/src/scripting/components/scene/asCameraComponent.cpp trunk/src/scripting/components/scene/asCameraComponent.h trunk/src/scripting/components/scene/asImageComponent.cpp trunk/src/scripting/components/scene/asImageComponent.h trunk/src/scripting/components/scene/asLightComponent.cpp trunk/src/scripting/components/scene/asLightComponent.h trunk/src/scripting/components/scene/asMeshComponent.cpp trunk/src/scripting/components/scene/asMeshComponent.h trunk/src/scripting/components/scene/asOctTreeComponent.cpp trunk/src/scripting/components/scene/asOctTreeComponent.h trunk/src/scripting/components/scene/asParticleSysComponent.cpp trunk/src/scripting/components/scene/asParticleSysComponent.h trunk/src/scripting/components/scene/asSceneComponent.cpp trunk/src/scripting/components/scene/asSceneComponent.h trunk/src/scripting/components/scene/asSkyBoxComponent.cpp trunk/src/scripting/components/scene/asSkyBoxComponent.h trunk/src/scripting/components/scene/asSkyDome.cpp trunk/src/scripting/components/scene/asSkyDomeComponent.h trunk/src/scripting/components/scene/asTerrainComponent.cpp trunk/src/scripting/components/scene/asTerrainComponent.h trunk/src/scripting/components/scene/asTextBillboardComponent.cpp trunk/src/scripting/components/scene/asTextBillboardComponent.h trunk/src/scripting/components/sound/asSoundListenerComponent.cpp trunk/src/scripting/components/sound/asSoundListenerComponent.h trunk/src/scripting/components/sound/asSoundSourceComponent.cpp trunk/src/scripting/components/sound/asSoundSourceComponent.h trunk/src/scripting/core/asDataStack.cpp trunk/src/scripting/core/asDataStack.h trunk/src/scripting/core/asDataStore.cpp trunk/src/scripting/core/asDataStore.h trunk/src/scripting/core/asEntity.cpp trunk/src/scripting/core/asEntity.h trunk/src/scripting/core/asEntityComponent.cpp trunk/src/scripting/core/asEntityComponent.h trunk/src/scripting/core/asEntityManager.cpp trunk/src/scripting/core/asEntityManager.h trunk/src/scripting/core/asEventManager.cpp trunk/src/scripting/core/asEventManager.h trunk/src/scripting/core/asGameManager.cpp trunk/src/scripting/core/asGameManager.h trunk/src/scripting/core/asGameState.cpp trunk/src/scripting/core/asGameState.h trunk/src/scripting/scripting/asScript.cpp trunk/src/scripting/scripting/asScript.h trunk/src/scripting/scripting/asScriptManager.cpp trunk/src/scripting/scripting/asScriptManager.h trunk/src/scripting/sound/asSoundManager.cpp trunk/src/scripting/sound/asSoundManager.h trunk/src/scripting/vendor/angelscript/scriptstdstring.cpp trunk/src/scripting/vendor/angelscript/scriptstdstring.h trunk/src/scripting/vendor/irrlicht/asAabbox3d.cpp trunk/src/scripting/vendor/irrlicht/asAabbox3d.h trunk/src/scripting/vendor/irrlicht/asDimension2d.cpp trunk/src/scripting/vendor/irrlicht/asDimension2d.h trunk/src/scripting/vendor/irrlicht/asIrrHelper.h trunk/src/scripting/vendor/irrlicht/asIrrlicht.cpp trunk/src/scripting/vendor/irrlicht/asIrrlicht.h trunk/src/scripting/vendor/irrlicht/asLine2d.cpp trunk/src/scripting/vendor/irrlicht/asLine2d.h trunk/src/scripting/vendor/irrlicht/asLine3d.cpp trunk/src/scripting/vendor/irrlicht/asLine3d.h trunk/src/scripting/vendor/irrlicht/asMatrix4.cpp trunk/src/scripting/vendor/irrlicht/asMatrix4.h trunk/src/scripting/vendor/irrlicht/asRect.cpp trunk/src/scripting/vendor/irrlicht/asRect.h trunk/src/scripting/vendor/irrlicht/asSColor.cpp trunk/src/scripting/vendor/irrlicht/asSColor.h trunk/src/scripting/vendor/irrlicht/asVector2d.cpp trunk/src/scripting/vendor/irrlicht/asVector2d.h trunk/src/scripting/vendor/irrlicht/asVector3d.cpp trunk/src/scripting/vendor/irrlicht/asVector3d.h trunk/src/sound/SoundManager.cpp trunk/src/sound/SoundManager.h Added Paths: ----------- trunk/src/config.h Modified: trunk/CHANGES =================================================================== --- trunk/CHANGES 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/CHANGES 2009-06-17 17:31:40 UTC (rev 69) @@ -2,6 +2,12 @@ Sirrf version 0.1.1 (SVN) - Changes ========================================================================== + * Implemented the __COMPILE_WITH_SFML_AUDIO__ and + __COMPILE_WITH_ANGELSCRIPT__ compilation flags. With these flags it's + possible to enable/disable features of Sirrf without having to remove + them completely. These flags should also give an idea what should be + removed when a feature has to be removed completely. + * Separated the AngelScript binding functions from the source and header files where Sirrf classes are declared and implemented. Modified: trunk/build/CodeBlocks/sirrf.cbp =================================================================== --- trunk/build/CodeBlocks/sirrf.cbp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/build/CodeBlocks/sirrf.cbp 2009-06-17 17:31:40 UTC (rev 69) @@ -89,6 +89,7 @@ <Unit filename="../../src/components/sound/SoundListenerComponent.h" /> <Unit filename="../../src/components/sound/SoundSourceComponent.cpp" /> <Unit filename="../../src/components/sound/SoundSourceComponent.h" /> + <Unit filename="../../src/config.h" /> <Unit filename="../../src/core/DataStack.cpp" /> <Unit filename="../../src/core/DataStack.h" /> <Unit filename="../../src/core/DataStore.cpp" /> Modified: trunk/src/components/scene/BillboardComponent.cpp =================================================================== --- trunk/src/components/scene/BillboardComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/components/scene/BillboardComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -43,6 +43,16 @@ { } +// BillboardComponent deconstructor. +BillboardComponent::~BillboardComponent() +{ + if(mBillboardSN != NULL) + { + mBillboardSN->remove(); + mSceneNode = NULL; + } +} + // AngelScript: Will be used to instanciate objects of this class. BillboardComponent* BillboardComponent::refFactory(Entity *parent) { @@ -56,16 +66,6 @@ return new BillboardComponent(parent, size, colorTop, colorBottom); } -// BillboardComponent deconstructor. -BillboardComponent::~BillboardComponent() -{ - if(mBillboardSN != NULL) - { - mBillboardSN->remove(); - mSceneNode = NULL; - } -} - // Returns a direct pointer to the IBillboardSceneNode. IBillboardSceneNode* BillboardComponent::getBillboardSceneNode() { Modified: trunk/src/components/scene/SceneComponent.cpp =================================================================== --- trunk/src/components/scene/SceneComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/components/scene/SceneComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -80,7 +80,6 @@ return new SceneComponent(parent); } - // Returns a direct pointer to the ISceneNode. ISceneNode* SceneComponent::getSceneNode() { Modified: trunk/src/components/sound/SoundListenerComponent.cpp =================================================================== --- trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -15,9 +15,9 @@ // Include files #include "SoundListenerComponent.h" +#ifdef __COMPILE_WITH_SFML_AUDIO__ #include "../../core/GameManager.h" -#include "../../scripting/core/asEntityComponent.h" // SoundListenerComponent class // Static variables. @@ -127,4 +127,6 @@ setIsMainListener(true); } +#endif // __COMPILE_WITH_SFML_AUDIO__ + // End of File Modified: trunk/src/components/sound/SoundListenerComponent.h =================================================================== --- trunk/src/components/sound/SoundListenerComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/components/sound/SoundListenerComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -18,6 +18,7 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_SFML_AUDIO__ #include "../../core/EntityComponent.h" @@ -77,4 +78,6 @@ bool mWasMainListener; // For event handeling }; +#endif // __COMPILE_WITH_SFML_AUDIO__ + #endif Modified: trunk/src/components/sound/SoundSourceComponent.cpp =================================================================== --- trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -15,9 +15,9 @@ // Include files #include "SoundSourceComponent.h" +#ifdef __COMPILE_WITH_SFML_AUDIO__ #include "../../core/GameManager.h" -#include "../../scripting/core/asEntityComponent.h" // SoundSourceComponent class // SoundSource constructor. @@ -381,4 +381,6 @@ play(); } +#endif // __COMPILE_WITH_SFML_AUDIO__ + // End of File Modified: trunk/src/components/sound/SoundSourceComponent.h =================================================================== --- trunk/src/components/sound/SoundSourceComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/components/sound/SoundSourceComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -18,6 +18,7 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_SFML_AUDIO__ #include "../../core/EntityComponent.h" @@ -135,5 +136,6 @@ }; +#endif // __COMPILE_WITH_SFML_AUDIO__ + #endif - Added: trunk/src/config.h =================================================================== --- trunk/src/config.h (rev 0) +++ trunk/src/config.h 2009-06-17 17:31:40 UTC (rev 69) @@ -0,0 +1,25 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: config.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Header file with compile configuration. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +//! Define __COMPILE_WITH_SFML_AUDIO__ to compile with SFML-Audio. +#define __COMPILE_WITH_SFML_AUDIO__ + +//! Define __COMPILE_WITH_ANGELSCRIPT__ to compile with AngelScript. +#define __COMPILE_WITH_ANGELSCRIPT__ + +#endif Modified: trunk/src/core/DataStack.cpp =================================================================== --- trunk/src/core/DataStack.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/core/DataStack.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -27,7 +27,7 @@ // DataStack constructor. DataStack::DataStack(const std::string &name) -: mRefCount(1), mName(name) +: mRefCount(1), mName(name) { mID = mIDCount++; } Modified: trunk/src/core/DataStack.h =================================================================== --- trunk/src/core/DataStack.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/core/DataStack.h 2009-06-17 17:31:40 UTC (rev 69) @@ -56,6 +56,7 @@ //! @note For internal use only! void refRelease(); + // Methods //! Gets the ID of the DataStack. u32 getID() const; Modified: trunk/src/core/DataStore.cpp =================================================================== --- trunk/src/core/DataStore.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/core/DataStore.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -67,6 +67,7 @@ // Add the DataStack to the vector. mStacks.push_back(stack); + stack->refAdd(); return true; } Modified: trunk/src/core/Entity.cpp =================================================================== --- trunk/src/core/Entity.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/core/Entity.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -130,6 +130,7 @@ // Add new component. mChildren.push_back(entity); + entity->refAdd(); return true; } @@ -147,6 +148,7 @@ // Add new component. mComponents.push_back(component); + component->refAdd(); return true; } Modified: trunk/src/core/EntityManager.cpp =================================================================== --- trunk/src/core/EntityManager.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/core/EntityManager.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -69,6 +69,7 @@ // Add the entity. mEntities.push_back(entity); + entity->refAdd(); return true; } Modified: trunk/src/core/GameManager.cpp =================================================================== --- trunk/src/core/GameManager.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/core/GameManager.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -18,7 +18,10 @@ // Include files #include "GameManager.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ #include "../scripting/core/asGameState.h" // We need the ScriptedGameState class. +#endif // __COMPILE_WITH_ANGELSCRIPT__ // GameManager class @@ -70,10 +73,15 @@ // Initialise subsystems of the framework (stage 2); pEntityManager = new EntityManager(); + +#ifdef __COMPILE_WITH_SFML_AUDIO__ pSoundManager = new SoundManager(); +#endif // __COMPILE_WITH_SFML_AUDIO__ +#ifdef __COMPILE_WITH_ANGELSCRIPT__ pScriptManager = new ScriptManager(); pScriptManager->init(); +#endif // __COMPILE_WITH_ANGELSCRIPT__ } // Updates the GameManager. @@ -119,10 +127,15 @@ } // Clean up subsystems of the framework. +#ifdef ____COMPILE_WITH_ANGELSCRIPT__ pScriptManager->clear(); delete pScriptManager; +#endif // __COMPILE_WITH_ANGELSCRIPT__ +#ifdef __COMPILE_WITH_SFML_AUDIO__ delete pSoundManager; +#endif // __COMPILE_WITH_SFML_AUDIO__ + delete pEventManager; delete pEntityManager; delete pDataStore; @@ -159,10 +172,13 @@ if(state != NULL) { mGameStates.push_back(state); + state->refAdd(); state->init(); } } +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + // Close the current state and change to the given state. void GameManager::changeState(asIScriptObject *object) { @@ -178,6 +194,8 @@ } } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // Pause the current state and change to the given state. void GameManager::pushState(GameState *state) { @@ -189,10 +207,13 @@ if(state != NULL) { mGameStates.push_back(state); + state->refAdd(); state->init(); } } +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + // Pause the current state and change to the given state. void GameManager::pushState(asIScriptObject *object) { @@ -209,6 +230,8 @@ } } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // Close the current state and resume the previous state. void GameManager::popState() { @@ -267,18 +290,26 @@ return pEventManager; } +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + // Returns a pointer to the ScriptManager. ScriptManager* GameManager::getScriptManager() { return pScriptManager; } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + +#ifdef __COMPILE_WITH_SFML_AUDIO__ + // Returns a pointer to the Sound Manager. SoundManager* GameManager::getSoundManager() { return pSoundManager; } +#endif // __COMPILE_WITH_SFML_AUDIO__ + // Returns whether the Irrlicht device is running. bool GameManager::getIsRunning() const { Modified: trunk/src/core/GameManager.h =================================================================== --- trunk/src/core/GameManager.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/core/GameManager.h 2009-06-17 17:31:40 UTC (rev 69) @@ -22,8 +22,16 @@ #include "DataStore.h" #include "EntityManager.h" #include "EventManager.h" + +#ifdef __COMPILE_WITH_SFML_AUDIO__ #include "../sound/SoundManager.h" +#endif // __COMPILE_WITH_SFML_AUDIO__ + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ #include "../scripting/ScriptManager.h" +#endif // __COMPILE_WITH_ANGELSCRIPT__ + + #include "../components/components.h" #include "GameState.h" @@ -74,15 +82,19 @@ //! Close the current state and change to the given state. //! @param state Pointer to the new state. void changeState(GameState *state); +#ifdef __COMPILE_WITH_ANGELSCRIPT__ //! Close the current state and change to the given state. //! @note For internal use only! void changeState(asIScriptObject *object); +#endif // __COMPILE_WITH_ANGELSCRIPT__ //! Pause the current state and change to the given state. //! @param state Pointer to the new state. void pushState(GameState *state); +#ifdef __COMPILE_WITH_ANGELSCRIPT__ //! Pause the current state and change to the given state. //! @note For internal use only! void pushState(asIScriptObject *object); +#endif // __COMPILE_WITH_ANGELSCRIPT__ //! Close the current state and resume the previous state. void popState(); @@ -105,10 +117,16 @@ EntityManager* getEntityManager(); //! Returns a pointer to the EventManager. EventManager* getEventManager(); + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ //! Returns a pointer to the ScriptManager. ScriptManager* getScriptManager(); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + +#ifdef __COMPILE_WITH_SFML_AUDIO__ //! Returns a pointer to the Sound Manager. SoundManager* getSoundManager(); +#endif // __COMPILE_WITH_SFML_AUDIO__ //! Returns whether the Irrlicht device is running. bool getIsRunning() const; @@ -133,8 +151,14 @@ DataStore *pDataStore; EntityManager *pEntityManager; EventManager *pEventManager; + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ ScriptManager *pScriptManager; +#endif // __COMPILE_WITH_ANGELSCRIPT__ + +#ifdef __COMPILE_WITH_SFML_AUDIO__ SoundManager *pSoundManager; +#endif // __COMPILE_WITH_SFML_AUDIO__ u32 mLastTime; }; Modified: trunk/src/dependencies.h =================================================================== --- trunk/src/dependencies.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/dependencies.h 2009-06-17 17:31:40 UTC (rev 69) @@ -17,6 +17,9 @@ #define __DEPENDENCIES_H__ // Include files. +// Config +#include "config.h" + // C Library #include <assert.h> #include <stddef.h> @@ -34,14 +37,18 @@ #include <irrlicht.h> // Angelscript +#ifdef __COMPILE_WITH_ANGELSCRIPT__ #include <angelscript.h> +#endif // Sigslot #include <sigslot/sigslot.h> // SFML +#ifdef __COMPILE_WITH_SFML_AUDIO__ #include <SFML/System.hpp> #include <SFML/Audio.hpp> +#endif // Namespaces Modified: trunk/src/scripting/Script.cpp =================================================================== --- trunk/src/scripting/Script.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/Script.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -16,6 +16,9 @@ // Include files #include "Script.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../core/GameManager.h" @@ -187,4 +190,6 @@ else return false; } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/Script.h =================================================================== --- trunk/src/scripting/Script.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/Script.h 2009-06-17 17:31:40 UTC (rev 69) @@ -18,6 +18,9 @@ // Include files #include "../dependencies.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "ScriptManager.h" // Forward declarations. @@ -89,4 +92,6 @@ }; +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/ScriptHelper.h =================================================================== --- trunk/src/scripting/ScriptHelper.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/ScriptHelper.h 2009-06-17 17:31:40 UTC (rev 69) @@ -17,6 +17,8 @@ #ifndef __SCRIPTHELPER_H__ #define __SCRIPTHELPER_H__ +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Global function for assigning objects. template<typename T> T& assignT(const T ©) @@ -43,4 +45,6 @@ return b; } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/ScriptManager.cpp =================================================================== --- trunk/src/scripting/ScriptManager.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/ScriptManager.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -17,6 +17,9 @@ // Include files // Framework files #include "ScriptManager.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../core/GameManager.h" // AngelScript @@ -81,7 +84,9 @@ bindEventManager(pEngine); bindDataStack(pEngine); bindDataStore(pEngine); +#ifdef __COMPILE_WITH_SFML_AUDIO__ bindSoundManager(pEngine); +#endif // __COMPILE_WITH_SFML_AUDIO__ bindScript(pEngine); bindScriptManager(pEngine); bindGameState(pEngine); @@ -337,4 +342,6 @@ printf("%s (%d, %d) : %s : %s\n", msg->section, msg->row, msg->col, type, msg->message); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/ScriptManager.h =================================================================== --- trunk/src/scripting/ScriptManager.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/ScriptManager.h 2009-06-17 17:31:40 UTC (rev 69) @@ -18,6 +18,9 @@ // Include files #include "../dependencies.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "Script.h" // Forward declarations. @@ -121,4 +124,6 @@ //! Implements a message callback function for AngelScript. extern void MessageCallback(const asSMessageInfo *msg, void *param); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/asComponents.cpp =================================================================== --- trunk/src/scripting/components/asComponents.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/asComponents.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -16,6 +16,8 @@ // Include files #include "asComponents.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + // Scene #include "scene/asSceneComponent.h" #include "scene/asAnimatedMeshComponent.h" @@ -56,8 +58,12 @@ bindTextBillboardComponent(engine); // Sound +#ifdef __COMPILE_WITH_SFML_AUDIO__ bindSoundListenerComponent(engine); bindSoundSourceComponent(engine); +#endif // __COMPILE_WITH_SFML_AUDIO__ } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/asComponents.h =================================================================== --- trunk/src/scripting/components/asComponents.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/asComponents.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Bind all components so that they can be used within scripts. extern void bindComponents(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asAnimatedMeshComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asAnimatedMeshComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asAnimatedMeshComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asAnimatedMeshComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asSceneComponent.h" -#include "asAnimatedMeshComponent.h" #include "../../../components/scene/AnimatedMeshComponent.h" @@ -79,4 +82,6 @@ asMETHOD(AnimatedMeshComponent, setTransitionTime), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asAnimatedMeshComponent.h =================================================================== --- trunk/src/scripting/components/scene/asAnimatedMeshComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asAnimatedMeshComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,9 +19,12 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the AnimatedMeshComponent class to AngelScript. extern void bindAnimatedMeshComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif - Modified: trunk/src/scripting/components/scene/asBillboardComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asBillboardComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asBillboardComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files -#include "../../ScriptHelper.h" #include "asBillboardComponent.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ +#include "../../ScriptHelper.h" + + //! Binds the BillboardComponent class to AngelScript. void bindBillboardComponent(asIScriptEngine *engine) { @@ -45,4 +48,6 @@ asFUNCTION(assignT<BillboardComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asBillboardComponent.h =================================================================== --- trunk/src/scripting/components/scene/asBillboardComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asBillboardComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -18,8 +18,10 @@ // Include files #include "../../../dependencies.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "asSceneComponent.h" - #include "../../../components/scene/BillboardComponent.h" @@ -58,4 +60,6 @@ asMETHOD(T, setSize), asCALL_THISCALL); assert(r >= 0); } +#endif //__COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asCameraComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asCameraComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asCameraComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asCameraComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asSceneComponent.h" -#include "asCameraComponent.h" #include "../../../components/scene/CameraComponent.h" @@ -97,4 +100,6 @@ asMETHOD(CameraComponent, setMayaMode), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asCameraComponent.h =================================================================== --- trunk/src/scripting/components/scene/asCameraComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asCameraComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,10 +19,12 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the CameraComponent class to AngelScript. extern void bindCameraComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif - - Modified: trunk/src/scripting/components/scene/asImageComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asImageComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asImageComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asImageComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "../../core/asEntityComponent.h" -#include "asImageComponent.h" #include "../../../components/scene/ImageComponent.h" @@ -76,4 +79,6 @@ asMETHOD(ImageComponent, getUseAlphaColor), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asImageComponent.h =================================================================== --- trunk/src/scripting/components/scene/asImageComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asImageComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the ImageComponent class to AngelScript. extern void bindImageComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asLightComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asLightComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asLightComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asLightComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asSceneComponent.h" -#include "asLightComponent.h" #include "../../../components/scene/LightComponent.h" @@ -61,4 +64,6 @@ asMETHOD(LightComponent, setRadius), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asLightComponent.h =================================================================== --- trunk/src/scripting/components/scene/asLightComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asLightComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the LightComponent class to AngelScript. extern void bindLightComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asMeshComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asMeshComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asMeshComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asMeshComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asSceneComponent.h" -#include "asMeshComponent.h" #include "../../../components/scene/MeshComponent.h" @@ -49,4 +52,6 @@ asMETHODPR(MeshComponent, setMesh, (const std::string&), void), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asMeshComponent.h =================================================================== --- trunk/src/scripting/components/scene/asMeshComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asMeshComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the MeshComponent class to AngelScript. extern void bindMeshComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asOctTreeComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asOctTreeComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asOctTreeComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,14 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asOctTreeComponent.h" + + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asSceneComponent.h" -#include "asOctTreeComponent.h" #include "../../../components/scene/OctTreeComponent.h" @@ -44,4 +48,6 @@ asFUNCTION(assignT<OctTreeComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asOctTreeComponent.h =================================================================== --- trunk/src/scripting/components/scene/asOctTreeComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asOctTreeComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the OctTreeComponent class to AngelScript. extern void bindOctTreeComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asParticleSysComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asParticleSysComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asParticleSysComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asParticleSysComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asSceneComponent.h" -#include "asParticleSysComponent.h" #include "../../../components/scene/ParticleSysComponent.h" @@ -101,4 +104,6 @@ asMETHOD(ParticleSysComponent, setParticleSize), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asParticleSysComponent.h =================================================================== --- trunk/src/scripting/components/scene/asParticleSysComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asParticleSysComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,10 +19,14 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the ParticleSysComponent class to AngelScript. extern void bindParticleSysComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asSceneComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asSceneComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asSceneComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files -#include "../../ScriptHelper.h" #include "asSceneComponent.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ +#include "../../ScriptHelper.h" + + //! Binds the SceneComponent class to AngelScript. void bindSceneComponent(asIScriptEngine *engine) { @@ -39,4 +42,6 @@ asFUNCTION(assignT<SceneComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asSceneComponent.h =================================================================== --- trunk/src/scripting/components/scene/asSceneComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asSceneComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,6 +19,8 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "../../core/asEntityComponent.h" @@ -107,4 +109,6 @@ asMETHOD(T, setVisible), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asSkyBoxComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asSkyBoxComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asSkyBoxComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asSkyBoxComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asSceneComponent.h" -#include "asSkyBoxComponent.h" #include "../../../components/scene/SkyBoxComponent.h" @@ -46,4 +49,6 @@ asFUNCTION(assignT<SkyBoxComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asSkyBoxComponent.h =================================================================== --- trunk/src/scripting/components/scene/asSkyBoxComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asSkyBoxComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the SkyBoxComponent class to AngelScript. extern void bindSkyBoxComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asSkyDome.cpp =================================================================== --- trunk/src/scripting/components/scene/asSkyDome.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asSkyDome.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,14 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asSkyDomeComponent.h" + + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asSceneComponent.h" -#include "asSkyDomeComponent.h" #include "../../../components/scene/SkyDomeComponent.h" @@ -44,4 +48,6 @@ asFUNCTION(assignT<SkyDomeComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asSkyDomeComponent.h =================================================================== --- trunk/src/scripting/components/scene/asSkyDomeComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asSkyDomeComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the SkyDomeComponent class to AngelScript. extern void bindSkyDomeComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asTerrainComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asTerrainComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asTerrainComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asTerrainComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asSceneComponent.h" -#include "asTerrainComponent.h" #include "../../../components/scene/TerrainComponent.h" @@ -61,4 +64,6 @@ asMETHOD(TerrainComponent, scaleTexture), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asTerrainComponent.h =================================================================== --- trunk/src/scripting/components/scene/asTerrainComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asTerrainComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the TerrainComponent class to AngelScript. extern void bindTerrainComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/scene/asTextBillboardComponent.cpp =================================================================== --- trunk/src/scripting/components/scene/asTextBillboardComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asTextBillboardComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asTextBillboardComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../ScriptHelper.h" #include "asBillboardComponent.h" -#include "asTextBillboardComponent.h" #include "../../../components/scene/TextBillboardComponent.h" @@ -56,4 +59,6 @@ asMETHOD(TextBillboardComponent, setTextColor), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/scene/asTextBillboardComponent.h =================================================================== --- trunk/src/scripting/components/scene/asTextBillboardComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/scene/asTextBillboardComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,10 +19,14 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the TextBillboardComponent class to AngelScript. extern void bindTextBillboardComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/sound/asSoundListenerComponent.cpp =================================================================== --- trunk/src/scripting/components/sound/asSoundListenerComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/sound/asSoundListenerComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,14 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asSoundListenerComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ +#ifdef __COMPILE_WITH_SFML_AUDIO__ + #include "../../ScriptHelper.h" #include "../../core/asEntityComponent.h" -#include "asSoundListenerComponent.h" #include "../../../components/sound/SoundListenerComponent.h" @@ -62,4 +66,7 @@ asMETHOD(SoundListenerComponent, setTarget), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_SFML_AUDIO__ +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/sound/asSoundListenerComponent.h =================================================================== --- trunk/src/scripting/components/sound/asSoundListenerComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/sound/asSoundListenerComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,9 +19,15 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ +#ifdef __COMPILE_WITH_SFML_AUDIO__ + //! Binds the SoundListenerComponent class to AngelScript. extern void bindSoundListenerComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_SFML_AUDIO__ +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/components/sound/asSoundSourceComponent.cpp =================================================================== --- trunk/src/scripting/components/sound/asSoundSourceComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/sound/asSoundSourceComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,10 +14,14 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asSoundSourceComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ +#ifdef __COMPILE_WITH_SFML_AUDIO__ + #include "../../ScriptHelper.h" #include "../../core/asEntityComponent.h" -#include "asSoundSourceComponent.h" #include "../../../components/sound/SoundSourceComponent.h" @@ -90,4 +94,7 @@ asMETHOD(SoundSourceComponent, setVolume), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_SFML_AUDIO__ +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/components/sound/asSoundSourceComponent.h =================================================================== --- trunk/src/scripting/components/sound/asSoundSourceComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/components/sound/asSoundSourceComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,10 +19,14 @@ // Include files #include "../../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ +#ifdef __COMPILE_WITH_SFML_AUDIO__ + //! Binds the SoundSourceComponent class to AngelScript. extern void bindSoundSourceComponent(asIScriptEngine *engine); +#endif // __COMPILE_WITH_SFML_AUDIO__ +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif - - Modified: trunk/src/scripting/core/asDataStack.cpp =================================================================== --- trunk/src/scripting/core/asDataStack.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asDataStack.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,9 +14,12 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asDataStack.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../ScriptHelper.h" -#include "asDataStack.h" #include "../../core/DataStack.h" @@ -101,4 +104,6 @@ asMETHOD(DataStack, loadXML), asCALL_THISCALL);assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/core/asDataStack.h =================================================================== --- trunk/src/scripting/core/asDataStack.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asDataStack.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the DataStack class to AngelScript. extern void bindDataStack(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/core/asDataStore.cpp =================================================================== --- trunk/src/scripting/core/asDataStore.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asDataStore.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,9 +14,12 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asDataStore.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../ScriptHelper.h" -#include "asDataStore.h" #include "../../core/DataStore.h" @@ -66,4 +69,6 @@ asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/core/asDataStore.h =================================================================== --- trunk/src/scripting/core/asDataStore.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asDataStore.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the DataStore class to AngelScript. extern void bindDataStore(asIScriptEngine *engine); +#endif //__COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/core/asEntity.cpp =================================================================== --- trunk/src/scripting/core/asEntity.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asEntity.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,9 +14,12 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asEntity.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../ScriptHelper.h" -#include "asEntity.h" #include "../../core/Entity.h" @@ -90,4 +93,6 @@ asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/core/asEntity.h =================================================================== --- trunk/src/scripting/core/asEntity.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asEntity.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,9 +19,13 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the Entity class to AngelScript. extern void bindEntity(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/core/asEntityComponent.cpp =================================================================== --- trunk/src/scripting/core/asEntityComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asEntityComponent.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,9 +14,12 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asEntityComponent.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../ScriptHelper.h" -#include "asEntityComponent.h" #include "../../core/EntityComponent.h" @@ -41,4 +44,6 @@ asFUNCTION(assignT<EntityComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/core/asEntityComponent.h =================================================================== --- trunk/src/scripting/core/asEntityComponent.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asEntityComponent.h 2009-06-17 17:31:40 UTC (rev 69) @@ -18,6 +18,9 @@ // Include files #include "../../dependencies.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../core/EntityComponent.h" #include "../ScriptHelper.h" @@ -58,5 +61,7 @@ asMETHOD(T, getParent), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/core/asEntityManager.cpp =================================================================== --- trunk/src/scripting/core/asEntityManager.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asEntityManager.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -15,6 +15,9 @@ // Include files #include "asEntityManager.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../core/EntityManager.h" @@ -66,4 +69,6 @@ asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/core/asEntityManager.h =================================================================== --- trunk/src/scripting/core/asEntityManager.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asEntityManager.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the EntityManager class to AngelScript. extern void bindEntityManager(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/core/asEventManager.cpp =================================================================== --- trunk/src/scripting/core/asEventManager.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asEventManager.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -15,6 +15,9 @@ // Include files #include "asEventManager.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../core/EventManager.h" @@ -68,4 +71,6 @@ asMETHOD(EventManager, removeEventSlot), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/core/asEventManager.h =================================================================== --- trunk/src/scripting/core/asEventManager.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asEventManager.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,9 +19,13 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the EventManager class to AngelScript. extern void bindEventManager(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/core/asGameManager.cpp =================================================================== --- trunk/src/scripting/core/asGameManager.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asGameManager.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -15,6 +15,9 @@ // Include files #include "asGameManager.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../core/GameManager.h" @@ -62,8 +65,10 @@ asMETHOD(GameManager, getEventManager), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("GameManager", "ScriptManager@ getScriptManager()", asMETHOD(GameManager, getScriptManager), asCALL_THISCALL); assert(r >= 0); +#ifdef __COMPILE_WITH_SFML_AUDIO__ r = engine->RegisterObjectMethod("GameManager", "SoundManager@ getSoundManager()", asMETHOD(GameManager, getSoundManager), asCALL_THISCALL); assert(r >= 0); +#endif // __COMPILE_WITH_SFML_AUDIO__ r = engine->RegisterObjectMethod("GameManager", "bool getIsRunning()", asMETHOD(GameManager, getIsRunning), asCALL_THISCALL); assert(r >= 0); @@ -72,4 +77,6 @@ asMETHOD(GameManager, setIsRunning), asCALL_THISCALL); assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/core/asGameManager.h =================================================================== --- trunk/src/scripting/core/asGameManager.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asGameManager.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,10 +19,14 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the GameManager class to AngelScript. extern void bindGameManager(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/core/asGameState.cpp =================================================================== --- trunk/src/scripting/core/asGameState.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asGameState.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,9 +14,12 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asGameState.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../ScriptHelper.h" -#include "asGameState.h" #include "../../core/GameState.h" @@ -155,3 +158,7 @@ GameManager::Instance()->getScriptManager()->addScriptSection("CGameState", decl); } + +#endif // __COMPILE_WITH_ANGELSCRIPT__ + +// End of File Modified: trunk/src/scripting/core/asGameState.h =================================================================== --- trunk/src/scripting/core/asGameState.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/core/asGameState.h 2009-06-17 17:31:40 UTC (rev 69) @@ -18,6 +18,9 @@ // Include files #include "../../dependencies.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../../core/GameState.h" @@ -50,5 +53,7 @@ //! Binds the GameState class to AngelScript. extern void bindGameState(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/scripting/asScript.cpp =================================================================== --- trunk/src/scripting/scripting/asScript.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/scripting/asScript.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,9 +14,12 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asScript.h" + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../ScriptHelper.h" -#include "asScript.h" #include "../Script.h" @@ -52,4 +55,6 @@ asMETHOD(Script, loadScript), asCALL_THISCALL);assert(r >= 0); } +#endif // __COMPILE_WITH_ANGELSCRIPT__ + // End of File Modified: trunk/src/scripting/scripting/asScript.h =================================================================== --- trunk/src/scripting/scripting/asScript.h 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/scripting/asScript.h 2009-06-17 17:31:40 UTC (rev 69) @@ -19,8 +19,12 @@ // Include files #include "../../dependencies.h" +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + //! Binds the Script class to AngelScript. extern void bindScript(asIScriptEngine *engine); +#endif // __COMPILE_WITH_ANGELSCRIPT__ + #endif Modified: trunk/src/scripting/scripting/asScriptManager.cpp =================================================================== --- trunk/src/scripting/scripting/asScriptManager.cpp 2009-06-16 18:58:47 UTC (rev 68) +++ trunk/src/scripting/scripting/asScriptManager.cpp 2009-06-17 17:31:40 UTC (rev 69) @@ -14,9 +14,13 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asScriptManager.h" + + +#ifdef __COMPILE_WITH_ANGELSCRIPT__ + #include "../Scrip... [truncated message content] |
From: <zcc...@us...> - 2009-06-16 18:58:50
|
Revision: 68 http://sirrf.svn.sourceforge.net/sirrf/?rev=68&view=rev Author: zccdark203 Date: 2009-06-16 18:58:47 +0000 (Tue, 16 Jun 2009) Log Message: ----------- This revision brings the separation of the AngelScript binding code from the regular declaration and implementation code. AngelScript binding coding code can now be found in the sub-directories (which mimic the framework's directory structure) of the /src/scripting directory. Thanks to this it should be a lot easier to remove scripting if desired. Furthermore it has also cleaned the code up significantly. Modified Paths: -------------- trunk/CHANGES trunk/build/CMake/CMakeLists.txt trunk/build/CodeBlocks/sirrf.cbp trunk/src/components/components.h trunk/src/components/scene/AnimatedMeshComponent.cpp trunk/src/components/scene/AnimatedMeshComponent.h trunk/src/components/scene/BillboardComponent.cpp trunk/src/components/scene/BillboardComponent.h trunk/src/components/scene/CameraComponent.cpp trunk/src/components/scene/CameraComponent.h trunk/src/components/scene/ImageComponent.cpp trunk/src/components/scene/ImageComponent.h trunk/src/components/scene/LightComponent.cpp trunk/src/components/scene/LightComponent.h trunk/src/components/scene/MeshComponent.cpp trunk/src/components/scene/MeshComponent.h trunk/src/components/scene/OctTreeComponent.cpp trunk/src/components/scene/OctTreeComponent.h trunk/src/components/scene/ParticleSysComponent.cpp trunk/src/components/scene/ParticleSysComponent.h trunk/src/components/scene/SceneComponent.cpp trunk/src/components/scene/SceneComponent.h trunk/src/components/scene/SkyBoxComponent.cpp trunk/src/components/scene/SkyBoxComponent.h trunk/src/components/scene/SkyDomeComponent.cpp trunk/src/components/scene/SkyDomeComponent.h trunk/src/components/scene/TerrainComponent.cpp trunk/src/components/scene/TerrainComponent.h trunk/src/components/scene/TextBillboardComponent.cpp trunk/src/components/scene/TextBillboardComponent.h trunk/src/components/sound/SoundListenerComponent.cpp trunk/src/components/sound/SoundListenerComponent.h trunk/src/components/sound/SoundSourceComponent.cpp trunk/src/components/sound/SoundSourceComponent.h trunk/src/core/DataStack.cpp trunk/src/core/DataStack.h trunk/src/core/DataStore.cpp trunk/src/core/DataStore.h trunk/src/core/Entity.cpp trunk/src/core/Entity.h trunk/src/core/EntityComponent.cpp trunk/src/core/EntityComponent.h trunk/src/core/EntityManager.cpp trunk/src/core/EntityManager.h trunk/src/core/EventManager.cpp trunk/src/core/EventManager.h trunk/src/core/GameManager.cpp trunk/src/core/GameManager.h trunk/src/core/GameState.cpp trunk/src/core/GameState.h trunk/src/scripting/Script.cpp trunk/src/scripting/Script.h trunk/src/scripting/ScriptManager.cpp trunk/src/scripting/ScriptManager.h trunk/src/scripting/vendor/irrlicht/asAabbox3d.h trunk/src/scripting/vendor/irrlicht/asDimension2d.h trunk/src/scripting/vendor/irrlicht/asIrrHelper.h trunk/src/scripting/vendor/irrlicht/asIrrlicht.h trunk/src/scripting/vendor/irrlicht/asLine2d.h trunk/src/scripting/vendor/irrlicht/asLine3d.h trunk/src/scripting/vendor/irrlicht/asMatrix4.h trunk/src/scripting/vendor/irrlicht/asRect.h trunk/src/scripting/vendor/irrlicht/asSColor.h trunk/src/scripting/vendor/irrlicht/asVector2d.h trunk/src/scripting/vendor/irrlicht/asVector3d.h trunk/src/sound/SoundManager.cpp trunk/src/sound/SoundManager.h Added Paths: ----------- trunk/src/scripting/components/ trunk/src/scripting/components/asComponents.cpp trunk/src/scripting/components/asComponents.h trunk/src/scripting/components/scene/ trunk/src/scripting/components/scene/asAnimatedMeshComponent.cpp trunk/src/scripting/components/scene/asAnimatedMeshComponent.h trunk/src/scripting/components/scene/asBillboardComponent.cpp trunk/src/scripting/components/scene/asBillboardComponent.h trunk/src/scripting/components/scene/asCameraComponent.cpp trunk/src/scripting/components/scene/asCameraComponent.h trunk/src/scripting/components/scene/asImageComponent.cpp trunk/src/scripting/components/scene/asImageComponent.h trunk/src/scripting/components/scene/asLightComponent.cpp trunk/src/scripting/components/scene/asLightComponent.h trunk/src/scripting/components/scene/asMeshComponent.cpp trunk/src/scripting/components/scene/asMeshComponent.h trunk/src/scripting/components/scene/asOctTreeComponent.cpp trunk/src/scripting/components/scene/asOctTreeComponent.h trunk/src/scripting/components/scene/asParticleSysComponent.cpp trunk/src/scripting/components/scene/asParticleSysComponent.h trunk/src/scripting/components/scene/asSceneComponent.cpp trunk/src/scripting/components/scene/asSceneComponent.h trunk/src/scripting/components/scene/asSkyBoxComponent.cpp trunk/src/scripting/components/scene/asSkyBoxComponent.h trunk/src/scripting/components/scene/asSkyDome.cpp trunk/src/scripting/components/scene/asSkyDomeComponent.h trunk/src/scripting/components/scene/asTerrainComponent.cpp trunk/src/scripting/components/scene/asTerrainComponent.h trunk/src/scripting/components/scene/asTextBillboardComponent.cpp trunk/src/scripting/components/scene/asTextBillboardComponent.h trunk/src/scripting/components/sound/ trunk/src/scripting/components/sound/asSoundListenerComponent.cpp trunk/src/scripting/components/sound/asSoundListenerComponent.h trunk/src/scripting/components/sound/asSoundSourceComponent.cpp trunk/src/scripting/components/sound/asSoundSourceComponent.h trunk/src/scripting/core/ trunk/src/scripting/core/asDataStack.cpp trunk/src/scripting/core/asDataStack.h trunk/src/scripting/core/asDataStore.cpp trunk/src/scripting/core/asDataStore.h trunk/src/scripting/core/asEntity.cpp trunk/src/scripting/core/asEntity.h trunk/src/scripting/core/asEntityComponent.cpp trunk/src/scripting/core/asEntityComponent.h trunk/src/scripting/core/asEntityManager.cpp trunk/src/scripting/core/asEntityManager.h trunk/src/scripting/core/asEventManager.cpp trunk/src/scripting/core/asEventManager.h trunk/src/scripting/core/asGameManager.cpp trunk/src/scripting/core/asGameManager.h trunk/src/scripting/core/asGameState.cpp trunk/src/scripting/core/asGameState.h trunk/src/scripting/game/ trunk/src/scripting/scripting/ trunk/src/scripting/scripting/asScript.cpp trunk/src/scripting/scripting/asScript.h trunk/src/scripting/scripting/asScriptManager.cpp trunk/src/scripting/scripting/asScriptManager.h trunk/src/scripting/sound/ trunk/src/scripting/sound/asSoundManager.cpp trunk/src/scripting/sound/asSoundManager.h trunk/src/scripting/vendor/ trunk/src/scripting/vendor/angelscript/ trunk/src/scripting/vendor/irrlicht/ Removed Paths: ------------- trunk/src/components/components.cpp trunk/src/scripting/angelscript/ trunk/src/scripting/irrlicht/ Modified: trunk/CHANGES =================================================================== --- trunk/CHANGES 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/CHANGES 2009-06-16 18:58:47 UTC (rev 68) @@ -2,6 +2,9 @@ Sirrf version 0.1.1 (SVN) - Changes ========================================================================== + * Separated the AngelScript binding functions from the source and + header files where Sirrf classes are declared and implemented. + * All objects which can be instanciated have been given assignment/copy behaviours. Modified: trunk/build/CMake/CMakeLists.txt =================================================================== --- trunk/build/CMake/CMakeLists.txt 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/build/CMake/CMakeLists.txt 2009-06-16 18:58:47 UTC (rev 68) @@ -13,7 +13,6 @@ ${SOURCE_DIR}main.cpp # src/components - ${SOURCE_DIR}components/components.cpp # src/components/scene ${SOURCE_DIR}components/scene/AnimatedMeshComponent.cpp ${SOURCE_DIR}components/scene/BillboardComponent.cpp @@ -48,22 +47,53 @@ # /src/scripting ${SOURCE_DIR}scripting/Script.cpp ${SOURCE_DIR}scripting/ScriptManager.cpp - - # /src/scripting/angelscript - ${SOURCE_DIR}scripting/scriptstdstring.cpp + # /src/scripting/components + ${SOURCE_DIR}scripting/components/asComponents.cpp + # /src/scripting/components/scene + ${SOURCE_DIR}scripting/components/scene/asAnimatedMeshComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asBillboardComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asCameraComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asImageComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asLightComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asMeshComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asOctTreeComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asParticleSysComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asSceneComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asSkyBoxComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asSkyDomeComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asTerrainComponent.cpp + ${SOURCE_DIR}scripting/components/scene/asTextBillboardComponent.cpp + # /src/scripting/components/sound + ${SOURCE_DIR}scripting/components/sound/asSoundListenerComponent.cpp + ${SOURCE_DIR}scripting/components/sound/asSoundSourceComponent.cpp + # /src/scripting/core + ${SOURCE_DIR}scripting/core/asDataStack.cpp + ${SOURCE_DIR}scripting/core/asDataStore.cpp + ${SOURCE_DIR}scripting/core/asEntity.cpp + ${SOURCE_DIR}scripting/core/asEntityComponent.cpp + ${SOURCE_DIR}scripting/core/asEntityManager.cpp + ${SOURCE_DIR}scripting/core/asEventManager.cpp + ${SOURCE_DIR}scripting/core/asGameManager.cpp + ${SOURCE_DIR}scripting/core/asGameState.cpp + # /src/scripting/scripting + ${SOURCE_DIR}scripting/scripting/asScript.cpp + ${SOURCE_DIR}scripting/scripting/asScriptManager.cpp + # /src/scripting/sound + ${SOURCE_DIR}scripting/sound/asSoundManager.cpp + # /src/scripting/vendor/angelscript + ${SOURCE_DIR}scripting/vendor/angelscript/scriptstdstring.cpp + # /src/scripting/vendor/irrlicht + ${SOURCE_DIR}scripting/vendor/irrlicht/asAabbox3d.cpp + ${SOURCE_DIR}scripting/vendor/irrlicht/asDimension2d.cpp + ${SOURCE_DIR}scripting/vendor/irrlicht/asIrrlicht.cpp + ${SOURCE_DIR}scripting/vendor/irrlicht/asLine2d.cpp + ${SOURCE_DIR}scripting/vendor/irrlicht/asLine3d.cpp + ${SOURCE_DIR}scripting/vendor/irrlicht/asMatrix4.cpp + ${SOURCE_DIR}scripting/vendor/irrlicht/asRect.cpp + ${SOURCE_DIR}scripting/vendor/irrlicht/asSColor.cpp + ${SOURCE_DIR}scripting/vendor/irrlicht/asVector2d.cpp + ${SOURCE_DIR}scripting/vendor/irrlicht/asVector3d.cpp - # /src/scripting/irrlicht - ${SOURCE_DIR}scripting/irrlicht/asAabbox3d.cpp - ${SOURCE_DIR}scripting/irrlicht/asDimension2d.cpp - ${SOURCE_DIR}scripting/irrlicht/asIrrlicht.cpp - ${SOURCE_DIR}scripting/irrlicht/asLine2d.cpp - ${SOURCE_DIR}scripting/irrlicht/asLine3d.cpp - ${SOURCE_DIR}scripting/irrlicht/asMatrix4.cpp - ${SOURCE_DIR}scripting/irrlicht/asRect.cpp - ${SOURCE_DIR}scripting/irrlicht/asSColor.cpp - ${SOURCE_DIR}scripting/irrlicht/asVector2d.cpp - ${SOURCE_DIR}scripting/irrlicht/asVector3d.cpp - # /src/sound ${SOURCE_DIR}sound/SoundManager.cpp ) Modified: trunk/build/CodeBlocks/sirrf.cbp =================================================================== --- trunk/build/CodeBlocks/sirrf.cbp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/build/CodeBlocks/sirrf.cbp 2009-06-16 18:58:47 UTC (rev 68) @@ -58,7 +58,6 @@ <Add option="-Wall" /> <Add directory="../../src/vendor" /> </Compiler> - <Unit filename="../../src/components/components.cpp" /> <Unit filename="../../src/components/components.h" /> <Unit filename="../../src/components/scene/AnimatedMeshComponent.cpp" /> <Unit filename="../../src/components/scene/AnimatedMeshComponent.h" /> @@ -113,29 +112,83 @@ <Unit filename="../../src/scripting/ScriptHelper.h" /> <Unit filename="../../src/scripting/ScriptManager.cpp" /> <Unit filename="../../src/scripting/ScriptManager.h" /> - <Unit filename="../../src/scripting/angelscript/scriptstdstring.cpp" /> - <Unit filename="../../src/scripting/angelscript/scriptstdstring.h" /> - <Unit filename="../../src/scripting/irrlicht/asAabbox3d.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asAabbox3d.h" /> - <Unit filename="../../src/scripting/irrlicht/asDimension2d.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asDimension2d.h" /> - <Unit filename="../../src/scripting/irrlicht/asIrrHelper.h" /> - <Unit filename="../../src/scripting/irrlicht/asIrrlicht.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asIrrlicht.h" /> - <Unit filename="../../src/scripting/irrlicht/asLine2d.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asLine2d.h" /> - <Unit filename="../../src/scripting/irrlicht/asLine3d.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asLine3d.h" /> - <Unit filename="../../src/scripting/irrlicht/asMatrix4.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asMatrix4.h" /> - <Unit filename="../../src/scripting/irrlicht/asRect.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asRect.h" /> - <Unit filename="../../src/scripting/irrlicht/asSColor.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asSColor.h" /> - <Unit filename="../../src/scripting/irrlicht/asVector2d.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asVector2d.h" /> - <Unit filename="../../src/scripting/irrlicht/asVector3d.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asVector3d.h" /> + <Unit filename="../../src/scripting/components/asComponents.cpp" /> + <Unit filename="../../src/scripting/components/asComponents.h" /> + <Unit filename="../../src/scripting/components/scene/asAnimatedMeshComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asAnimatedMeshComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asBillboardComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asBillboardComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asCameraComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asCameraComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asImageComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asImageComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asLightComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asLightComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asMeshComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asMeshComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asOctTreeComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asOctTreeComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asParticleSysComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asParticleSysComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asSceneComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asSceneComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asSkyBoxComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asSkyBoxComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asSkyDome.cpp" /> + <Unit filename="../../src/scripting/components/scene/asSkyDomeComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asTerrainComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asTerrainComponent.h" /> + <Unit filename="../../src/scripting/components/scene/asTextBillboardComponent.cpp" /> + <Unit filename="../../src/scripting/components/scene/asTextBillboardComponent.h" /> + <Unit filename="../../src/scripting/components/sound/asSoundListenerComponent.cpp" /> + <Unit filename="../../src/scripting/components/sound/asSoundListenerComponent.h" /> + <Unit filename="../../src/scripting/components/sound/asSoundSourceComponent.cpp" /> + <Unit filename="../../src/scripting/components/sound/asSoundSourceComponent.h" /> + <Unit filename="../../src/scripting/core/asDataStack.cpp" /> + <Unit filename="../../src/scripting/core/asDataStack.h" /> + <Unit filename="../../src/scripting/core/asDataStore.cpp" /> + <Unit filename="../../src/scripting/core/asDataStore.h" /> + <Unit filename="../../src/scripting/core/asEntity.cpp" /> + <Unit filename="../../src/scripting/core/asEntity.h" /> + <Unit filename="../../src/scripting/core/asEntityComponent.cpp" /> + <Unit filename="../../src/scripting/core/asEntityComponent.h" /> + <Unit filename="../../src/scripting/core/asEntityManager.cpp" /> + <Unit filename="../../src/scripting/core/asEntityManager.h" /> + <Unit filename="../../src/scripting/core/asEventManager.cpp" /> + <Unit filename="../../src/scripting/core/asEventManager.h" /> + <Unit filename="../../src/scripting/core/asGameManager.cpp" /> + <Unit filename="../../src/scripting/core/asGameManager.h" /> + <Unit filename="../../src/scripting/core/asGameState.cpp" /> + <Unit filename="../../src/scripting/core/asGameState.h" /> + <Unit filename="../../src/scripting/scripting/asScript.cpp" /> + <Unit filename="../../src/scripting/scripting/asScript.h" /> + <Unit filename="../../src/scripting/scripting/asScriptManager.cpp" /> + <Unit filename="../../src/scripting/scripting/asScriptManager.h" /> + <Unit filename="../../src/scripting/sound/asSoundManager.cpp" /> + <Unit filename="../../src/scripting/sound/asSoundManager.h" /> + <Unit filename="../../src/scripting/vendor/angelscript/scriptstdstring.cpp" /> + <Unit filename="../../src/scripting/vendor/angelscript/scriptstdstring.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asAabbox3d.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asAabbox3d.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asDimension2d.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asDimension2d.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asIrrHelper.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asIrrlicht.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asIrrlicht.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asLine2d.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asLine2d.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asLine3d.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asLine3d.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asMatrix4.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asMatrix4.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asRect.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asRect.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asSColor.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asSColor.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asVector2d.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asVector2d.h" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asVector3d.cpp" /> + <Unit filename="../../src/scripting/vendor/irrlicht/asVector3d.h" /> <Unit filename="../../src/sound/SoundManager.cpp" /> <Unit filename="../../src/sound/SoundManager.h" /> <Extensions> Deleted: trunk/src/components/components.cpp =================================================================== --- trunk/src/components/components.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/components.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -1,44 +0,0 @@ -// ///////////////////////////////////////////////////////////////////////////// -// -// Name: components.cpp -// Author: Michael Bartsch (ZCCdark203) -// -// Desc : Control functions for derived EntityComponent classes. -// -// License: Copyright (C) 2009 Michael Bartsch and Contributors -// -// This program is free software: you can redistribute it -// and/or modify it under the terms of the zlib/libpng License. -// See main.cpp for conditions of distribution and use. -// -// ///////////////////////////////////////////////////////////////////////////// - -// Include files -#include "components.h" - - -// AngelScript binding -void bindComponents(asIScriptEngine *engine) -{ - // Scene - bindSceneComponent(engine); - - bindAnimatedMeshComponent(engine); - bindBillboardComponent(engine); - bindCameraComponent(engine); - bindImageComponent(engine); - bindLightComponent(engine); - bindMeshComponent(engine); - bindOctTreeComponent(engine); - bindParticleSysComponent(engine); - bindSkyBoxComponent(engine); - bindSkyDomeComponent(engine); - bindTerrainComponent(engine); - bindTextBillboardComponent(engine); - - // Sound - bindSoundListenerComponent(engine); - bindSoundSourceComponent(engine); -} - -// End of File Modified: trunk/src/components/components.h =================================================================== --- trunk/src/components/components.h 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/components.h 2009-06-16 18:58:47 UTC (rev 68) @@ -36,10 +36,5 @@ #include "sound/SoundListenerComponent.h" #include "sound/SoundSourceComponent.h" - -// AngelScript binding -//! Bind all components so that they can be used within scripts. -extern void bindComponents(asIScriptEngine *engine); - #endif Modified: trunk/src/components/scene/AnimatedMeshComponent.cpp =================================================================== --- trunk/src/components/scene/AnimatedMeshComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/AnimatedMeshComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -217,63 +217,4 @@ mAnimatedMeshSN->setTransitionTime(time); } - -// AnimatedMeshComponent Angelscript binding. -void bindAnimatedMeshComponent(asIScriptEngine *engine) -{ - // Forward declarations. - int r; - - // Bind AnimatedMeshComponent class. - r = engine->RegisterObjectType("AnimatedMeshComponent", sizeof(AnimatedMeshComponent), asOBJ_REF); assert(r >= 0); - - // Bind inherited functions. - bindSceneComponentBase<AnimatedMeshComponent>(engine, "AnimatedMeshComponent"); - - // Set SkyDomeComponent behaviour. - r = engine->RegisterObjectBehaviour("AnimatedMeshComponent", asBEHAVE_FACTORY, "AnimatedMeshComponent@ f(Entity @)", - asFUNCTIONPR(AnimatedMeshComponent::refFactory, (Entity*), AnimatedMeshComponent*), - asCALL_CDECL); assert(r >= 0); - r = engine->RegisterObjectBehaviour("AnimatedMeshComponent", asBEHAVE_FACTORY, "AnimatedMeshComponent@ f(Entity @, " \ - "const string &in, const vector3df &in, const vector3df &in)", - asFUNCTIONPR(AnimatedMeshComponent::refFactory, (Entity*, const std::string&, - const vector3df&, const vector3df&), AnimatedMeshComponent*), asCALL_CDECL); - assert(r >= 0); - - r = engine->RegisterObjectBehaviour("AnimatedMeshComponent", asBEHAVE_ASSIGNMENT, "AnimatedMeshComponent&" \ - " f(const AnimatedMeshComponent &in)", - asFUNCTION(assignT<AnimatedMeshComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); - - // Bind AnimatedMeshComponent class functions. - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void animate()", - asMETHOD(AnimatedMeshComponent, animate), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "s32 getEndFrame()", - asMETHOD(AnimatedMeshComponent, getEndFrame), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "f32 getFrame()", - asMETHOD(AnimatedMeshComponent, getFrame), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "s32 getStartFrame()", - asMETHOD(AnimatedMeshComponent, getStartFrame), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setAnimationSpeed(f32)", - asMETHOD(AnimatedMeshComponent, setAnimationSpeed), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setCurrentFrame(f32)", - asMETHOD(AnimatedMeshComponent, setCurrentFrame), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setFrameLoop(s32, s32)", - asMETHOD(AnimatedMeshComponent, setFrameLoop), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setLoopMode(bool)", - asMETHOD(AnimatedMeshComponent, setLoopMode), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setMD2Animation(const string &in)", - asMETHODPR(AnimatedMeshComponent, setMD2Animation, (const std::string&), void), - asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setMesh(const string &in)", - asMETHODPR(AnimatedMeshComponent, setMesh, (const std::string&), void), - asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setShadowVolumeSceneNode(const string &in, " \ - "bool, f32)", asMETHODPR(AnimatedMeshComponent, setShadowVolumeSceneNode, - (const std::string&, bool, f32), void), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setTransitionTime(f32)", - asMETHOD(AnimatedMeshComponent, setTransitionTime), asCALL_THISCALL); assert(r >= 0); -} - // End of File Modified: trunk/src/components/scene/AnimatedMeshComponent.h =================================================================== --- trunk/src/components/scene/AnimatedMeshComponent.h 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/AnimatedMeshComponent.h 2009-06-16 18:58:47 UTC (rev 68) @@ -135,9 +135,4 @@ IShadowVolumeSceneNode *mShadowVolumeSN; }; - -// AnimatedMeshComponent Angelscript binding. -//! Binds the AnimatedMeshComponent class to AngelScript so that it can be used within scripts. -extern void bindAnimatedMeshComponent(asIScriptEngine *engine); - #endif Modified: trunk/src/components/scene/BillboardComponent.cpp =================================================================== --- trunk/src/components/scene/BillboardComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/BillboardComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -102,32 +102,4 @@ mBillboardSN->setSize(size); } - -// BillboardComponent Angelscript binding. -void bindBillboardComponent(asIScriptEngine *engine) -{ - // Forward declarations. - int r; - - // Bind BillboardComponent class. - r = engine->RegisterObjectType("BillboardComponent", sizeof(BillboardComponent), asOBJ_REF); assert(r >= 0); - - // Bind base functions. - bindBillboardComponentBase<BillboardComponent>(engine, "BillboardComponent"); - - // Set BillboardComponent behaviour. - r = engine->RegisterObjectBehaviour("BillboardComponent", asBEHAVE_FACTORY, "BillboardComponent@ f(Entity @)", - asFUNCTIONPR(BillboardComponent::refFactory, (Entity*), BillboardComponent*), - asCALL_CDECL); assert(r >= 0); - r = engine->RegisterObjectBehaviour("BillboardComponent", asBEHAVE_FACTORY, "BillboardComponent@ f(Entity @, " \ - "const dimension2df &in, const SColor &in, const SColor &in)", - asFUNCTIONPR(BillboardComponent::refFactory, (Entity*, const dimension2df&, - const SColor&, const SColor&), BillboardComponent*), - asCALL_CDECL); assert(r >= 0); - - r = engine->RegisterObjectBehaviour("BillboardComponent", asBEHAVE_ASSIGNMENT, "BillboardComponent& " \ - "f(const BillboardComponent &in)", - asFUNCTION(assignT<BillboardComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); -} - // End of File Modified: trunk/src/components/scene/BillboardComponent.h =================================================================== --- trunk/src/components/scene/BillboardComponent.h 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/BillboardComponent.h 2009-06-16 18:58:47 UTC (rev 68) @@ -81,41 +81,4 @@ IBillboardSceneNode *mBillboardSN; }; - -// BillboardComponent Angelscript binding. -//! Binds the BillboardComponent class to AngelScript so that it can be used within scripts. -extern void bindBillboardComponent(asIScriptEngine *engine); - -//! Binds the base behaviours and methods of the BillboardComponent to the given class in -//! AngelScript. -template<typename T> -void bindBillboardComponentBase(asIScriptEngine *engine, const char *type) -{ - // Forward declaration. - int r; - std::string sType = type; - - // Bind inherited functions. - bindSceneComponentBase<BillboardComponent>(engine, type); - - // Set common behaviour. - r = engine->RegisterGlobalBehaviour(asBEHAVE_REF_CAST, std::string(sType + "@ f(BillboardComponent @)").c_str(), - asFUNCTION((asRefCast<BillboardComponent,T>)), asCALL_CDECL); assert( r >= 0 ); - r = engine->RegisterGlobalBehaviour(asBEHAVE_IMPLICIT_REF_CAST, std::string("BillboardComponent@ f(" + sType +" @)").c_str(), - asFUNCTION((asRefCast<T,BillboardComponent>)), asCALL_CDECL); assert( r >= 0 ); - - // Bind common class functions. - r = engine->RegisterObjectMethod(type, "void getColor(SColor &out, SColor &out)", - asMETHOD(T, getColor), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod(type, "const dimension2df& getSize()", - asMETHOD(T, getSize), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod(type, "void setColor(const SColor &in)", - asMETHODPR(T, setColor, (const SColor&), void), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod(type, "void setColor(const SColor &in, const SColor &in)", - asMETHODPR(T, setColor, (const SColor&, const SColor&), void), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod(type, "void setSize(const dimension2df &in)", - asMETHOD(T, setSize), asCALL_THISCALL); assert(r >= 0); -} - #endif Modified: trunk/src/components/scene/CameraComponent.cpp =================================================================== --- trunk/src/components/scene/CameraComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/CameraComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -230,81 +230,4 @@ mCameraAnimator = animMaya; } - -// CameraComponent Angelscript binding. -void bindCameraComponent(asIScriptEngine *engine) -{ - // Forward declarations. - int r; - - // Bind CameraComponent class. - r = engine->RegisterObjectType("CameraComponent", sizeof(CameraComponent), asOBJ_REF); assert(r >= 0); - - // Bind inherited functions. - bindSceneComponentBase<CameraComponent>(engine, "CameraComponent"); - - // Set CameraComponent behaviour. - r = engine->RegisterObjectBehaviour("CameraComponent", asBEHAVE_FACTORY, "CameraComponent@ f(Entity @)", - asFUNCTIONPR(CameraComponent::refFactory, (Entity*), CameraComponent*), - asCALL_CDECL); assert(r >= 0); - r = engine->RegisterObjectBehaviour("CameraComponent", asBEHAVE_FACTORY, "CameraComponent@ f(Entity @, " \ - "const vector3df &in)", asFUNCTIONPR(CameraComponent::refFactory, - (Entity*, const vector3df&), CameraComponent*), asCALL_CDECL); assert(r >= 0); - - r = engine->RegisterObjectBehaviour("CameraComponent", asBEHAVE_ASSIGNMENT, "CameraComponent& " \ - "f(const CameraComponent &in)", - asFUNCTION(assignT<CameraComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); - - // Bind CameraComponent class functions. - r = engine->RegisterObjectMethod("CameraComponent", "void bindTargetAndRotation(bool)", - asMETHOD(CameraComponent, bindTargetAndRotation), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "bool getTargetAndRotationBinding()", - asMETHOD(CameraComponent, getTargetAndRotationBinding), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod("CameraComponent", "f32 getAspectRatio()", - asMETHOD(CameraComponent, getAspectRatio), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "f32 getFarValue()", - asMETHOD(CameraComponent, getFarValue), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "f32 getFOV()", - asMETHOD(CameraComponent, getFOV), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "f32 getNearValue()", - asMETHOD(CameraComponent, getNearValue), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "const matrix4& getProjectionMatrix()", - asMETHOD(CameraComponent, getProjectionMatrix), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "const vector3df& getTarget()", - asMETHOD(CameraComponent, getTarget), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "const vector3df& getUpVector()", - asMETHOD(CameraComponent, getUpVector), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "const matrix4& getViewMatrix()", - asMETHOD(CameraComponent, getViewMatrix), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "bool getIsOrthogonal()", - asMETHOD(CameraComponent, getIsOrthogonal), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod("CameraComponent", "void setAsMainCamera()", - asMETHOD(CameraComponent, setAsMainCamera), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setAspectRatio(f32)", - asMETHOD(CameraComponent, setAspectRatio), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setFarValue(f32)", - asMETHOD(CameraComponent, setFarValue), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setFOV(f32)", - asMETHOD(CameraComponent, setFOV), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setNearValue(f32)", - asMETHOD(CameraComponent, setNearValue), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setProjectionMatrix(const matrix4 &in, bool)", - asMETHOD(CameraComponent, setProjectionMatrix), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setRotation(const vector3df &in)", - asMETHOD(CameraComponent, setRotation), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setTarget(const vector3df &in)", - asMETHOD(CameraComponent, setTarget), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setUpVector(const vector3df &in)", - asMETHOD(CameraComponent, setUpVector), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod("CameraComponent", "void setNormalMode()", - asMETHOD(CameraComponent, setNormalMode), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setFPSMode(f32, f32, bool, f32)", - asMETHOD(CameraComponent, setFPSMode), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("CameraComponent", "void setMayaMode(f32, f32, f32)", - asMETHOD(CameraComponent, setMayaMode), asCALL_THISCALL); assert(r >= 0); -} - // End of File Modified: trunk/src/components/scene/CameraComponent.h =================================================================== --- trunk/src/components/scene/CameraComponent.h 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/CameraComponent.h 2009-06-16 18:58:47 UTC (rev 68) @@ -126,10 +126,5 @@ ISceneNodeAnimator *mCameraAnimator; }; - -// CameraComponent Angelscript binding. -//! Binds the CameraComponent class to AngelScript so that it can be used within scripts. -extern void bindCameraComponent(asIScriptEngine *engine); - #endif Modified: trunk/src/components/scene/ImageComponent.cpp =================================================================== --- trunk/src/components/scene/ImageComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/ImageComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -234,60 +234,4 @@ mVisible = mWasVisible; } - -// ImageComponent Angelscript binding. -void bindImageComponent(asIScriptEngine *engine) -{ - // Forward declarations. - int r; - - // Bind ImageComponent class. - r = engine->RegisterObjectType("ImageComponent", sizeof(ImageComponent), asOBJ_REF); assert(r >= 0); - - // Bind inherited functions. - bindEntityComponentBase<ImageComponent>(engine, "ImageComponent"); - - // Set ImageComponent behaviour. - r = engine->RegisterGlobalBehaviour(asBEHAVE_REF_CAST, "ImageComponent@ f(EntityComponent @)", - asFUNCTION((asRefCast<EntityComponent,ImageComponent>)), asCALL_CDECL); assert( r >= 0 ); - r = engine->RegisterGlobalBehaviour(asBEHAVE_IMPLICIT_REF_CAST, "EntityComponent@ f(ImageComponent @)", - asFUNCTION((asRefCast<ImageComponent,EntityComponent>)), asCALL_CDECL); assert( r >= 0 ); - - r = engine->RegisterObjectBehaviour("ImageComponent", asBEHAVE_FACTORY, "ImageComponent@ f(Entity @)", - asFUNCTION(ImageComponent::refFactory), asCALL_CDECL); assert(r >= 0); - - r = engine->RegisterObjectBehaviour("ImageComponent", asBEHAVE_ASSIGNMENT, "ImageComponent& f(const ImageComponent &in)", - asFUNCTION(assignT<ImageComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); - - // Bind ImageComponent class functions. - r = engine->RegisterObjectMethod("ImageComponent", "void setAlphaColor(const SColor &in)", - asMETHOD(ImageComponent, setAlphaColor), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "void setClipRect(const recti &in)", - asMETHOD(ImageComponent, setClipRect), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "void setColor(const SColor &in)", - asMETHOD(ImageComponent, setColor), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "void setPosition(vector2di &in)", - asMETHOD(ImageComponent, setPosition), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "void setSourceRect(const recti &in)", - asMETHOD(ImageComponent, setSourceRect), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "void setTexture(const string&in)", - asMETHODPR(ImageComponent, setTexture, (const std::string&), void), - asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "void setUseAlphaColor(bool)", - asMETHOD(ImageComponent, setUseAlphaColor), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod("ImageComponent", "const SColor& getAlphaColor()", - asMETHOD(ImageComponent, getAlphaColor), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "const recti& getClipRect()", - asMETHOD(ImageComponent, getClipRect), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "const SColor& getColor()", - asMETHOD(ImageComponent, getColor), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "const vector2di& getPosition()", - asMETHOD(ImageComponent, getPosition), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "const recti& getSourceRect()", - asMETHOD(ImageComponent, getSourceRect), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "bool getUseAlphaColor()", - asMETHOD(ImageComponent, getUseAlphaColor), asCALL_THISCALL); assert(r >= 0); -} - // End of File Modified: trunk/src/components/scene/ImageComponent.h =================================================================== --- trunk/src/components/scene/ImageComponent.h 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/ImageComponent.h 2009-06-16 18:58:47 UTC (rev 68) @@ -140,9 +140,4 @@ }; - -// ImageComponent Angelscript binding. -//! Binds the ImageComponent class to AngelScript so that it can be used within scripts. -extern void bindImageComponent(asIScriptEngine *engine); - #endif Modified: trunk/src/components/scene/LightComponent.cpp =================================================================== --- trunk/src/components/scene/LightComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/LightComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -97,45 +97,4 @@ mLightSN->setRadius(radius); } - -// LightComponent Angelscript binding. -void bindLightComponent(asIScriptEngine *engine) -{ - // Forward declarations. - int r; - - // Bind LightComponent class. - r = engine->RegisterObjectType("LightComponent", sizeof(LightComponent), asOBJ_REF); assert(r >= 0); - - // Bind inherited functions. - bindSceneComponentBase<LightComponent>(engine, "LightComponent"); - - // Set LightComponent behaviour. - r = engine->RegisterObjectBehaviour("LightComponent", asBEHAVE_FACTORY, "LightComponent@ f(Entity @)", - asFUNCTIONPR(LightComponent::refFactory, (Entity*), LightComponent*), - asCALL_CDECL); assert(r >= 0); - r = engine->RegisterObjectBehaviour("LightComponent", asBEHAVE_FACTORY, "LightComponent@ f(Entity @, " \ - "const SColor&in, f32)",asFUNCTIONPR(LightComponent::refFactory, - (Entity*, const SColor &color, f32), LightComponent*), asCALL_CDECL); - assert(r >= 0); - - r = engine->RegisterObjectBehaviour("LightComponent", asBEHAVE_ASSIGNMENT, "LightComponent& f(const LightComponent &in)", - asFUNCTION(assignT<LightComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); - - // Bind LightComponent class functions. - r = engine->RegisterObjectMethod("LightComponent", "bool getCastShadow()", - asMETHOD(LightComponent, getCastShadow), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("LightComponent", "E_LIGHT_TYPE getLightType()", - asMETHOD(LightComponent, getLightType), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("LightComponent", "f32 getRadius()", - asMETHOD(LightComponent, getRadius), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod("LightComponent", "void setCastShadow(bool)", - asMETHOD(LightComponent, setCastShadow), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("LightComponent", "void setLightType(E_LIGHT_TYPE)", - asMETHOD(LightComponent, setLightType), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("LightComponent", "void setRadius(f32)", - asMETHOD(LightComponent, setRadius), asCALL_THISCALL); assert(r >= 0); -} - // End of File Modified: trunk/src/components/scene/LightComponent.h =================================================================== --- trunk/src/components/scene/LightComponent.h 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/LightComponent.h 2009-06-16 18:58:47 UTC (rev 68) @@ -72,9 +72,4 @@ ILightSceneNode *mLightSN; }; - -// LightComponent Angelscript binding. -//! Binds the LightComponent class to AngelScript so that it can be used within scripts. -extern void bindLightComponent(asIScriptEngine *engine); - #endif Modified: trunk/src/components/scene/MeshComponent.cpp =================================================================== --- trunk/src/components/scene/MeshComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/MeshComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -119,33 +119,4 @@ mMeshSN->setMesh(mesh); } - -// MeshComponent Angelscript binding. -void bindMeshComponent(asIScriptEngine *engine) -{ - // Forward declarations. - int r; - - // Bind MeshComponent class. - r = engine->RegisterObjectType("MeshComponent", sizeof(MeshComponent), asOBJ_REF); assert(r >= 0); - - // Bind inherited functions. - bindSceneComponentBase<MeshComponent>(engine, "MeshComponent"); - - // Set MeshComponent behaviour. - r = engine->RegisterObjectBehaviour("MeshComponent", asBEHAVE_FACTORY, "MeshComponent@ f(Entity @)", - asFUNCTIONPR(MeshComponent::refFactory, (Entity*), MeshComponent*), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterObjectBehaviour("MeshComponent", asBEHAVE_FACTORY, "MeshComponent@ f(Entity @, const string &in, " \ - "const vector3df &in, const vector3df &in)", - asFUNCTIONPR(MeshComponent::refFactory, (Entity*, const std::string&, const vector3df&, - const vector3df&), MeshComponent*), asCALL_CDECL); assert(r >= 0); - - r = engine->RegisterObjectBehaviour("MeshComponent", asBEHAVE_ASSIGNMENT, "MeshComponent& f(const MeshComponent &in)", - asFUNCTION(assignT<MeshComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); - - // Bind MeshComponent class functions. - r = engine->RegisterObjectMethod("MeshComponent", "void setMesh(const string &in)", - asMETHODPR(MeshComponent, setMesh, (const std::string&), void), asCALL_THISCALL); assert(r >= 0); -} - // End of File Modified: trunk/src/components/scene/MeshComponent.h =================================================================== --- trunk/src/components/scene/MeshComponent.h 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/MeshComponent.h 2009-06-16 18:58:47 UTC (rev 68) @@ -83,10 +83,5 @@ IMeshSceneNode *mMeshSN; }; - -// MeshComponent Angelscript binding. -//! Binds the MeshComponent class to AngelScript so that it can be used within scripts. -extern void bindMeshComponent(asIScriptEngine *engine); - #endif Modified: trunk/src/components/scene/OctTreeComponent.cpp =================================================================== --- trunk/src/components/scene/OctTreeComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/OctTreeComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -81,28 +81,4 @@ return new OctTreeComponent(parent, fileName, minPolysPerNode); } - -// OctTreeComponent Angelscript binding. -void bindOctTreeComponent(asIScriptEngine *engine) -{ - // Forward declarations. - int r; - - // Bind SkyDomeComponent class. - r = engine->RegisterObjectType("OctTreeComponent", sizeof(OctTreeComponent), asOBJ_REF); assert(r >= 0); - - // Bind inherited functions. - bindSceneComponentBase<OctTreeComponent>(engine, "OctTreeComponent"); - - // Set SkyDomeComponent behaviour. - r = engine->RegisterObjectBehaviour("OctTreeComponent", asBEHAVE_FACTORY, "OctTreeComponent@ f(Entity @, " \ - "const string &in, s32)", - asFUNCTIONPR(OctTreeComponent::refFactory, (Entity*, const std::string&, - s32), OctTreeComponent*), asCALL_CDECL); assert(r >= 0); - - r = engine->RegisterObjectBehaviour("OctTreeComponent", asBEHAVE_ASSIGNMENT, "OctTreeComponent& " \ - "f(const OctTreeComponent &in)", - asFUNCTION(assignT<OctTreeComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); -} - // End of File Modified: trunk/src/components/scene/OctTreeComponent.h =================================================================== --- trunk/src/components/scene/OctTreeComponent.h 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/OctTreeComponent.h 2009-06-16 18:58:47 UTC (rev 68) @@ -61,9 +61,4 @@ s32 minPolysPerNode); }; - -// OctTreeComponent Angelscript binding. -//! Binds the OctreeComponent class to AngelScript so that it can be used within scripts. -extern void bindOctTreeComponent(asIScriptEngine *engine); - #endif Modified: trunk/src/components/scene/ParticleSysComponent.cpp =================================================================== --- trunk/src/components/scene/ParticleSysComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/ParticleSysComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -323,85 +323,4 @@ mParticleSystemSN->setParticleSize(size); } - -// ParticleSysComponent Angelscript binding. -void bindParticleSysComponent(asIScriptEngine *engine) -{ - // Forward declarations. - int r; - - // Bind ParticleSysComponent class. - r = engine->RegisterObjectType("ParticleSysComponent", sizeof(ParticleSysComponent), asOBJ_REF); assert(r >= 0); - - // Bind inherited functions. - bindSceneComponentBase<ParticleSysComponent>(engine, "ParticleSysComponent"); - - // Set SkyboxComponent behaviour. - r = engine->RegisterObjectBehaviour("ParticleSysComponent", asBEHAVE_FACTORY, "ParticleSysComponent@ f(Entity @, " \ - "const vector3df &in, const vector3df &in)", - asFUNCTIONPR(ParticleSysComponent::refFactory, (Entity*, const vector3df&, - const vector3df&), ParticleSysComponent*), asCALL_CDECL); assert(r >= 0); - - r = engine->RegisterObjectBehaviour("ParticleSysComponent", asBEHAVE_ASSIGNMENT, "ParticleSysComponent& " \ - "f(const ParticleSysComponent &in)", - asFUNCTION(assignT<ParticleSysComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); - - // Bind ParticleSysComponent class methods. - r = engine->RegisterObjectMethod("ParticleSysComponent", "void addAttractionAffector(const vector3df &in, f32, " \ - "bool, bool, bool, bool)", asMETHOD(ParticleSysComponent, addAttractionAffector), - asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void addFadeOutParticleAffector(const SColor &in, u32)", - asMETHOD(ParticleSysComponent, addFadeOutParticleAffector), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void addGravityAffector(const vector3df &in, u32)", - asMETHOD(ParticleSysComponent, addGravityAffector), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void addRotationAffector(const vector3df &in, const vector3df &in)", - asMETHOD(ParticleSysComponent, addRotationAffector), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void addScaleParticleAffector(const dimension2df &in)", - asMETHOD(ParticleSysComponent, addScaleParticleAffector), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void removeAffectors()", - asMETHOD(ParticleSysComponent, removeAffectors), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setAnimatedMeshSceneNodeEmitter(const string &in, " \ - "bool, const vector3df &in, f32, bool, u32, u32, const SColor &in, " \ - "const SColor &in, u32, u32, s32, const dimension2df &in, const dimension2df &in)", - asMETHODPR(ParticleSysComponent, setAnimatedMeshSceneNodeEmitter, - (const std::string&, bool, const vector3df&, f32, bool, u32, u32, - const SColor&, const SColor&, u32, u32, s32,const dimension2df&, - const dimension2df &), void), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setBoxEmitter(const aabbox3df &in, const vector3df &in, " \ - "u32, u32, const SColor &in, const SColor &in, u32, u32, s32, " \ - "const dimension2df &in, const dimension2df &in)", - asMETHOD(ParticleSysComponent, setBoxEmitter), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setCylinderEmitter(const vector3df &in, f32, " \ - "const vector3df &in, f32, bool, const vector3df &in, u32, u32, " \ - "const SColor &in, const SColor &in, u32, u32, s32, const dimension2df &in, " \ - "const dimension2df &in)", asMETHOD(ParticleSysComponent, setCylinderEmitter), - asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setMeshEmitter(const string &in, bool, " \ - "const vector3df &in, f32, bool, u32, u32, const SColor &in, const SColor &in, " \ - "u32, u32, s32, const dimension2df &in, const dimension2df &in)", - asMETHODPR(ParticleSysComponent, setMeshEmitter, (const std::string&, bool, - const vector3df&, f32, bool, u32, u32, const SColor&, const SColor&, u32, u32, s32, - const dimension2df&, const dimension2df&), void), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setPointEmitter(const vector3df &in, u32, u32, " \ - "const SColor &in, const SColor &in, u32, u32, s32, const dimension2df &in, " \ - "const dimension2df &in)", asMETHOD(ParticleSysComponent, setPointEmitter), - asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setRingEmitter(const vector3df &in, f32, f32, " \ - "const vector3df &in, u32, u32, const SColor &in, const SColor &in, " \ - "u32, u32, s32, const dimension2df &in, const dimension2df &in)", - asMETHOD(ParticleSysComponent, setRingEmitter), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setSphereEmitter(const vector3df &in, f32, " \ - "const vector3df &in, u32, u32, const SColor &in, const SColor &in, " \ - "u32, u32, s32, const dimension2df &in, const dimension2df &in)", - asMETHOD(ParticleSysComponent, setSphereEmitter), asCALL_THISCALL); assert(r >= 0); - - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setParticlesAreGlobal()", - asMETHOD(ParticleSysComponent, setParticlesAreGlobal), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setParticlesAreGlobal(bool)", - asMETHOD(ParticleSysComponent, setParticlesAreGlobal), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setParticleSize(const dimension2df &in)", - asMETHOD(ParticleSysComponent, setParticleSize), asCALL_THISCALL); assert(r >= 0); -} - // End of File Modified: trunk/src/components/scene/ParticleSysComponent.h =================================================================== --- trunk/src/components/scene/ParticleSysComponent.h 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/ParticleSysComponent.h 2009-06-16 18:58:47 UTC (rev 68) @@ -375,9 +375,4 @@ IParticleSystemSceneNode *mParticleSystemSN; }; - -// ParticleSysComponent Angelscript binding. -//! Binds the ParticleSysComponent class to AngelScript so that it can be used within scripts. -extern void bindParticleSysComponent(asIScriptEngine *engine); - #endif Modified: trunk/src/components/scene/SceneComponent.cpp =================================================================== --- trunk/src/components/scene/SceneComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) +++ trunk/src/components/scene/SceneComponent.cpp 2009-06-16 18:58:47 UTC (rev 68) @@ -356,26 +356,4 @@ mSceneNode->setVisible(true); } - -/... [truncated message content] |
From: <zcc...@us...> - 2009-06-13 19:43:31
|
Revision: 67 http://sirrf.svn.sourceforge.net/sirrf/?rev=67&view=rev Author: zccdark203 Date: 2009-06-13 19:43:28 +0000 (Sat, 13 Jun 2009) Log Message: ----------- Changed the rendering order. Switched from the scriptstring add-on to the scriptstdstring add-on for AngelScript. And most objects have been given a assignment/copy behaviour. Modified Paths: -------------- trunk/CONTRIBUTORS trunk/README trunk/build/CMake/CMakeLists.txt trunk/build/CodeBlocks/sirrf.cbp trunk/src/components/scene/AnimatedMeshComponent.cpp trunk/src/components/scene/BillboardComponent.cpp trunk/src/components/scene/CameraComponent.cpp trunk/src/components/scene/ImageComponent.cpp trunk/src/components/scene/LightComponent.cpp trunk/src/components/scene/MeshComponent.cpp trunk/src/components/scene/OctTreeComponent.cpp trunk/src/components/scene/ParticleSysComponent.cpp trunk/src/components/scene/SceneComponent.cpp trunk/src/components/scene/SceneComponent.h trunk/src/components/scene/SkyBoxComponent.cpp trunk/src/components/scene/SkyDomeComponent.cpp trunk/src/components/scene/TerrainComponent.cpp trunk/src/components/scene/TextBillboardComponent.cpp trunk/src/components/sound/SoundListenerComponent.cpp trunk/src/components/sound/SoundSourceComponent.cpp trunk/src/core/DataStack.cpp trunk/src/core/DataStore.cpp trunk/src/core/Entity.cpp trunk/src/core/EntityComponent.cpp trunk/src/core/EntityComponent.h trunk/src/core/EntityManager.cpp trunk/src/core/EventManager.cpp trunk/src/core/GameManager.cpp trunk/src/core/GameState.cpp trunk/src/scripting/Script.cpp trunk/src/scripting/ScriptManager.cpp trunk/src/scripting/ScriptManager.h trunk/src/sound/SoundManager.cpp Added Paths: ----------- trunk/CHANGES trunk/src/scripting/ScriptHelper.h trunk/src/scripting/angelscript/ trunk/src/scripting/angelscript/scriptstdstring.cpp trunk/src/scripting/angelscript/scriptstdstring.h Removed Paths: ------------- trunk/src/scripting/scriptstring.cpp trunk/src/scripting/scriptstring.h trunk/src/scripting/scriptstring_utils.cpp Added: trunk/CHANGES =================================================================== --- trunk/CHANGES (rev 0) +++ trunk/CHANGES 2009-06-13 19:43:28 UTC (rev 67) @@ -0,0 +1,13 @@ +========================================================================== +Sirrf version 0.1.1 (SVN) - Changes +========================================================================== + + * All objects which can be instanciated have been given assignment/copy + behaviours. + + * Switched from the scriptstring AngelScript add-on to the + scriptstdstring AngelScript add-on. + + * Changed the rendering order. In v0.1.0 Sirrf first rendered the scene, + then the subscribed entities, and finally the state. This order has + been reversed. Modified: trunk/CONTRIBUTORS =================================================================== --- trunk/CONTRIBUTORS 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/CONTRIBUTORS 2009-06-13 19:43:28 UTC (rev 67) @@ -1,5 +1,5 @@ ========================================================================== -Sirrf version 0.1.0 - Contributors +Sirrf version 0.1.1 (SVN) - Contributors ========================================================================== Please also note contributors who have contributed to the framework: Modified: trunk/README =================================================================== --- trunk/README 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/README 2009-06-13 19:43:28 UTC (rev 67) @@ -1,5 +1,5 @@ ========================================================================== -Sirrf version 0.1.0 - Readme +Sirrf version 0.1.1 (SVN) - Readme ========================================================================== Content of this file: Modified: trunk/build/CMake/CMakeLists.txt =================================================================== --- trunk/build/CMake/CMakeLists.txt 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/build/CMake/CMakeLists.txt 2009-06-13 19:43:28 UTC (rev 67) @@ -48,8 +48,9 @@ # /src/scripting ${SOURCE_DIR}scripting/Script.cpp ${SOURCE_DIR}scripting/ScriptManager.cpp - ${SOURCE_DIR}scripting/scriptstring.cpp - ${SOURCE_DIR}scripting/scriptstring_utils.cpp + + # /src/scripting/angelscript + ${SOURCE_DIR}scripting/scriptstdstring.cpp # /src/scripting/irrlicht ${SOURCE_DIR}scripting/irrlicht/asAabbox3d.cpp Modified: trunk/build/CodeBlocks/sirrf.cbp =================================================================== --- trunk/build/CodeBlocks/sirrf.cbp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/build/CodeBlocks/sirrf.cbp 2009-06-13 19:43:28 UTC (rev 67) @@ -110,8 +110,11 @@ <Unit filename="../../src/main.cpp" /> <Unit filename="../../src/scripting/Script.cpp" /> <Unit filename="../../src/scripting/Script.h" /> + <Unit filename="../../src/scripting/ScriptHelper.h" /> <Unit filename="../../src/scripting/ScriptManager.cpp" /> <Unit filename="../../src/scripting/ScriptManager.h" /> + <Unit filename="../../src/scripting/angelscript/scriptstdstring.cpp" /> + <Unit filename="../../src/scripting/angelscript/scriptstdstring.h" /> <Unit filename="../../src/scripting/irrlicht/asAabbox3d.cpp" /> <Unit filename="../../src/scripting/irrlicht/asAabbox3d.h" /> <Unit filename="../../src/scripting/irrlicht/asDimension2d.cpp" /> @@ -133,9 +136,6 @@ <Unit filename="../../src/scripting/irrlicht/asVector2d.h" /> <Unit filename="../../src/scripting/irrlicht/asVector3d.cpp" /> <Unit filename="../../src/scripting/irrlicht/asVector3d.h" /> - <Unit filename="../../src/scripting/scriptstring.cpp" /> - <Unit filename="../../src/scripting/scriptstring.h" /> - <Unit filename="../../src/scripting/scriptstring_utils.cpp" /> <Unit filename="../../src/sound/SoundManager.cpp" /> <Unit filename="../../src/sound/SoundManager.h" /> <Extensions> Modified: trunk/src/components/scene/AnimatedMeshComponent.cpp =================================================================== --- trunk/src/components/scene/AnimatedMeshComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/AnimatedMeshComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -235,11 +235,15 @@ asFUNCTIONPR(AnimatedMeshComponent::refFactory, (Entity*), AnimatedMeshComponent*), asCALL_CDECL); assert(r >= 0); r = engine->RegisterObjectBehaviour("AnimatedMeshComponent", asBEHAVE_FACTORY, "AnimatedMeshComponent@ f(Entity @, " \ - "const string &, const vector3df &in, const vector3df &in)", + "const string &in, const vector3df &in, const vector3df &in)", asFUNCTIONPR(AnimatedMeshComponent::refFactory, (Entity*, const std::string&, const vector3df&, const vector3df&), AnimatedMeshComponent*), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("AnimatedMeshComponent", asBEHAVE_ASSIGNMENT, "AnimatedMeshComponent&" \ + " f(const AnimatedMeshComponent &in)", + asFUNCTION(assignT<AnimatedMeshComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind AnimatedMeshComponent class functions. r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void animate()", asMETHOD(AnimatedMeshComponent, animate), asCALL_THISCALL); assert(r >= 0); @@ -259,13 +263,13 @@ asMETHOD(AnimatedMeshComponent, setFrameLoop), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setLoopMode(bool)", asMETHOD(AnimatedMeshComponent, setLoopMode), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setMD2Animation(const string &)", + r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setMD2Animation(const string &in)", asMETHODPR(AnimatedMeshComponent, setMD2Animation, (const std::string&), void), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setMesh(const string &)", + r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setMesh(const string &in)", asMETHODPR(AnimatedMeshComponent, setMesh, (const std::string&), void), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setShadowVolumeSceneNode(const string &fileName, " \ + r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setShadowVolumeSceneNode(const string &in, " \ "bool, f32)", asMETHODPR(AnimatedMeshComponent, setShadowVolumeSceneNode, (const std::string&, bool, f32), void), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setTransitionTime(f32)", Modified: trunk/src/components/scene/BillboardComponent.cpp =================================================================== --- trunk/src/components/scene/BillboardComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/BillboardComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -124,6 +124,10 @@ asFUNCTIONPR(BillboardComponent::refFactory, (Entity*, const dimension2df&, const SColor&, const SColor&), BillboardComponent*), asCALL_CDECL); assert(r >= 0); + + r = engine->RegisterObjectBehaviour("BillboardComponent", asBEHAVE_ASSIGNMENT, "BillboardComponent& " \ + "f(const BillboardComponent &in)", + asFUNCTION(assignT<BillboardComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } // End of File Modified: trunk/src/components/scene/CameraComponent.cpp =================================================================== --- trunk/src/components/scene/CameraComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/CameraComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -251,6 +251,10 @@ "const vector3df &in)", asFUNCTIONPR(CameraComponent::refFactory, (Entity*, const vector3df&), CameraComponent*), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("CameraComponent", asBEHAVE_ASSIGNMENT, "CameraComponent& " \ + "f(const CameraComponent &in)", + asFUNCTION(assignT<CameraComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind CameraComponent class functions. r = engine->RegisterObjectMethod("CameraComponent", "void bindTargetAndRotation(bool)", asMETHOD(CameraComponent, bindTargetAndRotation), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/components/scene/ImageComponent.cpp =================================================================== --- trunk/src/components/scene/ImageComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/ImageComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -256,6 +256,9 @@ r = engine->RegisterObjectBehaviour("ImageComponent", asBEHAVE_FACTORY, "ImageComponent@ f(Entity @)", asFUNCTION(ImageComponent::refFactory), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("ImageComponent", asBEHAVE_ASSIGNMENT, "ImageComponent& f(const ImageComponent &in)", + asFUNCTION(assignT<ImageComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind ImageComponent class functions. r = engine->RegisterObjectMethod("ImageComponent", "void setAlphaColor(const SColor &in)", asMETHOD(ImageComponent, setAlphaColor), asCALL_THISCALL); assert(r >= 0); @@ -267,7 +270,7 @@ asMETHOD(ImageComponent, setPosition), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("ImageComponent", "void setSourceRect(const recti &in)", asMETHOD(ImageComponent, setSourceRect), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "void setTexture(const string&)", + r = engine->RegisterObjectMethod("ImageComponent", "void setTexture(const string&in)", asMETHODPR(ImageComponent, setTexture, (const std::string&), void), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("ImageComponent", "void setUseAlphaColor(bool)", Modified: trunk/src/components/scene/LightComponent.cpp =================================================================== --- trunk/src/components/scene/LightComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/LightComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -119,6 +119,9 @@ (Entity*, const SColor &color, f32), LightComponent*), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("LightComponent", asBEHAVE_ASSIGNMENT, "LightComponent& f(const LightComponent &in)", + asFUNCTION(assignT<LightComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind LightComponent class functions. r = engine->RegisterObjectMethod("LightComponent", "bool getCastShadow()", asMETHOD(LightComponent, getCastShadow), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/components/scene/MeshComponent.cpp =================================================================== --- trunk/src/components/scene/MeshComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/MeshComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -135,13 +135,16 @@ // Set MeshComponent behaviour. r = engine->RegisterObjectBehaviour("MeshComponent", asBEHAVE_FACTORY, "MeshComponent@ f(Entity @)", asFUNCTIONPR(MeshComponent::refFactory, (Entity*), MeshComponent*), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterObjectBehaviour("MeshComponent", asBEHAVE_FACTORY, "MeshComponent@ f(Entity @, const string&, " \ + r = engine->RegisterObjectBehaviour("MeshComponent", asBEHAVE_FACTORY, "MeshComponent@ f(Entity @, const string &in, " \ "const vector3df &in, const vector3df &in)", asFUNCTIONPR(MeshComponent::refFactory, (Entity*, const std::string&, const vector3df&, const vector3df&), MeshComponent*), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("MeshComponent", asBEHAVE_ASSIGNMENT, "MeshComponent& f(const MeshComponent &in)", + asFUNCTION(assignT<MeshComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind MeshComponent class functions. - r = engine->RegisterObjectMethod("MeshComponent", "void setMesh(const string&)", + r = engine->RegisterObjectMethod("MeshComponent", "void setMesh(const string &in)", asMETHODPR(MeshComponent, setMesh, (const std::string&), void), asCALL_THISCALL); assert(r >= 0); } Modified: trunk/src/components/scene/OctTreeComponent.cpp =================================================================== --- trunk/src/components/scene/OctTreeComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/OctTreeComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -96,9 +96,13 @@ // Set SkyDomeComponent behaviour. r = engine->RegisterObjectBehaviour("OctTreeComponent", asBEHAVE_FACTORY, "OctTreeComponent@ f(Entity @, " \ - "const string &, s32)", + "const string &in, s32)", asFUNCTIONPR(OctTreeComponent::refFactory, (Entity*, const std::string&, s32), OctTreeComponent*), asCALL_CDECL); assert(r >= 0); + + r = engine->RegisterObjectBehaviour("OctTreeComponent", asBEHAVE_ASSIGNMENT, "OctTreeComponent& " \ + "f(const OctTreeComponent &in)", + asFUNCTION(assignT<OctTreeComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } // End of File Modified: trunk/src/components/scene/ParticleSysComponent.cpp =================================================================== --- trunk/src/components/scene/ParticleSysComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/ParticleSysComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -342,6 +342,10 @@ asFUNCTIONPR(ParticleSysComponent::refFactory, (Entity*, const vector3df&, const vector3df&), ParticleSysComponent*), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("ParticleSysComponent", asBEHAVE_ASSIGNMENT, "ParticleSysComponent& " \ + "f(const ParticleSysComponent &in)", + asFUNCTION(assignT<ParticleSysComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind ParticleSysComponent class methods. r = engine->RegisterObjectMethod("ParticleSysComponent", "void addAttractionAffector(const vector3df &in, f32, " \ "bool, bool, bool, bool)", asMETHOD(ParticleSysComponent, addAttractionAffector), @@ -357,7 +361,7 @@ r = engine->RegisterObjectMethod("ParticleSysComponent", "void removeAffectors()", asMETHOD(ParticleSysComponent, removeAffectors), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setAnimatedMeshSceneNodeEmitter(const string &, " \ + r = engine->RegisterObjectMethod("ParticleSysComponent", "void setAnimatedMeshSceneNodeEmitter(const string &in, " \ "bool, const vector3df &in, f32, bool, u32, u32, const SColor &in, " \ "const SColor &in, u32, u32, s32, const dimension2df &in, const dimension2df &in)", asMETHODPR(ParticleSysComponent, setAnimatedMeshSceneNodeEmitter, @@ -373,7 +377,7 @@ "const SColor &in, const SColor &in, u32, u32, s32, const dimension2df &in, " \ "const dimension2df &in)", asMETHOD(ParticleSysComponent, setCylinderEmitter), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ParticleSysComponent", "void setMeshEmitter(const string&, bool, " \ + r = engine->RegisterObjectMethod("ParticleSysComponent", "void setMeshEmitter(const string &in, bool, " \ "const vector3df &in, f32, bool, u32, u32, const SColor &in, const SColor &in, " \ "u32, u32, s32, const dimension2df &in, const dimension2df &in)", asMETHODPR(ParticleSysComponent, setMeshEmitter, (const std::string&, bool, Modified: trunk/src/components/scene/SceneComponent.cpp =================================================================== --- trunk/src/components/scene/SceneComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/SceneComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -373,6 +373,9 @@ r = engine->RegisterObjectBehaviour("SceneComponent", asBEHAVE_FACTORY, "SceneComponent@ f(Entity @)", asFUNCTIONPR(SceneComponent::refFactory, (Entity*), SceneComponent*), asCALL_CDECL); assert(r >= 0); + + r = engine->RegisterObjectBehaviour("SceneComponent", asBEHAVE_ASSIGNMENT, "SceneComponent& f(const SceneComponent &in)", + asFUNCTION(assignT<SceneComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } // End of File Modified: trunk/src/components/scene/SceneComponent.h =================================================================== --- trunk/src/components/scene/SceneComponent.h 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/SceneComponent.h 2009-06-13 19:43:28 UTC (rev 67) @@ -274,7 +274,7 @@ asMETHOD(T, setDebugDataVisible), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod(type, "void setMaterialFlag(E_MATERIAL_FLAG, bool)", asMETHOD(T, setMaterialFlag), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod(type, "void setMaterialTexture(u32, const string &)", + r = engine->RegisterObjectMethod(type, "void setMaterialTexture(u32, const string &in)", asMETHODPR(T, setMaterialTexture, (u32 layer, const std::string &fileName), void), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod(type, "void setMaterialType(E_MATERIAL_TYPE)", Modified: trunk/src/components/scene/SkyBoxComponent.cpp =================================================================== --- trunk/src/components/scene/SkyBoxComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/SkyBoxComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -90,10 +90,14 @@ // Set SkyboxComponent behaviour. r = engine->RegisterObjectBehaviour("SkyBoxComponent", asBEHAVE_FACTORY, "SkyBoxComponent@ f(Entity @, " \ - "const string &, const string &, const string &, const string &, " \ - "const string &, const string &)", + "const string &in, const string &in, const string &in, const string &in, " \ + "const string &in, const string &in)", asFUNCTIONPR(SkyBoxComponent::refFactory, (Entity*, const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, const std::string&), SkyBoxComponent*), asCALL_CDECL); assert(r >= 0); + + r = engine->RegisterObjectBehaviour("SkyBoxComponent", asBEHAVE_ASSIGNMENT, "SkyBoxComponent& " \ + "f(const SkyBoxComponent &in)", + asFUNCTION(assignT<SkyBoxComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } // End of File Modified: trunk/src/components/scene/SkyDomeComponent.cpp =================================================================== --- trunk/src/components/scene/SkyDomeComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/SkyDomeComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -83,9 +83,13 @@ // Set SkyDomeComponent behaviour. r = engine->RegisterObjectBehaviour("SkyDomeComponent", asBEHAVE_FACTORY, "SkyDomeComponent@ f(Entity @, " \ - "const string &, u32, u32, f32, f32, f32)", + "const string &in, u32, u32, f32, f32, f32)", asFUNCTIONPR(SkyDomeComponent::refFactory, (Entity*, const std::string&, u32, u32, f32, f32, f32), SkyDomeComponent*), asCALL_CDECL); assert(r >= 0); + + r = engine->RegisterObjectBehaviour("SkyDomeComponent", asBEHAVE_ASSIGNMENT, "SkyDomeComponent& " \ + "f(const SkyDomeComponent &in)", + asFUNCTION(assignT<SkyDomeComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } // End of File Modified: trunk/src/components/scene/TerrainComponent.cpp =================================================================== --- trunk/src/components/scene/TerrainComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/TerrainComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -153,11 +153,15 @@ asFUNCTIONPR(TerrainComponent::refFactory, (Entity*), TerrainComponent*), asCALL_CDECL); assert(r >= 0); r = engine->RegisterObjectBehaviour("TerrainComponent", asBEHAVE_FACTORY, "TerrainComponent@ f(Entity @, " \ - "const string &, const vector3df &in, const vector3df &in," \ + "const string &in, const vector3df &in, const vector3df &in," \ "const SColor &in, s32, s32)", asFUNCTIONPR(TerrainComponent::refFactory, (Entity*, const std::string &, const vector3df &, const vector3df &, const SColor &, s32, s32), TerrainComponent*), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("TerrainComponent", asBEHAVE_ASSIGNMENT, "TerrainComponent& " \ + "f(const TerrainComponent &in)", + asFUNCTION(assignT<TerrainComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind TerrainComponent class functions. r = engine->RegisterObjectMethod("TerrainComponent", "const aabbox3df& getBoundingBox(s32, s32)", asMETHODPR(TerrainComponent, getBoundingBox, (s32, s32) const, const aabbox3df&), @@ -166,7 +170,7 @@ asMETHOD(TerrainComponent, getHeight), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("TerrainComponent", "const vector3df& getTerrainCenter()", asMETHOD(TerrainComponent, getTerrainCenter), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("TerrainComponent", "bool loadHeightMap(const string &, const SColor &in, s32)", + r = engine->RegisterObjectMethod("TerrainComponent", "bool loadHeightMap(const string &in, const SColor &in, s32)", asMETHOD(TerrainComponent, loadHeightMap), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("TerrainComponent", "void scaleTexture(f32, f32)", asMETHOD(TerrainComponent, scaleTexture), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/components/scene/TextBillboardComponent.cpp =================================================================== --- trunk/src/components/scene/TextBillboardComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/scene/TextBillboardComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -153,14 +153,18 @@ asFUNCTIONPR(TextBillboardComponent::refFactory, (Entity*), TextBillboardComponent*), asCALL_CDECL); assert(r >= 0); r = engine->RegisterObjectBehaviour("TextBillboardComponent", asBEHAVE_FACTORY, "TextBillboardComponent@ f(Entity @, " \ - "const string &, const string &, const dimension2df &in, const SColor &in, " \ + "const string &in, const string &in, const dimension2df &in, const SColor &in, " \ "const SColor &in)", asFUNCTIONPR(TextBillboardComponent::refFactory, (Entity*, const std::string&, const std::string&, const dimension2df&, const SColor&, const SColor&), TextBillboardComponent*), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("TextBillboardComponent", asBEHAVE_ASSIGNMENT, "TextBillboardComponent& " \ + "f(const TextBillboardComponent &in)", + asFUNCTION(assignT<TextBillboardComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind TextBillboardComponent class functions. - r = engine->RegisterObjectMethod("TextBillboardComponent", "void setText(const string &)", + r = engine->RegisterObjectMethod("TextBillboardComponent", "void setText(const string &in)", asMETHODPR(TextBillboardComponent, setText, (const std::string&), void), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("TextBillboardComponent", "void setTextColor(const SColor &in)", Modified: trunk/src/components/sound/SoundListenerComponent.cpp =================================================================== --- trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -150,6 +150,10 @@ r = engine->RegisterObjectBehaviour("SoundListenerComponent", asBEHAVE_FACTORY, "SoundListenerComponent@ f(Entity @, bool)", asFUNCTION(SoundListenerComponent::refFactory), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("SoundListenerComponent", asBEHAVE_ASSIGNMENT, "SoundListenerComponent& " \ + "f(const SoundListenerComponent &in)", + asFUNCTION(assignT<SoundListenerComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind SoundListenerComponent class functions. r = engine->RegisterObjectMethod("SoundListenerComponent", "bool getIsMainListener()", asMETHOD(SoundListenerComponent, getIsMainListener), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/components/sound/SoundSourceComponent.cpp =================================================================== --- trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -402,10 +402,14 @@ r = engine->RegisterObjectBehaviour("SoundSourceComponent", asBEHAVE_FACTORY, "SoundSourceComponent@ f(Entity @)", asFUNCTION(SoundSourceComponent::refFactory), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("SoundSourceComponent", asBEHAVE_ASSIGNMENT, "SoundSourceComponent& " \ + "f(const SoundSourceComponent &in)", + asFUNCTION(assignT<SoundSourceComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind SoundSourceComponent class functions. - r = engine->RegisterObjectMethod("SoundSourceComponent", "bool loadMusic(const string &)", + r = engine->RegisterObjectMethod("SoundSourceComponent", "bool loadMusic(const string &in)", asMETHOD(SoundSourceComponent, loadMusic), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("SoundSourceComponent", "bool loadSoundBuffer(const string &)", + r = engine->RegisterObjectMethod("SoundSourceComponent", "bool loadSoundBuffer(const string &in)", asMETHOD(SoundSourceComponent, loadSoundBuffer), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("SoundSourceComponent", "void play()", Modified: trunk/src/core/DataStack.cpp =================================================================== --- trunk/src/core/DataStack.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/core/DataStack.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -340,14 +340,14 @@ // Binds DataStack::setVar<T> ss.str(""); - ss << "bool set_" << asType << "(const string&, const " << asType << ")"; + ss << "bool set_" << asType << "(const string &in, const " << asType << ")"; r = engine->RegisterObjectMethod("DataStack", ss.str().c_str(), asMETHODPR(DataStack, setVar<T>, (const std::string&, const T&), bool), - asCALL_THISCALL); assert(r >= 0); + asCALL_THISCALL); // Binds DataStack::getVar<T> ss.str(""); - ss << asType << " get_" << asType << "(const string&)"; + ss << asType << " get_" << asType << "(const string &in)"; r = engine->RegisterObjectMethod("DataStack", ss.str().c_str(), asMETHODPR(DataStack, getVar<T>, (const std::string&), T), asCALL_THISCALL); assert(r >= 0); @@ -362,13 +362,16 @@ r = engine->RegisterObjectType("DataStack", sizeof(DataStack), asOBJ_REF); assert(r >= 0); // Set DataStack behaviour. - r = engine->RegisterObjectBehaviour("DataStack", asBEHAVE_FACTORY, "DataStack@ f(const string &)", + r = engine->RegisterObjectBehaviour("DataStack", asBEHAVE_FACTORY, "DataStack@ f(const string &in)", asFUNCTION(DataStack::refFactory), asCALL_CDECL); assert(r >= 0); r = engine->RegisterObjectBehaviour("DataStack", asBEHAVE_ADDREF, "void f()", asMETHOD(DataStack, refAdd), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectBehaviour("DataStack", asBEHAVE_RELEASE, "void f()", asMETHOD(DataStack, refRelease), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("DataStack", asBEHAVE_ASSIGNMENT, "DataStack& f(const DataStack &in)", + asFUNCTION(assignT<DataStack>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind DataStack class functions. r = engine->RegisterObjectMethod("DataStack", "void init()", asMETHOD(DataStack, init), asCALL_THISCALL); assert(r >= 0); @@ -381,7 +384,6 @@ asMETHOD(DataStack, getName), asCALL_THISCALL); assert(r >= 0); // Bind DataStack::setVar<T> and DataStack::getVar<T> - bindSetGetVar<s32>(engine, "s32"); bindSetGetVar<c8>(engine, "c8"); bindSetGetVar<f32>(engine, "f32"); bindSetGetVar<f64>(engine, "f64"); @@ -394,17 +396,17 @@ r = engine->RegisterObjectMethod("DataStack", "void removeAll()", asMETHOD(DataStack, removeAll), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("DataStack", "bool removeVar(const string &)", + r = engine->RegisterObjectMethod("DataStack", "bool removeVar(const string &in)", asMETHOD(DataStack, removeVar), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("DataStack", "bool saveBencode(const string &)", + r = engine->RegisterObjectMethod("DataStack", "bool saveBencode(const string &in)", asMETHOD(DataStack, saveBencode), asCALL_THISCALL);assert(r >= 0); - r = engine->RegisterObjectMethod("DataStack", "bool loadBencode(const string &)", + r = engine->RegisterObjectMethod("DataStack", "bool loadBencode(const string &in)", asMETHOD(DataStack, loadBencode), asCALL_THISCALL);assert(r >= 0); - r = engine->RegisterObjectMethod("DataStack", "bool saveXML(const string &)", + r = engine->RegisterObjectMethod("DataStack", "bool saveXML(const string &in)", asMETHOD(DataStack, saveXML), asCALL_THISCALL);assert(r >= 0); - r = engine->RegisterObjectMethod("DataStack", "bool loadXML(const string &)", + r = engine->RegisterObjectMethod("DataStack", "bool loadXML(const string &in)", asMETHOD(DataStack, loadXML), asCALL_THISCALL);assert(r >= 0); } Modified: trunk/src/core/DataStore.cpp =================================================================== --- trunk/src/core/DataStore.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/core/DataStore.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -214,13 +214,13 @@ r = engine->RegisterObjectMethod("DataStore", "bool addDataStack(DataStack @)", asMETHOD(DataStore, addDataStack), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("DataStore", "DataStack@ createDataStack(const string &)", + r = engine->RegisterObjectMethod("DataStore", "DataStack@ createDataStack(const string &in)", asMETHOD(DataStore, createDataStack), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("DataStore", "DataStack@ getDataStack(const u32)", asMETHODPR(DataStore, getDataStack, (const u32), DataStack*), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("DataStore", "DataStack@ getDataStack(const string &)", + r = engine->RegisterObjectMethod("DataStore", "DataStack@ getDataStack(const string &in)", asMETHODPR(DataStore, getDataStack, (const std::string &), DataStack*), asCALL_THISCALL); assert(r >= 0); @@ -232,7 +232,7 @@ r = engine->RegisterObjectMethod("DataStore", "bool removeDataStack(const u32)", asMETHODPR(DataStore, removeDataStack, (const u32), bool), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("DataStore", "bool removeDataStack(const string &)", + r = engine->RegisterObjectMethod("DataStore", "bool removeDataStack(const string &in)", asMETHODPR(DataStore, removeDataStack, (const std::string &), bool), asCALL_THISCALL); assert(r >= 0); } Modified: trunk/src/core/Entity.cpp =================================================================== --- trunk/src/core/Entity.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/core/Entity.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -439,13 +439,16 @@ r = engine->RegisterObjectType("EntityComponent", sizeof(EntityComponent), asOBJ_REF); // Set Entity behaviour. - r = engine->RegisterObjectBehaviour("Entity", asBEHAVE_FACTORY, "Entity@ f(const string &)", + r = engine->RegisterObjectBehaviour("Entity", asBEHAVE_FACTORY, "Entity@ f(const string &in)", asFUNCTION(Entity::refFactory), asCALL_CDECL); assert(r >= 0); r = engine->RegisterObjectBehaviour("Entity", asBEHAVE_ADDREF, "void f()", asMETHOD(Entity, refAdd), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectBehaviour("Entity", asBEHAVE_RELEASE, "void f()", asMETHOD(Entity, refRelease), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("Entity", asBEHAVE_ASSIGNMENT, "Entity& f(const Entity &in)", + asFUNCTION(assignT<Entity>), asCALL_CDECL_OBJLAST); assert(r >= 0); + // Bind Entity class functions. r = engine->RegisterObjectMethod("Entity", "u32 getID()", asMETHOD(Entity, getID), asCALL_THISCALL); assert(r >= 0); @@ -458,13 +461,13 @@ r = engine->RegisterObjectMethod("Entity", "Entity@ getChild(const u32)", asMETHODPR(Entity, getChild, (const u32), Entity*), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("Entity", "Entity@ getChild(const string &)", + r = engine->RegisterObjectMethod("Entity", "Entity@ getChild(const string &in)", asMETHODPR(Entity, getChild, (const std::string &), Entity*), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("Entity", "EntityComponent@ getComponent(const u32)", asMETHODPR(Entity, getComponent, (const u32), EntityComponent*), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("Entity", "EntityComponent@ getComponent(const string &)", + r = engine->RegisterObjectMethod("Entity", "EntityComponent@ getComponent(const string &in)", asMETHODPR(Entity, getComponent, (const std::string &), EntityComponent*), asCALL_THISCALL); assert(r >= 0); @@ -481,7 +484,7 @@ r = engine->RegisterObjectMethod("Entity", "bool removeChild(const u32)", asMETHODPR(Entity, removeChild, (const u32), bool), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("Entity", "bool removeChild(const string &)", + r = engine->RegisterObjectMethod("Entity", "bool removeChild(const string &in)", asMETHODPR(Entity, removeChild, (const std::string&), bool), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("Entity", "bool removeComponent(EntityComponent @)", @@ -490,7 +493,7 @@ r = engine->RegisterObjectMethod("Entity", "bool removeComponent(const u32)", asMETHODPR(Entity, removeComponent, (const u32), bool), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("Entity", "bool removeComponent(const string &)", + r = engine->RegisterObjectMethod("Entity", "bool removeComponent(const string &in)", asMETHODPR(Entity, removeComponent, (const std::string&), bool), asCALL_THISCALL); assert(r >= 0); } Modified: trunk/src/core/EntityComponent.cpp =================================================================== --- trunk/src/core/EntityComponent.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/core/EntityComponent.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -114,6 +114,9 @@ // Set EntityComponent behaviour. r = engine->RegisterObjectBehaviour("EntityComponent", asBEHAVE_FACTORY, "EntityComponent@ f(Entity @)", asFUNCTION(EntityComponent::refFactory), asCALL_CDECL); assert(r >= 0); + + r = engine->RegisterObjectBehaviour("EntityComponent", asBEHAVE_ASSIGNMENT, "EntityComponent& f(const EntityComponent &in)", + asFUNCTION(assignT<EntityComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0); } // End of File Modified: trunk/src/core/EntityComponent.h =================================================================== --- trunk/src/core/EntityComponent.h 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/core/EntityComponent.h 2009-06-13 19:43:28 UTC (rev 67) @@ -19,7 +19,7 @@ // Include files #include "../dependencies.h" #include "Entity.h" -#include "../scripting/ScriptManager.h" +#include "../scripting/ScriptHelper.h" // Forward declarations class Entity; @@ -107,7 +107,7 @@ r = engine->RegisterObjectMethod(type, "u32 getID()", asMETHOD(T, getID), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod(type, "void setName(const string &)", + r = engine->RegisterObjectMethod(type, "void setName(const string &in)", asMETHOD(T, setName), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod(type, "const string& getName()", asMETHOD(T, getName), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/core/EntityManager.cpp =================================================================== --- trunk/src/core/EntityManager.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/core/EntityManager.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -214,15 +214,15 @@ r = engine->RegisterObjectMethod("EntityManager", "bool addEntity(Entity @)", asMETHOD(EntityManager, addEntity), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntity(const string &)", + r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntity(const string &in)", asMETHOD(EntityManager, createEntity), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntity(const string &, Entity @)", + r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntity(const string &in, Entity @)", asMETHOD(EntityManager, createEntity), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("EntityManager", "Entity@ getEntity(const u32)", asMETHODPR(EntityManager, getEntity, (const u32), Entity*), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EntityManager", "Entity@ getEntity(const string &)", + r = engine->RegisterObjectMethod("EntityManager", "Entity@ getEntity(const string &in)", asMETHODPR(EntityManager, getEntity, (const std::string &), Entity*), asCALL_THISCALL); assert(r >= 0); @@ -234,7 +234,7 @@ r = engine->RegisterObjectMethod("EntityManager", "bool removeEntity(const u32)", asMETHODPR(EntityManager, removeEntity, (const u32), bool), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EntityManager", "bool removeEntity(const string &)", + r = engine->RegisterObjectMethod("EntityManager", "bool removeEntity(const string &in)", asMETHODPR(EntityManager, removeEntity, (const std::string &), bool), asCALL_THISCALL); assert(r >= 0); } Modified: trunk/src/core/EventManager.cpp =================================================================== --- trunk/src/core/EventManager.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/core/EventManager.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -490,9 +490,9 @@ r = engine->RegisterObjectMethod("EventManager", "void clear()", asMETHOD(EventManager, clear), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EventManager", "bool createEventGroup(const string &)", + r = engine->RegisterObjectMethod("EventManager", "bool createEventGroup(const string &in)", asMETHOD(EventManager, createEventGroup), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EventManager", "bool createEventSlot(const string &, const string &)", + r = engine->RegisterObjectMethod("EventManager", "bool createEventSlot(const string &in, const string &in)", asMETHOD(EventManager, createEventSlot), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("EventManager", "bool getIsKeyDown(EKEY_CODE)", @@ -511,11 +511,11 @@ r = engine->RegisterObjectMethod("EventManager", "void removeAllEventGroups()", asMETHOD(EventManager, removeAllEventGroups), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EventManager", "bool removeAllEventSlots(const string &)", + r = engine->RegisterObjectMethod("EventManager", "bool removeAllEventSlots(const string &in)", asMETHOD(EventManager, removeAllEventSlots), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EventManager", "bool removeEventGroup(const string &)", + r = engine->RegisterObjectMethod("EventManager", "bool removeEventGroup(const string &in)", asMETHOD(EventManager, removeEventGroup), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EventManager", "bool removeEventSlot(const string &, const string &)", + r = engine->RegisterObjectMethod("EventManager", "bool removeEventSlot(const string &in, const string &in)", asMETHOD(EventManager, removeEventSlot), asCALL_THISCALL); assert(r >= 0); } Modified: trunk/src/core/GameManager.cpp =================================================================== --- trunk/src/core/GameManager.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/core/GameManager.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -96,12 +96,12 @@ { pDriver->beginScene(); + mGameStates.back()->render(); + mGameStates.back()->onRender(); + pSceneManager->drawAll(); pGUIEnvironment->drawAll(); - mGameStates.back()->onRender(); - mGameStates.back()->render(); - pDriver->endScene(); } } Modified: trunk/src/core/GameState.cpp =================================================================== --- trunk/src/core/GameState.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/core/GameState.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -16,6 +16,7 @@ // Include files #include "GameState.h" +#include "../scripting/ScriptHelper.h" // GameState class @@ -24,6 +25,7 @@ // Constructer of the GameState class. GameState::GameState() +: mRefCount(1) { mID = mIDCount++; @@ -206,6 +208,9 @@ r = engine->RegisterObjectBehaviour("GameState", asBEHAVE_RELEASE, "void f()", asMETHOD(GameState, refRelease), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("GameState", asBEHAVE_ASSIGNMENT, "GameState& f(const GameState &in)", + asFUNCTION(assignT<GameState>), asCALL_CDECL_OBJFIRST); assert(r >= 0); + // Bind GameState class functions. r = engine->RegisterObjectMethod("GameState", "void init()", asMETHOD(GameState, init), asCALL_THISCALL); assert(r >= 0); @@ -230,15 +235,15 @@ r = engine->RegisterInterfaceMethod("IGameState", "const Entity@ getBaseEntity()"); // Define the class for inheritance. - std::string decl = "CGameState : IGameState\n" + std::string decl = "class CGameState : IGameState\n" "{\n" " GameState _inner;\n" - " Entity @mBaseEntity\n;" + " Entity @mBaseEntity;\n" "\n" - " CGameState::CGameState()\n" + " CGameState()\n" " {\n" - " _inner = GameState();\n" - " mBaseEntity = _inner.getBaseEntity();\n" + " this._inner = GameState();\n" + " this.mBaseEntity = this._inner.getBaseEntity();\n" " }\n" "\n" " void init() {}\n" @@ -246,7 +251,7 @@ " void update() {}\n" " void render() {}\n" "\n" - " const Entity@ getBaseEntity() { return _inner.getBaseEntity(); }\n" + " const Entity@ getBaseEntity() { return this._inner.getBaseEntity(); }\n" "}\n"; GameManager::Instance()->getScriptManager()->addScriptSection("CGameState", decl); Modified: trunk/src/scripting/Script.cpp =================================================================== --- trunk/src/scripting/Script.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/scripting/Script.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -198,7 +198,7 @@ r = engine->RegisterObjectType("Script", sizeof(Script), asOBJ_REF); assert(r >= 0); // Set DataStack behaviour. - r = engine->RegisterObjectBehaviour("Script", asBEHAVE_FACTORY, "Script@ f(const string &)", + r = engine->RegisterObjectBehaviour("Script", asBEHAVE_FACTORY, "Script@ f(const string &in)", asFUNCTION(Script::refFactory), asCALL_CDECL); assert(r >= 0); r = engine->RegisterObjectBehaviour("Script", asBEHAVE_ADDREF, "void f()", asMETHOD(Script, refAdd), asCALL_THISCALL); assert(r >= 0); @@ -211,12 +211,12 @@ r = engine->RegisterObjectMethod("Script", "const string& getName()", asMETHOD(Script, getName), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("Script", "bool loadScript(const string &)", + r = engine->RegisterObjectMethod("Script", "bool loadScript(const string &in)", asMETHOD(Script, loadScript), asCALL_THISCALL);assert(r >= 0); r = engine->RegisterObjectMethod("Script", "bool unloadScript()", asMETHOD(Script, unloadScript), asCALL_THISCALL);assert(r >= 0); - r = engine->RegisterObjectMethod("Script", "bool executeFunctionByName(const string &, const string &)", + r = engine->RegisterObjectMethod("Script", "bool executeFunctionByName(const string &in, const string &in)", asMETHOD(Script, loadScript), asCALL_THISCALL);assert(r >= 0); } Added: trunk/src/scripting/ScriptHelper.h =================================================================== --- trunk/src/scripting/ScriptHelper.h (rev 0) +++ trunk/src/scripting/ScriptHelper.h 2009-06-13 19:43:28 UTC (rev 67) @@ -0,0 +1,46 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asScriptHelper.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Contains various convenience functions which can be used +// for binding to AngelScript. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __SCRIPTHELPER_H__ +#define __SCRIPTHELPER_H__ + +//! Global function for assigning objects. +template<typename T> +T& assignT(const T ©) +{ + T *t = new T(copy); + return *t; +} + +//! Global function for AngelScript's ref casting. +//! @author Andreas Jönsson (AngelScript's author) +template<typename A, typename B> +B* asRefCast(A* a) +{ + // If the handle already is a null handle, then just return the null handle + if( !a ) return 0; + + // Now try to dynamically cast the pointer to the wanted type + B* b = dynamic_cast<B*>(a); + if( b == 0 ) + { + // Since the cast couldn't be made, we need to release the handle we received + a->refRelease(); + } + return b; +} + +#endif Modified: trunk/src/scripting/ScriptManager.cpp =================================================================== --- trunk/src/scripting/ScriptManager.cpp 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/scripting/ScriptManager.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -16,7 +16,10 @@ // Include files #include "ScriptManager.h" + +#include "angelscript/scriptstdstring.h" // Standard Angelscript add-on. #include "irrlicht/asIrrlicht.h" + #include "../core/GameManager.h" @@ -37,7 +40,7 @@ // Initialise the AngelScript engine. pEngine = asCreateScriptEngine(ANGELSCRIPT_VERSION); - RegisterScriptString(pEngine); + RegisterStdString(pEngine); pEngine->SetMessageCallback(asFUNCTION(MessageCallback), 0, asCALL_CDECL); // Register typedefs. @@ -328,15 +331,15 @@ r = engine->RegisterObjectMethod("ScriptManager", "bool addScript(Script @)", asMETHOD(ScriptManager, addScript), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScript(const string &)", + r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScript(const string &in)", asMETHOD(ScriptManager, createScript), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScriptFromFile(const string &)", + r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScriptFromFile(const string &in)", asMETHOD(ScriptManager, createScriptFromFile), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("ScriptManager", "Script@ getScript(const u32)", asMETHODPR(ScriptManager, getScript, (const u32), Script*), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ScriptManager", "Script@ getScript(const string &)", + r = engine->RegisterObjectMethod("ScriptManager", "Script@ getScript(const string &in)", asMETHODPR(ScriptManager, getScript, (const std::string &), Script*), asCALL_THISCALL); assert(r >= 0); @@ -348,7 +351,7 @@ r = engine->RegisterObjectMethod("ScriptManager", "bool removeScript(const u32)", asMETHODPR(ScriptManager, removeScript, (const u32), bool), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ScriptManager", "bool removeScript(const string &)", + r = engine->RegisterObjectMethod("ScriptManager", "bool removeScript(const string &in)", asMETHODPR(ScriptManager, removeScript, (const std::string &), bool), asCALL_THISCALL); assert(r >= 0); } Modified: trunk/src/scripting/ScriptManager.h =================================================================== --- trunk/src/scripting/ScriptManager.h 2009-06-08 14:22:21 UTC (rev 66) +++ trunk/src/scripting/ScriptManager.h 2009-06-13 19:43:28 UTC (rev 67) @@ -18,8 +18,6 @@ // Include files #include "../dependencies.h" -#include "scriptstring.h" // Standard Angelscript add-on. - #include "Script.h" // Forward declarations. @@ -128,23 +126,4 @@ //! Implements a message callback function for AngelScript. extern void MessageCallback(const asSMessageInfo *msg, void *param); -//! Global function for AngelScript's ref casting. -//! @author Andreas Jönsson (AngelScript's author) -template<typename A, typename B> -B* asRefCast(A* a) -{ - // If the handle already is a null handle, then just return the null handle - if( !a ) return 0; - - // Now try to dynamically cast the pointer to the wanted type - B* b = dynamic_cast<B*>(a); - if( b == 0 ) - { - // Since the cast couldn't be made, we need to release the handle we received - a->refRelease(); - } - return b; -} - - #endif Added: trunk/src/scripting/angelscript/scriptstdstring.cpp =================================================================== --- trunk/src/scripting/angelscript/scriptstdstring.cpp (rev 0) +++ trunk/src/scripting/angelscript/scriptstdstring.cpp 2009-06-13 19:43:28 UTC (rev 67) @@ -0,0 +1,469 @@ +#include <assert.h> +#include <sstream> +#include "scriptstdstring.h" +#include <string.h> // strstr + +using namespace std; + +BEGIN_AS_N... [truncated message content] |
From: <zcc...@us...> - 2009-06-08 14:22:25
|
Revision: 66 http://sirrf.svn.sourceforge.net/sirrf/?rev=66&view=rev Author: zccdark203 Date: 2009-06-08 14:22:21 +0000 (Mon, 08 Jun 2009) Log Message: ----------- Sirrf v0.1.0 has been released Added Paths: ----------- tags/0.x/ tags/0.x/0.1.x/ tags/0.x/0.1.x/0.1.0/ tags/0.x/0.1.x/0.1.0/CONTRIBUTORS tags/0.x/0.1.x/0.1.0/README tags/0.x/0.1.x/0.1.0/bin/ tags/0.x/0.1.x/0.1.0/build/ tags/0.x/0.1.x/0.1.0/build/CMake/ tags/0.x/0.1.x/0.1.0/build/CMake/CMakeLists.txt tags/0.x/0.1.x/0.1.0/build/CodeBlocks/ tags/0.x/0.1.x/0.1.0/build/CodeBlocks/sirrf.cbp tags/0.x/0.1.x/0.1.0/docs/ tags/0.x/0.1.x/0.1.0/docs/docs/ tags/0.x/0.1.x/0.1.0/docs/docs/mainpage.txt tags/0.x/0.1.x/0.1.0/docs/doxyfile tags/0.x/0.1.x/0.1.0/share/ tags/0.x/0.1.x/0.1.0/src/ tags/0.x/0.1.x/0.1.0/src/components/ tags/0.x/0.1.x/0.1.0/src/components/components.cpp tags/0.x/0.1.x/0.1.0/src/components/components.h tags/0.x/0.1.x/0.1.0/src/components/scene/ tags/0.x/0.1.x/0.1.0/src/components/scene/AnimatedMeshComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/AnimatedMeshComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/BillboardComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/BillboardComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/CameraComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/CameraComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/ImageComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/ImageComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/LightComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/LightComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/MeshComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/MeshComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/OctTreeComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/OctTreeComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/ParticleSysComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/ParticleSysComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/SceneComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/SceneComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/SkyBoxComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/SkyBoxComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/SkyDomeComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/SkyDomeComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/TerrainComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/TerrainComponent.h tags/0.x/0.1.x/0.1.0/src/components/scene/TextBillboardComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/scene/TextBillboardComponent.h tags/0.x/0.1.x/0.1.0/src/components/sound/ tags/0.x/0.1.x/0.1.0/src/components/sound/SoundListenerComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/sound/SoundListenerComponent.h tags/0.x/0.1.x/0.1.0/src/components/sound/SoundSourceComponent.cpp tags/0.x/0.1.x/0.1.0/src/components/sound/SoundSourceComponent.h tags/0.x/0.1.x/0.1.0/src/core/ tags/0.x/0.1.x/0.1.0/src/core/DataStack.cpp tags/0.x/0.1.x/0.1.0/src/core/DataStack.h tags/0.x/0.1.x/0.1.0/src/core/DataStore.cpp tags/0.x/0.1.x/0.1.0/src/core/DataStore.h tags/0.x/0.1.x/0.1.0/src/core/Entity.cpp tags/0.x/0.1.x/0.1.0/src/core/Entity.h tags/0.x/0.1.x/0.1.0/src/core/EntityComponent.cpp tags/0.x/0.1.x/0.1.0/src/core/EntityComponent.h tags/0.x/0.1.x/0.1.0/src/core/EntityManager.cpp tags/0.x/0.1.x/0.1.0/src/core/EntityManager.h tags/0.x/0.1.x/0.1.0/src/core/EventManager.cpp tags/0.x/0.1.x/0.1.0/src/core/EventManager.h tags/0.x/0.1.x/0.1.0/src/core/GameManager.cpp tags/0.x/0.1.x/0.1.0/src/core/GameManager.h tags/0.x/0.1.x/0.1.0/src/core/GameState.cpp tags/0.x/0.1.x/0.1.0/src/core/GameState.h tags/0.x/0.1.x/0.1.0/src/dependencies.h tags/0.x/0.1.x/0.1.0/src/game/ tags/0.x/0.1.x/0.1.0/src/game/readme.txt tags/0.x/0.1.x/0.1.0/src/main.cpp tags/0.x/0.1.x/0.1.0/src/scripting/ tags/0.x/0.1.x/0.1.0/src/scripting/Script.cpp tags/0.x/0.1.x/0.1.0/src/scripting/Script.h tags/0.x/0.1.x/0.1.0/src/scripting/ScriptManager.cpp tags/0.x/0.1.x/0.1.0/src/scripting/ScriptManager.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/ tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asAabbox3d.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asAabbox3d.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asDimension2d.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asDimension2d.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asIrrHelper.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asIrrlicht.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asIrrlicht.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asLine2d.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asLine2d.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asLine3d.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asLine3d.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asMatrix4.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asMatrix4.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asRect.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asRect.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asSColor.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asSColor.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asVector2d.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asVector2d.h tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asVector3d.cpp tags/0.x/0.1.x/0.1.0/src/scripting/irrlicht/asVector3d.h tags/0.x/0.1.x/0.1.0/src/scripting/scriptstring.cpp tags/0.x/0.1.x/0.1.0/src/scripting/scriptstring.h tags/0.x/0.1.x/0.1.0/src/scripting/scriptstring_utils.cpp tags/0.x/0.1.x/0.1.0/src/sound/ tags/0.x/0.1.x/0.1.0/src/sound/SoundManager.cpp tags/0.x/0.1.x/0.1.0/src/sound/SoundManager.h tags/0.x/0.1.x/0.1.0/src/vendor/ tags/0.x/0.1.x/0.1.0/src/vendor/sigslot/ tags/0.x/0.1.x/0.1.0/src/vendor/sigslot/sigslot.h Added: tags/0.x/0.1.x/0.1.0/CONTRIBUTORS =================================================================== --- tags/0.x/0.1.x/0.1.0/CONTRIBUTORS (rev 0) +++ tags/0.x/0.1.x/0.1.0/CONTRIBUTORS 2009-06-08 14:22:21 UTC (rev 66) @@ -0,0 +1,8 @@ +========================================================================== +Sirrf version 0.1.0 - Contributors +========================================================================== + + Please also note contributors who have contributed to the framework: + + FuzzYspo0N - Made various small bug-fixes in order to + let Sirrf run on the Windows platform; Added: tags/0.x/0.1.x/0.1.0/README =================================================================== --- tags/0.x/0.1.x/0.1.0/README (rev 0) +++ tags/0.x/0.1.x/0.1.0/README 2009-06-08 14:22:21 UTC (rev 66) @@ -0,0 +1,76 @@ +========================================================================== +Sirrf version 0.1.0 - Readme +========================================================================== + + Content of this file: + + 1. Directory Structure Overview + 2. How To Start + 3. License + 4. Contact + + +========================================================================== +1. Directory Structure Overview +========================================================================== + + After uncompressing the archive you'll find the following directories: + + /bin Binaries build with the provided build files will be + put in this directory. + /build Contains build files for various build systems and + IDEs. + /CMake CMake build files. + /CodeBlocks Code::Blocks project files. + /docs Documentation of Sirrf. + /share Put here the resources (i.e. models) your game uses. + /src The source code of Sirrf. + + +========================================================================== +2. Getting Started +========================================================================== + + See the following tutorial on Sirrf's development hub: + http://apps.sf.net/trac/sirrf/wiki/Tutorials/v0.1.0/GettingStarted + + +========================================================================== +3. License +========================================================================== + + Copyright (c) 2009 Michael Bartsch and Contributors + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + +========================================================================== +4. Contact +========================================================================== + + If you have problems, questions or suggestions, please visit the + official homepage of Sirrf: + + http://sourceforge.net/projects/sirrf + + If you want to contact the team, please send an email to Michael Bartsch: + + zcc...@us... + Added: tags/0.x/0.1.x/0.1.0/build/CMake/CMakeLists.txt =================================================================== --- tags/0.x/0.1.x/0.1.0/build/CMake/CMakeLists.txt (rev 0) +++ tags/0.x/0.1.x/0.1.0/build/CMake/CMakeLists.txt 2009-06-08 14:22:21 UTC (rev 66) @@ -0,0 +1,131 @@ +# CMake required minimum version. +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +# Project +PROJECT(SIRRF) +SET(PROJECT_NAME sirrf) + +# Define source files. +SET(SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../src/) + +SET(SOURCES + # /src + ${SOURCE_DIR}main.cpp + + # src/components + ${SOURCE_DIR}components/components.cpp + # src/components/scene + ${SOURCE_DIR}components/scene/AnimatedMeshComponent.cpp + ${SOURCE_DIR}components/scene/BillboardComponent.cpp + ${SOURCE_DIR}components/scene/CameraComponent.cpp + ${SOURCE_DIR}components/scene/ImageComponent.cpp + ${SOURCE_DIR}components/scene/LightComponent.cpp + ${SOURCE_DIR}components/scene/MeshComponent.cpp + ${SOURCE_DIR}components/scene/OctTreeComponent.cpp + ${SOURCE_DIR}components/scene/ParticleSysComponent.cpp + ${SOURCE_DIR}components/scene/SceneComponent.cpp + ${SOURCE_DIR}components/scene/SkyBoxComponent.cpp + ${SOURCE_DIR}components/scene/SkyDomeComponent.cpp + ${SOURCE_DIR}components/scene/TerrainComponent.cpp + ${SOURCE_DIR}components/scene/TextBillboardComponent.cpp + # src/components/sound + ${SOURCE_DIR}components/sound/SoundListenerComponent.cpp + ${SOURCE_DIR}components/sound/SoundSourceComponent.cpp + + # /src/core + ${SOURCE_DIR}core/DataStack.cpp + ${SOURCE_DIR}core/DataStore.cpp + ${SOURCE_DIR}core/Entity.cpp + ${SOURCE_DIR}core/EntityComponent.cpp + ${SOURCE_DIR}core/EntityManager.cpp + ${SOURCE_DIR}core/EventManager.cpp + ${SOURCE_DIR}core/GameManager.cpp + ${SOURCE_DIR}core/GameState.cpp + + # /src/game + # Define here your own source files. + + # /src/scripting + ${SOURCE_DIR}scripting/Script.cpp + ${SOURCE_DIR}scripting/ScriptManager.cpp + ${SOURCE_DIR}scripting/scriptstring.cpp + ${SOURCE_DIR}scripting/scriptstring_utils.cpp + + # /src/scripting/irrlicht + ${SOURCE_DIR}scripting/irrlicht/asAabbox3d.cpp + ${SOURCE_DIR}scripting/irrlicht/asDimension2d.cpp + ${SOURCE_DIR}scripting/irrlicht/asIrrlicht.cpp + ${SOURCE_DIR}scripting/irrlicht/asLine2d.cpp + ${SOURCE_DIR}scripting/irrlicht/asLine3d.cpp + ${SOURCE_DIR}scripting/irrlicht/asMatrix4.cpp + ${SOURCE_DIR}scripting/irrlicht/asRect.cpp + ${SOURCE_DIR}scripting/irrlicht/asSColor.cpp + ${SOURCE_DIR}scripting/irrlicht/asVector2d.cpp + ${SOURCE_DIR}scripting/irrlicht/asVector3d.cpp + + # /src/sound + ${SOURCE_DIR}sound/SoundManager.cpp + ) + +MESSAGE("${SOURCES}") + +# Define include directories for third-party libraries. +SET(INCLUDE_DIRS + ${SOURCE_DIR}vendor + $ENV{PATH} + # Change the following lines to set the right include directories. + /usr/local/include/irrlicht + /usr/local/include/SFML + ) + +INCLUDE_DIRECTORIES(${INCLUDE_DIRS}) + +# Define library directories for third-party libraries. +SET(LIB_DIRS + $ENV{PATH} + ) + +LINK_DIRECTORIES(${LIB_DIRS}) + +# Define libraries with which we have to link. +IF(UNIX) + IF(APPLE) + ELSE(APPLE) + FIND_LIBRARY(LIB_GL GL REQUIRED) + FIND_LIBRARY(LIB_XXF86VM Xxf86vm REQUIRED) + FIND_LIBRARY(LIB_XEXT Xext REQUIRED) + FIND_LIBRARY(LIB_X11 X11 REQUIRED) + ENDIF(APPLE) +ENDIF(UNIX) + +FIND_LIBRARY(LIB_IRR Irrlicht REQUIRED) +FIND_LIBRARY(LIB_AS angelscript REQUIRED) +FIND_LIBRARY(LIB_SFML_SYSTEM sfml-system REQUIRED) +FIND_LIBRARY(LIB_SFML_AUDIO sfml-audio REQUIRED) + +IF(UNIX) + IF(APPLE) + ELSE(APPLE) + SET(LIBS + ${LIB_GL} + ${LIB_XXF86VM} + ${LIB_XEXT} + ${LIB_X11} + ) + ENDIF(APPLE) +ENDIF(UNIX) + +SET(LIBS + ${LIBS} + ${LIB_IRR} + ${LIB_AS} + ${LIB_SFML_SYSTEM} + ${LIB_SFML_AUDIO} + ) + +# Create the executable. +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin) +ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) + +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIBS}) + Added: tags/0.x/0.1.x/0.1.0/build/CodeBlocks/sirrf.cbp =================================================================== --- tags/0.x/0.1.x/0.1.0/build/CodeBlocks/sirrf.cbp (rev 0) +++ tags/0.x/0.1.x/0.1.0/build/CodeBlocks/sirrf.cbp 2009-06-08 14:22:21 UTC (rev 66) @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Sirrf" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="linux-debug"> + <Option output="../../bin/sirrf" prefix_auto="1" extension_auto="1" /> + <Option working_dir="../../bin" /> + <Option object_output="obj/linux/debug" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add directory="/usr/local/include/" /> + <Add directory="/usr/local/include/irrlicht" /> + </Compiler> + <Linker> + <Add option="-lGL" /> + <Add option="-lXxf86vm" /> + <Add option="-lXext" /> + <Add option="-lX11" /> + <Add option="-lsfml-system -lsfml-audio" /> + <Add library="libIrrlicht.a" /> + <Add library="libangelscript.a" /> + <Add directory="/usr/lib/" /> + <Add directory="/usr/local/lib/" /> + </Linker> + </Target> + <Target title="linux-release"> + <Option output="../../bin/sirrf" prefix_auto="1" extension_auto="1" /> + <Option working_dir="../../bin" /> + <Option object_output="obj/linux/release" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-O3" /> + <Add directory="/usr/local/include/" /> + <Add directory="/usr/local/include/irrlicht" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add option="-lGL" /> + <Add option="-lXxf86vm" /> + <Add option="-lXext" /> + <Add option="-lX11" /> + <Add option="-lsfml-system -lsfml-audio" /> + <Add library="libIrrlicht.a" /> + <Add library="libangelscript.a" /> + <Add directory="/usr/lib/" /> + <Add directory="/usr/local/lib/" /> + </Linker> + </Target> + </Build> + <Compiler> + <Add option="-Wall" /> + <Add directory="../../src/vendor" /> + </Compiler> + <Unit filename="../../src/components/components.cpp" /> + <Unit filename="../../src/components/components.h" /> + <Unit filename="../../src/components/scene/AnimatedMeshComponent.cpp" /> + <Unit filename="../../src/components/scene/AnimatedMeshComponent.h" /> + <Unit filename="../../src/components/scene/BillboardComponent.cpp" /> + <Unit filename="../../src/components/scene/BillboardComponent.h" /> + <Unit filename="../../src/components/scene/CameraComponent.cpp" /> + <Unit filename="../../src/components/scene/CameraComponent.h" /> + <Unit filename="../../src/components/scene/ImageComponent.cpp" /> + <Unit filename="../../src/components/scene/ImageComponent.h" /> + <Unit filename="../../src/components/scene/LightComponent.cpp" /> + <Unit filename="../../src/components/scene/LightComponent.h" /> + <Unit filename="../../src/components/scene/MeshComponent.cpp" /> + <Unit filename="../../src/components/scene/MeshComponent.h" /> + <Unit filename="../../src/components/scene/OctTreeComponent.cpp" /> + <Unit filename="../../src/components/scene/OctTreeComponent.h" /> + <Unit filename="../../src/components/scene/ParticleSysComponent.cpp" /> + <Unit filename="../../src/components/scene/ParticleSysComponent.h" /> + <Unit filename="../../src/components/scene/SceneComponent.cpp" /> + <Unit filename="../../src/components/scene/SceneComponent.h" /> + <Unit filename="../../src/components/scene/SkyBoxComponent.cpp" /> + <Unit filename="../../src/components/scene/SkyBoxComponent.h" /> + <Unit filename="../../src/components/scene/SkyDomeComponent.cpp" /> + <Unit filename="../../src/components/scene/SkyDomeComponent.h" /> + <Unit filename="../../src/components/scene/TerrainComponent.cpp" /> + <Unit filename="../../src/components/scene/TerrainComponent.h" /> + <Unit filename="../../src/components/scene/TextBillboardComponent.cpp" /> + <Unit filename="../../src/components/scene/TextBillboardComponent.h" /> + <Unit filename="../../src/components/sound/SoundListenerComponent.cpp" /> + <Unit filename="../../src/components/sound/SoundListenerComponent.h" /> + <Unit filename="../../src/components/sound/SoundSourceComponent.cpp" /> + <Unit filename="../../src/components/sound/SoundSourceComponent.h" /> + <Unit filename="../../src/core/DataStack.cpp" /> + <Unit filename="../../src/core/DataStack.h" /> + <Unit filename="../../src/core/DataStore.cpp" /> + <Unit filename="../../src/core/DataStore.h" /> + <Unit filename="../../src/core/Entity.cpp" /> + <Unit filename="../../src/core/Entity.h" /> + <Unit filename="../../src/core/EntityComponent.cpp" /> + <Unit filename="../../src/core/EntityComponent.h" /> + <Unit filename="../../src/core/EntityManager.cpp" /> + <Unit filename="../../src/core/EntityManager.h" /> + <Unit filename="../../src/core/EventManager.cpp" /> + <Unit filename="../../src/core/EventManager.h" /> + <Unit filename="../../src/core/GameManager.cpp" /> + <Unit filename="../../src/core/GameManager.h" /> + <Unit filename="../../src/core/GameState.cpp" /> + <Unit filename="../../src/core/GameState.h" /> + <Unit filename="../../src/dependencies.h" /> + <Unit filename="../../src/main.cpp" /> + <Unit filename="../../src/scripting/Script.cpp" /> + <Unit filename="../../src/scripting/Script.h" /> + <Unit filename="../../src/scripting/ScriptManager.cpp" /> + <Unit filename="../../src/scripting/ScriptManager.h" /> + <Unit filename="../../src/scripting/irrlicht/asAabbox3d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asAabbox3d.h" /> + <Unit filename="../../src/scripting/irrlicht/asDimension2d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asDimension2d.h" /> + <Unit filename="../../src/scripting/irrlicht/asIrrHelper.h" /> + <Unit filename="../../src/scripting/irrlicht/asIrrlicht.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asIrrlicht.h" /> + <Unit filename="../../src/scripting/irrlicht/asLine2d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asLine2d.h" /> + <Unit filename="../../src/scripting/irrlicht/asLine3d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asLine3d.h" /> + <Unit filename="../../src/scripting/irrlicht/asMatrix4.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asMatrix4.h" /> + <Unit filename="../../src/scripting/irrlicht/asRect.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asRect.h" /> + <Unit filename="../../src/scripting/irrlicht/asSColor.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asSColor.h" /> + <Unit filename="../../src/scripting/irrlicht/asVector2d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asVector2d.h" /> + <Unit filename="../../src/scripting/irrlicht/asVector3d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asVector3d.h" /> + <Unit filename="../../src/scripting/scriptstring.cpp" /> + <Unit filename="../../src/scripting/scriptstring.h" /> + <Unit filename="../../src/scripting/scriptstring_utils.cpp" /> + <Unit filename="../../src/sound/SoundManager.cpp" /> + <Unit filename="../../src/sound/SoundManager.h" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> Added: tags/0.x/0.1.x/0.1.0/docs/docs/mainpage.txt =================================================================== --- tags/0.x/0.1.x/0.1.0/docs/docs/mainpage.txt (rev 0) +++ tags/0.x/0.1.x/0.1.0/docs/docs/mainpage.txt 2009-06-08 14:22:21 UTC (rev 66) @@ -0,0 +1,6 @@ +//! \mainpage +//! Sirrf, the Simple Irrlicht Framework, is a free, open source, extendible, +//! and cross-platform framework for building games based upon the popular +//! Irrlicht Engine. +//! +//! The official website of the framework is: http://sf.net/projects/sirrf Added: tags/0.x/0.1.x/0.1.0/docs/doxyfile =================================================================== --- tags/0.x/0.1.x/0.1.0/docs/doxyfile (rev 0) +++ tags/0.x/0.1.x/0.1.0/docs/doxyfile 2009-06-08 14:22:21 UTC (rev 66) @@ -0,0 +1,1514 @@ +# Doxyfile 1.5.8 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = "Sirrf - Simple Irrlicht Framework" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = v0.1.0 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = YES + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = ../src + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../src ./docs + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = *.c *.cpp *.cxx *.c++ *.h *.hh *.hxx *.hpp *.h++ \ + *.txt + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = ../src/vendor \ + ../src/scripting/scriptstring.cpp \ + ../src/scripting/scriptstring.h \ + ../src/scripting/scriptstring_utils.cpp + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table... [truncated message content] |
From: <zcc...@us...> - 2009-06-08 14:17:27
|
Revision: 65 http://sirrf.svn.sourceforge.net/sirrf/?rev=65&view=rev Author: zccdark203 Date: 2009-06-08 14:17:25 +0000 (Mon, 08 Jun 2009) Log Message: ----------- The final revision before the release of Sirrf v0.1.0. Modified Paths: -------------- trunk/CONTRIBUTORS trunk/docs/doxyfile trunk/src/components/scene/ImageComponent.h trunk/src/core/DataStack.cpp trunk/src/core/DataStack.h trunk/src/core/EventManager.cpp Added Paths: ----------- trunk/README trunk/docs/docs/ trunk/docs/docs/mainpage.txt Modified: trunk/CONTRIBUTORS =================================================================== --- trunk/CONTRIBUTORS 2009-06-08 12:39:52 UTC (rev 64) +++ trunk/CONTRIBUTORS 2009-06-08 14:17:25 UTC (rev 65) @@ -1,5 +1,5 @@ ========================================================================== -Sirrf version 0.10 (SVN) - Contributors +Sirrf version 0.1.0 - Contributors ========================================================================== Please also note contributors who have contributed to the framework: Added: trunk/README =================================================================== --- trunk/README (rev 0) +++ trunk/README 2009-06-08 14:17:25 UTC (rev 65) @@ -0,0 +1,76 @@ +========================================================================== +Sirrf version 0.1.0 - Readme +========================================================================== + + Content of this file: + + 1. Directory Structure Overview + 2. How To Start + 3. License + 4. Contact + + +========================================================================== +1. Directory Structure Overview +========================================================================== + + After uncompressing the archive you'll find the following directories: + + /bin Binaries build with the provided build files will be + put in this directory. + /build Contains build files for various build systems and + IDEs. + /CMake CMake build files. + /CodeBlocks Code::Blocks project files. + /docs Documentation of Sirrf. + /share Put here the resources (i.e. models) your game uses. + /src The source code of Sirrf. + + +========================================================================== +2. Getting Started +========================================================================== + + See the following tutorial on Sirrf's development hub: + http://apps.sf.net/trac/sirrf/wiki/Tutorials/v0.1.0/GettingStarted + + +========================================================================== +3. License +========================================================================== + + Copyright (c) 2009 Michael Bartsch and Contributors + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + +========================================================================== +4. Contact +========================================================================== + + If you have problems, questions or suggestions, please visit the + official homepage of Sirrf: + + http://sourceforge.net/projects/sirrf + + If you want to contact the team, please send an email to Michael Bartsch: + + zcc...@us... + Added: trunk/docs/docs/mainpage.txt =================================================================== --- trunk/docs/docs/mainpage.txt (rev 0) +++ trunk/docs/docs/mainpage.txt 2009-06-08 14:17:25 UTC (rev 65) @@ -0,0 +1,6 @@ +//! \mainpage +//! Sirrf, the Simple Irrlicht Framework, is a free, open source, extendible, +//! and cross-platform framework for building games based upon the popular +//! Irrlicht Engine. +//! +//! The official website of the framework is: http://sf.net/projects/sirrf Modified: trunk/docs/doxyfile =================================================================== --- trunk/docs/doxyfile 2009-06-08 12:39:52 UTC (rev 64) +++ trunk/docs/doxyfile 2009-06-08 14:17:25 UTC (rev 65) @@ -564,7 +564,7 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ../src +INPUT = ../src ./docs # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -581,7 +581,8 @@ # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 -FILE_PATTERNS = +FILE_PATTERNS = *.c *.cpp *.cxx *.c++ *.h *.hh *.hxx *.hpp *.h++ \ + *.txt # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. Modified: trunk/src/components/scene/ImageComponent.h =================================================================== --- trunk/src/components/scene/ImageComponent.h 2009-06-08 12:39:52 UTC (rev 64) +++ trunk/src/components/scene/ImageComponent.h 2009-06-08 14:17:25 UTC (rev 65) @@ -89,17 +89,17 @@ //! @param color New alpha color of the image. void setAlphaColor(const SColor &color); //! Sets where the image is clipped to. - //! @param rect Pointer to rectangle on the screen where the image is clipped to. + //! @param rectangle Pointer to rectangle on the screen where the image is clipped to. //! If this pointer is NULL the image is not clipped. void setClipRect(rect<s32> *rectangle); //! Sets the color with which the image is drawn. - //! @param color New color. + //! @param color New color. void setColor(const SColor &color); //! Sets the upper left 2d screen position where the image will be drawn. //! @param position New position. void setPosition(const vector2di &position); //! Sets the source rectangle in the image - //! @param rect New source rectangle from where the image is retrieved. + //! @param rectangle New source rectangle from where the image is retrieved. void setSourceRect(const rect<s32> &rectangle); //! Loads a texture from the given file and sets it as the texture to be drawn. //! @param fileName Filename of the texture to load. Modified: trunk/src/core/DataStack.cpp =================================================================== --- trunk/src/core/DataStack.cpp 2009-06-08 12:39:52 UTC (rev 64) +++ trunk/src/core/DataStack.cpp 2009-06-08 14:17:25 UTC (rev 65) @@ -390,6 +390,7 @@ bindSetGetVar<u16>(engine, "u16"); bindSetGetVar<u32>(engine, "u32"); bindSetGetVar<u8>(engine, "u8"); + bindSetGetVar<std::string>(engine, "string"); r = engine->RegisterObjectMethod("DataStack", "void removeAll()", asMETHOD(DataStack, removeAll), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/core/DataStack.h =================================================================== --- trunk/src/core/DataStack.h 2009-06-08 12:39:52 UTC (rev 64) +++ trunk/src/core/DataStack.h 2009-06-08 14:17:25 UTC (rev 65) @@ -68,6 +68,8 @@ //! Sets the variable with the given name. //! @param name Name of the variable to set. //! @param value Value of the variable. + //! @note This function is not directly available in AngelScript. You can use the + //! set_<valuetype> functions, though. template<typename T> bool setVar(const std::string &name, const T &value) { @@ -89,6 +91,8 @@ //! Gets the variable with the given name. //! @param name Name of the variable. //! @return The value of the given variable. + //! @note This function is not directly available in AngelScript. You can use the + //! get_<valuetype> functions, though. template<typename T> T getVar(const std::string &name) { Modified: trunk/src/core/EventManager.cpp =================================================================== --- trunk/src/core/EventManager.cpp 2009-06-08 12:39:52 UTC (rev 64) +++ trunk/src/core/EventManager.cpp 2009-06-08 14:17:25 UTC (rev 65) @@ -461,6 +461,10 @@ } } + // GUI event. + if(event.EventType == EET_GUI_EVENT) + mEvents["EventManager"]["onGUIEvent"].emit((void*)&event); + return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-08 13:13:06
|
Revision: 64 http://sirrf.svn.sourceforge.net/sirrf/?rev=64&view=rev Author: zccdark203 Date: 2009-06-08 12:39:52 +0000 (Mon, 08 Jun 2009) Log Message: ----------- The DataStack class have been revised. On top of that XML support has been added to the DataStack class. I've also made some changes within the framework to let things work properly and consistent. Modified Paths: -------------- trunk/src/components/scene/ImageComponent.cpp trunk/src/components/scene/ImageComponent.h trunk/src/core/DataStack.cpp trunk/src/core/DataStack.h trunk/src/core/GameState.cpp trunk/src/scripting/Script.cpp trunk/src/scripting/ScriptManager.cpp trunk/src/sound/SoundManager.cpp Modified: trunk/src/components/scene/ImageComponent.cpp =================================================================== --- trunk/src/components/scene/ImageComponent.cpp 2009-06-08 09:25:43 UTC (rev 63) +++ trunk/src/components/scene/ImageComponent.cpp 2009-06-08 12:39:52 UTC (rev 64) @@ -156,9 +156,16 @@ } // Sets where the image is clipped to. -void ImageComponent::setClipRect(rect<s32> *rect) +void ImageComponent::setClipRect(rect<s32> *rectangle) { - mClipRect = rect; + if(mClipRect != NULL) + { + delete mClipRect; + mClipRect = NULL; + } + + if(rectangle != NULL) + mClipRect = new rect<s32>(*rectangle); } // Sets the color with which the image is drawn. @@ -174,9 +181,9 @@ } // Sets the source rectangle in the image -void ImageComponent::setSourceRect(const rect<s32> &rect) +void ImageComponent::setSourceRect(const rect<s32> &rectangle) { - mSourceRect = rect; + mSourceRect = rectangle; } // Loads a texture from the given file and sets it as the texture to be drawn. Modified: trunk/src/components/scene/ImageComponent.h =================================================================== --- trunk/src/components/scene/ImageComponent.h 2009-06-08 09:25:43 UTC (rev 63) +++ trunk/src/components/scene/ImageComponent.h 2009-06-08 12:39:52 UTC (rev 64) @@ -91,7 +91,7 @@ //! Sets where the image is clipped to. //! @param rect Pointer to rectangle on the screen where the image is clipped to. //! If this pointer is NULL the image is not clipped. - void setClipRect(rect<s32> *rect); + void setClipRect(rect<s32> *rectangle); //! Sets the color with which the image is drawn. //! @param color New color. void setColor(const SColor &color); @@ -100,7 +100,7 @@ void setPosition(const vector2di &position); //! Sets the source rectangle in the image //! @param rect New source rectangle from where the image is retrieved. - void setSourceRect(const rect<s32> &rect); + void setSourceRect(const rect<s32> &rectangle); //! Loads a texture from the given file and sets it as the texture to be drawn. //! @param fileName Filename of the texture to load. void setTexture(const std::string &fileName); Modified: trunk/src/core/DataStack.cpp =================================================================== --- trunk/src/core/DataStack.cpp 2009-06-08 09:25:43 UTC (rev 63) +++ trunk/src/core/DataStack.cpp 2009-06-08 12:39:52 UTC (rev 64) @@ -89,6 +89,21 @@ return mVars.size(); } +// Try to find the given variable. +std::string DataStack::getVar(const std::string &name) +{ + // Try to find the given variable. + std::map<std::string, std::string>::iterator it; + it = mVars.find(name); + + // Did we find the variable? + if(it != mVars.end()) + return it->second; + + // We didn't find the variable. + else return NULL; +} + // Removes all variables from this DataStack. void DataStack::removeAll() { @@ -111,8 +126,14 @@ } // Saves the Data Stack as a bencoded file. -bool DataStack::save(const std::string &fileName) +bool DataStack::saveBencode(const std::string &fileName) { + // Get pointer to the File System of Irrlicht. + IFileSystem *fileSystem = GameManager::Instance()->getDevice()->getFileSystem(); + + // Open the file. + IWriteFile *file = fileSystem->createAndWriteFile(fileName.c_str()); + // Create a buffer. std::stringstream fBuffer; @@ -131,47 +152,35 @@ fBuffer << "e"; - - // Open the file. - ofstream file(fileName.c_str()); - - if(!file.is_open()) - return false; - // Write to the file. - file << fBuffer.str(); + file->write(fBuffer.str().c_str(), fBuffer.str().size()); // Close the file. - file.close(); + file->drop(); - // We're done. return true; } // Loads the Data Stack from a bencoded file. -bool DataStack::load(const std::string &fileName) +bool DataStack::loadBencode(const std::string &fileName) { - // Create a buffer. - std::string fBuffer; + // Get pointer to the File System of Irrlicht. + IFileSystem *fileSystem = GameManager::Instance()->getDevice()->getFileSystem(); - // Open the file. - ifstream file(fileName.c_str()); - - if(!file.is_open()) + // Does the file exist? + if(!fileSystem->existFile(fileName.c_str())) return false; - // Determine the size of the file. - file.seekg(0, ios::end); - long fSize = file.tellg(); - fBuffer.reserve(fSize); + // Open the given file and load the contents to the buffer. + IReadFile *file = fileSystem->createAndOpenFile(fileName.c_str()); - // Read from the file. - file.seekg(0); - for(long i = 0; i < fSize; i++) - fBuffer += file.get(); + long fSize = file->getSize(); + c8 *fBuffer = new c8[fSize+1]; + file->read(fBuffer, fSize); + file->drop(); // Indentify the file as Bencoded Data Stack. - std::string fHeader = fBuffer.substr(0, 25); + std::string fHeader = std::string(fBuffer).substr(0, 25); if(fHeader != "d3:fidi2419e5:ftype3:bdse") return false; @@ -187,7 +196,7 @@ std::string key; std::string value; - for(unsigned int i = 25; i < fBuffer.size(); i++) + for(unsigned int i = 25; i < fSize; i++) { if(bCount != 0) { @@ -224,12 +233,126 @@ } } + // Remove the buffer. + delete[] fBuffer; + // We're done. return true; } +// Saves the Data Stack as a XML file. +bool DataStack::saveXML(const std::string &fileName) +{ + // Get pointer to the File System of Irrlicht. + IFileSystem *fileSystem = GameManager::Instance()->getDevice()->getFileSystem(); + // Open the file. + IWriteFile *file = fileSystem->createAndWriteFile(fileName.c_str()); + + // Create a buffer. + std::stringstream fBuffer; + + // Write the header to the buffer. + fBuffer << "<?xml version=\"1.0\"?>\n"; + + // Write the contents of the data stack to the buffer. + fBuffer << "<datastack>\n"; + + std::map<std::string, std::string>::iterator it; + for(it = mVars.begin(); it != mVars.end(); it++) + fBuffer << " <var name=\"" << it->first << "\" value=\"" << it->second << "\" />\n"; + + fBuffer << "</datastack>"; + + // Write to the file. + file->write(fBuffer.str().c_str(), fBuffer.str().size()); + + // Close the file. + file->drop(); + + return true; +} + +// Loads the Data Stack from a XML file. +bool DataStack::loadXML(const std::string &fileName) +{ + // Get pointer to the File System of Irrlicht. + IFileSystem *fileSystem = GameManager::Instance()->getDevice()->getFileSystem(); + + // Does the file exist? + if(!fileSystem->existFile(fileName.c_str())) + return false; + + // Open the file. + IXMLReader *file = fileSystem->createXMLReader(fileName.c_str()); + + if(!file) + return false; + + // Read from the file. + bool isDataStack = false; + + while(file && file->read()) + { + switch(file->getNodeType()) + { + case io::EXN_ELEMENT: + + // Did we find a <datastack>? + if(core::stringw("datastack") == file->getNodeName()) + isDataStack = true; + + // Did we find a <var>? + if(isDataStack) + { + if(core::stringw("var") == file->getNodeName()) + { + core::stringc name = file->getAttributeValue(L"name"); + core::stringc value = file->getAttributeValue(L"value"); + mVars[name.c_str()] = value.c_str(); + } + } + + break; + + default: + break; + } + } + + if(!isDataStack) + return false; + + // Close the file. + file->drop(); + + return true; +} + + // DataStack Angelscript binding. +template<typename T> +void bindSetGetVar(asIScriptEngine *engine, const std::string &asType) +{ + // Forward declarations. + int r; + std::stringstream ss; + + // Binds DataStack::setVar<T> + ss.str(""); + ss << "bool set_" << asType << "(const string&, const " << asType << ")"; + r = engine->RegisterObjectMethod("DataStack", ss.str().c_str(), + asMETHODPR(DataStack, setVar<T>, (const std::string&, const T&), bool), + asCALL_THISCALL); assert(r >= 0); + + // Binds DataStack::getVar<T> + ss.str(""); + ss << asType << " get_" << asType << "(const string&)"; + r = engine->RegisterObjectMethod("DataStack", ss.str().c_str(), + asMETHODPR(DataStack, getVar<T>, (const std::string&), T), + asCALL_THISCALL); assert(r >= 0); +} + void bindDataStack(asIScriptEngine *engine) { // Forward declarations. @@ -246,27 +369,42 @@ r = engine->RegisterObjectBehaviour("DataStack", asBEHAVE_RELEASE, "void f()", asMETHOD(DataStack, refRelease), asCALL_THISCALL); assert(r >= 0); - // Bind DataStack class functions. + // Bind DataStack class functions. r = engine->RegisterObjectMethod("DataStack", "void init()", asMETHOD(DataStack, init), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("DataStack", "void clear()", asMETHOD(DataStack, clear), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("DataStack", "u32 getID()", - asMETHOD(DataStack, getID), asCALL_THISCALL); (r >= 0); + asMETHOD(DataStack, getID), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("DataStack", "const string& getName()", asMETHOD(DataStack, getName), asCALL_THISCALL); assert(r >= 0); + // Bind DataStack::setVar<T> and DataStack::getVar<T> + bindSetGetVar<s32>(engine, "s32"); + bindSetGetVar<c8>(engine, "c8"); + bindSetGetVar<f32>(engine, "f32"); + bindSetGetVar<f64>(engine, "f64"); + bindSetGetVar<s16>(engine, "s16"); + bindSetGetVar<s32>(engine, "s32"); + bindSetGetVar<u16>(engine, "u16"); + bindSetGetVar<u32>(engine, "u32"); + bindSetGetVar<u8>(engine, "u8"); + r = engine->RegisterObjectMethod("DataStack", "void removeAll()", asMETHOD(DataStack, removeAll), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("DataStack", "bool removeVar(const string &)", asMETHOD(DataStack, removeVar), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("DataStack", "bool save(const string &)", - asMETHOD(DataStack, save), asCALL_THISCALL);assert(r >= 0); + r = engine->RegisterObjectMethod("DataStack", "bool saveBencode(const string &)", + asMETHOD(DataStack, saveBencode), asCALL_THISCALL);assert(r >= 0); + r = engine->RegisterObjectMethod("DataStack", "bool loadBencode(const string &)", + asMETHOD(DataStack, loadBencode), asCALL_THISCALL);assert(r >= 0); - r = engine->RegisterObjectMethod("DataStack", "bool load(const string &)", - asMETHOD(DataStack, load), asCALL_THISCALL);assert(r >= 0); + r = engine->RegisterObjectMethod("DataStack", "bool saveXML(const string &)", + asMETHOD(DataStack, saveXML), asCALL_THISCALL);assert(r >= 0); + r = engine->RegisterObjectMethod("DataStack", "bool loadXML(const string &)", + asMETHOD(DataStack, loadXML), asCALL_THISCALL);assert(r >= 0); } // End of File Modified: trunk/src/core/DataStack.h =================================================================== --- trunk/src/core/DataStack.h 2009-06-08 09:25:43 UTC (rev 63) +++ trunk/src/core/DataStack.h 2009-06-08 12:39:52 UTC (rev 64) @@ -99,25 +99,23 @@ // Did we find the variable? if(it != mVars.end()) { - // Does this type have a specialisation? - if(typeid(T) == typeid(std::string)) - return it->second; + std::stringstream ss(it->second); + T t; - // In case it doesn't we'll use a stringstream. - else - { - std::stringstream ss(it->second); - T t; - - ss >> t; - return t; - } + ss >> t; + return t; } // We didn't find the variable. else return NULL; }; + //! Gets the variable with the given name. + //! @param name Name of the variable. + //! @return The value of the given variable. + //! @note Specialization function for std::string. + std::string getVar(const std::string &name); + //! Removes all variables from this DataStack. void removeAll(); //! Removes the variable with the given name. @@ -126,11 +124,18 @@ //! Saves the DataStack as a bencoded file. //! @param fileName Filename of the file where the data is stored in. - bool save(const std::string &fileName); - //! Loads the Data Stack from a bencoded file. + bool saveBencode(const std::string &fileName); + //! Loads the DataStack from a bencoded file. //! @param fileName Filename of the file where the data is retrieved from. - bool load(const std::string &fileName); + bool loadBencode(const std::string &fileName); + //! Saves the DataStack as a XML file. + //! @param fileName Filename of the file where the data is stored in. + bool saveXML(const std::string &fileName); + //! Loads the DataStack from a XML file. + //! @param fileName Filename of the file where the data is retrieved from. + bool loadXML(const std::string &fileName); + private: // Static members Modified: trunk/src/core/GameState.cpp =================================================================== --- trunk/src/core/GameState.cpp 2009-06-08 09:25:43 UTC (rev 63) +++ trunk/src/core/GameState.cpp 2009-06-08 12:39:52 UTC (rev 64) @@ -233,10 +233,12 @@ std::string decl = "CGameState : IGameState\n" "{\n" " GameState _inner;\n" + " Entity @mBaseEntity\n;" "\n" " CGameState::CGameState()\n" " {\n" " _inner = GameState();\n" + " mBaseEntity = _inner.getBaseEntity();\n" " }\n" "\n" " void init() {}\n" Modified: trunk/src/scripting/Script.cpp =================================================================== --- trunk/src/scripting/Script.cpp 2009-06-08 09:25:43 UTC (rev 63) +++ trunk/src/scripting/Script.cpp 2009-06-08 12:39:52 UTC (rev 64) @@ -120,15 +120,15 @@ // Open the given file and load the contents to the buffer. IReadFile *file = fileSystem->createAndOpenFile(fileName.c_str()); - long bufferSize = file->getSize(); - c8 * buffer = new c8[bufferSize+1]; - memset(buffer, 0, bufferSize+1); + long fSize = file->getSize(); + c8 * fBuffer = new c8[fSize+1]; + memset(fBuffer, 0, fSize+1); - file->read(buffer, bufferSize); + file->read(fBuffer, fSize); file->drop(); // Add a script section to the earlier created module. - mModule->AddScriptSection("main", buffer); + mModule->AddScriptSection("main", fBuffer); scriptMgr->addScriptSectionsToScript(this); // Build the script. @@ -137,7 +137,7 @@ return false; // Clean up. - delete[] buffer; + delete[] fBuffer; return true; } Modified: trunk/src/scripting/ScriptManager.cpp =================================================================== --- trunk/src/scripting/ScriptManager.cpp 2009-06-08 09:25:43 UTC (rev 63) +++ trunk/src/scripting/ScriptManager.cpp 2009-06-08 12:39:52 UTC (rev 64) @@ -46,10 +46,8 @@ pEngine->RegisterTypedef("f64", "double"); pEngine->RegisterTypedef("s16", "int16"); pEngine->RegisterTypedef("s32", "int"); - pEngine->RegisterTypedef("s64", "int64"); pEngine->RegisterTypedef("u16", "uint16"); pEngine->RegisterTypedef("u32", "uint"); - pEngine->RegisterTypedef("u64", "uint64"); pEngine->RegisterTypedef("u8", "uint8"); // Register Irrlicht. Modified: trunk/src/sound/SoundManager.cpp =================================================================== --- trunk/src/sound/SoundManager.cpp 2009-06-08 09:25:43 UTC (rev 63) +++ trunk/src/sound/SoundManager.cpp 2009-06-08 12:39:52 UTC (rev 64) @@ -93,21 +93,21 @@ // Open the given file and load the contents to the buffer. IReadFile *file = fileSystem->createAndOpenFile(fileName.c_str()); - long bufferSize = file->getSize(); - c8 * buffer = new c8[bufferSize+1]; - memset(buffer, 0, bufferSize+1); + long fSize = file->getSize(); + c8 *fBuffer = new c8[fSize+1]; + memset(fBuffer, 0, fSize+1); - file->read(buffer, bufferSize); + file->read(fBuffer, fSize); file->drop(); // Create the sound buffer and add it to the map. sf::SoundBuffer *soundBuffer = new sf::SoundBuffer(); - soundBuffer->LoadFromMemory(buffer, bufferSize); + soundBuffer->LoadFromMemory(fBuffer, fSize); mSoundBuffers[fileBase] = soundBuffer; // Clean up. - delete[] buffer; + delete[] fBuffer; return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-08 09:25:52
|
Revision: 63 http://sirrf.svn.sourceforge.net/sirrf/?rev=63&view=rev Author: zccdark203 Date: 2009-06-08 09:25:43 +0000 (Mon, 08 Jun 2009) Log Message: ----------- Upgraded to AngelScript 2.16.2, SFML 1.5 and Irrlicht svn 2412. I had to make some changes in order to compile Sirrf. Modified Paths: -------------- trunk/src/components/scene/SceneComponent.h trunk/src/components/scene/TerrainComponent.cpp trunk/src/components/scene/TerrainComponent.h Modified: trunk/src/components/scene/SceneComponent.h =================================================================== --- trunk/src/components/scene/SceneComponent.h 2009-06-07 17:48:54 UTC (rev 62) +++ trunk/src/components/scene/SceneComponent.h 2009-06-08 09:25:43 UTC (rev 63) @@ -108,7 +108,7 @@ //! Gets the automatic culling state. E_CULLING_TYPE getAutomaticCulling() const; //! Get the axis aligned, not transformed bounding box of this component. - const aabbox3df& getBoundingBox() const; + virtual const aabbox3df& getBoundingBox() const; //! Get amount of materials used by this component. u32 getMaterialCount() const; //! Returns the relative transformation of the component. @@ -249,7 +249,7 @@ r = engine->RegisterObjectMethod(type, "E_CULLING_TYPE getAutomaticCulling()", asMETHOD(T, getAutomaticCulling), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod(type, "const aabbox3df& getBoundingBox()", - asMETHODPR(T, getBoundingBox, (void), const aabbox3df&), asCALL_THISCALL); assert(r >= 0); + asMETHODPR(T, getBoundingBox, (void) const, const aabbox3df&), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod(type, "u32 getMaterialCount()", asMETHOD(T, getMaterialCount), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod(type, "const matrix4& getRelativeTransformation()", Modified: trunk/src/components/scene/TerrainComponent.cpp =================================================================== --- trunk/src/components/scene/TerrainComponent.cpp 2009-06-07 17:48:54 UTC (rev 62) +++ trunk/src/components/scene/TerrainComponent.cpp 2009-06-08 09:25:43 UTC (rev 63) @@ -86,6 +86,12 @@ return mTerrainSN; } +// Get the bounding box of the terrain. +const aabbox3df& TerrainComponent::getBoundingBox() const +{ + return mTerrainSN->getBoundingBox(); +} + // Gets the bounding box of a patch. const aabbox3df& TerrainComponent::getBoundingBox(s32 patchX, s32 patchZ) const { @@ -154,7 +160,7 @@ // Bind TerrainComponent class functions. r = engine->RegisterObjectMethod("TerrainComponent", "const aabbox3df& getBoundingBox(s32, s32)", - asMETHODPR(TerrainComponent, getBoundingBox, (s32, s32), const aabbox3df&), + asMETHODPR(TerrainComponent, getBoundingBox, (s32, s32) const, const aabbox3df&), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("TerrainComponent", "f32 getHeight(f32, f32)", asMETHOD(TerrainComponent, getHeight), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/components/scene/TerrainComponent.h =================================================================== --- trunk/src/components/scene/TerrainComponent.h 2009-06-07 17:48:54 UTC (rev 62) +++ trunk/src/components/scene/TerrainComponent.h 2009-06-08 09:25:43 UTC (rev 63) @@ -62,6 +62,8 @@ //! @note Not available in AngelScript. ITerrainSceneNode* getTerrainSceneNode(); + //! Get the bounding box of the terrain. + const aabbox3df& getBoundingBox() const; //! Gets the bounding box of a patch. const aabbox3df& getBoundingBox(s32 patchX, s32 patchZ) const; //! Gets height of a point of the terrain. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-07 17:49:05
|
Revision: 62 http://sirrf.svn.sourceforge.net/sirrf/?rev=62&view=rev Author: zccdark203 Date: 2009-06-07 17:48:54 +0000 (Sun, 07 Jun 2009) Log Message: ----------- Just discovered that position2d has been deprecated in Irrlicht 1.6. It has been removed from Sirrf now. Modified Paths: -------------- trunk/build/CMake/CMakeLists.txt trunk/build/CodeBlocks/sirrf.cbp trunk/src/components/scene/ImageComponent.cpp trunk/src/components/scene/ImageComponent.h trunk/src/scripting/irrlicht/asIrrlicht.cpp trunk/src/scripting/irrlicht/asRect.cpp Removed Paths: ------------- trunk/src/scripting/irrlicht/asPosition2d.cpp trunk/src/scripting/irrlicht/asPosition2d.h Modified: trunk/build/CMake/CMakeLists.txt =================================================================== --- trunk/build/CMake/CMakeLists.txt 2009-06-07 17:33:48 UTC (rev 61) +++ trunk/build/CMake/CMakeLists.txt 2009-06-07 17:48:54 UTC (rev 62) @@ -58,7 +58,6 @@ ${SOURCE_DIR}scripting/irrlicht/asLine2d.cpp ${SOURCE_DIR}scripting/irrlicht/asLine3d.cpp ${SOURCE_DIR}scripting/irrlicht/asMatrix4.cpp - ${SOURCE_DIR}scripting/irrlicht/asPosition2d.cpp ${SOURCE_DIR}scripting/irrlicht/asRect.cpp ${SOURCE_DIR}scripting/irrlicht/asSColor.cpp ${SOURCE_DIR}scripting/irrlicht/asVector2d.cpp @@ -75,7 +74,7 @@ ${SOURCE_DIR}vendor $ENV{PATH} # Change the following lines to set the right include directories. - /usr/local/include/irrlicht-svn2329 + /usr/local/include/irrlicht /usr/local/include/SFML ) @@ -99,7 +98,7 @@ ENDIF(APPLE) ENDIF(UNIX) -FIND_LIBRARY(LIB_IRR Irrlicht-svn2329 REQUIRED) +FIND_LIBRARY(LIB_IRR Irrlicht REQUIRED) FIND_LIBRARY(LIB_AS angelscript REQUIRED) FIND_LIBRARY(LIB_SFML_SYSTEM sfml-system REQUIRED) FIND_LIBRARY(LIB_SFML_AUDIO sfml-audio REQUIRED) Modified: trunk/build/CodeBlocks/sirrf.cbp =================================================================== --- trunk/build/CodeBlocks/sirrf.cbp 2009-06-07 17:33:48 UTC (rev 61) +++ trunk/build/CodeBlocks/sirrf.cbp 2009-06-07 17:48:54 UTC (rev 62) @@ -15,7 +15,7 @@ <Compiler> <Add option="-g" /> <Add directory="/usr/local/include/" /> - <Add directory="/usr/local/include/irrlicht-svn2329" /> + <Add directory="/usr/local/include/irrlicht" /> </Compiler> <Linker> <Add option="-lGL" /> @@ -23,7 +23,7 @@ <Add option="-lXext" /> <Add option="-lX11" /> <Add option="-lsfml-system -lsfml-audio" /> - <Add library="libIrrlicht-svn2329.a" /> + <Add library="libIrrlicht.a" /> <Add library="libangelscript.a" /> <Add directory="/usr/lib/" /> <Add directory="/usr/local/lib/" /> @@ -38,7 +38,7 @@ <Compiler> <Add option="-O3" /> <Add directory="/usr/local/include/" /> - <Add directory="/usr/local/include/irrlicht-svn2329" /> + <Add directory="/usr/local/include/irrlicht" /> </Compiler> <Linker> <Add option="-s" /> @@ -47,7 +47,7 @@ <Add option="-lXext" /> <Add option="-lX11" /> <Add option="-lsfml-system -lsfml-audio" /> - <Add library="libIrrlicht-svn2329.a" /> + <Add library="libIrrlicht.a" /> <Add library="libangelscript.a" /> <Add directory="/usr/lib/" /> <Add directory="/usr/local/lib/" /> @@ -125,8 +125,6 @@ <Unit filename="../../src/scripting/irrlicht/asLine3d.h" /> <Unit filename="../../src/scripting/irrlicht/asMatrix4.cpp" /> <Unit filename="../../src/scripting/irrlicht/asMatrix4.h" /> - <Unit filename="../../src/scripting/irrlicht/asPosition2d.cpp" /> - <Unit filename="../../src/scripting/irrlicht/asPosition2d.h" /> <Unit filename="../../src/scripting/irrlicht/asRect.cpp" /> <Unit filename="../../src/scripting/irrlicht/asRect.h" /> <Unit filename="../../src/scripting/irrlicht/asSColor.cpp" /> Modified: trunk/src/components/scene/ImageComponent.cpp =================================================================== --- trunk/src/components/scene/ImageComponent.cpp 2009-06-07 17:33:48 UTC (rev 61) +++ trunk/src/components/scene/ImageComponent.cpp 2009-06-07 17:48:54 UTC (rev 62) @@ -22,7 +22,7 @@ // ImageComponent constructor (default) ImageComponent::ImageComponent(Entity *parent) : EntityComponent(parent), mTexture(NULL), mAlphaColor(SColor(255, 255, 255, 255)), mClipRect(NULL), - mColor(SColor(255, 255, 255, 255)), mPosition(position2di(0, 0)), + mColor(SColor(255, 255, 255, 255)), mPosition(vector2di(0, 0)), mSourceRect(rect<s32>(0, 0, 0, 0)), mVisible(true), mUseAlphaColor(false) { // Get a pointer to sub-systems of the Game Manager. @@ -42,7 +42,7 @@ // ImageComponent constructor. ImageComponent::ImageComponent(Entity *parent, const std::string &fileName, - const position2di &position, const rect<s32> &sourceRect, + const vector2di &position, const rect<s32> &sourceRect, rect<s32> *clipRect, const SColor &color, const SColor &alphaColor, bool useAlphaColor) : EntityComponent(parent), mAlphaColor(alphaColor), mClipRect(clipRect), mColor(color), @@ -68,7 +68,7 @@ // ImageComponent constructor. ImageComponent::ImageComponent(Entity *parent, ITexture *texture, - const position2di &position, const rect<s32> &sourceRect, + const vector2di &position, const rect<s32> &sourceRect, rect<s32> *clipRect, const SColor &color, const SColor &alphaColor, bool useAlphaColor) : EntityComponent(parent), mAlphaColor(alphaColor), mClipRect(clipRect), mColor(color), @@ -123,7 +123,7 @@ } // Gets the upper left 2d screen position where the image will be drawn. -const position2di& ImageComponent::getPosition() const +const vector2di& ImageComponent::getPosition() const { return mPosition; } @@ -168,7 +168,7 @@ } // Sets the upper left 2d screen position where the image will be drawn. -void ImageComponent::setPosition(const position2di &position) +void ImageComponent::setPosition(const vector2di &position) { mPosition = position; } @@ -256,7 +256,7 @@ asMETHOD(ImageComponent, setClipRect), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("ImageComponent", "void setColor(const SColor &in)", asMETHOD(ImageComponent, setColor), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "void setPosition(position2di &in)", + r = engine->RegisterObjectMethod("ImageComponent", "void setPosition(vector2di &in)", asMETHOD(ImageComponent, setPosition), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("ImageComponent", "void setSourceRect(const recti &in)", asMETHOD(ImageComponent, setSourceRect), asCALL_THISCALL); assert(r >= 0); @@ -272,7 +272,7 @@ asMETHOD(ImageComponent, getClipRect), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("ImageComponent", "const SColor& getColor()", asMETHOD(ImageComponent, getColor), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("ImageComponent", "const position2di& getPosition()", + r = engine->RegisterObjectMethod("ImageComponent", "const vector2di& getPosition()", asMETHOD(ImageComponent, getPosition), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("ImageComponent", "const recti& getSourceRect()", asMETHOD(ImageComponent, getSourceRect), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/components/scene/ImageComponent.h =================================================================== --- trunk/src/components/scene/ImageComponent.h 2009-06-07 17:33:48 UTC (rev 61) +++ trunk/src/components/scene/ImageComponent.h 2009-06-07 17:48:54 UTC (rev 62) @@ -41,7 +41,7 @@ //! @param color Color with which the image is drawn. //! @param alphaColor Alpha color of the image. //! @param useAlphaColor If true, the alpha channel of the texture is used to draw the image. - ImageComponent(Entity *parent, const std::string &fileName, const position2di &position, + ImageComponent(Entity *parent, const std::string &fileName, const vector2di &position, const rect<s32> &sourceRect, rect<s32> *clipRect = NULL, const SColor &color = SColor(255, 255, 255, 255), const SColor &alphaColor = SColor(255, 255, 255, 255), @@ -56,7 +56,7 @@ //! @param color Color with which the image is drawn. //! @param alphaColor Alpha color of the image. //! @param useAlphaColor If true, the alpha channel of the texture is used to draw the image. - ImageComponent(Entity *parent, ITexture *texture, const position2di &position, + ImageComponent(Entity *parent, ITexture *texture, const vector2di &position, const rect<s32> &sourceRect, rect<s32> *clipRect = NULL, const SColor &color = SColor(255, 255, 255, 255), const SColor &alphaColor = SColor(255, 255, 255, 255), @@ -77,7 +77,7 @@ //! Gets the color with which the image is drawn. const SColor& getColor() const; //! Gets the upper left 2d screen position where the image will be drawn. - const position2di& getPosition() const; + const vector2di& getPosition() const; //! Gets the source rectangle in the image const rect<s32>& getSourceRect() const; //! Gets the texture associated with this component. @@ -97,7 +97,7 @@ void setColor(const SColor &color); //! Sets the upper left 2d screen position where the image will be drawn. //! @param position New position. - void setPosition(const position2di &position); + void setPosition(const vector2di &position); //! Sets the source rectangle in the image //! @param rect New source rectangle from where the image is retrieved. void setSourceRect(const rect<s32> &rect); @@ -131,7 +131,7 @@ SColor mAlphaColor; rect<s32> *mClipRect; SColor mColor; - position2di mPosition; + vector2di mPosition; rect<s32> mSourceRect; bool mVisible; Modified: trunk/src/scripting/irrlicht/asIrrlicht.cpp =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-07 17:33:48 UTC (rev 61) +++ trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-07 17:48:54 UTC (rev 62) @@ -20,7 +20,6 @@ #include "asLine2d.h" #include "asLine3d.h" #include "asMatrix4.h" -#include "asPosition2d.h" #include "asRect.h" #include "asSColor.h" #include "asVector2d.h" @@ -309,7 +308,6 @@ bindLine3d(engine); bindAabbox3d(engine); bindMatrix4(engine); - bindPosition2d(engine); bindRect(engine); // Enumerations Deleted: trunk/src/scripting/irrlicht/asPosition2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asPosition2d.cpp 2009-06-07 17:33:48 UTC (rev 61) +++ trunk/src/scripting/irrlicht/asPosition2d.cpp 2009-06-07 17:48:54 UTC (rev 62) @@ -1,200 +0,0 @@ -// ///////////////////////////////////////////////////////////////////////////// -// -// Name: asPosition2d.cpp -// Author: Michael Bartsch (ZCCdark203) -// -// Desc : Binds the position2d<T> class from the Irrlicht engine. -// -// License: Copyright (C) 2009 Michael Bartsch and Contributors -// -// This program is free software: you can redistribute it -// and/or modify it under the terms of the zlib/libpng License. -// See main.cpp for conditions of distribution and use. -// -// ///////////////////////////////////////////////////////////////////////////// - -// Include files -#include "asIrrHelper.h" -#include "asPosition2d.h" -#include "asDimension2d.h" - - -// position2d<T> behaviour functions. -//! An AngelScript wrapper function so that position2d<T> objects can be -//! constructed within AngelScript. -//! @note For internal use only! -template<typename T> -void constructor(void *memory) -{ - new (memory) position2d<T>(); -} - -//! An AngelScript wrapper function so that position2d<T> objects can be -//! constructed within AngelScript. -//! @note For internal use only! -template<typename T> -void constructor(const position2d<T> &other, void *memory) -{ - new (memory) position2d<T>(other); -} - -//! An AngelScript wrapper function so that position2d<T> objects can be -//! constructed within AngelScript. -//! @note For internal use only! -template<typename T> -void constructor(T x, T y, void *memory) -{ - new (memory) position2d<T>(x, y); -} - -//! An AngelScript wrapper function so that position2d<T> objects can be -//! deconstructed within AngelScript. -//! @note For internal use only! -template<typename T> -void deconstructor(void *memory) -{ - ((position2d<T>*)memory)->~position2d<T>(); -} - - -//! Binds position2d<T> as a value type to AngelScript with the given template. -//! @param engine Pointer to the AngelScript engine -//! @param typeName The name of the object within AngelScript; -//! @param asType The AngelScript name of the used template; -template<typename T> -void bindPosition2dT(asIScriptEngine *engine, const char *typeName, const char *asType) -{ - // Forward declarations. - int r; - std::stringstream ss; - - // Bind Position2d<T> class. - r = engine->RegisterObjectType(typeName, sizeof(position2d<T>), asOBJ_VALUE | asOBJ_APP_CLASS_CDA); assert(r >= 0); - - // Set position2d<T> behaviour. - // Initialisation and deinitialisation - r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor<T>, - (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); - - ss.str(""); - ss << "void f(const " << typeName << " &in)"; - r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, - (const position2d<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); - - ss.str(""); - ss << "void f(" << asType << ", " << asType << ")"; - r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, - (T, T, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); - - r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor<T>), - asCALL_CDECL_OBJLAST); assert(r >= 0); - - // Calculation behaviours. - ss.str(""); - ss << typeName << " f(const " << typeName << " &in, const " << typeName << " &in)"; - std::string declActionType = ss.str(); - - ss.str(""); - ss << typeName << " f(const " << typeName << " &in, " << getDimension2dName(asType) << ")"; - std::string declActionValue = ss.str(); - - ss.str(""); - ss << typeName << "& f(const " << typeName << " &in)"; - std::string declAssignType = ss.str(); - - ss.str(""); - ss << typeName << "& f(const " << getDimension2dName(asType) << ")"; - std::string declAssignValue = ss.str(); - - // Assignment - r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ASSIGNMENT, declAssignType.c_str(), - asMETHODPR(position2d<T>, operator=, (const position2d<T>&), - position2d<T>&), asCALL_THISCALL); assert(r >= 0); - - // Multiply (*) - r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), - asFUNCTIONPR((multiply< position2d<T>, position2d<T>, position2d<T> >), - (const position2d<T>&, const position2d<T>&), position2d<T>), - asCALL_CDECL); assert(r >= 0); - - ss.str(""); - ss << typeName << " f(const " << typeName << " &in, const " << asType << " &in)"; - r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionValue.c_str(), - asFUNCTIONPR((multiply< position2d<T>, position2d<T>, T >), - (const position2d<T>&, const T&), position2d<T>), - asCALL_CDECL); assert(r >= 0); - - // Add (+) - r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), - asFUNCTIONPR((add< position2d<T>, position2d<T>, position2d<T> >), - (const position2d<T>&, const position2d<T>&), position2d<T>), - asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionValue.c_str(), - asFUNCTIONPR((add< position2d<T>, position2d<T>, dimension2d<T> >), - (const position2d<T>&, const dimension2d<T>&), position2d<T>), - asCALL_CDECL); assert(r >= 0); - - // Add Assign (+=) - r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, declAssignType.c_str(), - asMETHODPR(position2d<T>, operator+=, (const position2d<T>&), - position2d<T>&), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, declAssignValue.c_str(), - asMETHODPR(position2d<T>, operator+=, (const dimension2d<T>&), position2d<T>&), - asCALL_THISCALL); assert(r >= 0); - - // Subtract (-) - r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), - asFUNCTIONPR((substract< position2d<T>, position2d<T>, position2d<T> >), - (const position2d<T>&, const position2d<T>&), position2d<T>), - asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionValue.c_str(), - asFUNCTIONPR((substract< position2d<T>, position2d<T>, dimension2d<T> >), - (const position2d<T>&, const dimension2d<T>&), position2d<T>), - asCALL_CDECL); assert(r >= 0); - - // Subtract Assign (-=) - r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, declAssignType.c_str(), - asMETHODPR(position2d<T>, operator-=, (const position2d<T>&), - position2d<T>&), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, declAssignValue.c_str(), - asMETHODPR(position2d<T>, operator-=, (const dimension2d<T>&), position2d<T>&), - asCALL_THISCALL); assert(r >= 0); - - // Comparison behaviours. - ss.str(""); - ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; - std::string declComparison = ss.str(); - - r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< position2d<T> >, - (const position2d<T>&, const position2d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< position2d<T> >, - (const position2d<T>&, const position2d<T>&), bool), asCALL_CDECL); assert(r >= 0); - - // Bind position2d<T> class properties. - ss.str(""); - ss << asType << " X"; - r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(position2d<T>, X)); assert(r >= 0); - - ss.str(""); - ss << asType << " Y"; - r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(position2d<T>, Y)); assert(r >= 0); -} - -//! Binds all needed position2d<T> objects to AngelScript. -//! @param engine Pointer to the AngelScript engine; -void bindPosition2d(asIScriptEngine *engine) -{ - bindPosition2dT<f32>(engine, "position2df", "f32"); - bindPosition2dT<s32>(engine, "position2di", "s32"); -} - -//! Gets the name of the position2d<T> registered within AngelScript. -//! @param asType The AngelScript name of the used template; -std::string getPosition2dName(const std::string &asType) -{ - if(asType == "f32") return std::string("position2df"); - if(asType == "s32") return std::string("position2di"); - else return std::string(""); -} - -// End of File Deleted: trunk/src/scripting/irrlicht/asPosition2d.h =================================================================== --- trunk/src/scripting/irrlicht/asPosition2d.h 2009-06-07 17:33:48 UTC (rev 61) +++ trunk/src/scripting/irrlicht/asPosition2d.h 2009-06-07 17:48:54 UTC (rev 62) @@ -1,33 +0,0 @@ -// ///////////////////////////////////////////////////////////////////////////// -// -// Name: asPosition2d.h -// Author: Michael Bartsch (ZCCdark203) -// -// Desc : Binds the position2d<T> class from the Irrlicht engine. -// -// License: Copyright (C) 2009 Michael Bartsch and Contributors -// -// This program is free software: you can redistribute it -// and/or modify it under the terms of the zlib/libpng License. -// See main.cpp for conditions of distribution and use. -// -// ///////////////////////////////////////////////////////////////////////////// - -#ifndef __ASPOSITION2D_H__ -#define __ASPOSITION2D_H__ - -// Include files -#include "../../dependencies.h" - - -// AngelScript binding -//! Binds all needed position2d<T> objects to AngelScript. -//! @param engine Pointer to the AngelScript engine; -extern void bindPosition2d(asIScriptEngine *engine); - -//! Gets the name of the position2d<T> registered within AngelScript. -//! @param asType The AngelScript name of the used template; -extern std::string getPosition2dName(const std::string &asType); - -#endif - Modified: trunk/src/scripting/irrlicht/asRect.cpp =================================================================== --- trunk/src/scripting/irrlicht/asRect.cpp 2009-06-07 17:33:48 UTC (rev 61) +++ trunk/src/scripting/irrlicht/asRect.cpp 2009-06-07 17:48:54 UTC (rev 62) @@ -17,7 +17,7 @@ #include "asIrrHelper.h" #include "asRect.h" #include "asDimension2d.h" -#include "asPosition2d.h" +#include "asVector2d.h" // rect<T> behaviour functions. @@ -78,13 +78,13 @@ (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); ss.str(""); - ss << "void f(const " << getPosition2dName(asType) << " &in, const " << getDimension2dName(asType) << " &in)"; + ss << "void f(const " << getVector2dName(asType) << " &in, const " << getDimension2dName(asType) << " &in)"; r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, (const position2d<T>&, const dimension2d<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); ss.str(""); - ss << "void f(const " << getPosition2dName(asType) << " &in, const " << getPosition2dName(asType) << " &in)"; + ss << "void f(const " << getVector2dName(asType) << " &in, const " << getVector2dName(asType) << " &in)"; r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, (const position2d<T>&, const position2d<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); @@ -94,11 +94,11 @@ // Calculation behaviours. ss.str(""); - ss << typeName << " f(const " << typeName << " &in, const " << getPosition2dName(asType) << "&in)"; + ss << typeName << " f(const " << typeName << " &in, const " << getVector2dName(asType) << "&in)"; std::string declActionType = ss.str(); ss.str(""); - ss << typeName << "& f(const " << getPosition2dName(asType) << "&in)"; + ss << typeName << "& f(const " << getVector2dName(asType) << "&in)"; std::string declAssignType = ss.str(); // Add (+) @@ -109,7 +109,7 @@ // Add Assign (+=) ss.str(""); - ss << typeName << "& f(const " << getPosition2dName(asType) << "&in)"; + ss << typeName << "& f(const " << getVector2dName(asType) << "&in)"; r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, declAssignType.c_str(), asMETHODPR(rect<T>, operator+=, (const position2d<T>&), rect<T>&), asCALL_THISCALL); assert(r >= 0); @@ -139,7 +139,7 @@ // Bind rect<T> class functions. ss.str(""); - ss << "void addInternalPoint(const " << getPosition2dName(asType) << " &in)"; + ss << "void addInternalPoint(const " << getVector2dName(asType) << " &in)"; r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), asMETHODPR(rect<T>, addInternalPoint, (const position2d<T>&), void), asCALL_THISCALL); assert(r >= 0); @@ -160,7 +160,7 @@ asMETHOD(rect<T>, getArea), asCALL_THISCALL); assert(r >= 0); ss.str(""); - ss << getPosition2dName(asType) << " getCenter()"; + ss << getVector2dName(asType) << " getCenter()"; r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), asMETHOD(rect<T>, getCenter), asCALL_THISCALL); assert(r >= 0); @@ -180,7 +180,7 @@ asMETHOD(rect<T>, getWidth), asCALL_THISCALL); assert(r >= 0); ss.str(""); - ss << "bool isPointInside(const " << getPosition2dName(asType) << " &in)"; + ss << "bool isPointInside(const " << getVector2dName(asType) << " &in)"; r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), asMETHOD(rect<T>, isPointInside), asCALL_THISCALL); assert(r >= 0); @@ -197,11 +197,11 @@ // Bind rect<T> class properties. ss.str(""); - ss << getPosition2dName(asType) << " LowerRightCorner"; + ss << getVector2dName(asType) << " LowerRightCorner"; r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(rect<T>, LowerRightCorner)); assert(r >= 0); ss.str(""); - ss << getPosition2dName(asType) << " UpperLeftCorner"; + ss << getVector2dName(asType) << " UpperLeftCorner"; r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(rect<T>, UpperLeftCorner)); assert(r >= 0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-07 17:33:52
|
Revision: 61 http://sirrf.svn.sourceforge.net/sirrf/?rev=61&view=rev Author: zccdark203 Date: 2009-06-07 17:33:48 +0000 (Sun, 07 Jun 2009) Log Message: ----------- Added support for CMake. Also, I changed the project structure a little bit to accomodate multiple build systems. Added Paths: ----------- trunk/build/ trunk/build/CMake/ trunk/build/CMake/CMakeLists.txt trunk/build/CodeBlocks/ trunk/build/CodeBlocks/sirrf.cbp trunk/share/ Removed Paths: ------------- trunk/media/ trunk/src/sirrf.cbp trunk/src/sirrf.depend trunk/src/sirrf.layout Added: trunk/build/CMake/CMakeLists.txt =================================================================== --- trunk/build/CMake/CMakeLists.txt (rev 0) +++ trunk/build/CMake/CMakeLists.txt 2009-06-07 17:33:48 UTC (rev 61) @@ -0,0 +1,132 @@ +# CMake required minimum version. +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +# Project +PROJECT(SIRRF) +SET(PROJECT_NAME sirrf) + +# Define source files. +SET(SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../src/) + +SET(SOURCES + # /src + ${SOURCE_DIR}main.cpp + + # src/components + ${SOURCE_DIR}components/components.cpp + # src/components/scene + ${SOURCE_DIR}components/scene/AnimatedMeshComponent.cpp + ${SOURCE_DIR}components/scene/BillboardComponent.cpp + ${SOURCE_DIR}components/scene/CameraComponent.cpp + ${SOURCE_DIR}components/scene/ImageComponent.cpp + ${SOURCE_DIR}components/scene/LightComponent.cpp + ${SOURCE_DIR}components/scene/MeshComponent.cpp + ${SOURCE_DIR}components/scene/OctTreeComponent.cpp + ${SOURCE_DIR}components/scene/ParticleSysComponent.cpp + ${SOURCE_DIR}components/scene/SceneComponent.cpp + ${SOURCE_DIR}components/scene/SkyBoxComponent.cpp + ${SOURCE_DIR}components/scene/SkyDomeComponent.cpp + ${SOURCE_DIR}components/scene/TerrainComponent.cpp + ${SOURCE_DIR}components/scene/TextBillboardComponent.cpp + # src/components/sound + ${SOURCE_DIR}components/sound/SoundListenerComponent.cpp + ${SOURCE_DIR}components/sound/SoundSourceComponent.cpp + + # /src/core + ${SOURCE_DIR}core/DataStack.cpp + ${SOURCE_DIR}core/DataStore.cpp + ${SOURCE_DIR}core/Entity.cpp + ${SOURCE_DIR}core/EntityComponent.cpp + ${SOURCE_DIR}core/EntityManager.cpp + ${SOURCE_DIR}core/EventManager.cpp + ${SOURCE_DIR}core/GameManager.cpp + ${SOURCE_DIR}core/GameState.cpp + + # /src/game + # Define here your own source files. + + # /src/scripting + ${SOURCE_DIR}scripting/Script.cpp + ${SOURCE_DIR}scripting/ScriptManager.cpp + ${SOURCE_DIR}scripting/scriptstring.cpp + ${SOURCE_DIR}scripting/scriptstring_utils.cpp + + # /src/scripting/irrlicht + ${SOURCE_DIR}scripting/irrlicht/asAabbox3d.cpp + ${SOURCE_DIR}scripting/irrlicht/asDimension2d.cpp + ${SOURCE_DIR}scripting/irrlicht/asIrrlicht.cpp + ${SOURCE_DIR}scripting/irrlicht/asLine2d.cpp + ${SOURCE_DIR}scripting/irrlicht/asLine3d.cpp + ${SOURCE_DIR}scripting/irrlicht/asMatrix4.cpp + ${SOURCE_DIR}scripting/irrlicht/asPosition2d.cpp + ${SOURCE_DIR}scripting/irrlicht/asRect.cpp + ${SOURCE_DIR}scripting/irrlicht/asSColor.cpp + ${SOURCE_DIR}scripting/irrlicht/asVector2d.cpp + ${SOURCE_DIR}scripting/irrlicht/asVector3d.cpp + + # /src/sound + ${SOURCE_DIR}sound/SoundManager.cpp + ) + +MESSAGE("${SOURCES}") + +# Define include directories for third-party libraries. +SET(INCLUDE_DIRS + ${SOURCE_DIR}vendor + $ENV{PATH} + # Change the following lines to set the right include directories. + /usr/local/include/irrlicht-svn2329 + /usr/local/include/SFML + ) + +INCLUDE_DIRECTORIES(${INCLUDE_DIRS}) + +# Define library directories for third-party libraries. +SET(LIB_DIRS + $ENV{PATH} + ) + +LINK_DIRECTORIES(${LIB_DIRS}) + +# Define libraries with which we have to link. +IF(UNIX) + IF(APPLE) + ELSE(APPLE) + FIND_LIBRARY(LIB_GL GL REQUIRED) + FIND_LIBRARY(LIB_XXF86VM Xxf86vm REQUIRED) + FIND_LIBRARY(LIB_XEXT Xext REQUIRED) + FIND_LIBRARY(LIB_X11 X11 REQUIRED) + ENDIF(APPLE) +ENDIF(UNIX) + +FIND_LIBRARY(LIB_IRR Irrlicht-svn2329 REQUIRED) +FIND_LIBRARY(LIB_AS angelscript REQUIRED) +FIND_LIBRARY(LIB_SFML_SYSTEM sfml-system REQUIRED) +FIND_LIBRARY(LIB_SFML_AUDIO sfml-audio REQUIRED) + +IF(UNIX) + IF(APPLE) + ELSE(APPLE) + SET(LIBS + ${LIB_GL} + ${LIB_XXF86VM} + ${LIB_XEXT} + ${LIB_X11} + ) + ENDIF(APPLE) +ENDIF(UNIX) + +SET(LIBS + ${LIBS} + ${LIB_IRR} + ${LIB_AS} + ${LIB_SFML_SYSTEM} + ${LIB_SFML_AUDIO} + ) + +# Create the executable. +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin) +ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) + +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIBS}) + Added: trunk/build/CodeBlocks/sirrf.cbp =================================================================== --- trunk/build/CodeBlocks/sirrf.cbp (rev 0) +++ trunk/build/CodeBlocks/sirrf.cbp 2009-06-07 17:33:48 UTC (rev 61) @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Sirrf" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="linux-debug"> + <Option output="../../bin/sirrf" prefix_auto="1" extension_auto="1" /> + <Option working_dir="../../bin" /> + <Option object_output="obj/linux/debug" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add directory="/usr/local/include/" /> + <Add directory="/usr/local/include/irrlicht-svn2329" /> + </Compiler> + <Linker> + <Add option="-lGL" /> + <Add option="-lXxf86vm" /> + <Add option="-lXext" /> + <Add option="-lX11" /> + <Add option="-lsfml-system -lsfml-audio" /> + <Add library="libIrrlicht-svn2329.a" /> + <Add library="libangelscript.a" /> + <Add directory="/usr/lib/" /> + <Add directory="/usr/local/lib/" /> + </Linker> + </Target> + <Target title="linux-release"> + <Option output="../../bin/sirrf" prefix_auto="1" extension_auto="1" /> + <Option working_dir="../../bin" /> + <Option object_output="obj/linux/release" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-O3" /> + <Add directory="/usr/local/include/" /> + <Add directory="/usr/local/include/irrlicht-svn2329" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add option="-lGL" /> + <Add option="-lXxf86vm" /> + <Add option="-lXext" /> + <Add option="-lX11" /> + <Add option="-lsfml-system -lsfml-audio" /> + <Add library="libIrrlicht-svn2329.a" /> + <Add library="libangelscript.a" /> + <Add directory="/usr/lib/" /> + <Add directory="/usr/local/lib/" /> + </Linker> + </Target> + </Build> + <Compiler> + <Add option="-Wall" /> + <Add directory="../../src/vendor" /> + </Compiler> + <Unit filename="../../src/components/components.cpp" /> + <Unit filename="../../src/components/components.h" /> + <Unit filename="../../src/components/scene/AnimatedMeshComponent.cpp" /> + <Unit filename="../../src/components/scene/AnimatedMeshComponent.h" /> + <Unit filename="../../src/components/scene/BillboardComponent.cpp" /> + <Unit filename="../../src/components/scene/BillboardComponent.h" /> + <Unit filename="../../src/components/scene/CameraComponent.cpp" /> + <Unit filename="../../src/components/scene/CameraComponent.h" /> + <Unit filename="../../src/components/scene/ImageComponent.cpp" /> + <Unit filename="../../src/components/scene/ImageComponent.h" /> + <Unit filename="../../src/components/scene/LightComponent.cpp" /> + <Unit filename="../../src/components/scene/LightComponent.h" /> + <Unit filename="../../src/components/scene/MeshComponent.cpp" /> + <Unit filename="../../src/components/scene/MeshComponent.h" /> + <Unit filename="../../src/components/scene/OctTreeComponent.cpp" /> + <Unit filename="../../src/components/scene/OctTreeComponent.h" /> + <Unit filename="../../src/components/scene/ParticleSysComponent.cpp" /> + <Unit filename="../../src/components/scene/ParticleSysComponent.h" /> + <Unit filename="../../src/components/scene/SceneComponent.cpp" /> + <Unit filename="../../src/components/scene/SceneComponent.h" /> + <Unit filename="../../src/components/scene/SkyBoxComponent.cpp" /> + <Unit filename="../../src/components/scene/SkyBoxComponent.h" /> + <Unit filename="../../src/components/scene/SkyDomeComponent.cpp" /> + <Unit filename="../../src/components/scene/SkyDomeComponent.h" /> + <Unit filename="../../src/components/scene/TerrainComponent.cpp" /> + <Unit filename="../../src/components/scene/TerrainComponent.h" /> + <Unit filename="../../src/components/scene/TextBillboardComponent.cpp" /> + <Unit filename="../../src/components/scene/TextBillboardComponent.h" /> + <Unit filename="../../src/components/sound/SoundListenerComponent.cpp" /> + <Unit filename="../../src/components/sound/SoundListenerComponent.h" /> + <Unit filename="../../src/components/sound/SoundSourceComponent.cpp" /> + <Unit filename="../../src/components/sound/SoundSourceComponent.h" /> + <Unit filename="../../src/core/DataStack.cpp" /> + <Unit filename="../../src/core/DataStack.h" /> + <Unit filename="../../src/core/DataStore.cpp" /> + <Unit filename="../../src/core/DataStore.h" /> + <Unit filename="../../src/core/Entity.cpp" /> + <Unit filename="../../src/core/Entity.h" /> + <Unit filename="../../src/core/EntityComponent.cpp" /> + <Unit filename="../../src/core/EntityComponent.h" /> + <Unit filename="../../src/core/EntityManager.cpp" /> + <Unit filename="../../src/core/EntityManager.h" /> + <Unit filename="../../src/core/EventManager.cpp" /> + <Unit filename="../../src/core/EventManager.h" /> + <Unit filename="../../src/core/GameManager.cpp" /> + <Unit filename="../../src/core/GameManager.h" /> + <Unit filename="../../src/core/GameState.cpp" /> + <Unit filename="../../src/core/GameState.h" /> + <Unit filename="../../src/dependencies.h" /> + <Unit filename="../../src/main.cpp" /> + <Unit filename="../../src/scripting/Script.cpp" /> + <Unit filename="../../src/scripting/Script.h" /> + <Unit filename="../../src/scripting/ScriptManager.cpp" /> + <Unit filename="../../src/scripting/ScriptManager.h" /> + <Unit filename="../../src/scripting/irrlicht/asAabbox3d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asAabbox3d.h" /> + <Unit filename="../../src/scripting/irrlicht/asDimension2d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asDimension2d.h" /> + <Unit filename="../../src/scripting/irrlicht/asIrrHelper.h" /> + <Unit filename="../../src/scripting/irrlicht/asIrrlicht.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asIrrlicht.h" /> + <Unit filename="../../src/scripting/irrlicht/asLine2d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asLine2d.h" /> + <Unit filename="../../src/scripting/irrlicht/asLine3d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asLine3d.h" /> + <Unit filename="../../src/scripting/irrlicht/asMatrix4.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asMatrix4.h" /> + <Unit filename="../../src/scripting/irrlicht/asPosition2d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asPosition2d.h" /> + <Unit filename="../../src/scripting/irrlicht/asRect.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asRect.h" /> + <Unit filename="../../src/scripting/irrlicht/asSColor.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asSColor.h" /> + <Unit filename="../../src/scripting/irrlicht/asVector2d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asVector2d.h" /> + <Unit filename="../../src/scripting/irrlicht/asVector3d.cpp" /> + <Unit filename="../../src/scripting/irrlicht/asVector3d.h" /> + <Unit filename="../../src/scripting/scriptstring.cpp" /> + <Unit filename="../../src/scripting/scriptstring.h" /> + <Unit filename="../../src/scripting/scriptstring_utils.cpp" /> + <Unit filename="../../src/sound/SoundManager.cpp" /> + <Unit filename="../../src/sound/SoundManager.h" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> Property changes on: trunk/share ___________________________________________________________________ Added: svn:mergeinfo + Deleted: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-06-06 19:22:22 UTC (rev 60) +++ trunk/src/sirrf.cbp 2009-06-07 17:33:48 UTC (rev 61) @@ -1,148 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<CodeBlocks_project_file> - <FileVersion major="1" minor="6" /> - <Project> - <Option title="Sirrf" /> - <Option pch_mode="2" /> - <Option compiler="gcc" /> - <Build> - <Target title="linux-debug"> - <Option output="../bin/sirrf" prefix_auto="1" extension_auto="1" /> - <Option object_output="../obj/linux/debug/" /> - <Option type="1" /> - <Option compiler="gcc" /> - <Compiler> - <Add option="-pedantic" /> - <Add option="-g" /> - <Add directory="/usr/local/include/" /> - <Add directory="/usr/local/include/irrlicht-svn2329" /> - </Compiler> - <Linker> - <Add option="-lGL" /> - <Add option="-lXxf86vm" /> - <Add option="-lXext" /> - <Add option="-lX11" /> - <Add option="-lsfml-system -lsfml-audio" /> - <Add library="libIrrlicht-svn2329.a" /> - <Add library="libangelscript.a" /> - <Add directory="/usr/lib/" /> - <Add directory="/usr/local/lib/" /> - </Linker> - </Target> - <Target title="linux-release"> - <Option output="../bin/sirrf" prefix_auto="1" extension_auto="1" /> - <Option object_output="../obj/linux/release/" /> - <Option type="1" /> - <Option compiler="gcc" /> - <Compiler> - <Add option="-O3" /> - <Add directory="/usr/local/include/" /> - <Add directory="/usr/local/include/irrlicht-svn2329" /> - </Compiler> - <Linker> - <Add option="-s" /> - <Add option="-lGL" /> - <Add option="-lXxf86vm" /> - <Add option="-lXext" /> - <Add option="-lX11" /> - <Add option="-lsfml-system -lsfml-audio" /> - <Add library="libIrrlicht-svn2329.a" /> - <Add library="libangelscript.a" /> - <Add directory="/usr/lib/" /> - <Add directory="/usr/local/lib/" /> - </Linker> - </Target> - </Build> - <Compiler> - <Add option="-Wall" /> - <Add directory="vendor" /> - </Compiler> - <Unit filename="components/components.cpp" /> - <Unit filename="components/components.h" /> - <Unit filename="components/scene/AnimatedMeshComponent.cpp" /> - <Unit filename="components/scene/AnimatedMeshComponent.h" /> - <Unit filename="components/scene/BillboardComponent.cpp" /> - <Unit filename="components/scene/BillboardComponent.h" /> - <Unit filename="components/scene/CameraComponent.cpp" /> - <Unit filename="components/scene/CameraComponent.h" /> - <Unit filename="components/scene/ImageComponent.cpp" /> - <Unit filename="components/scene/ImageComponent.h" /> - <Unit filename="components/scene/LightComponent.cpp" /> - <Unit filename="components/scene/LightComponent.h" /> - <Unit filename="components/scene/MeshComponent.cpp" /> - <Unit filename="components/scene/MeshComponent.h" /> - <Unit filename="components/scene/OctTreeComponent.cpp" /> - <Unit filename="components/scene/OctTreeComponent.h" /> - <Unit filename="components/scene/ParticleSysComponent.cpp" /> - <Unit filename="components/scene/ParticleSysComponent.h" /> - <Unit filename="components/scene/SceneComponent.cpp" /> - <Unit filename="components/scene/SceneComponent.h" /> - <Unit filename="components/scene/SkyBoxComponent.cpp" /> - <Unit filename="components/scene/SkyBoxComponent.h" /> - <Unit filename="components/scene/SkyDomeComponent.cpp" /> - <Unit filename="components/scene/SkyDomeComponent.h" /> - <Unit filename="components/scene/TerrainComponent.cpp" /> - <Unit filename="components/scene/TerrainComponent.h" /> - <Unit filename="components/scene/TextBillboardComponent.cpp" /> - <Unit filename="components/scene/TextBillboardComponent.h" /> - <Unit filename="components/sound/SoundListenerComponent.cpp" /> - <Unit filename="components/sound/SoundListenerComponent.h" /> - <Unit filename="components/sound/SoundSourceComponent.cpp" /> - <Unit filename="components/sound/SoundSourceComponent.h" /> - <Unit filename="core/DataStack.cpp" /> - <Unit filename="core/DataStack.h" /> - <Unit filename="core/DataStore.cpp" /> - <Unit filename="core/DataStore.h" /> - <Unit filename="core/Entity.cpp" /> - <Unit filename="core/Entity.h" /> - <Unit filename="core/EntityComponent.cpp" /> - <Unit filename="core/EntityComponent.h" /> - <Unit filename="core/EntityManager.cpp" /> - <Unit filename="core/EntityManager.h" /> - <Unit filename="core/EventManager.cpp" /> - <Unit filename="core/EventManager.h" /> - <Unit filename="core/GameManager.cpp" /> - <Unit filename="core/GameManager.h" /> - <Unit filename="core/GameState.cpp" /> - <Unit filename="core/GameState.h" /> - <Unit filename="dependencies.h" /> - <Unit filename="main.cpp" /> - <Unit filename="scripting/Script.cpp" /> - <Unit filename="scripting/Script.h" /> - <Unit filename="scripting/ScriptManager.cpp" /> - <Unit filename="scripting/ScriptManager.h" /> - <Unit filename="scripting/irrlicht/asAabbox3d.cpp" /> - <Unit filename="scripting/irrlicht/asAabbox3d.h" /> - <Unit filename="scripting/irrlicht/asDimension2d.cpp" /> - <Unit filename="scripting/irrlicht/asDimension2d.h" /> - <Unit filename="scripting/irrlicht/asIrrHelper.h" /> - <Unit filename="scripting/irrlicht/asIrrlicht.cpp" /> - <Unit filename="scripting/irrlicht/asIrrlicht.h" /> - <Unit filename="scripting/irrlicht/asLine2d.cpp" /> - <Unit filename="scripting/irrlicht/asLine2d.h" /> - <Unit filename="scripting/irrlicht/asLine3d.cpp" /> - <Unit filename="scripting/irrlicht/asLine3d.h" /> - <Unit filename="scripting/irrlicht/asMatrix4.cpp" /> - <Unit filename="scripting/irrlicht/asMatrix4.h" /> - <Unit filename="scripting/irrlicht/asPosition2d.cpp" /> - <Unit filename="scripting/irrlicht/asPosition2d.h" /> - <Unit filename="scripting/irrlicht/asRect.cpp" /> - <Unit filename="scripting/irrlicht/asRect.h" /> - <Unit filename="scripting/irrlicht/asSColor.cpp" /> - <Unit filename="scripting/irrlicht/asSColor.h" /> - <Unit filename="scripting/irrlicht/asVector2d.cpp" /> - <Unit filename="scripting/irrlicht/asVector2d.h" /> - <Unit filename="scripting/irrlicht/asVector3d.cpp" /> - <Unit filename="scripting/irrlicht/asVector3d.h" /> - <Unit filename="scripting/scriptstring.cpp" /> - <Unit filename="scripting/scriptstring.h" /> - <Unit filename="scripting/scriptstring_utils.cpp" /> - <Unit filename="sound/SoundManager.cpp" /> - <Unit filename="sound/SoundManager.h" /> - <Extensions> - <code_completion /> - <envvars /> - <debugger /> - </Extensions> - </Project> -</CodeBlocks_project_file> Deleted: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-06 19:22:22 UTC (rev 60) +++ trunk/src/sirrf.depend 2009-06-07 17:33:48 UTC (rev 61) @@ -1,2485 +0,0 @@ -# depslib dependency file v1.0 -1237737808 source:/home/michael/Programming/Projects/game/src/angelscript/add_on/scriptstring/scriptstring.cpp - <assert.h> - <string.h> - "scriptstring.h" - -1228771288 /home/michael/Programming/Projects/game/src/angelscript/add_on/scriptstring/scriptstring.h - <angelscript.h> - <string> - -1242048002 /usr/local/include//angelscript.h - <stddef.h> - -1237737822 source:/home/michael/Programming/Projects/game/src/angelscript/add_on/scriptstring/scriptstring_utils.cpp - <assert.h> - "scriptstring.h" - -1240924120 source:/home/michael/Programming/Projects/game/src/core/DataStack.cpp - "DataStack.h" - -1240834414 /home/michael/Programming/Projects/game/src/core/DataStack.h - "../dependencies.h" - "DataStore.h" - -1240926846 /home/michael/Programming/Projects/game/src/dependencies.h - <assert.h> - <fstream> - <iostream> - <map> - <string> - <sstream> - <typeinfo> - <vector> - <irrlicht.h> - <angelscript.h> - -1239199901 /usr/local/include/irrlicht-1.5//irrlicht.h - "IrrCompileConfig.h" - "aabbox3d.h" - "CDynamicMeshBuffer.h" - "CIndexBuffer.h" - "CMeshBuffer.h" - "coreutil.h" - "CVertexBuffer.h" - "dimension2d.h" - "ECullingTypes.h" - "EDebugSceneTypes.h" - "EDriverFeatures.h" - "EDriverTypes.h" - "EGUIAlignment.h" - "EGUIElementTypes.h" - "EHardwareBufferFlags.h" - "EMaterialFlags.h" - "EMaterialTypes.h" - "EMeshWriterEnums.h" - "EMessageBoxFlags.h" - "ESceneNodeAnimatorTypes.h" - "ESceneNodeTypes.h" - "ETerrainElements.h" - "fast_atof.h" - "heapsort.h" - "IAnimatedMesh.h" - "IAnimatedMeshMD2.h" - "IAnimatedMeshMD3.h" - "IAnimatedMeshSceneNode.h" - "IAttributeExchangingObject.h" - "IAttributes.h" - "IBillboardSceneNode.h" - "IBillboardTextSceneNode.h" - "IBoneSceneNode.h" - "ICameraSceneNode.h" - "ICursorControl.h" - "IDummyTransformationSceneNode.h" - "IDynamicMeshBuffer.h" - "IEventReceiver.h" - "IFileList.h" - "IFileSystem.h" - "IGPUProgrammingServices.h" - "IGUIButton.h" - "IGUICheckBox.h" - "IGUIColorSelectDialog.h" - "IGUIComboBox.h" - "IGUIContextMenu.h" - "IGUIEditBox.h" - "IGUIElement.h" - "IGUIElementFactory.h" - "IGUIEnvironment.h" - "IGUIFileOpenDialog.h" - "IGUIFont.h" - "IGUIFontBitmap.h" - "IGUIImage.h" - "IGUIInOutFader.h" - "IGUIListBox.h" - "IGUIMeshViewer.h" - "IGUIScrollBar.h" - "IGUISkin.h" - "IGUISpinBox.h" - "IGUISpriteBank.h" - "IGUIStaticText.h" - "IGUITabControl.h" - "IGUITable.h" - "IGUIToolbar.h" - "IGUIWindow.h" - "IImage.h" - "IImageLoader.h" - "IImageWriter.h" - "IIndexBuffer.h" - "ILightSceneNode.h" - "ILogger.h" - "IMaterialRenderer.h" - "IMaterialRendererServices.h" - "IMesh.h" - "IMeshBuffer.h" - "IMeshCache.h" - "IMeshLoader.h" - "IMeshManipulator.h" - "IMeshSceneNode.h" - "IMeshWriter.h" - "IMetaTriangleSelector.h" - "IOSOperator.h" - "IParticleSystemSceneNode.h" - "IQ3LevelMesh.h" - "IQ3Shader.h" - "IReadFile.h" - "IReferenceCounted.h" - "irrArray.h" - "IrrlichtDevice.h" - "irrList.h" - "irrMap.h" - "irrMath.h" - "irrString.h" - "irrTypes.h" - "irrXML.h" - "ISceneCollisionManager.h" - "ISceneManager.h" - "ISceneNode.h" - "ISceneNodeAnimator.h" - "ISceneNodeAnimatorCameraFPS.h" - "ISceneNodeAnimatorCameraMaya.h" - "ISceneNodeAnimatorCollisionResponse.h" - "ISceneNodeAnimatorFactory.h" - "ISceneNodeFactory.h" - "ISceneUserDataSerializer.h" - "IShaderConstantSetCallBack.h" - "IShadowVolumeSceneNode.h" - "ISkinnedMesh.h" - "ITerrainSceneNode.h" - "ITextSceneNode.h" - "ITexture.h" - "ITimer.h" - "ITriangleSelector.h" - "IVertexBuffer.h" - "IVideoDriver.h" - "IVideoModeList.h" - "IVolumeLightSceneNode.h" - "IWriteFile.h" - "IXMLReader.h" - "IXMLWriter.h" - "Keycodes.h" - "line2d.h" - "line3d.h" - "matrix4.h" - "plane3d.h" - "position2d.h" - "quaternion.h" - "rect.h" - "S3DVertex.h" - "SAnimatedMesh.h" - "SceneParameters.h" - "SColor.h" - "SExposedVideoData.h" - "SIrrCreationParameters.h" - "SKeyMap.h" - "SLight.h" - "SMaterial.h" - "SMesh.h" - "SMeshBuffer.h" - "SMeshBufferLightMap.h" - "SMeshBufferTangents.h" - "SParticle.h" - "SSharedMeshBuffer.h" - "SSkinMeshBuffer.h" - "SVertexIndex.h" - "SViewFrustum.h" - "triangle3d.h" - "vector2d.h" - "vector3d.h" - "SIrrCreationParameters.h" - -1239199901 /usr/local/include/irrlicht-1.5//IrrCompileConfig.h - <stdio.h> - -1239199901 /usr/local/include/irrlicht-1.5//aabbox3d.h - "irrMath.h" - "plane3d.h" - "line3d.h" - -1239199901 /usr/local/include/irrlicht-1.5//irrMath.h - "IrrCompileConfig.h" - "irrTypes.h" - <math.h> - <stdlib.h> - -1239199901 /usr/local/include/irrlicht-1.5//irrTypes.h - "IrrCompileConfig.h" - <wchar.h> - <crtdbg.h> - "assert.h" - <stdlib.h> - <crtdbg.h> - -1239199901 /usr/local/include/irrlicht-1.5//plane3d.h - "irrMath.h" - "vector3d.h" - -1239199901 /usr/local/include/irrlicht-1.5//vector3d.h - "irrMath.h" - -1239199901 /usr/local/include/irrlicht-1.5//line3d.h - "irrTypes.h" - "vector3d.h" - -1239199901 /usr/local/include/irrlicht-1.5//CDynamicMeshBuffer.h - "IDynamicMeshBuffer.h" - "CVertexBuffer.h" - "CIndexBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//IDynamicMeshBuffer.h - "IMeshBuffer.h" - "IVertexBuffer.h" - "IIndexBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMeshBuffer.h - "IReferenceCounted.h" - "SMaterial.h" - "aabbox3d.h" - "S3DVertex.h" - "SVertexIndex.h" - "EHardwareBufferFlags.h" - -1239199901 /usr/local/include/irrlicht-1.5//IReferenceCounted.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//SMaterial.h - "SColor.h" - "matrix4.h" - "irrArray.h" - "EMaterialTypes.h" - "EMaterialFlags.h" - "SMaterialLayer.h" - -1239199901 /usr/local/include/irrlicht-1.5//SColor.h - "irrTypes.h" - "irrMath.h" - -1239199901 /usr/local/include/irrlicht-1.5//matrix4.h - "irrTypes.h" - "vector3d.h" - "vector2d.h" - "plane3d.h" - "aabbox3d.h" - "rect.h" - "irrString.h" - -1239199901 /usr/local/include/irrlicht-1.5//vector2d.h - "irrMath.h" - -1239199901 /usr/local/include/irrlicht-1.5//rect.h - "irrTypes.h" - "dimension2d.h" - "position2d.h" - -1239199901 /usr/local/include/irrlicht-1.5//dimension2d.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//position2d.h - "irrTypes.h" - "dimension2d.h" - -1239199901 /usr/local/include/irrlicht-1.5//irrString.h - "irrTypes.h" - "irrAllocator.h" - "irrMath.h" - <stdio.h> - <string.h> - <stdlib.h> - -1239199901 /usr/local/include/irrlicht-1.5//irrAllocator.h - "irrTypes.h" - <new> - <memory.h> - -1239199901 /usr/local/include/irrlicht-1.5//irrArray.h - "irrTypes.h" - "heapsort.h" - "irrAllocator.h" - -1239199901 /usr/local/include/irrlicht-1.5//heapsort.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//EMaterialTypes.h - -1239199901 /usr/local/include/irrlicht-1.5//EMaterialFlags.h - -1239199901 /usr/local/include/irrlicht-1.5//SMaterialLayer.h - "matrix4.h" - "irrAllocator.h" - -1239199901 /usr/local/include/irrlicht-1.5//S3DVertex.h - "vector3d.h" - "vector2d.h" - "SColor.h" - -1239199901 /usr/local/include/irrlicht-1.5//SVertexIndex.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//EHardwareBufferFlags.h - -1239199901 /usr/local/include/irrlicht-1.5//IVertexBuffer.h - "IReferenceCounted.h" - "irrArray.h" - "S3DVertex.h" - -1239199901 /usr/local/include/irrlicht-1.5//IIndexBuffer.h - "IReferenceCounted.h" - "irrArray.h" - "SVertexIndex.h" - -1239199901 /usr/local/include/irrlicht-1.5//CVertexBuffer.h - "IVertexBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//CIndexBuffer.h - "IIndexBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//CMeshBuffer.h - "irrArray.h" - "IMeshBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//coreutil.h - "irrString.h" - -1239199901 /usr/local/include/irrlicht-1.5//ECullingTypes.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//EDebugSceneTypes.h - -1239199901 /usr/local/include/irrlicht-1.5//EDriverFeatures.h - -1239199901 /usr/local/include/irrlicht-1.5//EDriverTypes.h - -1239199901 /usr/local/include/irrlicht-1.5//EGUIAlignment.h - -1239199901 /usr/local/include/irrlicht-1.5//EGUIElementTypes.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//EMeshWriterEnums.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//EMessageBoxFlags.h - -1239199901 /usr/local/include/irrlicht-1.5//ESceneNodeAnimatorTypes.h - -1239199901 /usr/local/include/irrlicht-1.5//ESceneNodeTypes.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//ETerrainElements.h - -1239199901 /usr/local/include/irrlicht-1.5//fast_atof.h - <stdlib.h> - "irrMath.h" - <float.h> - <limits.h> - -1239199901 /usr/local/include/irrlicht-1.5//IAnimatedMesh.h - "aabbox3d.h" - "IMesh.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMesh.h - "IReferenceCounted.h" - "SMaterial.h" - "EHardwareBufferFlags.h" - -1239199901 /usr/local/include/irrlicht-1.5//IAnimatedMeshMD2.h - "IAnimatedMesh.h" - -1239199901 /usr/local/include/irrlicht-1.5//IAnimatedMeshMD3.h - "IAnimatedMesh.h" - "IQ3Shader.h" - "quaternion.h" - -1239199901 /usr/local/include/irrlicht-1.5//IQ3Shader.h - "irrArray.h" - "fast_atof.h" - "IFileSystem.h" - "IVideoDriver.h" - "coreutil.h" - -1239199901 /usr/local/include/irrlicht-1.5//IFileSystem.h - "IReferenceCounted.h" - "IXMLReader.h" - "irrString.h" - -1239199901 /usr/local/include/irrlicht-1.5//IXMLReader.h - "IReferenceCounted.h" - "irrXML.h" - -1239199901 /usr/local/include/irrlicht-1.5//irrXML.h - <stdio.h> - "IrrCompileConfig.h" - <irrXML.h> - <string> - <irrXML.h> - <irrXML.h> - <irrXML.h> - -1239199901 /usr/local/include/irrlicht-1.5//IVideoDriver.h - "rect.h" - "SColor.h" - "ITexture.h" - "irrArray.h" - "matrix4.h" - "plane3d.h" - "dimension2d.h" - "position2d.h" - "SMaterial.h" - "IMeshBuffer.h" - "triangle3d.h" - "EDriverTypes.h" - "EDriverFeatures.h" - -1239199901 /usr/local/include/irrlicht-1.5//ITexture.h - "IReferenceCounted.h" - "IImage.h" - "dimension2d.h" - "EDriverTypes.h" - "irrString.h" - "matrix4.h" - -1239199901 /usr/local/include/irrlicht-1.5//IImage.h - "IReferenceCounted.h" - "position2d.h" - "rect.h" - "SColor.h" - -1239199901 /usr/local/include/irrlicht-1.5//triangle3d.h - "vector3d.h" - "line3d.h" - "plane3d.h" - "aabbox3d.h" - -1239199901 /usr/local/include/irrlicht-1.5//quaternion.h - "irrTypes.h" - "irrMath.h" - "matrix4.h" - "vector3d.h" - -1239199901 /usr/local/include/irrlicht-1.5//IAnimatedMeshSceneNode.h - "ISceneNode.h" - "IBoneSceneNode.h" - "IAnimatedMeshMD2.h" - "IAnimatedMeshMD3.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISceneNode.h - "IAttributeExchangingObject.h" - "ESceneNodeTypes.h" - "ECullingTypes.h" - "EDebugSceneTypes.h" - "ISceneNodeAnimator.h" - "ITriangleSelector.h" - "SMaterial.h" - "irrString.h" - "aabbox3d.h" - "matrix4.h" - "irrList.h" - "IAttributes.h" - -1239199901 /usr/local/include/irrlicht-1.5//IAttributeExchangingObject.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISceneNodeAnimator.h - "IReferenceCounted.h" - "vector3d.h" - "ESceneNodeAnimatorTypes.h" - "IAttributeExchangingObject.h" - "IEventReceiver.h" - -1239199901 /usr/local/include/irrlicht-1.5//IEventReceiver.h - "ILogger.h" - "position2d.h" - "Keycodes.h" - "irrString.h" - -1239199901 /usr/local/include/irrlicht-1.5//ILogger.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//Keycodes.h - -1239199901 /usr/local/include/irrlicht-1.5//ITriangleSelector.h - "IReferenceCounted.h" - "triangle3d.h" - "aabbox3d.h" - "matrix4.h" - "line3d.h" - -1239199901 /usr/local/include/irrlicht-1.5//irrList.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//IAttributes.h - "IReferenceCounted.h" - "SColor.h" - "vector3d.h" - "vector2d.h" - "line2d.h" - "line3d.h" - "triangle3d.h" - "position2d.h" - "rect.h" - "matrix4.h" - "quaternion.h" - "plane3d.h" - "triangle3d.h" - "line2d.h" - "line3d.h" - "irrString.h" - "irrArray.h" - "IXMLReader.h" - -1239199901 /usr/local/include/irrlicht-1.5//line2d.h - "irrTypes.h" - "vector2d.h" - -1239199901 /usr/local/include/irrlicht-1.5//IBoneSceneNode.h - "ISceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//IBillboardSceneNode.h - "ISceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//IBillboardTextSceneNode.h - "IBillboardSceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//ICameraSceneNode.h - "ISceneNode.h" - "IEventReceiver.h" - -1239199901 /usr/local/include/irrlicht-1.5//ICursorControl.h - "IReferenceCounted.h" - "position2d.h" - "rect.h" - -1239199901 /usr/local/include/irrlicht-1.5//IDummyTransformationSceneNode.h - "ISceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//IFileList.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGPUProgrammingServices.h - "IReferenceCounted.h" - "SMaterial.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIButton.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIElement.h - "IAttributeExchangingObject.h" - "irrList.h" - "rect.h" - "irrString.h" - "IEventReceiver.h" - "EGUIElementTypes.h" - "EGUIAlignment.h" - "IAttributes.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUICheckBox.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIColorSelectDialog.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIComboBox.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIContextMenu.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIEditBox.h - "IGUIElement.h" - "SColor.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIElementFactory.h - "IReferenceCounted.h" - "EGUIElementTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIEnvironment.h - "IReferenceCounted.h" - "IGUISkin.h" - "rect.h" - "EMessageBoxFlags.h" - "IEventReceiver.h" - "IXMLReader.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUISkin.h - "IAttributeExchangingObject.h" - "EGUIAlignment.h" - "SColor.h" - "rect.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIFileOpenDialog.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIFont.h - "IReferenceCounted.h" - "SColor.h" - "rect.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIFontBitmap.h - "IGUIFont.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIImage.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIInOutFader.h - "IGUIElement.h" - "SColor.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIListBox.h - "IGUIElement.h" - "SColor.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIMeshViewer.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIScrollBar.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUISpinBox.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUISpriteBank.h - "IReferenceCounted.h" - "irrArray.h" - "SColor.h" - "rect.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIStaticText.h - "IGUIElement.h" - "SColor.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUITabControl.h - "IGUIElement.h" - "SColor.h" - "IGUISkin.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUITable.h - "IGUIElement.h" - "irrTypes.h" - "SColor.h" - "IGUISkin.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIToolbar.h - "IGUIElement.h" - -1239199901 /usr/local/include/irrlicht-1.5//IGUIWindow.h - "IGUIElement.h" - "EMessageBoxFlags.h" - -1239199901 /usr/local/include/irrlicht-1.5//IImageLoader.h - "IReferenceCounted.h" - "IImage.h" - -1239199901 /usr/local/include/irrlicht-1.5//IImageWriter.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//ILightSceneNode.h - "ISceneNode.h" - "SLight.h" - -1239199901 /usr/local/include/irrlicht-1.5//SLight.h - "SColor.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMaterialRenderer.h - "IReferenceCounted.h" - "SMaterial.h" - "S3DVertex.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMaterialRendererServices.h - "IReferenceCounted.h" - "SMaterial.h" - "S3DVertex.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMeshCache.h - "IReferenceCounted.h" - "irrString.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMeshLoader.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMeshManipulator.h - "IReferenceCounted.h" - "vector3d.h" - "aabbox3d.h" - "matrix4.h" - "IAnimatedMesh.h" - "SColor.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMeshSceneNode.h - "ISceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMeshWriter.h - "IReferenceCounted.h" - "EMeshWriterEnums.h" - -1239199901 /usr/local/include/irrlicht-1.5//IMetaTriangleSelector.h - "ITriangleSelector.h" - -1239199901 /usr/local/include/irrlicht-1.5//IOSOperator.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleSystemSceneNode.h - "ISceneNode.h" - "IParticleAnimatedMeshSceneNodeEmitter.h" - "IParticleBoxEmitter.h" - "IParticleCylinderEmitter.h" - "IParticleMeshEmitter.h" - "IParticleRingEmitter.h" - "IParticleSphereEmitter.h" - "IParticleAttractionAffector.h" - "IParticleFadeOutAffector.h" - "IParticleGravityAffector.h" - "IParticleRotationAffector.h" - "dimension2d.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleAnimatedMeshSceneNodeEmitter.h - "IParticleEmitter.h" - "IAnimatedMeshSceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleEmitter.h - "IAttributeExchangingObject.h" - "SParticle.h" - -1239199901 /usr/local/include/irrlicht-1.5//SParticle.h - "vector3d.h" - "dimension2d.h" - "SColor.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleBoxEmitter.h - "IParticleEmitter.h" - "aabbox3d.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleCylinderEmitter.h - "IParticleEmitter.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleMeshEmitter.h - "IParticleEmitter.h" - "IMesh.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleRingEmitter.h - "IParticleEmitter.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleSphereEmitter.h - "IParticleEmitter.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleAttractionAffector.h - "IParticleAffector.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleAffector.h - "IAttributeExchangingObject.h" - "SParticle.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleFadeOutAffector.h - "IParticleAffector.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleGravityAffector.h - "IParticleAffector.h" - -1239199901 /usr/local/include/irrlicht-1.5//IParticleRotationAffector.h - "IParticleAffector.h" - -1239199901 /usr/local/include/irrlicht-1.5//IQ3LevelMesh.h - "IAnimatedMesh.h" - "IQ3Shader.h" - -1239199901 /usr/local/include/irrlicht-1.5//IReadFile.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//IrrlichtDevice.h - "IReferenceCounted.h" - "dimension2d.h" - "IVideoDriver.h" - "EDriverTypes.h" - "IEventReceiver.h" - "ICursorControl.h" - "IVideoModeList.h" - "ITimer.h" - "IOSOperator.h" - -1239199901 /usr/local/include/irrlicht-1.5//IVideoModeList.h - "IReferenceCounted.h" - "dimension2d.h" - -1239199901 /usr/local/include/irrlicht-1.5//ITimer.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//irrMap.h - "irrTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISceneCollisionManager.h - "IReferenceCounted.h" - "vector3d.h" - "triangle3d.h" - "position2d.h" - "line3d.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISceneManager.h - "IReferenceCounted.h" - "irrArray.h" - "vector3d.h" - "dimension2d.h" - "SColor.h" - "ETerrainElements.h" - "ESceneNodeTypes.h" - "EMeshWriterEnums.h" - "SceneParameters.h" - -1239199901 /usr/local/include/irrlicht-1.5//SceneParameters.h - -1239199901 /usr/local/include/irrlicht-1.5//ISceneNodeAnimatorCameraFPS.h - "ISceneNodeAnimator.h" - "IEventReceiver.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISceneNodeAnimatorCameraMaya.h - "ISceneNodeAnimator.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISceneNodeAnimatorCollisionResponse.h - "ISceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISceneNodeAnimatorFactory.h - "IReferenceCounted.h" - "ESceneNodeAnimatorTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISceneNodeFactory.h - "IReferenceCounted.h" - "ESceneNodeTypes.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISceneUserDataSerializer.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//IShaderConstantSetCallBack.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//IShadowVolumeSceneNode.h - "ISceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//ISkinnedMesh.h - "irrArray.h" - "IBoneSceneNode.h" - "IAnimatedMesh.h" - "SSkinMeshBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//SSkinMeshBuffer.h - "IMeshBuffer.h" - "S3DVertex.h" - -1239199901 /usr/local/include/irrlicht-1.5//ITerrainSceneNode.h - "ETerrainElements.h" - "ISceneNode.h" - "IDynamicMeshBuffer.h" - "irrArray.h" - -1239199901 /usr/local/include/irrlicht-1.5//ITextSceneNode.h - "ISceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//IVolumeLightSceneNode.h - "ISceneNode.h" - -1239199901 /usr/local/include/irrlicht-1.5//IWriteFile.h - "IReferenceCounted.h" - -1239199901 /usr/local/include/irrlicht-1.5//IXMLWriter.h - "IReferenceCounted.h" - "irrArray.h" - "irrString.h" - -1239199901 /usr/local/include/irrlicht-1.5//SAnimatedMesh.h - "IAnimatedMesh.h" - "IMesh.h" - "aabbox3d.h" - "irrArray.h" - -1239199901 /usr/local/include/irrlicht-1.5//SExposedVideoData.h - -1239199901 /usr/local/include/irrlicht-1.5//SIrrCreationParameters.h - "EDriverTypes.h" - "dimension2d.h" - -1239199901 /usr/local/include/irrlicht-1.5//SKeyMap.h - "Keycodes.h" - -1239199901 /usr/local/include/irrlicht-1.5//SMesh.h - "IMesh.h" - "IMeshBuffer.h" - "aabbox3d.h" - "irrArray.h" - -1239199901 /usr/local/include/irrlicht-1.5//SMeshBuffer.h - "CMeshBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//SMeshBufferLightMap.h - "CMeshBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//SMeshBufferTangents.h - "CMeshBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//SSharedMeshBuffer.h - "irrArray.h" - "IMeshBuffer.h" - -1239199901 /usr/local/include/irrlicht-1.5//SViewFrustum.h - "plane3d.h" - "vector3d.h" - "aabbox3d.h" - "matrix4.h" - "IVideoDriver.h" - -1240926318 /home/michael/Programming/Projects/game/src/core/DataStore.h - "../dependencies.h" - "DataStack.h" - -1240924165 source:/home/michael/Programming/Projects/game/src/core/DataStore.cpp - "DataStore.h" - -1240926821 source:/home/michael/Programming/Projects/game/src/core/Entity.cpp - "Entity.h" - -1240926823 /home/michael/Programming/Projects/game/src/core/Entity.h - "../dependencies.h" - "EntityComponent.h" - -1240926836 /home/michael/Programming/Projects/game/src/core/EntityComponent.h - "../dependencies.h" - "Entity.h" - -1240926831 source:/home/michael/Programming/Projects/game/src/core/EntityComponent.cpp - "EntityComponent.h" - -1240926807 source:/home/michael/Programming/Projects/game/src/core/EntityManager.cpp - "EntityManager.h" - -1240926805 /home/michael/Programming/Projects/game/src/core/EntityManager.h - "../dependencies.h" - "Entity.h" - -1240926937 source:/home/michael/Programming/Projects/game/src/core/GameManager.cpp - "GameManager.h" - -1240927433 /home/michael/Programming/Projects/game/src/core/GameManager.h - "../dependencies.h" - "GameState.h" - "DataStore.h" - "EntityManager.h" - "ScriptManager.h" - -1240923898 /home/michael/Programming/Projects/game/src/core/GameState.h - "GameManager.h" - -1240927386 /home/michael/Programming/Projects/game/src/core/ScriptManager.h - "../dependencies.h" - "../angelscript/add_on/scriptstring/scriptstring.h" - -1240924111 source:/home/michael/Programming/Projects/game/src/core/GameState.cpp - "GameState.h" - -1240927391 source:/home/michael/Programming/Projects/game/src/core/ScriptManager.cpp - "ScriptManager.h" - "GameManager.h" - -1240922162 source:/home/michael/Programming/Projects/game/src/main.cpp - "core/GameManager.h" - -1237737808 source:/home/michael/Programming/Projects/sirrf/src/angelscript/add_on/scriptstring/scriptstring.cpp - <assert.h> - <string.h> - "scriptstring.h" - -1228771288 /home/michael/Programming/Projects/sirrf/src/angelscript/add_on/scriptstring/scriptstring.h - <angelscript.h> - <string> - -1237737822 source:/home/michael/Programming/Projects/sirrf/src/angelscript/add_on/scriptstring/scriptstring_utils.cpp - <assert.h> - "scriptstring.h" - -1244309636 source:/home/michael/Programming/Projects/sirrf/src/core/DataStack.cpp - "DataStack.h" - "GameManager.h" - -1244309635 /home/michael/Programming/Projects/sirrf/src/core/DataStack.h - "../dependencies.h" - "DataStore.h" - -1243891466 /home/michael/Programming/Projects/sirrf/src/dependencies.h - <assert.h> - <stddef.h> - <fstream> - <iostream> - <map> - <string> - <sstream> - <typeinfo> - <vector> - <irrlicht.h> - <angelscript.h> - <sigslot/sigslot.h> - <SFML/System.hpp> - <SFML/Audio.hpp> - -1244315472 /home/michael/Programming/Projects/sirrf/src/core/DataStore.h - "../dependencies.h" - "DataStack.h" - -1244310209 source:/home/michael/Programming/Projects/sirrf/src/core/DataStore.cpp - "DataStore.h" - -1244311041 source:/home/michael/Programming/Projects/sirrf/src/core/Entity.cpp - "Entity.h" - "GameManager.h" - -1244311059 /home/michael/Programming/Projects/sirrf/src/core/Entity.h - "../dependencies.h" - "EntityComponent.h" - -1244311588 /home/michael/Programming/Projects/sirrf/src/core/EntityComponent.h - "../dependencies.h" - "Entity.h" - "../scripting/ScriptManager.h" - -1244311591 source:/home/michael/Programming/Projects/sirrf/src/core/EntityComponent.cpp - "EntityComponent.h" - -1244311929 source:/home/michael/Programming/Projects/sirrf/src/core/EntityManager.cpp - "EntityManager.h" - "GameManager.h" - -1244315424 /home/michael/Programming/Projects/sirrf/src/core/EntityManager.h - "../dependencies.h" - "Entity.h" - -1244313641 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp - "GameManager.h" - -1244313637 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h - "../dependencies.h" - "DataStore.h" - "EntityManager.h" - "EventManager.h" - "../sound/SoundManager.h" - "../scripting/ScriptManager.h" - "../components/components.h" - "GameState.h" - -1244314690 /home/michael/Programming/Projects/sirrf/src/core/GameState.h - "GameManager.h" - -1241010330 /home/michael/Programming/Projects/sirrf/src/core/ScriptManager.h - "../dependencies.h" - "../angelscript/add_on/scriptstring/scriptstring.h" - -1244313808 source:/home/michael/Programming/Projects/sirrf/src/core/GameState.cpp - "GameState.h" - -1241017939 source:/home/michael/Programming/Projects/sirrf/src/core/ScriptManager.cpp - "ScriptManager.h" - "GameManager.h" - -1243891466 source:/home/michael/Programming/Projects/sirrf/src/main.cpp - "core/GameManager.h" - -1240939945 source:/home/michael/Programming/Projects/sirrf/src/core/EventSubscriber.cpp - -1244312984 source:/home/michael/Programming/Projects/sirrf/src/core/EventManager.cpp - "EventManager.h" - -1244312971 /home/michael/Programming/Projects/sirrf/src/core/EventManager.h - "../dependencies.h" - -1240941730 /home/michael/Programming/Projects/sirrf/src/core/EventSubscriber.h - "../dependencies.h" - -1240948793 /home/michael/Programming/Projects/sirrf/src/sigslot/sigslot.h - <set> - <list> - <windows.h> - <pthread.h> - -1240948793 /home/michael/Programming/Projects/sirrf/src/vendor/sigslot/sigslot.h - <set> - <list> - <windows.h> - <pthread.h> - -1244315858 /home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.h - "../dependencies.h" - "scriptstring.h" - "Script.h" - -1228771288 /home/michael/Programming/Projects/sirrf/src/vendor/angelscript/add_on/scriptstring/scriptstring.h - <angelscript.h> - <string> - -1244315760 source:/home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.cpp - "ScriptManager.h" - "irrlicht/asIrrlicht.h" - "../core/GameManager.h" - -1228771288 /home/michael/Programming/Projects/sirrf/src/scripting/scriptstring.h - <angelscript.h> - <string> - -1237737808 source:/home/michael/Programming/Projects/sirrf/src/scripting/scriptstring.cpp - <assert.h> - <string.h> - "scriptstring.h" - -1241866946 source:/home/michael/Programming/Projects/sirrf/src/scripting/scriptstring_utils.cpp - <assert.h> - "scriptstring.h" - <string.h> - -1244299788 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.cpp - "SceneComponent.h" - "../../core/GameManager.h" - -1244304168 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h - "../../dependencies.h" - "../../core/EntityComponent.h" - -1244230285 source:/home/michael/Programming/Projects/sirrf/src/components/scene/BillboardComponent.cpp - "BillboardComponent.h" - "../../core/GameManager.h" - -1244230388 /home/michael/Programming/Projects/sirrf/src/components/scene/BillboardComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1244304348 source:/home/michael/Programming/Projects/sirrf/src/components/scene/TextBillboardComponent.cpp - "TextBillboardComponent.h" - "../../core/GameManager.h" - -1244304218 /home/michael/Programming/Projects/sirrf/src/components/scene/TextBillboardComponent.h - "../../dependencies.h" - "BillboardComponent.h" - -1241890726 source:/home/michael/Programming/Projects/sirrf/src/components/scene/TextComponent.cpp - "TextComponent.h" - "../../core/GameManager.h" - -1241878343 /home/michael/Programming/Projects/sirrf/src/components/scene/TextComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1244230830 source:/home/michael/Programming/Projects/sirrf/src/components/scene/MeshComponent.cpp - "MeshComponent.h" - "../../core/GameManager.h" - -1244230760 /home/michael/Programming/Projects/sirrf/src/components/scene/MeshComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1241639241 /home/michael/Programming/Projects/sirrf/src/core/support.h - "../dependencies.h" - -1241639151 source:/home/michael/Programming/Projects/sirrf/src/core/support.cpp - "support.h" - -1244230121 source:/home/michael/Programming/Projects/sirrf/src/components/scene/LightComponent.cpp - "LightComponent.h" - "../../core/GameManager.h" - -1244232907 /home/michael/Programming/Projects/sirrf/src/components/scene/LightComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1244230296 source:/home/michael/Programming/Projects/sirrf/src/components/scene/AnimatedMeshComponent.cpp - "AnimatedMeshComponent.h" - "../../core/GameManager.h" - -1244230722 /home/michael/Programming/Projects/sirrf/src/components/scene/AnimatedMeshComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1244230304 source:/home/michael/Programming/Projects/sirrf/src/components/scene/CameraComponent.cpp - "CameraComponent.h" - "../../core/GameManager.h" - -1244230399 /home/michael/Programming/Projects/sirrf/src/components/scene/CameraComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1244302556 source:/home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.cpp - "TerrainComponent.h" - "../../core/GameManager.h" - -1244304255 /home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1244233658 source:/home/michael/Programming/Projects/sirrf/src/components/scene/ParticleSysComponent.cpp - "ParticleSysComponent.h" - "../../core/GameManager.h" - -1244234100 /home/michael/Programming/Projects/sirrf/src/components/scene/ParticleSysComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1236000368 /home/michael/Programming/Projects/sirrf/src/scripting/scriptstdstring.h - <angelscript.h> - <string> - -1241866940 source:/home/michael/Programming/Projects/sirrf/src/scripting/scriptstdstring.cpp - <assert.h> - <sstream> - "scriptstdstring.h" - <string.h> - -1243891465 source:/home/michael/Programming/Projects/sirrf/src/components/scene/OctTreeComponent.cpp - "OctTreeComponent.h" - "../../core/GameManager.h" - -1244231091 /home/michael/Programming/Projects/sirrf/src/components/scene/OctTreeComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1243891465 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SkyDomeComponent.cpp - "SkyDomeComponent.h" - "../../core/GameManager.h" - -1244301881 /home/michael/Programming/Projects/sirrf/src/components/scene/SkyDomeComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1243891465 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SkyBoxComponent.cpp - "SkyBoxComponent.h" - "../../core/GameManager.h" - -1244301581 /home/michael/Programming/Projects/sirrf/src/components/scene/SkyBoxComponent.h - "../../dependencies.h" - "SceneComponent.h" - -1202520678 /usr/local/include//AL/al.h - -1216759683 /usr/local/include//AL/alc.h - -1243926043 source:/home/michael/Programming/Projects/sirrf/src/sound/SoundManager.cpp - "SoundManager.h" - "../core/GameManager.h" - -1244314330 /home/michael/Programming/Projects/sirrf/src/sound/SoundManager.h - "../dependencies.h" - -1242308358 /usr/local/include//SFML/System.hpp - <SFML/Config.hpp> - <SFML/System/Clock.hpp> - <SFML/System/Lock.hpp> - <SFML/System/Mutex.hpp> - <SFML/System/Randomizer.hpp> - <SFML/System/Sleep.hpp> - <SFML/System/Thread.hpp> - <SFML/System/Unicode.hpp> - <SFML/System/Vector2.hpp> - <SFML/System/Vector3.hpp> - -1242308358 /usr/local/include//SFML/Config.hpp - <climits> - -1242308358 /usr/local/include//SFML/System/Clock.hpp - <SFML/Config.hpp> - -1242308358 /usr/local/include//SFML/System/Lock.hpp - <SFML/System/NonCopyable.hpp> - -1242308358 /usr/local/include//SFML/System/NonCopyable.hpp - <SFML/Config.hpp> - -1242308358 /usr/local/include//SFML/System/Mutex.hpp - <SFML/Config.hpp> - <SFML/System/Win32/Mutex.hpp> - <SFML/System/Unix/Mutex.hpp> - -1242308358 /usr/local/include//SFML/System/Win32/Mutex.hpp - <SFML/System/NonCopyable.hpp> - <windows.h> - -1242308358 /usr/local/include//SFML/System/Unix/Mutex.hpp - <SFML/System/NonCopyable.hpp> - <pthread.h> - -1242308358 /usr/local/include//SFML/System/Randomizer.hpp - <SFML/Config.hpp> - -1242308358 /usr/local/include//SFML/System/Sleep.hpp - <SFML/Config.hpp> - -1242308358 /usr/local/include//SFML/System/Thread.hpp - <SFML/Config.hpp> - <SFML/System/Win32/Thread.hpp> - <SFML/System/Unix/Thread.hpp> - -1242308358 /usr/local/include//SFML/System/Win32/Thread.hpp - <SFML/System/NonCopyable.hpp> - <windows.h> - -1242308358 /usr/local/include//SFML/System/Unix/Thread.hpp - <SFML/System/NonCopyable.hpp> - <pthread.h> - -1242308358 /usr/local/include//SFML/System/Unicode.hpp - <SFML/Config.hpp> - <iterator> - <locale> - <string> - <stdlib.h> - <SFML/System/Unicode.inl> - -1242308358 /usr/local/include//SFML/System/Unicode.inl - -1242308358 /usr/local/include//SFML/System/Vector2.hpp - <SFML/System/Vector2.inl> - -1242308358 /usr/local/include//SFML/System/Vector2.inl - -1242308358 /usr/local/include//SFML/System/Vector3.hpp - <SFML/System/Vector3.inl> - -1242308358 /usr/local/include//SFML/System/Vector3.inl - -1242308358 /usr/local/include//SFML/Audio.hpp - <SFML/System.hpp> - <SFML/Audio/Listener.hpp> - <SFML/Audio/Music.hpp> - <SFML/Audio/Sound.hpp> - <SFML/Audio/SoundBuffer.hpp> - <SFML/Audio/SoundBufferRecorder.hpp> - <SFML/Audio/SoundRecorder.hpp> - <SFML/Audio/SoundStream.hpp> - -1242308358 /usr/local/include//SFML/Audio/Listener.hpp - <SFML/Config.hpp> - <SFML/System/Vector3.hpp> - -1242308358 /usr/local/include//SFML/Audio/Music.hpp - <SFML/Audio/SoundStream.hpp> - <string> - <vector> - -1242308358 /usr/local/include//SFML/Audio/SoundStream.hpp - <SFML/Audio/Sound.hpp> - <SFML/System/Thread.hpp> - <cstdlib> - -1242308358 /usr/local/include//SFML/Audio/Sound.hpp - <SFML/System/Resource.hpp> - <SFML/System/Vector3.hpp> - <SFML/Audio/AudioResource.hpp> - <cstdlib> - -1242308358 /usr/local/include//SFML/System/Resource.hpp - <set> - <SFML/System/Resource.inl> - <SFML/System/ResourcePtr.inl> - -1242308358 /usr/local/include//SFML/System/Resource.inl - -1242308358 /usr/local/include//SFML/System/ResourcePtr.inl - -1242308358 /usr/local/include//SFML/Audio/AudioResource.hpp - <SFML/Config.hpp> - -1242308358 /usr/local/include//SFML/Audio/SoundBuffer.hpp - <SFML/System/Resource.hpp> - <SFML/Audio/AudioResource.hpp> - <string> - <vector> - -1242308358 /usr/local/include//SFML/Audio/SoundBufferRecorder.hpp - <SFML/Audio/SoundBuffer.hpp> - <SFML/Audio/SoundRecorder.hpp> - <vector> - -1242308358 /usr/local/include//SFML/Audio/SoundRecorder.hpp - <SFML/System/Thread.hpp> - <vector> - -1244308036 source:/home/michael/Programming/Projects/sirrf/src/components/sound/SoundListenerComponent.cpp - "SoundListenerComponent.h" - "../../core/GameManager.h" - -1244307969 /home/michael/Programming/Projects/sirrf/src/components/sound/SoundListenerComponent.h - "../../dependencies.h" - "../../core/EntityComponent.h" - -1242563366 /usr/local/include/irrlicht-svn2329/irrlicht.h - "IrrCompileConfig.h" - "aabbox3d.h" - "CDynamicMeshBuffer.h" - "CIndexBuffer.h" - "CMeshBuffer.h" - "coreutil.h" - "CVertexBuffer.h" - "dimension2d.h" - "ECullingTypes.h" - "EDebugSceneTypes.h" - "EDriverFeatures.h" - "EDriverTypes.h" - "EGUIAlignment.h" - "EGUIElementTypes.h" - "EHardwareBufferFlags.h" - "EMaterialFlags.h" - "EMaterialTypes.h" - "EMeshWriterEnums.h" - "EMessageBoxFlags.h" - "ESceneNodeAnimatorTypes.h" - "ESceneNodeTypes.h" - "ETerrainElements.h" - "fast_atof.h" - "heapsort.h" - "IAnimatedMesh.h" - "IAnimatedMeshMD2.h" - "IAnimatedMeshMD3.h" - "IAnimatedMeshSceneNode.h" - "IAttributeExchangingObject.h" - "IAttributes.h" - "IBillboardSceneNode.h" - "IBillboardTextSceneNode.h" - "IBoneSceneNode.h" - "ICameraSceneNode.h" - "ICursorControl.h" - "IDummyTransformationSceneNode.h" - "IDynamicMeshBuffer.h" - "IEventReceiver.h" - "IFileList.h" - "IFileSystem.h" - "IGPUProgrammingServices.h" - "IGUIButton.h" - "IGUICheckBox.h" - "IGUIColorSelectDialog.h" - "IGUIComboBox.h" - "IGUIContextMenu.h" - "IGUIEditBox.h" - "IGUIElement.h" - "IGUIElementFactory.h" - "IGUIEnvironment.h" - "IGUIFileOpenDialog.h" - "IGUIFont.h" - "IGUIFontBitmap.h" - "IGUIImage.h" - "IGUIInOutFader.h" - "IGUIListBox.h" - "IGUIMeshViewer.h" - "IGUIScrollBar.h" - "IGUISkin.h" - "IGUISpinBox.h" - "IGUISpriteBank.h" - "IGUIStaticText.h" - "IGUITabControl.h" - "IGUITable.h" - "IGUIToolbar.h" - "IGUIWindow.h" - "IGUITreeView.h" - "IImage.h" - "IImageLoader.h" - "IImageWriter.h" - "IIndexBuffer.h" - "ILightSceneNode.h" - "ILogger.h" - "IMaterialRenderer.h" - "IMaterialRendererServices.h" - "IMesh.h" - "IMeshBuffer.h" - "IMeshCache.h" - "IMeshLoader.h" - "IMeshManipulator.h" - "IMeshSceneNode.h" - "IMeshWriter.h" - "IMetaTriangleSelector.h" - "IOSOperator.h" - "IParticleSystemSceneNode.h" - "IQ3LevelMesh.h" - "IQ3Shader.h" - "IReadFile.h" - "IReferenceCounted.h" - "irrArray.h" - "IrrlichtDevice.h" - "irrList.h" - "irrMap.h" - "irrMath.h" - "irrString.h" - "irrTypes.h" - "irrXML.h" - "ISceneCollisionManager.h" - "ISceneManager.h" - "ISceneNode.h" - "ISceneNodeAnimator.h" - "ISceneNodeAnimatorCameraFPS.h" - "ISceneNodeAnimatorCameraMaya.h" - "ISceneNodeAnimatorCollisionResponse.h" - "ISceneNodeAnimatorFactory.h" - "ISceneNodeFactory.h" - "ISceneUserDataSerializer.h" - "IShaderConstantSetCallBack.h" - "IShadowVolumeSceneNode.h" - "ISkinnedMesh.h" - "ITerrainSceneNode.h" - "ITextSceneNode.h" - "ITexture.h" - "ITimer.h" - "ITriangleSelector.h" - "IVertexBuffer.h" - "IVideoDriver.h" - "IVideoModeList.h" - "IVolumeLightSceneNode.h" - "IWriteFile.h" - "IXMLReader.h" - "IXMLWriter.h" - "ILightManager.h" - "Keycodes.h" - "line2d.h" - "line3d.h" - "matrix4.h" - "plane3d.h" - "position2d.h" - "quaternion.h" - "rect.h" - "S3DVertex.h" - "SAnimatedMesh.h" - "SceneParameters.h" - "SColor.h" - "SExposedVideoData.h" - "SIrrCreationParameters.h" - "SKeyMap.h" - "SLight.h" - "SMaterial.h" - "SMesh.h" - "SMeshBuffer.h" - "SMeshBufferLightMap.h" - "SMeshBufferTangents.h" - "SParticle.h" - "SSharedMeshBuffer.h" - "SSkinMeshBuffer.h" - "SVertexIndex.h" - "SViewFrustum.h" - "triangle3d.h" - "vector2d.h" - "vector3d.h" - "SIrrCreationParameters.h" - -1242563366 /usr/local/include/irrlicht-svn2329/IrrCompileConfig.h - <stdio.h> - <xtl.h> - -1242563365 /usr/local/include/irrlicht-svn2329/aabbox3d.h - "irrMath.h" - "plane3d.h" - "line3d.h" - -1242563366 /usr/local/include/irrlicht-svn2329/irrMath.h - "IrrCompileConfig.h" - "irrTypes.h" - <math.h> - <stdlib.h> - -1242563366 /usr/local/include/irrlicht-svn2329/irrTypes.h - "IrrCompileConfig.h" - <wchar.h> - <crtdbg.h> - "assert.h" - <stdlib.h> - <crtdbg.h> - -1242563366 /usr/local/include/irrlicht-svn2329/plane3d.h - "irrMath.h" - "vector3d.h" - -1242563366 /usr/local/include/irrlicht-svn2329/vector3d.h - "irrMath.h" - -1242563366 /usr/local/include/irrlicht-svn2329/line3d.h - "irrTypes.h" - "vector3d.h" - -1242563365 /usr/local/include/irrlicht-svn2329/CDynamicMeshBuffer.h - "IDynamicMeshBuffer.h" - "CVertexBuffer.h" - "CIndexBuffer.h" - -1242563365 /usr/local/include/irrlicht-svn2329/IDynamicMeshBuffer.h - "IMeshBuffer.h" - "IVertexBuffer.h" - "IIndexBuffer.h" - -1242563366 /usr/local/include/irrlicht-svn2329/IMeshBuffer.h - "IReferenceCounted.h" - "SMaterial.h" - "aabbox3d.h" - "S3DVertex.h" - "SVertexIndex.h" - "EHardwareBufferFlags.h" - -1242563366 /usr/local/include/irrlicht-svn2329/IReferenceCounted.h - "irrTypes.h" - -1242563366 /usr/local/include/irrlicht-svn2329/SMaterial.h - "SColor.h" - "matrix4.h" - "irrArray.h" - "EMaterialTypes.h" - "EMaterialFlags.h" - "SMaterialLayer.h" - -1242563366 /usr/local/include/irrlicht-svn2329/SColor.h - "irrTypes.h" - "irrMath.h" - -1242563366 /usr/local/include/irrlicht-svn2329/matrix4.h - "irrTypes.h" - "v... [truncated message content] |
From: <zcc...@us...> - 2009-06-06 19:22:53
|
Revision: 60 http://sirrf.svn.sourceforge.net/sirrf/?rev=60&view=rev Author: zccdark203 Date: 2009-06-06 19:22:22 +0000 (Sat, 06 Jun 2009) Log Message: ----------- The documentation of the API is done. Doxygen should now be able to generate documentation for the source of Sirrf. Modified Paths: -------------- trunk/src/components/components.h trunk/src/components/sound/SoundListenerComponent.cpp trunk/src/components/sound/SoundListenerComponent.h trunk/src/components/sound/SoundSourceComponent.cpp trunk/src/components/sound/SoundSourceComponent.h trunk/src/core/DataStack.cpp trunk/src/core/DataStack.h trunk/src/core/DataStore.cpp trunk/src/core/DataStore.h trunk/src/core/Entity.cpp trunk/src/core/Entity.h trunk/src/core/EntityComponent.cpp trunk/src/core/EntityComponent.h trunk/src/core/EntityManager.cpp trunk/src/core/EntityManager.h trunk/src/core/EventManager.cpp trunk/src/core/EventManager.h trunk/src/core/GameManager.cpp trunk/src/core/GameManager.h trunk/src/core/GameState.cpp trunk/src/core/GameState.h trunk/src/main.cpp trunk/src/scripting/Script.cpp trunk/src/scripting/Script.h trunk/src/scripting/ScriptManager.cpp trunk/src/scripting/ScriptManager.h trunk/src/sirrf.depend trunk/src/sirrf.layout trunk/src/sound/SoundManager.h Modified: trunk/src/components/components.h =================================================================== --- trunk/src/components/components.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/components/components.h 2009-06-06 19:22:22 UTC (rev 60) @@ -38,6 +38,7 @@ // AngelScript binding +//! Bind all components so that they can be used within scripts. extern void bindComponents(asIScriptEngine *engine); #endif Modified: trunk/src/components/sound/SoundListenerComponent.cpp =================================================================== --- trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -119,7 +119,7 @@ setIsMainListener(false); } -// Unpauses the component if the parent is paused. +// Unpauses the component if the parent is unpaused. void SoundListenerComponent::onUnPause(void *p) { if(mWasMainListener) Modified: trunk/src/components/sound/SoundListenerComponent.h =================================================================== --- trunk/src/components/sound/SoundListenerComponent.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/components/sound/SoundListenerComponent.h 2009-06-06 19:22:22 UTC (rev 60) @@ -22,27 +22,46 @@ // SoundListenerComponent class +//! Component wrapper of SFML's sf::Listener. class SoundListenerComponent : public EntityComponent { public: // Initialisation and deinitialisation + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param isMainListener Sets whether this is the main listener. SoundListenerComponent(Entity *parent, bool isMainListener = true); + //! Deconstructor ~SoundListenerComponent(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static SoundListenerComponent* refFactory(Entity *parent, bool isMainListener = true); // Methods + //! Checks if this listener is the main listener. bool getIsMainListener() const; + //! Gets the target direction of this listener. const vector3df& getTarget() const; + //! Sets whether this listener is the main listener. + //! @param value Value to enable or disable this option. void setIsMainListener(bool value = true); + //! Sets the target direction of this listener. + //! @param target Position of the point the listener must look at. void setTarget(const vector3df &target); // Events + //! Updates the position of the component after its parent has been updated. + //! @note For internal use only! void onPositionChange(void *p); + //! Pauses the component if the parent is paused. + //! @note For internal use only! void onPause(void *p); + //! Unpauses the component if the parent is unpaused. + //! @note For internal use only! void onUnPause(void *p); private: @@ -60,6 +79,7 @@ // SoundListenerComponent Angelscript binding. +//! Binds the SoundListenerComponent class to AngelScript so that it can be used within scripts. extern void bindSoundListenerComponent(asIScriptEngine *engine); #endif Modified: trunk/src/components/sound/SoundSourceComponent.cpp =================================================================== --- trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -3,7 +3,7 @@ // Name: SoundSourceComponent.cpp // Author: Michael Bartsch (ZCCdark203) // -// Desc : Component wrapper of SFML's sf::Music. +// Desc : Component wrapper of SFML's sf::Sound and sf::Music. // // License: Copyright (C) 2009 Michael Bartsch and Contributors // @@ -58,12 +58,18 @@ return new SoundSourceComponent(parent); } -// Gets a direct pointer to SFML's sf::Sound object. +// Returns a direct pointer to the sf::Sound object in this component. sf::Sound* SoundSourceComponent::getSound() { return mSound; } +// Returns a direct pointer to the sf::Music object in this component. +sf::Music* SoundSourceComponent::getMusic() +{ + return mMusic; +} + // Loads the sound data as a music (streaming) object. bool SoundSourceComponent::loadMusic(const std::string &fileName) { @@ -71,25 +77,8 @@ IFileSystem *fileSystem = GameManager::Instance()->getDevice()->getFileSystem(); // Delete the previous data. - if(mSound != NULL) - { - delete mSound; - mSound = NULL; - } + unloadData(); - if(mMusic != NULL) - { - delete mMusic; - mMusic = NULL; - } - - if(mBuffer != NULL) - { - delete[] mBuffer; - mBuffer = NULL; - mBufferSize = 0; - } - // Does the file exist? if(!fileSystem->existFile(fileName.c_str())) return false; @@ -121,25 +110,8 @@ bool SoundSourceComponent::loadSoundBuffer(const std::string &bufferName) { // Delete the previous data. - if(mSound != NULL) - { - delete mSound; - mSound = NULL; - } + unloadData(); - if(mMusic != NULL) - { - delete mMusic; - mMusic = NULL; - } - - if(mBuffer != NULL) - { - delete[] mBuffer; - mBuffer = NULL; - mBufferSize = 0; - } - // Set new data. mSound = new sf::Sound(); @@ -164,6 +136,29 @@ return true; } +// Unloads previously loaded data. +void SoundSourceComponent::unloadData() +{ + if(mSound != NULL) + { + delete mSound; + mSound = NULL; + } + + if(mMusic != NULL) + { + delete mMusic; + mMusic = NULL; + } + + if(mBuffer != NULL) + { + delete[] mBuffer; + mBuffer = NULL; + mBufferSize = 0; + } +} + // Plays the associated sound. void SoundSourceComponent::play() { @@ -378,7 +373,7 @@ pause(); } -// Unpauses the component if the parent is paused. +// Unpauses the component if the parent is unpaused. void SoundSourceComponent::onUnPause(void *p) { if(!mWasPaused) Modified: trunk/src/components/sound/SoundSourceComponent.h =================================================================== --- trunk/src/components/sound/SoundSourceComponent.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/components/sound/SoundSourceComponent.h 2009-06-06 19:22:22 UTC (rev 60) @@ -22,48 +22,97 @@ // SoundSourceComponent class +//! Component wrapper of SFML's sf::Sound and sf::Music. class SoundSourceComponent : public EntityComponent { public: // Initialisation and deinitialisation + //! Constructor + //! @param parent The parent entity to which the component should be added. SoundSourceComponent(Entity *parent); + //! Deconstructor ~SoundSourceComponent(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static SoundSourceComponent* refFactory(Entity *parent); // Methods + //! Returns a direct pointer to the sf::Sound object in this component. + //! @note Not available in AngelScript. sf::Sound* getSound(); + //! Returns a direct pointer to the sf::Music object in this component. + //! @note Not available in AngelScript. sf::Music* getMusic(); + //! Loads the sound data as a music (streaming) object. + //! @param fileName Filename of the music object to load. bool loadMusic(const std::string &fileName); + //! Loads the sound data from a sound buffer. + //! @param bufferName Name of the buffer to load. + //! @see SoundManager bool loadSoundBuffer(const std::string &bufferName); + //! Unloads previously loaded data. + void unloadData(); + + //! Plays the associated sound. void play(); + //! Pauses the associated sound. void pause(); + //! Stops the associated sound. void stop(); + //! Gets the attenuation of the sound. f32 getAttenuation() const; + //! Returns whether the sound is paused. bool getIsPaused() const; + //! Returns whether the sound is playing. bool getIsPlaying() const; + //! Returns whether the sound has been stopped. bool getIsStopped() const; + //! Gets the loop state of the sound. bool getLoop() const; + //! Gets the minimum distance. f32 getMinDistance() const; + //! Gets the current playing position of the sound. + //! @note Only works when a sound buffer is loaded. f32 getOffset() const; + //! Gets the pitch of the sound. f32 getPitch() const; + //! Gets the volume of the sound. f32 getVolume() const; + //! Sets the attenuation factor. + //! The higher the attenuation, the more the sound will be attenuated with distance from + //! listener. + //! @param attenuation New attenuation factor. void setAttenuation(f32 attenuation); + //! Sets the sound loop state. + //! @param value If true, the sound loops. Else the sound doesn't loop. void setLoop(bool value); + //! Sets the minimum distance. + //! Closer than this distance, the listener will hear the sound at its maximum volume. void setMinDistance(f32 minDistance); + //! Sets the current playing position of the sound. + //! @note Only works when a sound buffer is loaded. void setOffset(f32 offset); + //! Sets the sound pitch. void setPitch(f32 pitch); + //! Sets the sound volume. void setVolume(f32 volume); // Events + //! Updates the position of the component after its parent has been updated. + //! @note For internal use only! void onPositionChange(void *p); + //! Pauses the component if the parent is paused. + //! @note For internal use only! void onPause(void *p); + //! Unpauses the component if the parent is unpaused. + //! @note For internal use only! void onUnPause(void *p); private: @@ -88,6 +137,7 @@ // SoundSourceComponent Angelscript binding. +//! Binds the SoundSourceComponent class to AngelScript so that it can be used within scripts. extern void bindSoundSourceComponent(asIScriptEngine *engine); #endif Modified: trunk/src/core/DataStack.cpp =================================================================== --- trunk/src/core/DataStack.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/DataStack.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -38,12 +38,12 @@ clear(); } -// Initialises the Data Stack. +// Initialises the DataStack. void DataStack::init() { } -// Clears the Data Stack. +// Clears the DataStack. void DataStack::clear() { removeAll(); @@ -71,25 +71,25 @@ } } -// Gets the ID of the Data Stack. +// Gets the ID of the DataStack. u32 DataStack::getID() const { return mID; } -// Gets the name of the Data Stack. +// Gets the name of the DataStack. const std::string& DataStack::getName() const { return mName; } -// Gets the number of variables on the Data Stack. +// Gets the number of variables on the DataStack. u32 DataStack::getSize() const { return mVars.size(); } -// Removes all variables from this Data Stack. +// Removes all variables from this DataStack. void DataStack::removeAll() { mVars.clear(); Modified: trunk/src/core/DataStack.h =================================================================== --- trunk/src/core/DataStack.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/DataStack.h 2009-06-06 19:22:22 UTC (rev 60) @@ -25,29 +25,49 @@ // DataStack class +//! DataStacks provide an interface for storing (and removing) +//! variables that can be accessed from anywhere within the +//! framework. Furthermore it's also possible to save these +//! variables into files. class DataStack { public: // Initialisation and deinitialisation + //! Constructor + //! @param name Name of the DataStack. DataStack(const std::string &name); + //! Deconstructor ~DataStack(); + //! Initialises the DataStack. void init(); + //! Clears the DataStack. void clear(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static DataStack* refFactory(const std::string &name); + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Methods + //! Gets the ID of the DataStack. u32 getID() const; + //! Gets the name of the DataStack. const std::string& getName() const; + //! Gets the number of variables on the DataStack. u32 getSize() const; - // Sets the variable with the given name. + //! Sets the variable with the given name. + //! @param name Name of the variable to set. + //! @param value Value of the variable. template<typename T> bool setVar(const std::string &name, const T &value) { @@ -66,7 +86,9 @@ else return false; }; - // Gets the variable with the given name. + //! Gets the variable with the given name. + //! @param name Name of the variable. + //! @return The value of the given variable. template<typename T> T getVar(const std::string &name) { @@ -96,10 +118,17 @@ else return NULL; }; + //! Removes all variables from this DataStack. void removeAll(); + //! Removes the variable with the given name. + //! @param name Name of the variable. bool removeVar(const std::string &name); + //! Saves the DataStack as a bencoded file. + //! @param fileName Filename of the file where the data is stored in. bool save(const std::string &fileName); + //! Loads the Data Stack from a bencoded file. + //! @param fileName Filename of the file where the data is retrieved from. bool load(const std::string &fileName); private: @@ -119,6 +148,7 @@ // DataStack Angelscript binding. +//! Binds the DataStack class to AngelScript so that it can be used within scripts. extern void bindDataStack(asIScriptEngine *engine); #endif Modified: trunk/src/core/DataStore.cpp =================================================================== --- trunk/src/core/DataStore.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/DataStore.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -31,12 +31,12 @@ clear(); } -// Initialises the Data Store. +// Initialises the DataStore. void DataStore::init() { } -// Clears the Data Store. +// Clears the DataStore. void DataStore::clear() { removeAllDataStacks(); @@ -54,31 +54,31 @@ // Dummy function. } -// Adds the given Data Stack to the Data Store. +// Adds the given DataStack to the DataStore. bool DataStore::addDataStack(DataStack *stack) { // Did we get a valid pointer? if(stack == NULL) return false; - // Does a Data Stack with the same name exist? + // Does a DataStack with the same name exist? if(getDataStack(stack->getName())) return false; - // Add the Data Stack to the vector. + // Add the DataStack to the vector. mStacks.push_back(stack); return true; } -// Creates a Data Stack with the given name. +// Creates (and adds) a DataStack with the given name. DataStack* DataStore::createDataStack(const std::string &name) { // Does a Data Stack with the same name exist? if(getDataStack(name)) return NULL; - // Create the Data Stack and add it to the vector. + // Create the DataStack and add it to the vector. DataStack *stack = new DataStack(name); stack->refAdd(); mStacks.push_back(stack); @@ -86,7 +86,7 @@ return stack; } -// Gets the Data Stack with the given id. +// Gets the DataStack with the given ID. DataStack* DataStore::getDataStack(const u32 id) { for(u32 i = 0; i < mStacks.size(); i++) @@ -98,7 +98,7 @@ return NULL; } -// Gets the Data Stack with the given name. +// Gets the DataStack with the given name. DataStack* DataStore::getDataStack(const std::string &name) { for(u32 i = 0; i < mStacks.size(); i++) @@ -110,24 +110,24 @@ return NULL; } -// Removes all Data Stacks from this Data Store. +// Removes all DataStacks from this DataStore. void DataStore::removeAllDataStacks() { - // Clear the Data Stacks. + // Clear the DataStacks. for(u32 i = 0; i < mStacks.size(); i++) delete mStacks[i]; mStacks.clear(); } -// Removes the given Data Stack. +// Removes the given DataStack. bool DataStore::removeDataStack(DataStack *stack) { // Did we get a valid pointer? if(stack == NULL) return false; - // Try to remove the Data Stack. + // Try to remove the DataStack. vector<DataStack*>::iterator it; for(it = mStacks.begin(); it < mStacks.end(); it++) @@ -142,15 +142,14 @@ } } - // We couldn't find the Data Stack and thus couldn't remove it. + // We couldn't find the DataStack and thus couldn't remove it. return false; - } -// Removes the given Data Stack with the given id. +// Removes the given DataStack with the given ID. bool DataStore::removeDataStack(const u32 id) { - // Try to remove the Data Stack. + // Try to remove the DataStack. vector<DataStack*>::iterator it; for(it = mStacks.begin(); it < mStacks.end(); it++) @@ -165,14 +164,14 @@ } } - // We couldn't find the Data Stack and thus couldn't remove it. + // We couldn't find the DataStack and thus couldn't remove it. return false; } -// Removes the given Data Stack with the given name. +// Removes the given DataStack with the given name. bool DataStore::removeDataStack(const std::string &name) { - // Try to remove the Data Stack. + // Try to remove the DataStack. vector<DataStack*>::iterator it; for(it = mStacks.begin(); it < mStacks.end(); it++) @@ -187,7 +186,7 @@ } } - // We couldn't find the Data Stack and thus couldn't remove it. + // We couldn't find the DataStack and thus couldn't remove it. return false; } Modified: trunk/src/core/DataStore.h =================================================================== --- trunk/src/core/DataStore.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/DataStore.h 2009-06-06 19:22:22 UTC (rev 60) @@ -25,31 +25,60 @@ // DataStore class +//! The DataStore class manages the DataStacks that are being used by the framework. class DataStore { public: // Initialisation and deinitialisation + //! Constructor DataStore(); + //! Deconstructor ~DataStore(); + //! Initialises the DataStore. void init(); + //! Clears the DataStore. void clear(); // AngelScript binding + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Methods + //! Adds the given DataStack to the DataStore. + //! @param stack Pointer to the DataStack to add. + //! @return True if addition was successful, false if addition was a failure. bool addDataStack(DataStack *stack); + //! Creates (and adds) a DataStack with the given name. + //! @param name Name of the DataStack. + //! @return Pointer to the DataStack on success, NULL on failure. DataStack* createDataStack(const std::string &name); + //! Gets the DataStack with the given ID. + //! @return Pointer to the DataStack if found, else NULL. DataStack* getDataStack(const u32 id); + //! Gets the DataStack with the given name. + //! @return Pointer to the DataStack if found, else NULL. DataStack* getDataStack(const std::string &name); + //! Removes all DataStacks from the DataStore. void removeAllDataStacks(); + //! Removes the given DataStack. + //! @param stack Pointer to the DataStack to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeDataStack(DataStack *stack); + //! Removes the given DataStack with the given ID. + //! @param id ID of the DataStack to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeDataStack(const u32 id); + //! Removes the given DataStack with the given name. + //! @param name Name of the DataStack to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeDataStack(const std::string &name); private: @@ -61,6 +90,7 @@ // DataStore Angelscript binding. +//! Binds the DataStore class to AngelScript so that it can be used within scripts. extern void bindDataStore(asIScriptEngine *engine); #endif Modified: trunk/src/core/Entity.cpp =================================================================== --- trunk/src/core/Entity.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/Entity.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -3,7 +3,7 @@ // Name: Entity.cpp // Author: Michael Bartsch (ZCCdark203) // -// Desc : +// Desc : Represents an object in the game world. // // License: Copyright (C) 2009 Michael Bartsch and Contributors // @@ -406,21 +406,21 @@ "onUpdate", p); } -// Updates the entity if the parent is rendered. +// Renders the entity if the parent is rendered. void Entity::onRender(void *p) { GameManager::Instance()->getEventManager()->emitEvent(std::string("ent#") + mName, "onRender", p); } -// Updates the entity if the parent is paused. +// Pauses the entity if the parent is paused. void Entity::onPause(void *p) { GameManager::Instance()->getEventManager()->emitEvent(std::string("ent#") + mName, "onPause", p); } -// Updates the entity if the parent is paused. +// Updates the entity if the parent is unpaused. void Entity::onUnPause(void *p) { GameManager::Instance()->getEventManager()->emitEvent(std::string("ent#") + mName, Modified: trunk/src/core/Entity.h =================================================================== --- trunk/src/core/Entity.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/Entity.h 2009-06-06 19:22:22 UTC (rev 60) @@ -25,50 +25,109 @@ // Entity class +//! Represents an object in the game world. class Entity : public sigslot::has_slots<> { public: // Initialisation and deinitialisation + //! Constructor + //! @param name Name of the entity. + //! @param parent Parent of the entity. Entity(const std::string &name, Entity *parent = NULL); + //! Deconstructor ~Entity(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static Entity* refFactory(const std::string &name); + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Methods + //! Gets the ID of this entity. u32 getID() const; + //! Gets the name of this entity. const std::string& getName() const; + //! Adds a component to the entity. + //! @param component Pointer to the component to add. + //! @return True if addition was successful, false if addition was a failure. bool addComponent(EntityComponent *component); + //! Gets the child with the given ID from this entity. + //! @return Pointer to the child if found, else NULL. Entity* getChild(const u32 id); + //! Gets the child with the given name from this entity. + //! @return Pointer to the child if found, else NULL. Entity* getChild(const std::string &name); + //! Gets the component with the given ID from this entity. + //! @return Pointer to the component if found, else NULL. EntityComponent* getComponent(const u32 id); + //! Gets the component with the given name from this entity. + //! @return Pointer to the component if found, else NULL. EntityComponent* getComponent(const std::string &name); + //! Gets the parent of this entity. + //! @return Pointer to the parent, NULL if there is no parent. Entity *getParent() const; + //! Gets the position of the entity. const vector3df& getPosition() const; + //! Removes all children. void removeAllChildren(); + //! Removes all components. void removeAllComponents(); + //! Removes the given child. + //! @param entity Pointer to the child to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeChild(Entity *entity); + //! Removes the child with the given ID. + //! @param id ID of the child to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeChild(const u32 id); + //! Removes the child with the given name. + //! @param name Name of the child to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeChild(const std::string &name); + //! Removes the given component. + //! @param component Pointer to the component to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeComponent(EntityComponent *component); + //! Removes the component with the given ID. + //! @param id ID of the component to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeComponent(const u32 id); + //! Removes the component with the given name. + //! @param name Name of the component to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeComponent(const std::string &name); + //! Sets the position of the entity. + //! @param position New position of the entity. void setPosition(const vector3df &position); // Events + //! Updates the position of the entity after its parent has been updated. + //! @note For internal use only! void onPositionChange(void *p); + //! Updates the entity if the parent is updated. + //! @note For internal use only! void onUpdate(void *p); + //! Renders the entity if the parent is rendered. + //! @note For internal use only! void onRender(void *p); + //! Pauses the entity if the parent is paused. + //! @note For internal use only! void onPause(void *p); + //! Updates the entity if the parent is unpaused. + //! @note For internal use only! void onUnPause(void *p); private: @@ -96,6 +155,7 @@ // Entity Angelscript binding. +//! Binds the Entity class to AngelScript so that it can be used within scripts. extern void bindEntity(asIScriptEngine *engine); #endif Modified: trunk/src/core/EntityComponent.cpp =================================================================== --- trunk/src/core/EntityComponent.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/EntityComponent.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -3,7 +3,8 @@ // Name: EntityComponent.cpp // Author: Michael Bartsch (ZCCdark203) // -// Desc : +// Desc : Abstraction base class for adding new functionalities to +// entities. // // License: Copyright (C) 2009 Michael Bartsch and Contributors // Modified: trunk/src/core/EntityComponent.h =================================================================== --- trunk/src/core/EntityComponent.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/EntityComponent.h 2009-06-06 19:22:22 UTC (rev 60) @@ -26,25 +26,39 @@ // EntityComponent class +//! Abstraction base class for adding new functionalities to entities. class EntityComponent : public sigslot::has_slots<> { public: // Initialisation and deinitialisation + //! Constructor + //! @param parent Pointer to parent Entity. EntityComponent(Entity *parent); + //! Deconstructor virtual ~EntityComponent(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static EntityComponent* refFactory(Entity *parent); + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Methods + //! Gets the ID of this component. u32 getID() const; + //! Gets the name of this component. const std::string& getName() const; + //! Gets the parent of this component. const Entity* getParent(); + //! Sets the name of this component. void setName(const std::string &name); protected: @@ -66,8 +80,11 @@ // EntityComponent Angelscript binding. +//! Binds the EntityComponent class to AngelScript so that it can be used within scripts. extern void bindEntityComponent(asIScriptEngine *engine); +//! Binds the base behaviours and methods of the EntityComponent to the given class in +//! AngelScript. template<typename T> void bindEntityComponentBase(asIScriptEngine *engine, const char *type) { Modified: trunk/src/core/EntityManager.cpp =================================================================== --- trunk/src/core/EntityManager.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/EntityManager.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -73,7 +73,7 @@ return true; } -// Creates an entity with the given name and adds it to the Entity Manager. +// Creates (and adds) an entity with the given name and adds it to the Entity Manager. Entity* EntityManager::createEntity(const std::string &name, Entity *parent) { // Look if a entity with given name doesn't already exist. Modified: trunk/src/core/EntityManager.h =================================================================== --- trunk/src/core/EntityManager.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/EntityManager.h 2009-06-06 19:22:22 UTC (rev 60) @@ -25,33 +25,62 @@ // EntityManager class +//! The Entity Manager is the central interface point to all entity related functions of this +//! program. class EntityManager { - friend class Entity; - public: // Initialisation and deinitialisation + //! Constructor EntityManager(); + //! Deconstructor ~EntityManager(); + //! Initialises the EntityManager. void init(); + //! Clears the EntityManager. void clear(); // AngelScript binding + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Methods + //! Adds the given Entity to the EntityManager + //! @param entity Pointer to the Entity to add. + //! @return True if addition was successful, false if addition was a failure. bool addEntity(Entity *entity); + //! Creates (and adds) an Entity with the given name. + //! @param name Name of the Entity. + //! @param parent Parent of the entity that is going to be created. + //! @return Pointer to the Entity on success, NULL on failure. Entity* createEntity(const std::string &name, Entity *parent = NULL); + //! Gets the Entity with the given ID. + //! @return Pointer to the Entity if found, else NULL. Entity* getEntity(const u32 id); + //! Gets the Entity with the given name. + //! @return Pointer to the Entity if found, else NULL. Entity* getEntity(const std::string &name); + //! Removes all entities from the EntityManager. void removeAllEntities(); + //! Removes the given Entity. + //! @param entity Pointer to the Entity to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeEntity(Entity *entity); + //! Removes the given Entity with the given ID. + //! @param id ID of the Entity to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeEntity(const u32 id); + //! Removes the given Entity with the given name. + //! @param name Name of the Entity to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeEntity(const std::string &name); private: @@ -62,6 +91,7 @@ // EntityManager Angelscript binding. +//! Binds the EntityManager class to AngelScript so that it can be used within scripts. extern void bindEntityManager(asIScriptEngine *engine); #endif Modified: trunk/src/core/EventManager.cpp =================================================================== --- trunk/src/core/EventManager.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/EventManager.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -298,13 +298,13 @@ return true; } -// Check if the key is down. +// Checks if the given key is down. bool EventManager::getIsKeyDown(EKEY_CODE keyCode) const { return mKeyState[keyCode]; } -// Check if the key is up. +// Checks if the given key is up. bool EventManager::getIsKeyUp(EKEY_CODE keyCode) const { return !mKeyState[keyCode]; @@ -465,7 +465,7 @@ } -// EventManager and sigslot::has_slots<> Angelscript binding. +// EventManager Angelscript binding. void bindEventManager(asIScriptEngine *engine) { // Forward declarations. Modified: trunk/src/core/EventManager.h =================================================================== --- trunk/src/core/EventManager.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/EventManager.h 2009-06-06 19:22:22 UTC (rev 60) @@ -24,25 +24,47 @@ // EventManager class +//! The Event Manager is the central interface point to all event related functions of this program. class EventManager : public IEventReceiver { public: // Initialisation and deinitialisation + //! Constructor EventManager(); + //! Deconstructor ~EventManager(); + //! Initialises the EventManager. void init(); + //! Clears the EventManager. void clear(); // AngelScript binding + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Methods + //! Creates a new event group, a collection of events. + //! @param groupName Name of the event group. + //! @return True if creation was successful, false if creation was a failure. bool createEventGroup(const std::string &groupName); + //! Creates a new event slot in the given event group. + //! @param groupName Name of the event group. + //! @param slotName Name of the event slot. + //! @return True if creation was successful, false if creation was a failure. bool createEventSlot(const std::string &groupName, const std::string &slotName); + //! Connects a function to the given event slot. + //! @param groupName Name of the event group. + //! @param slotName Name of the event slot. + //! @param t Pointer to the object that will function as this-object when the + //! connect function is called. + //! @param m Pointer to the function. template<typename T> bool connectEventSignal(const std::string &groupName, const std::string &slotName, T *t, void (T::*m)(void*)) @@ -69,6 +91,12 @@ return true; }; + //! Disconnects a function from the given event slot. + //! @param groupName Name of the event group. + //! @param slotName Name of the event slot. + //! @param t Pointer to the object that will function as this-object when the + //! connect function is called. + //! @param m Pointer to the function. template<typename T> bool disconnectEventSignal(const std::string &groupName, const std::string &slotName, T *t, void (T::*m)(void*)) @@ -95,21 +123,43 @@ return true; }; + //! Emits an event to the given event slot. + //! @param groupName Name of the event group. + //! @param slotName Name of the event slot. + //! @param p Pointer to data which will be passed to all functions called. bool emitEvent(const std::string &groupName, const std::string &slotName, void* p = 0); + //! Checks if the given key is down. bool getIsKeyDown(EKEY_CODE keyCode) const; + //! Checks if the given key is up. bool getIsKeyUp(EKEY_CODE keyCode) const; + //! Returns the X-coordinate of the mouse position. s32 getMouseX() const; + //! Returns the Y-coordinate of the mouse position. s32 getMouseY() const; + //! Returns the position of the mouse as a 2d vector. const vector2di& getMousePos() const; + //! Gets the mouse wheel position. f32 getMouseWheel() const; + //! Removes all event groups from the EventManager. void removeAllEventGroups(); + //! Removes all event slots from the given event group. + //! @param groupName Name of the event group. + //! @return True if removal was successful, false if removal was a failure. bool removeAllEventSlots(const std::string &groupName); + //! Removes the given event group from the Event Manager. + //! @param groupName Name of the event group to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeEventGroup(const std::string &groupName); + //! Removes the given event slot from the given event group. + //! @param groupName Name of the event group. + //! @param slotName Name of the event slot to remove. bool removeEventSlot(const std::string &groupName, const std::string &slotName); + //! Handles the events sent by the Irrlicht engine. + //! @note For internal use only! virtual bool OnEvent(const SEvent &event); private: @@ -129,7 +179,8 @@ }; -// EventManager and sigslot::has_slots<> Angelscript binding. +// EventManager Angelscript binding. +//! Binds the EventManager class to AngelScript so that it can be used within scripts. extern void bindEventManager(asIScriptEngine *engine); #endif Modified: trunk/src/core/GameManager.cpp =================================================================== --- trunk/src/core/GameManager.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/GameManager.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -5,7 +5,7 @@ // // Desc : The Game Manager is the central access point to the game. // It is able to perform generic game initialisation and -// deinitialisation. It's main purpose though is to control +// deinitialisation. It's main purpose, though, is to control // the flow of the game. // // License: Copyright (C) 2009 Michael Bartsch and Contributors @@ -52,7 +52,7 @@ return *pInstance; } -// Initialises the Game Manager. +// Initialises the GameManager. void GameManager::init() { // Initialise the subsystems of the framework. (stage 1) @@ -75,7 +75,7 @@ pScriptManager->init(); } -// Updates the Game Manager. +// Updates the GameManager. void GameManager::update() { // Updating @@ -107,7 +107,7 @@ } } -// Clears the Game Manager. +// Clears the GameManager. void GameManager::clear() { // Clean up the state stack. @@ -248,25 +248,25 @@ return pGUIEnvironment; } -// Returns a pointer to the Data Store. +// Returns a pointer to the DataStore. DataStore* GameManager::getDataStore() { return pDataStore; } -// Returns a pointer to the Entity Manager. +// Returns a pointer to the EntityManager. EntityManager* GameManager::getEntityManager() { return pEntityManager; } -// Returns a pointer to the Entity Manager. +// Returns a pointer to the EventManager. EventManager* GameManager::getEventManager() { return pEventManager; } -// Returns a pointer to the Script Manager. +// Returns a pointer to the ScriptManager. ScriptManager* GameManager::getScriptManager() { return pScriptManager; Modified: trunk/src/core/GameManager.h =================================================================== --- trunk/src/core/GameManager.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/GameManager.h 2009-06-06 19:22:22 UTC (rev 60) @@ -34,46 +34,86 @@ // GameManager class +//! The Game Manager is the central access point to the game. +//! It is able to perform generic game initialisation and deinitialisation. It's main purpose, +//! though, is to control the flow of the game. class GameManager { public: // Initialisation, deinitialisation and control... + //! Constructor GameManager(); + //! Deconstructor ~GameManager(); + //! Returns a pointer to the singleton of the GameManager class. static GameManager* Instance(); + //! Returns a reference to the singleton of the GameManager class. static GameManager& Reference(); + //! Initialises the GameManager. void init(); + //! Updates the GameManager. void update(); + //! Clears the GameManager. void clear(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static GameManager* refFactory(); + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Public methods + //! Close the current state and change to the given state. + //! @param state Pointer to the new state. void changeState(GameState *state); + //! Close the current state and change to the given state. + //! @note For internal use only! void changeState(asIScriptObject *object); + //! Pause the current state and change to the given state. + //! @param state Pointer to the new state. void pushState(GameState *state); + //! Pause the current state and change to the given state. + //! @note For internal use only! void pushState(asIScriptObject *object); + //! Close the current state and resume the previous state. void popState(); + //! Returns a pointer to the Irrlicht Device. + //! @note Not available in AngelScript. IrrlichtDevice* getDevice(); + //! Returns a pointer to the Irrlicht driver. + //! @note Not available in AngelScript. IVideoDriver* getDriver(); + //! Returns a pointer to the Irrlicht SceneManager. + //! @note Not available in AngelScript. ISceneManager* getSceneManager(); + //! Returns a pointer to the Irrlicht GUI Manager. + //! @note Not available in AngelScript. IGUIEnvironment* getGUIEnvironment(); + //! Returns a pointer to the DataStore. DataStore* getDataStore(); + //! Returns a pointer to the EntityManager. EntityManager* getEntityManager(); + //! Returns a pointer to the EventManager. + EventManager* getEventManager(); + //! Returns a pointer to the ScriptManager. ScriptManager* getScriptManager(); - EventManager* getEventManager(); + //! Returns a pointer to the Sound Manager. SoundManager* getSoundManager(); + //! Returns whether the Irrlicht device is running. bool getIsRunning() const; + //! Sets the running state of the Irrlicht device. void setIsRunning(bool value); @@ -101,6 +141,7 @@ // GameManager Angelscript binding. +//! Binds the GameManager class to AngelScript so that it can be used within scripts. extern void bindGameManager(asIScriptEngine *engine); #endif Modified: trunk/src/core/GameState.cpp =================================================================== --- trunk/src/core/GameState.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/GameState.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -42,25 +42,25 @@ GameManager::Instance()->getEntityManager()->removeEntity(mBaseEntity); } -// Initialises the Game State. +// Initialises the GameState. // -> Implemented by subclass. void GameState::init() { } -// Clears the Game State. +// Clears the GameState. // -> Implemented by subclass. void GameState::clear() { } -// Updates the Game State. +// Updates the GameState. // -> Implemented by subclass. void GameState::update(f32 deltaTime) { } -// Renders the Game State. +// Renders the GameState. // -> Implemented by subclass. void GameState::render() { Modified: trunk/src/core/GameState.h =================================================================== --- trunk/src/core/GameState.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/core/GameState.h 2009-06-06 19:22:22 UTC (rev 60) @@ -24,6 +24,7 @@ // GameState class +//! The GameState object is a base class which is implemented through derived sub-classes. class GameState { friend class ScriptedGameState; @@ -31,27 +32,49 @@ public: // Initialisation, deinitialisation and control... + //! Constructor GameState(); + //! Deconstructor virtual ~GameState(); + //! Initialises the GameState. virtual void init(); + //! Clears the GameState. virtual void clear(); + //! Updates the GameState. + //! @param deltaTime The time that has passed since the last update. virtual void update(f32 deltaTime); + //! Renders the GameState. virtual void render(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static GameState* refFactory(); + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Public functions + //! Returns a pointer to the base pointer of the GameState. const Entity* getBaseEntity() const; // Event functions + //! Sends the "onUpdate" event to all entities subscribed to this state. + //! @note For internal use only! void onUpdate(f32 deltaTime); + //! Sends the "onUpdate" event to all entities subscribed to this state. + //! @note For internal use only! void onRender(); + //! Sends the "onPause" event to all entities subscribed to this state. + //! @note For internal use only! void onPause(); + //! Sends the "onUnPause" event to all entities subscribed to this state. + //! @note For internal use only! void onUnPause(); protected: @@ -74,6 +97,9 @@ // ScriptedGameState class +//! A class derived from GameState, which makes it possible to interact with classes derived from +//! GameState within AngelScript. +//! @note For internal use only! class ScriptedGameState : public GameState { public: @@ -98,6 +124,7 @@ // GameState Angelscript binding. +//! Binds the GameState class to AngelScript so that it can be used within scripts. extern void bindGameState(asIScriptEngine *engine); #endif Modified: trunk/src/main.cpp =================================================================== --- trunk/src/main.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/main.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -37,6 +37,7 @@ // Main function +//! Main entry point to the application. int main() { // Initialise the game. Modified: trunk/src/scripting/Script.cpp =================================================================== --- trunk/src/scripting/Script.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/scripting/Script.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -32,7 +32,8 @@ // Get a pointer to the Script Manager. ScriptManager *scriptMgr = GameManager::Instance()->getScriptManager(); - // Create a script context. + // Create a script module and context. + mModule = scriptMgr->getEngine()->GetModule(mName.c_str(), asGM_ALWAYS_CREATE); mContext = scriptMgr->getEngine()->CreateContext(); } @@ -83,6 +84,12 @@ return mName; } +// Returns the AngelScript context associated with this Script object. +asIScriptContext* Script::getContext() const +{ + return mContext; +} + // Gets the AngelScript module associated with this Script object. asIScriptModule* Script::getModule() const { @@ -122,6 +129,7 @@ // Add a script section to the earlier created module. mModule->AddScriptSection("main", buffer); + scriptMgr->addScriptSectionsToScript(this); // Build the script. int r = mModule->Build(); Modified: trunk/src/scripting/Script.h =================================================================== --- trunk/src/scripting/Script.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/scripting/Script.h 2009-06-06 19:22:22 UTC (rev 60) @@ -25,28 +25,51 @@ // Script class +//! The Script class is technically a wrapper for every AngelScript file that is loaded by the +//! framework. class Script { public: + // Initialisation and deinitialisation + //! Constructor + //! @param name Name of the script. Script(const std::string &name); + //! Deconstructor ~Script(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static Script* refFactory(const std::string &name); + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Methods + //! Gets the ID of this script. u32 getID() const; + //! Gets the name of this script. const std::string& getName() const; + //! Returns the AngelScript context associated with this Script object. asIScriptContext* getContext() const; + //! Returns the AngelScript module associated with this Script object. asIScriptModule* getModule() const; + //! Loads a script file and builds it. + //! @param fileName Filename of the file from where the script should be retrieved. + //! @return True on successful loading, else false on failure. bool loadScript(const std::string &fileName); + //! Unloads the loaded script. + //! @return True on success, false on failure. bool unloadScript(); + //! Executes the function with the given name and with the given arguments. + //! @return True on success, false on failure. bool executeFunctionByName(const std::string &name, const std::string &args = ""); private: @@ -68,6 +91,7 @@ // Script Angelscript binding. +//! Binds the Script class to AngelScript so that it can be used within scripts. extern void bindScript(asIScriptEngine *engine); #endif Modified: trunk/src/scripting/ScriptManager.cpp =================================================================== --- trunk/src/scripting/ScriptManager.cpp 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/scripting/ScriptManager.cpp 2009-06-06 19:22:22 UTC (rev 60) @@ -146,7 +146,7 @@ module->AddScriptSection((it->first).c_str(), (it->second).c_str()); } -// Creates an script with the given name and adds it to the Script Manager. +// Creates (and adds) an script with the given name. Script* ScriptManager::createScript(const std::string &name) { // Look if a script with given name doesn't already exist. @@ -159,7 +159,7 @@ return script; } -// Creates an script with the given name and adds it to the Script Manager. +// Creates an script with the given name, loaded from the given file. Script* ScriptManager::createScriptFromFile(const std::string &fileName) { // Get pointer to the File System of Irrlicht. @@ -213,6 +213,12 @@ mScripts.clear(); } +// Removes all script sections, +void ScriptManager::removeAllScriptSections() +{ + mScriptSections.clear(); +} + // Removes the given script. bool ScriptManager::removeScript(Script *script) { Modified: trunk/src/scripting/ScriptManager.h =================================================================== --- trunk/src/scripting/ScriptManager.h 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/scripting/ScriptManager.h 2009-06-06 19:22:22 UTC (rev 60) @@ -27,42 +27,90 @@ // ScriptManager class +//! The Script Manager is the central interface point to all script related functions of this +//! program. class ScriptManager { + friend class Script; + public: + // Initialisation and deinitialisation + //! Constructor ScriptManager(); + //! Deconstructor ~ScriptManager(); + //! Initialises the ScriptManager. void init(); + //! Clears the ScriptManager. void clear(); // AngelScript binding + //! Increases the reference counter. + //! @note For internal use only! void refAdd(); + //! Decreases the reference counter. + //! @note For internal use only! void refRelease(); // Methods + //! Returns a direct pointer to the AngelScript engine. + //! @note Not available in AngelScript. asIScriptEngine* getEngine() const; + //! Adds the given Script to the ScriptManager + //! @param script Pointer to the Script to add. + //! @return True if addition was successful, false if addition was a failure. bool addScript(Script *script); + //! Adds a script section to the ScriptManager. + //! These script sections are added to all scripts. + //! @param name Name of the script section. + //! @param section Contents of the section. bool addScriptSection(const std::string &name, const std::string §ion); - void addScriptSectionsToScript(Script *script); + //! Creates (and adds) an script with the given name. + //! @param name Name of the script. + //! @return Pointer to the Script on success, NULL on failure. Script* createScript(const std::string &name); + //! Creates an script with the given name, loaded from the given file. + //! @param fileName Filename of the file to load. + //! @return Pointer to the Script on success, NULL on failure. Script* createScriptFromFile(const std::string &fileName); + //! Gets the Script with the given ID. + //! @return Pointer to the Script if found, else NULL. Script* getScript(const u32 id); + //! Gets the Script with the given name. + //! @return Pointer to the Script if found, else NULL. Script* getScript(const std::string &name); + //! Removes all scripts from the ScriptManager. void removeAllScripts(); + //! Removes all script sections from the ScriptManager. + void removeAllScriptSections(); + //! Removes the given Script. + //! @param script Pointer to the Script to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeScript(Script *script); + //! Removes the given Script with the given ID. + //! @param id ID of the Script to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeScript(const u32 id); + //! Removes the given Script with the given name. + //! @param name Name of the Script to remove. + //! @return True if removal was successful, false if removal was a failure. bool removeScript(const std::string &name); + //! Removes the script section with the given name. + //! @param name Name of the script section to remove. bool removeScriptSection(const std::string &name); private: + // Private methods. + void addScriptSectionsToScript(Script *script); + // Private members asIScriptEngine *pEngine; @@ -72,14 +120,16 @@ // ScriptManager Angelscript binding. +//! Binds the EntityManager class to AngelScript so that it can be used within scripts. extern void bindScriptManager(asIScriptEngine *engine); // AngelScript functions +//! Implements a message callback function for AngelScript. extern void MessageCallback(const asSMessageInfo *msg, void *param); -// Global function for AngelScript's ref casting. -// Author: Andreas Jönsson (AngelScript's author) +//! Global function for AngelScript's ref casting. +//! @author Andreas Jönsson (AngelScript's author) template<typename A, typename B> B* asRefCast(A* a) { Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-06 16:08:29 UTC (rev 59) +++ trunk/src/sirrf.depend 2009-06-06 19:22:22 UTC (rev 60) @@ -989,11 +989,11 @@ <assert.h> "scriptstring.h" -1244207646 source:/home/michael/Programming/Projects/sirrf/src/core/DataStack.cpp +1244309636 source:/home/michael/Programming/Projects/sirrf/src/core/DataStack.cpp "DataStack.h" "GameManager.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/core/DataStack.h +1244309635 /home/michael/Programming/Projects/sirrf/src/core/DataStack.h "../dependencies.h" "DataStore.h" @@ -1013,41 +1013,41 @@ <SFML/System.hpp> <SFML/Audio.hpp> -1244208497 /home/michael/Programming/Projects/sirrf/src/core/DataStore.h +1244315472 /home/michael/Programming/Projects/sirrf/src/core/DataStore.h "../dependencies.h" "DataStack.h" -1244208569 source:/home/michael/Programming/Projects/sirrf/src/core/DataStore.cpp +1244310209 source:/home/michael/Programming/Projects/sirrf/src/core/DataStore.cpp "DataStore.h" -1244208488 source:/home/michael/Programming/Projects/sirrf/src/core/Entity.cpp +1244311041 source:/home/michael/Programming/Projects/sirrf/src/core/Entity.cpp "Entity.h" "GameManager.h" -1244208397 /home/michael/Programming/Projects/sirrf/src/core/Entity.h +1244311059 /home/michael/Programming/Projects/sirrf/src/core/Entity.h "../dependencies.h" "EntityComponent.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/core/EntityComponent.h +1244311588 /home/michael/Programming/Projects/sirrf/src/core/EntityComponent.h "../dependencies.h" "Entity.h" "../scripting/ScriptManager.h" -1244198741 source:/home/michael/Programming/Projects/sirrf/src/core/EntityComponent.cpp +1244311591 source:/home/michael/Programming/Projects/sirrf/src/core/EntityComponent.cpp "EntityComponent.h" -1244208557 source:/home/michael/Programming/Projects/sirrf/src/core/EntityManager.cpp +1244311929 source:/home/michael/Programming/Projects/sirrf/src/core/EntityManager.cpp "EntityManager.h" "GameManager.h" -1244208530 /home/michael/Programming/Projects/sirrf/src/core/EntityManager.h +1244315424 /home/michael/Programming/Projects/sirrf/src/core/EntityManager.h "../dependenci... [truncated message content] |
From: <zcc...@us...> - 2009-06-06 16:08:32
|
Revision: 59 http://sirrf.svn.sourceforge.net/sirrf/?rev=59&view=rev Author: zccdark203 Date: 2009-06-06 16:08:29 +0000 (Sat, 06 Jun 2009) Log Message: ----------- Added more documentation to the framework: all scene components are now documented. Modified Paths: -------------- trunk/docs/doxyfile trunk/src/components/scene/ImageComponent.cpp trunk/src/components/scene/ImageComponent.h trunk/src/components/scene/SceneComponent.cpp trunk/src/components/scene/SceneComponent.h trunk/src/components/scene/SkyBoxComponent.h trunk/src/components/scene/SkyDomeComponent.h trunk/src/components/scene/TerrainComponent.cpp trunk/src/components/scene/TerrainComponent.h trunk/src/components/scene/TextBillboardComponent.cpp trunk/src/components/scene/TextBillboardComponent.h trunk/src/sirrf.depend trunk/src/sirrf.layout Modified: trunk/docs/doxyfile =================================================================== --- trunk/docs/doxyfile 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/docs/doxyfile 2009-06-06 16:08:29 UTC (rev 59) @@ -25,13 +25,13 @@ # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = Sirrf - Simple Irrlicht Framework +PROJECT_NAME = "Sirrf - Simple Irrlicht Framework" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = v0.10 +PROJECT_NUMBER = v0.1.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -47,7 +47,7 @@ # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. -CREATE_SUBDIRS = NO +CREATE_SUBDIRS = YES # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this @@ -153,7 +153,7 @@ # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. -MULTILINE_CPP_IS_BRIEF = NO +MULTILINE_CPP_IS_BRIEF = YES # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it @@ -384,7 +384,7 @@ # will put a list of the files that are included by a file in the documentation # of that file. -SHOW_INCLUDE_FILES = YES +SHOW_INCLUDE_FILES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. @@ -470,7 +470,7 @@ # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. -SHOW_DIRECTORIES = YES +SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the @@ -1402,14 +1402,14 @@ # file showing the direct and indirect include dependencies of the file with # other documented files. -INCLUDE_GRAPH = YES +INCLUDE_GRAPH = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. -INCLUDED_BY_GRAPH = YES +INCLUDED_BY_GRAPH = NO # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function @@ -1437,7 +1437,7 @@ # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. -DIRECTORY_GRAPH = YES +DIRECTORY_GRAPH = NO # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif Modified: trunk/src/components/scene/ImageComponent.cpp =================================================================== --- trunk/src/components/scene/ImageComponent.cpp 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/ImageComponent.cpp 2009-06-06 16:08:29 UTC (rev 59) @@ -104,6 +104,48 @@ return new ImageComponent(parent); } +// Gets the alpha color. +const SColor& ImageComponent::getAlphaColor() const +{ + return mAlphaColor; +} + +// Gets the clipping rectangle. +const rect<s32>* ImageComponent::getClipRect() const +{ + return mClipRect; +} + +// Gets the color with which the image is drawn. +const SColor& ImageComponent::getColor() const +{ + return mColor; +} + +// Gets the upper left 2d screen position where the image will be drawn. +const position2di& ImageComponent::getPosition() const +{ + return mPosition; +} + +// Gets the source rectangle in the image +const rect<s32>& ImageComponent::getSourceRect() const +{ + return mSourceRect; +} + +// Gets the texture associated with this component. +const ITexture* ImageComponent::getTexture() const +{ + return mTexture; +} + +// Returns whether the alpha color is used. +bool ImageComponent::getUseAlphaColor() const +{ + return mUseAlphaColor; +} + // Sets the alpha color of the image. void ImageComponent::setAlphaColor(const SColor &color) { @@ -141,12 +183,18 @@ void ImageComponent::setTexture(const std::string &fileName) { mTexture = GameManager::Instance()->getDriver()->getTexture(fileName.c_str()); + + if(mTexture) + GameManager::Instance()->getDriver()->makeColorKeyTexture(mTexture, mAlphaColor); } // Sets the texture which should be drawn. void ImageComponent::setTexture(ITexture *texture) { mTexture = texture; + + if(mTexture) + GameManager::Instance()->getDriver()->makeColorKeyTexture(mTexture, mAlphaColor); } // Sets whether the alpha color should be used. @@ -155,48 +203,7 @@ mUseAlphaColor = value; } -// Gets the alpha color. -const SColor& ImageComponent::getAlphaColor() const -{ - return mAlphaColor; -} -// Gets the clipping rectangle. -const rect<s32>* ImageComponent::getClipRect() const -{ - return mClipRect; -} - -// Gets the color with which the image is drawn. -const SColor& ImageComponent::getColor() const -{ - return mColor; -} - -// Gets the upper left 2d screen position where the image will be drawn. -const position2di& ImageComponent::getPosition() const -{ - return mPosition; -} - -// Gets the source rectangle in the image -const rect<s32>& ImageComponent::getSourceRect() const -{ - return mSourceRect; -} - -// Gets the texture associated with this component. -const ITexture* ImageComponent::getTexture() const -{ - return mTexture; -} - -// Returns whether the alpha color is used. -bool ImageComponent::getUseAlphaColor() const -{ - return mUseAlphaColor; -} - // Event functions // Updates the component if the parent is rendered. void ImageComponent::onRender(void *p) @@ -214,7 +221,7 @@ mWasVisible = mVisible; } -// Unpauses the component if the parent is paused. +// Unpauses the component if the parent is unpaused. void ImageComponent::onUnPause(void *p) { mVisible = mWasVisible; Modified: trunk/src/components/scene/ImageComponent.h =================================================================== --- trunk/src/components/scene/ImageComponent.h 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/ImageComponent.h 2009-06-06 16:08:29 UTC (rev 59) @@ -22,48 +22,105 @@ // ImageComponent class +//! Component wrapper for drawing 2d images. class ImageComponent : public EntityComponent { public: // Initialisation and deinitialisation + //! Constructor (default) + //! @param parent The parent entity to which the component should be added. ImageComponent(Entity *parent); + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param fileName Filename of the texture to load. + //! @param position Upper left 2d destination position where the image will be drawn. + //! @param sourceRect Source rectangle in the image. + //! @param clipRect Pointer to rectangle on the screen where the image is clipped to. + //! If this pointer is NULL the image is not clipped. + //! @param color Color with which the image is drawn. + //! @param alphaColor Alpha color of the image. + //! @param useAlphaColor If true, the alpha channel of the texture is used to draw the image. ImageComponent(Entity *parent, const std::string &fileName, const position2di &position, const rect<s32> &sourceRect, rect<s32> *clipRect = NULL, const SColor &color = SColor(255, 255, 255, 255), const SColor &alphaColor = SColor(255, 255, 255, 255), bool useAlphaColor = false); + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param texture Texture to be added to the image component. + //! @param position Upper left 2d destination position where the image will be drawn. + //! @param sourceRect Source rectangle in the image. + //! @param clipRect Pointer to rectangle on the screen where the image is clipped to. + //! If this pointer is NULL the image is not clipped. + //! @param color Color with which the image is drawn. + //! @param alphaColor Alpha color of the image. + //! @param useAlphaColor If true, the alpha channel of the texture is used to draw the image. ImageComponent(Entity *parent, ITexture *texture, const position2di &position, const rect<s32> &sourceRect, rect<s32> *clipRect = NULL, const SColor &color = SColor(255, 255, 255, 255), const SColor &alphaColor = SColor(255, 255, 255, 255), bool useAlphaColor = false); + //! Deconstructor ~ImageComponent(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static ImageComponent* refFactory(Entity *parent); // Public methods + //! Gets the alpha color. + const SColor& getAlphaColor() const; + //! Gets the clipping rectangle. + const rect<s32>* getClipRect() const; + //! Gets the color with which the image is drawn. + const SColor& getColor() const; + //! Gets the upper left 2d screen position where the image will be drawn. + const position2di& getPosition() const; + //! Gets the source rectangle in the image + const rect<s32>& getSourceRect() const; + //! Gets the texture associated with this component. + const ITexture* getTexture() const; + //! Returns whether the alpha color is used. + bool getUseAlphaColor() const; + + //! Sets the alpha color of the image. + //! @param color New alpha color of the image. void setAlphaColor(const SColor &color); + //! Sets where the image is clipped to. + //! @param rect Pointer to rectangle on the screen where the image is clipped to. + //! If this pointer is NULL the image is not clipped. void setClipRect(rect<s32> *rect); + //! Sets the color with which the image is drawn. + //! @param color New color. void setColor(const SColor &color); + //! Sets the upper left 2d screen position where the image will be drawn. + //! @param position New position. void setPosition(const position2di &position); + //! Sets the source rectangle in the image + //! @param rect New source rectangle from where the image is retrieved. void setSourceRect(const rect<s32> &rect); + //! Loads a texture from the given file and sets it as the texture to be drawn. + //! @param fileName Filename of the texture to load. void setTexture(const std::string &fileName); + //! Sets the texture which should be drawn. + //! @param texture Pointer to the new texture. + //! @note Not available in AngelScript. void setTexture(ITexture *texture); + //! Sets whether the alpha color should be used. + //! @param value Value to enable or disble this option. void setUseAlphaColor(bool value); - const SColor& getAlphaColor() const; - const rect<s32>* getClipRect() const; - const SColor& getColor() const; - const position2di& getPosition() const; - const rect<s32>& getSourceRect() const; - const ITexture* getTexture() const; - bool getUseAlphaColor() const; - // Event functions + //! Updates the component if the parent is rendered. + //! @note For internal use only! void onRender(void *p); + //! Pauses the component if the parent is paused. + //! @note For internal use only! void onPause(void *p); + //! Unpauses the component if the parent is unpaused. + //! @note For internal use only! void onUnPause(void *p); private: @@ -85,6 +142,7 @@ // ImageComponent Angelscript binding. +//! Binds the ImageComponent class to AngelScript so that it can be used within scripts. extern void bindImageComponent(asIScriptEngine *engine); #endif Modified: trunk/src/components/scene/SceneComponent.cpp =================================================================== --- trunk/src/components/scene/SceneComponent.cpp 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/SceneComponent.cpp 2009-06-06 16:08:29 UTC (rev 59) @@ -81,19 +81,19 @@ } -// Gets a direct pointer to the ISceneNode. +// Returns a direct pointer to the ISceneNode. ISceneNode* SceneComponent::getSceneNode() { return mSceneNode; } -// Gets the internal meta selector. (for internal use) +// Returns a direct pointer to the meta selector of this component. IMetaTriangleSelector* SceneComponent::getMetaSelector() const { return mMetaSelector; } -// Gets the internal triangle selector. (for use by external entities) +// Returns a direct pointer to the triangle selector of this component. ITriangleSelector* SceneComponent::getTriangleSelector() const { return mTriSelector; @@ -180,7 +180,7 @@ mMetaSelector->addTriangleSelector(selector); } -// Gets the abolute position of the component. +// Gets the abolute position of the component. vector3df SceneComponent::getAbsolutePosition() const { return mSceneNode->getAbsolutePosition(); @@ -198,7 +198,7 @@ return mSceneNode->getBoundingBox(); } -// Get amount of materials used by this component. +// Get amount of materials used by this component. u32 SceneComponent::getMaterialCount() const { return mSceneNode->getMaterialCount(); @@ -222,7 +222,7 @@ return mSceneNode->getRotation(); } -// Gets the relative scale of the component. +// Gets the scale of the component. const vector3df& SceneComponent::getScale() const { return mSceneNode->getScale(); Modified: trunk/src/components/scene/SceneComponent.h =================================================================== --- trunk/src/components/scene/SceneComponent.h 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/SceneComponent.h 2009-06-06 16:08:29 UTC (rev 59) @@ -22,72 +22,171 @@ // SceneComponent class +//! Component wrapper of Irrlicht's ISceneNode and base class of various scene components. class SceneComponent : public EntityComponent { public: // Initialisation and deinitialisation + //! Constructor (default) SceneComponent(Entity *parent); + //! Deconstructor ~SceneComponent(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static SceneComponent* refFactory(Entity *parent); // Methods + //! Returns a direct pointer to the ISceneNode. + //! @note Not available in AngelScript. ISceneNode* getSceneNode(); + //! Returns a direct pointer to the meta selector of this component. + //! @note Not available in AngelScript. IMetaTriangleSelector* getMetaSelector() const; + //! Returns a direct pointer to the triangle selector of this component. + //! @note Not available in AngelScript. ITriangleSelector* getTriangleSelector() const; + //! Adds an scene node animator to the component. + //! @param animator Pointer to the animator which should be added. + //! @note Don't forget to call SceneComponent::setCanAffectParent when you use an animator. void addAnimator(ISceneNodeAnimator *animator); + //! Adds a collision response animator to the component. + //! @param ellipsoidRadius Radius of the ellipsoid with which collision detection and + //! response is done. + //! @param gravityPerSecond Sets the gravity of the environment, as an acceleration in + //! units per second per second. + //! @param ellipsoidTranslation By default, the ellipsoid for collision detection is created + //! around the center of the component, which means that the + //! ellipsoid surrounds it completely. If this is not what you + //! want, you may specify a translation for the ellipsoid. + //! @param slidingValue Sets the sliding value. + //! @note Don't forget to call SceneComponent::setCanAffectParent when you use an animator. void addCollisionResponseAnimator(const vector3df &ellipsoidRadius = vector3df(30, 60, 30), const vector3df &gravityPerSecond = vector3df(0, -10, 0), const vector3df &ellipsoidTranslation = vector3df(0, 0, 0), f32 slidingValue = 0.0005f); + //! Adds a fly circle animator to the component. + //! @param center Center of the circle. + //! @param radius Radius of the circle. + //! @param speed Specifies the speed of the flight. + //! @param direction Specifies the upvector used for alignment of the mesh. + //! @note Don't forget to call SceneComponent::setCanAffectParent when you use an animator. void addFlyCircleAnimator(const vector3df ¢er = vector3df(0, 0, 0), f32 radius = 100, f32 speed = 0.001f, const vector3df &direction = vector3df(0, 0, 0)); + //! Adds a fly straight animator to the component. + //! @param startPoint Start point of the line. + //! @param endPoint End point of the line. + //! @param timeForWay Time in milliseconds how long the component should need to move from + //! the start point to the end point. + //! @param loop If set to false, the component stops when the end point is reached. If + //! loop is true, the component begins again at the start. + //! @note Don't forget to call SceneComponent::setCanAffectParent when you use an animator. void addFlyStraightAnimator(const vector3df &startPoint, const vector3df &endPoint, u32 timeForWay, bool loop = false); + //! Searches for a SceneComponent within the given entity and if found adds the triangle + //! selector of that component to the meta selector of this component. + //! @param entity Pointer to the entity. void addToMetaSelector(Entity *entity); + //! Adds the triangle selector of the given component to the meta selector of this + //! component. + //! @param component Pointer to the component. void addToMetaSelector(SceneComponent *component); + //! Adds the given triangle selector to the meta selector of this component. + //! @param selector Pointer to the triangle selector that should be added. + //! @note Not available in AngelScript. void addToMetaSelector(ITriangleSelector *selector); + //! Gets the abolute position of the component. vector3df getAbsolutePosition() const; + //! Gets the automatic culling state. E_CULLING_TYPE getAutomaticCulling() const; + //! Get the axis aligned, not transformed bounding box of this component. const aabbox3df& getBoundingBox() const; + //! Get amount of materials used by this component. u32 getMaterialCount() const; + //! Returns the relative transformation of the component. matrix4 getRelativeTransformation() const; + //! Gets the relative position of the component. const vector3df getPosition() const; + //! Gets the rotation of the component. const vector3df& getRotation() const; + //! Gets the scale of the component. const vector3df& getScale() const; + //! Removes all animators from this component. void removeAnimators(); + //! Sets the absolute position of the component. + //! @param position New absolute position of the component. void setAbsolutePosition(const vector3df &position); + //! Enables or disables automatic culling based on the bounding box. + //! @param state The culling state to be used. void setAutomaticCulling(E_CULLING_TYPE state); + //! Sets whether the component can affect the parent entity. + //! A direct effect of enabling this option is that the position of the parent entity and + //! this component will always be synchronised. + //! @param value Value to enable or disable this function. + //! @note It's recommended to enable this option when you're using animators. void setCanAffectParent(bool value); + //! Sets if debug data like bounding boxes should be drawn. + //! @param state The debug data visibility state to be used. void setDebugDataVisible(s32 state); + //! Sets a material flag to a new value. + //! @param flag Which flag of all materials to be set. + //! @param value New value of that flag. void setMaterialFlag(E_MATERIAL_FLAG flag, bool value); + //! Loads and sets the texture of the specified layer in all materials of this component to + //! the new texture. + //! @param layer Layer of texture to be set. + //! @param fileName Filename of the texture to load. void setMaterialTexture(u32 layer, const std::string &fileName); + //! Sets the texture of the specified layer in all materials of this component to the new + //! texture. + //! @param layer Layer of texture to be set. + //! @param texture New texture to be used. + //! @note Not available in AngelScript. void setMaterialTexture(u32 layer, ITexture *texture); + //! Sets the material type of all materials in this component to a new material type. + //! @param type New type of material to be set. void setMaterialType(E_MATERIAL_TYPE type); + //! Sets the relative position of the component. + //! @param position New relative postition of the component. void setPosition(const vector3df &position); + //! Sets the rotation of the component. + //! @param rotation New rotation of the component in degrees. void setRotation(const vector3df &rotation); + //! Sets the relative scale of the component. + //! @param scale New scale of the node void setScale(const vector3df &scale); + //! Sets if the component should be visible or not. + //! @param value If the node shall be visible. void setVisible(bool value); // Events + //! Updates the position of the component after its parent has been updated. + //! @note For internal use only! void onPositionChange(void *p); + //! Updates the component if the parent is updated. + //! @note For internal use only! void onUpdate(void *p); + //! Pauses the component if the parent is paused. + //! @note For internal use only! void onPause(void *p); + //! Unpauses the component if the parent is paused. + //! @note For internal use only! void onUnPause(void *p); protected: // Initialisation + //! Constructor for derived classes. SceneComponent(Entity *parent, bool isDerived); // Protected Members @@ -107,9 +206,12 @@ // SceneComponent Angelscript binding. +//! Binds the SceneComponent class to AngelScript so that it can be used within scripts. extern void bindSceneComponent(asIScriptEngine *engine); +//! Binds the base behaviours and methods of the SceneComponent to the given class in +//! AngelScript. template<typename T> void bindSceneComponentBase(asIScriptEngine *engine, const char *type) { Modified: trunk/src/components/scene/SkyBoxComponent.h =================================================================== --- trunk/src/components/scene/SkyBoxComponent.h 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/SkyBoxComponent.h 2009-06-06 16:08:29 UTC (rev 59) @@ -22,19 +22,40 @@ // SkyBoxComponent class +//! Component wrapper of Irrlicht's SceneManager function addSkyBoxSceneNode(...). class SkyBoxComponent : public SceneComponent { public: // Initialisation and deinitialisation + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param top Texture for the top plane of the box. + //! @param bottom Texture for the bottom plane of the box. + //! @param left Texture for the left plane of the box. + //! @param right Texture for the right plane of the box. + //! @param front Texture for the front plane of the box. + //! @param back Texture for the back plane of the box. + //! @note Not available in AngelScript. SkyBoxComponent(Entity *parent, ITexture *top, ITexture *bottom, ITexture *left, ITexture *right, ITexture *front, ITexture *back); + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param top File with the texture for the top plane of the box. + //! @param bottom File with the texture for the bottom plane of the box. + //! @param left File with the texture for the left plane of the box. + //! @param right File with the texture for the right plane of the box. + //! @param front File with the texture for the front plane of the box. + //! @param back File with the texture for the back plane of the box. SkyBoxComponent(Entity *parent, const std::string &top, const std::string &bottom, const std::string &left, const std::string &right, const std::string &front, const std::string &back); + //! Deconstructor ~SkyBoxComponent(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static SkyBoxComponent* refFactory(Entity *parent, const std::string &top, const std::string &bottom, const std::string &left, const std::string &right, const std::string &front, @@ -43,6 +64,7 @@ // SkyBoxComponent Angelscript binding. +//! Binds the SkyBoxComponent class to AngelScript so that it can be used within scripts. extern void bindSkyBoxComponent(asIScriptEngine *engine); #endif Modified: trunk/src/components/scene/SkyDomeComponent.h =================================================================== --- trunk/src/components/scene/SkyDomeComponent.h 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/SkyDomeComponent.h 2009-06-06 16:08:29 UTC (rev 59) @@ -22,24 +22,49 @@ // SkyDomeComponent class +//! Component wrapper of Irrlicht's SceneManager function addSkyDomeSceneNode(...). class SkyDomeComponent : public SceneComponent { public: // Initialisation and deinitialisation + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param fileName File with the texture to add. + //! @param hRes Number of vertices of a horizontal layer of the sphere. + //! @param vRes Number of vertices of a vertical layer of the sphere. + //! @param texturePerc How much of the height of the texture is used. Should be + //! between 0 and 1. + //! @param spherePerc How much of the sphere is drawn. Value should be between + //! 0 and 2, where 1 is an exact half-sphere and 2 is a full sphere. + //! @param radius Radius of the skydome. SkyDomeComponent(Entity *parent, const std::string &fileName, u32 hRes = 16, u32 vRes = 8, f32 texturePerc = 0.9f, f32 spherePerc = 2.0f, f32 radius = 1000.0f); + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param texture Pointer to the texture to add. + //! @param hRes Number of vertices of a horizontal layer of the sphere. + //! @param vRes Number of vertices of a vertical layer of the sphere. + //! @param texturePerc How much of the height of the texture is used. Should be + //! between 0 and 1. + //! @param spherePerc How much of the sphere is drawn. Value should be between + //! 0 and 2, where 1 is an exact half-sphere and 2 is a full sphere. + //! @param radius Radius of the skydome. SkyDomeComponent(Entity *parent, ITexture *texture, u32 hRes = 16, u32 vRes = 8, f32 texturePerc = 0.9f, f32 spherePerc = 2.0f, f32 radius = 1000.0f); + //! Deconstructor ~SkyDomeComponent(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static SkyDomeComponent* refFactory(Entity *parent, const std::string &fileName, u32 hRes, u32 vRes, f32 texturePerc, f32 spherePerc, f32 radius); }; // SkyDomeComponent Angelscript binding. +//! Binds the SkyDomeComponent class to AngelScript so that it can be used within scripts. extern void bindSkyDomeComponent(asIScriptEngine *engine); #endif Modified: trunk/src/components/scene/TerrainComponent.cpp =================================================================== --- trunk/src/components/scene/TerrainComponent.cpp 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/TerrainComponent.cpp 2009-06-06 16:08:29 UTC (rev 59) @@ -80,7 +80,7 @@ return new TerrainComponent(parent, fileName, rotation, scale, vertexColor, maxLOD, smoothFactor); } -// Gets a direct pointer to the ITerrainSceneNode. +// Returns a direct pointer to the ITerrainSceneNode. ITerrainSceneNode* TerrainComponent::getTerrainSceneNode() { return mTerrainSN; Modified: trunk/src/components/scene/TerrainComponent.h =================================================================== --- trunk/src/components/scene/TerrainComponent.h 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/TerrainComponent.h 2009-06-06 16:08:29 UTC (rev 59) @@ -22,36 +22,72 @@ // TerrainComponent class +//! Component wrapper of Irrlicht's ITerrainSceneNode. class TerrainComponent : public SceneComponent { public: // Initialisation and deinitialisation + //! Constructor (default) + //! @param parent The parent entity to which the component should be added. TerrainComponent(Entity *parent); + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param fileName Filename of the heightmap to load. + //! @param rotation The initial rotation of the component. + //! @param scale The initial scale of the component. + //! @param vertexColor The default color of all the vertices. + //! @param maxLOD The maximum LOD (level of detail) for the component. + //! @param smoothFactor The number of times the vertices are smoothed. TerrainComponent(Entity *parent, const std::string &fileName, const vector3df &rotation = vector3df(0.0f, 0.0f, 0.0f), const vector3df &scale = vector3df(1.0f, 1.0f, 1.0f), const SColor &vertexColor = SColor(255, 255, 255, 255), s32 maxLOD = 5, s32 smoothFactor = 0); + //! Deconstructor ~TerrainComponent(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static TerrainComponent* refFactory(Entity *parent); + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static TerrainComponent* refFactory(Entity *parent, const std::string &fileName, const vector3df &rotation, const vector3df &scale, const SColor &vertexColor, s32 maxLOD, s32 smoothFactor); // Methods + //! Returns a direct pointer to the ITerrainSceneNode. + //! @note Not available in AngelScript. ITerrainSceneNode* getTerrainSceneNode(); + //! Gets the bounding box of a patch. const aabbox3df& getBoundingBox(s32 patchX, s32 patchZ) const; + //! Gets height of a point of the terrain. f32 getHeight(f32 x, f32 y); + //! Returns the current mesh. + //! @note Not available in AngelScript. IMesh* getMesh(); + //! Gets the center of the terrain. const vector3df& getTerrainCenter() const; + //! Loads the data from a heightMapFile. + //! @param fileName Filename of the heightmap to load. + //! @param vertexColor The default color of all the vertices. + //! @param smoothFactor The number of times the vertices are smoothed. bool loadHeightMap(const std::string &fileName, const SColor &vertexColor = SColor(255, 255, 255, 255), s32 smoothFactor = 0); + //! Scales the base texture. + //! @param scale The scaling amount. Values above 1.0 increase the number of time + //! the texture is drawn on the terrain. Values below 0 will decrease + //! the number of times the texture is drawn on the terrain. Using + //! negative values will flip the texture, as well as still scaling it. + //! @param scale2 If set to 0 (default value), this will set the second texture + //! coordinate set to the same values as in the first set. If this is + //! another value than zero, it will scale the second texture + //! coordinate set by this value. void scaleTexture(f32 scale = 1.0f, f32 scale2 = 0.0f); @@ -63,6 +99,7 @@ // TerrainComponent Angelscript binding. +//! Binds the TerrainComponent class to AngelScript so that it can be used within scripts. extern void bindTerrainComponent(asIScriptEngine *engine); #endif Modified: trunk/src/components/scene/TextBillboardComponent.cpp =================================================================== --- trunk/src/components/scene/TextBillboardComponent.cpp 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/TextBillboardComponent.cpp 2009-06-06 16:08:29 UTC (rev 59) @@ -40,7 +40,7 @@ } // TextBillboardComponent constructor. -TextBillboardComponent::TextBillboardComponent(Entity *parent, const std::string &fontFilename, +TextBillboardComponent::TextBillboardComponent(Entity *parent, const std::string &fontFileName, const wchar_t *text, const dimension2df &size, const SColor &colorTop, const SColor &colorBottom) : BillboardComponent(parent, true) @@ -50,7 +50,7 @@ IGUIEnvironment *pGUIEnv = GameManager::Instance()->getGUIEnvironment(); // Create the internal scene node. - mBillboardTextSN = pSceneMgr->addBillboardTextSceneNode(pGUIEnv->getFont(fontFilename.c_str()), + mBillboardTextSN = pSceneMgr->addBillboardTextSceneNode(pGUIEnv->getFont(fontFileName.c_str()), text, 0, size, parent->getPosition(), parent->getID(), colorTop, colorBottom); mBillboardSN = mBillboardTextSN; @@ -62,7 +62,7 @@ } // TextBillboardComponent constructor. -TextBillboardComponent::TextBillboardComponent(Entity *parent, const std::string &fontFilename, +TextBillboardComponent::TextBillboardComponent(Entity *parent, const std::string &fontFileName, const std::string &text, const dimension2df &size, const SColor &colorTop, const SColor &colorBottom) : BillboardComponent(parent, true) @@ -73,7 +73,7 @@ // Create the internal scene node. core::stringw wBuffer = core::stringw(text.c_str()); - mBillboardTextSN = pSceneMgr->addBillboardTextSceneNode(pGUIEnv->getFont(fontFilename.c_str()), + mBillboardTextSN = pSceneMgr->addBillboardTextSceneNode(pGUIEnv->getFont(fontFileName.c_str()), wBuffer.c_str(), 0, size, parent->getPosition(), parent->getID(), colorTop, colorBottom); @@ -101,16 +101,16 @@ // AngelScript: Will be used to instanciate objects of this class. TextBillboardComponent* TextBillboardComponent::refFactory(Entity *parent, - const std::string &fontFilename, + const std::string &fontFileName, const std::string &text, const dimension2df &size, const SColor &colorTop, const SColor &colorBottom) { - return new TextBillboardComponent(parent, fontFilename, text, size, colorTop, colorBottom); + return new TextBillboardComponent(parent, fontFileName, text, size, colorTop, colorBottom); } -// Gets a direct pointer to the IBillboardTextSceneNode. +// Returns a direct pointer to the IBillboardTextSceneNode. IBillboardTextSceneNode* TextBillboardComponent::getBillboardTextSceneNode() { return mBillboardTextSN; Modified: trunk/src/components/scene/TextBillboardComponent.h =================================================================== --- trunk/src/components/scene/TextBillboardComponent.h 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/components/scene/TextBillboardComponent.h 2009-06-06 16:08:29 UTC (rev 59) @@ -22,33 +22,64 @@ // TextBillboardComponent class +//! Component wrapper of Irrlicht's IBillboardTextSceneNode. class TextBillboardComponent : public BillboardComponent { public: // Initialisation and deinitialisation + //! Constructor (default) TextBillboardComponent(Entity *parent); - TextBillboardComponent(Entity *parent, const std::string &fontFilename, const wchar_t *text, + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param fontFileName Filename of the font to load. + //! @param text The text to display on the billboard. + //! @param size The billboard's width and height. + //! @param colorTop The color of the vertices at the top of the billboard. + //! @param colorBottom The color of the vertices at the bottom of the billboard. + //! @note Not available in AngelScript. + TextBillboardComponent(Entity *parent, const std::string &fontFileName, const wchar_t *text, const dimension2df &size = dimension2df(10.0f, 10.0f), const SColor &colorTop = SColor(255, 255, 255, 255), const SColor &colorBottom = SColor(255, 255, 255, 255)); - TextBillboardComponent(Entity *parent, const std::string &fontFilename, const std::string &text, + //! Constructor + //! @param parent The parent entity to which the component should be added. + //! @param fontFileName Filename of the font to load. + //! @param text The text to display on the billboard. + //! @param size The billboard's width and height. + //! @param colorTop The color of the vertices at the top of the billboard. + //! @param colorBottom The color of the vertices at the bottom of the billboard. + TextBillboardComponent(Entity *parent, const std::string &fontFileName, const std::string &text, const dimension2df &size = dimension2df(10.0f, 10.0f), const SColor &colorTop = SColor(255, 255, 255, 255), const SColor &colorBottom = SColor(255, 255, 255, 255)); + //! Deconstructor ~TextBillboardComponent(); // AngelScript binding + //! Will be used to instanciate objects of this class. + //! @note For internal use only! static TextBillboardComponent* refFactory(Entity *parent); - static TextBillboardComponent* refFactory(Entity *parent, const std::string &fontFilename, + //! Will be used to instanciate objects of this class. + //! @note For internal use only! + static TextBillboardComponent* refFactory(Entity *parent, const std::string &fontFileName, const std::string &text, const dimension2df &size, const SColor &colorTop, const SColor &colorBottom); // Methods + //! Returns a direct pointer to the IBillboardTextSceneNode. + //! @note Not available in AngelScript. IBillboardTextSceneNode* getBillboardTextSceneNode(); + //! Sets the text string. + //! @param text Text to set. void setText(const std::string &text); + //! Sets the text string. + //! @param text Text to set. + //! @note Not available in AngelScript. void setText(const wchar_t *text); + //! Sets the color of the text. + //! @param color New color of the text. void setTextColor(const SColor &color); private: @@ -59,6 +90,7 @@ // TextBillboardComponent Angelscript binding. +//! Binds the TextBillboardComponent class to AngelScript so that it can be used within scripts. extern void bindTextBillboardComponent(asIScriptEngine *engine); #endif Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/sirrf.depend 2009-06-06 16:08:29 UTC (rev 59) @@ -1125,11 +1125,11 @@ "scriptstring.h" <string.h> -1244203676 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.cpp +1244299788 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.cpp "SceneComponent.h" "../../core/GameManager.h" -1244205765 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h +1244304168 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h "../../dependencies.h" "../../core/EntityComponent.h" @@ -1145,7 +1145,7 @@ "TextBillboardComponent.h" "../../core/GameManager.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/components/scene/TextBillboardComponent.h +1244304218 /home/michael/Programming/Projects/sirrf/src/components/scene/TextBillboardComponent.h "../../dependencies.h" "BillboardComponent.h" @@ -1157,7 +1157,7 @@ "../../dependencies.h" "SceneComponent.h" -1243891464 source:/home/michael/Programming/Projects/sirrf/src/components/scene/MeshComponent.cpp +1244230830 source:/home/michael/Programming/Projects/sirrf/src/components/scene/MeshComponent.cpp "MeshComponent.h" "../../core/GameManager.h" @@ -1195,15 +1195,15 @@ "../../dependencies.h" "SceneComponent.h" -1243891465 source:/home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.cpp +1244302556 source:/home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.cpp "TerrainComponent.h" "../../core/GameManager.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.h +1244304255 /home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.h "../../dependencies.h" "SceneComponent.h" -1243891465 source:/home/michael/Programming/Projects/sirrf/src/components/scene/ParticleSysComponent.cpp +1244233658 source:/home/michael/Programming/Projects/sirrf/src/components/scene/ParticleSysComponent.cpp "ParticleSysComponent.h" "../../core/GameManager.h" @@ -1233,7 +1233,7 @@ "SkyDomeComponent.h" "../../core/GameManager.h" -1243891465 /home/michael/Programming/Projects/sirrf/src/components/scene/SkyDomeComponent.h +1244301881 /home/michael/Programming/Projects/sirrf/src/components/scene/SkyDomeComponent.h "../../dependencies.h" "SceneComponent.h" @@ -1241,7 +1241,7 @@ "SkyBoxComponent.h" "../../core/GameManager.h" -1243891465 /home/michael/Programming/Projects/sirrf/src/components/scene/SkyBoxComponent.h +1244301581 /home/michael/Programming/Projects/sirrf/src/components/scene/SkyBoxComponent.h "../../dependencies.h" "SceneComponent.h" @@ -2475,11 +2475,11 @@ 1244040706 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asRect.h "../../dependencies.h" -1244220541 source:/home/michael/Programming/Projects/sirrf/src/components/scene/ImageComponent.cpp +1244304167 source:/home/michael/Programming/Projects/sirrf/src/components/scene/ImageComponent.cpp "ImageComponent.h" "../../core/GameManager.h" -1244220541 /home/michael/Programming/Projects/sirrf/src/components/scene/ImageComponent.h +1244304164 /home/michael/Programming/Projects/sirrf/src/components/scene/ImageComponent.h "../../dependencies.h" "../../core/EntityComponent.h" Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-06-05 20:39:27 UTC (rev 58) +++ trunk/src/sirrf.layout 2009-06-06 16:08:29 UTC (rev 59) @@ -8,22 +8,22 @@ <Cursor position="872" topLine="0" /> </File> <File name="components/scene/AnimatedMeshComponent.cpp" open="0" top="0" tabpos="5"> - <Cursor position="9630" topLine="232" /> + <Cursor position="7661" topLine="232" /> </File> <File name="components/scene/AnimatedMeshComponent.h" open="0" top="0" tabpos="6"> - <Cursor position="322" topLine="15" /> + <Cursor position="6351" topLine="0" /> </File> <File name="components/scene/BillboardComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="3847" topLine="86" /> + <Cursor position="3493" topLine="86" /> </File> <File name="components/scene/BillboardComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="316" topLine="7" /> + <Cursor position="2198" topLine="22" /> </File> <File name="components/scene/CameraComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="320" topLine="248" /> + <Cursor position="6737" topLine="221" /> </File> <File name="components/scene/CameraComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="310" topLine="34" /> + <Cursor position="1738" topLine="20" /> </File> <File name="components/scene/ImageComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="6304" topLine="0" /> @@ -32,34 +32,34 @@ <Cursor position="2373" topLine="25" /> </File> <File name="components/scene/LightComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="318" topLine="7" /> + <Cursor position="2620" topLine="60" /> </File> <File name="components/scene/LightComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="308" topLine="7" /> + <Cursor position="2256" topLine="27" /> </File> <File name="components/scene/MeshComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="316" topLine="7" /> + <Cursor position="3671" topLine="105" /> </File> <File name="components/scene/MeshComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="306" topLine="7" /> + <Cursor position="3306" topLine="45" /> </File> <File name="components/scene/OctTreeComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="371" topLine="8" /> + <Cursor position="197" topLine="0" /> </File> <File name="components/scene/OctTreeComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="312" topLine="0" /> + <Cursor position="2962" topLine="0" /> </File> <File name="components/scene/ParticleSysComponent.cpp" open="0" top="0" tabpos="1"> - <Cursor position="333" topLine="359" /> + <Cursor position="16552" topLine="279" /> </File> <File name="components/scene/ParticleSysComponent.h" open="0" top="0" tabpos="2"> - <Cursor position="320" topLine="7" /> + <Cursor position="26387" topLine="0" /> </File> <File name="components/scene/SceneComponent.cpp" open="0" top="0" tabpos="1"> <Cursor position="11243" topLine="258" /> </File> <File name="components/scene/SceneComponent.h" open="0" top="0" tabpos="3"> - <Cursor position="9464" topLine="145" /> + <Cursor position="9464" topLine="46" /> </File> <File name="components/scene/SkyBoxComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="369" topLine="8" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-05 20:40:28
|
Revision: 58 http://sirrf.svn.sourceforge.net/sirrf/?rev=58&view=rev Author: zccdark203 Date: 2009-06-05 20:39:27 +0000 (Fri, 05 Jun 2009) Log Message: ----------- Started with the documentation of the framework. The first batch of scene components have been documented. Generate HTML, CHM, and more files with Doxygen. Modified Paths: -------------- trunk/src/components/scene/AnimatedMeshComponent.cpp trunk/src/components/scene/AnimatedMeshComponent.h trunk/src/components/scene/BillboardComponent.cpp trunk/src/components/scene/BillboardComponent.h trunk/src/components/scene/CameraComponent.cpp trunk/src/components/scene/CameraComponent.h trunk/src/components/scene/LightComponent.cpp trunk/src/components/scene/LightComponent.h trunk/src/components/scene/MeshComponent.cpp trunk/src/components/scene/MeshComponent.h trunk/src/components/scene/OctTreeComponent.h trunk/src/components/scene/ParticleSysComponent.cpp trunk/src/components/scene/ParticleSysComponent.h trunk/src/sirrf.depend trunk/src/sirrf.layout Added Paths: ----------- trunk/docs/ trunk/docs/doxyfile Added: trunk/docs/doxyfile =================================================================== --- trunk/docs/doxyfile (rev 0) +++ trunk/docs/doxyfile 2009-06-05 20:39:27 UTC (rev 58) @@ -0,0 +1,1513 @@ +# Doxyfile 1.5.8 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = Sirrf - Simple Irrlicht Framework + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = v0.10 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = ../src + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = ../src/vendor \ + ../src/scripting/scriptstring.cpp \ + ../src/scripting/scriptstring.h \ + ../src/scripting/scriptstring_utils.cpp + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to FRAME, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. Other possible values +# for this tag are: HIERARCHIES, which will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list; +# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which +# disables this behavior completely. For backwards compatibility with previous +# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE +# respectively. + +GENERATE_TREEVIEW = NONE + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# ... [truncated message content] |
From: <zcc...@us...> - 2009-06-05 16:54:53
|
Revision: 57 http://sirrf.svn.sourceforge.net/sirrf/?rev=57&view=rev Author: zccdark203 Date: 2009-06-05 16:54:40 +0000 (Fri, 05 Jun 2009) Log Message: ----------- Added a new scene component: ImageComponent. This component can be used for drawing 2d graphics to the screen. Modified Paths: -------------- trunk/src/components/components.cpp trunk/src/components/components.h trunk/src/sirrf.cbp trunk/src/sirrf.depend trunk/src/sirrf.layout Added Paths: ----------- trunk/src/components/scene/ImageComponent.cpp trunk/src/components/scene/ImageComponent.h Modified: trunk/src/components/components.cpp =================================================================== --- trunk/src/components/components.cpp 2009-06-05 13:38:31 UTC (rev 56) +++ trunk/src/components/components.cpp 2009-06-05 16:54:40 UTC (rev 57) @@ -26,6 +26,7 @@ bindAnimatedMeshComponent(engine); bindBillboardComponent(engine); bindCameraComponent(engine); + bindImageComponent(engine); bindLightComponent(engine); bindMeshComponent(engine); bindOctTreeComponent(engine); Modified: trunk/src/components/components.h =================================================================== --- trunk/src/components/components.h 2009-06-05 13:38:31 UTC (rev 56) +++ trunk/src/components/components.h 2009-06-05 16:54:40 UTC (rev 57) @@ -22,6 +22,7 @@ #include "scene/AnimatedMeshComponent.h" #include "scene/BillboardComponent.h" #include "scene/CameraComponent.h" +#include "scene/ImageComponent.h" #include "scene/LightComponent.h" #include "scene/MeshComponent.h" #include "scene/OctTreeComponent.h" Added: trunk/src/components/scene/ImageComponent.cpp =================================================================== --- trunk/src/components/scene/ImageComponent.cpp (rev 0) +++ trunk/src/components/scene/ImageComponent.cpp 2009-06-05 16:54:40 UTC (rev 57) @@ -0,0 +1,276 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: ImageComponent.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Component wrapper for drawing 2d images. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "ImageComponent.h" +#include "../../core/GameManager.h" + + +// ImageComponent class +// ImageComponent constructor (default) +ImageComponent::ImageComponent(Entity *parent) +: EntityComponent(parent), mTexture(NULL), mAlphaColor(SColor(255, 255, 255, 255)), mClipRect(NULL), + mColor(SColor(255, 255, 255, 255)), mPosition(position2di(0, 0)), + mSourceRect(rect<s32>(0, 0, 0, 0)), mVisible(true), mUseAlphaColor(false) +{ + // Get a pointer to sub-systems of the Game Manager. + EventManager *pEventMgr = GameManager::Instance()->getEventManager(); + + // Set misc. variables. + mName = "ImageComponent"; + + // Register events. + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onRender", + this, &ImageComponent::onRender); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onPause", + this, &ImageComponent::onPause); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onUnPause", + this, &ImageComponent::onUnPause); +} + +// ImageComponent constructor. +ImageComponent::ImageComponent(Entity *parent, const std::string &fileName, + const position2di &position, const rect<s32> &sourceRect, + rect<s32> *clipRect, const SColor &color, + const SColor &alphaColor, bool useAlphaColor) +: EntityComponent(parent), mAlphaColor(alphaColor), mClipRect(clipRect), mColor(color), + mPosition(position), mSourceRect(sourceRect), mVisible(true), mUseAlphaColor(useAlphaColor) +{ + // Get a pointer to sub-systems of the Game Manager. + EventManager *pEventMgr = GameManager::Instance()->getEventManager(); + + // Load the texture/ + mTexture = GameManager::Instance()->getDriver()->getTexture(fileName.c_str()); + + // Set misc. variables. + mName = "ImageComponent"; + + // Register events. + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onRender", + this, &ImageComponent::onRender); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onPause", + this, &ImageComponent::onPause); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onUnPause", + this, &ImageComponent::onUnPause); +} + +// ImageComponent constructor. +ImageComponent::ImageComponent(Entity *parent, ITexture *texture, + const position2di &position, const rect<s32> &sourceRect, + rect<s32> *clipRect, const SColor &color, + const SColor &alphaColor, bool useAlphaColor) +: EntityComponent(parent), mAlphaColor(alphaColor), mClipRect(clipRect), mColor(color), + mPosition(position), mSourceRect(sourceRect), mVisible(true), mUseAlphaColor(useAlphaColor) +{ + // Get a pointer to sub-systems of the Game Manager. + EventManager *pEventMgr = GameManager::Instance()->getEventManager(); + + // Load the texture/ + mTexture = texture; + + // Set misc. variables. + mName = "ImageComponent"; + + // Register events. + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onRender", + this, &ImageComponent::onRender); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onPause", + this, &ImageComponent::onPause); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onUnPause", + this, &ImageComponent::onUnPause); +} + + +// ImageComponent deconstructor. +ImageComponent::~ImageComponent() +{ +} + +// AngelScript: Will be used to instanciate objects of this class. +ImageComponent* ImageComponent::refFactory(Entity *parent) +{ + return new ImageComponent(parent); +} + +// Sets the alpha color of the image. +void ImageComponent::setAlphaColor(const SColor &color) +{ + if(mTexture) + GameManager::Instance()->getDriver()->makeColorKeyTexture(mTexture, color); + + mAlphaColor = color; +} + +// Sets where the image is clipped to. +void ImageComponent::setClipRect(rect<s32> *rect) +{ + mClipRect = rect; +} + +// Sets the color with which the image is drawn. +void ImageComponent::setColor(const SColor &color) +{ + mColor = color; +} + +// Sets the upper left 2d screen position where the image will be drawn. +void ImageComponent::setPosition(const position2di &position) +{ + mPosition = position; +} + +// Sets the source rectangle in the image +void ImageComponent::setSourceRect(const rect<s32> &rect) +{ + mSourceRect = rect; +} + +// Loads a texture from the given file and sets it as the texture to be drawn. +void ImageComponent::setTexture(const std::string &fileName) +{ + mTexture = GameManager::Instance()->getDriver()->getTexture(fileName.c_str()); +} + +// Sets the texture which should be drawn. +void ImageComponent::setTexture(ITexture *texture) +{ + mTexture = texture; +} + +// Sets whether the alpha color should be used. +void ImageComponent::setUseAlphaColor(bool value) +{ + mUseAlphaColor = value; +} + +// Gets the alpha color. +const SColor& ImageComponent::getAlphaColor() const +{ + return mAlphaColor; +} + +// Gets the clipping rectangle. +const rect<s32>* ImageComponent::getClipRect() const +{ + return mClipRect; +} + +// Gets the color with which the image is drawn. +const SColor& ImageComponent::getColor() const +{ + return mColor; +} + +// Gets the upper left 2d screen position where the image will be drawn. +const position2di& ImageComponent::getPosition() const +{ + return mPosition; +} + +// Gets the source rectangle in the image +const rect<s32>& ImageComponent::getSourceRect() const +{ + return mSourceRect; +} + +// Gets the texture associated with this component. +const ITexture* ImageComponent::getTexture() const +{ + return mTexture; +} + +// Returns whether the alpha color is used. +bool ImageComponent::getUseAlphaColor() const +{ + return mUseAlphaColor; +} + +// Event functions +// Updates the component if the parent is rendered. +void ImageComponent::onRender(void *p) +{ + if(mTexture && mVisible) + { + IVideoDriver *driver = GameManager::Instance()->getDriver(); + driver->draw2DImage(mTexture, mPosition, mSourceRect, mClipRect, mColor, mUseAlphaColor); + } +} + +// Pauses the component if the parent is paused. +void ImageComponent::onPause(void *p) +{ + mWasVisible = mVisible; +} + +// Unpauses the component if the parent is paused. +void ImageComponent::onUnPause(void *p) +{ + mVisible = mWasVisible; +} + + +// ImageComponent Angelscript binding. +void bindImageComponent(asIScriptEngine *engine) +{ + // Forward declarations. + int r; + + // Bind ImageComponent class. + r = engine->RegisterObjectType("ImageComponent", sizeof(ImageComponent), asOBJ_REF); assert(r >= 0); + + // Bind inherited functions. + bindEntityComponentBase<ImageComponent>(engine, "ImageComponent"); + + // Set ImageComponent behaviour. + r = engine->RegisterGlobalBehaviour(asBEHAVE_REF_CAST, "ImageComponent@ f(EntityComponent @)", + asFUNCTION((asRefCast<EntityComponent,ImageComponent>)), asCALL_CDECL); assert( r >= 0 ); + r = engine->RegisterGlobalBehaviour(asBEHAVE_IMPLICIT_REF_CAST, "EntityComponent@ f(ImageComponent @)", + asFUNCTION((asRefCast<ImageComponent,EntityComponent>)), asCALL_CDECL); assert( r >= 0 ); + + r = engine->RegisterObjectBehaviour("ImageComponent", asBEHAVE_FACTORY, "ImageComponent@ f(Entity @)", + asFUNCTION(ImageComponent::refFactory), asCALL_CDECL); assert(r >= 0); + + // Bind ImageComponent class functions. + r = engine->RegisterObjectMethod("ImageComponent", "void setAlphaColor(const SColor &in)", + asMETHOD(ImageComponent, setAlphaColor), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "void setClipRect(const recti &in)", + asMETHOD(ImageComponent, setClipRect), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "void setColor(const SColor &in)", + asMETHOD(ImageComponent, setColor), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "void setPosition(position2di &in)", + asMETHOD(ImageComponent, setPosition), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "void setSourceRect(const recti &in)", + asMETHOD(ImageComponent, setSourceRect), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "void setTexture(const string&)", + asMETHODPR(ImageComponent, setTexture, (const std::string&), void), + asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "void setUseAlphaColor(bool)", + asMETHOD(ImageComponent, setUseAlphaColor), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod("ImageComponent", "const SColor& getAlphaColor()", + asMETHOD(ImageComponent, getAlphaColor), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "const recti& getClipRect()", + asMETHOD(ImageComponent, getClipRect), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "const SColor& getColor()", + asMETHOD(ImageComponent, getColor), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "const position2di& getPosition()", + asMETHOD(ImageComponent, getPosition), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "const recti& getSourceRect()", + asMETHOD(ImageComponent, getSourceRect), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ImageComponent", "bool getUseAlphaColor()", + asMETHOD(ImageComponent, getUseAlphaColor), asCALL_THISCALL); assert(r >= 0); +} + +// End of File Added: trunk/src/components/scene/ImageComponent.h =================================================================== --- trunk/src/components/scene/ImageComponent.h (rev 0) +++ trunk/src/components/scene/ImageComponent.h 2009-06-05 16:54:40 UTC (rev 57) @@ -0,0 +1,90 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: ImageComponent.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Declaration of the ImageComponent class. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __IMAGECOMPONENT_H__ +#define __IMAGECOMPONENT_H__ + +// Include files +#include "../../dependencies.h" +#include "../../core/EntityComponent.h" + + +// ImageComponent class +class ImageComponent : public EntityComponent +{ +public: + + // Initialisation and deinitialisation + ImageComponent(Entity *parent); + ImageComponent(Entity *parent, const std::string &fileName, const position2di &position, + const rect<s32> &sourceRect, rect<s32> *clipRect = NULL, + const SColor &color = SColor(255, 255, 255, 255), + const SColor &alphaColor = SColor(255, 255, 255, 255), + bool useAlphaColor = false); + ImageComponent(Entity *parent, ITexture *texture, const position2di &position, + const rect<s32> &sourceRect, rect<s32> *clipRect = NULL, + const SColor &color = SColor(255, 255, 255, 255), + const SColor &alphaColor = SColor(255, 255, 255, 255), + bool useAlphaColor = false); + ~ImageComponent(); + + // AngelScript binding + static ImageComponent* refFactory(Entity *parent); + + // Public methods + void setAlphaColor(const SColor &color); + void setClipRect(rect<s32> *rect); + void setColor(const SColor &color); + void setPosition(const position2di &position); + void setSourceRect(const rect<s32> &rect); + void setTexture(const std::string &fileName); + void setTexture(ITexture *texture); + void setUseAlphaColor(bool value); + + const SColor& getAlphaColor() const; + const rect<s32>* getClipRect() const; + const SColor& getColor() const; + const position2di& getPosition() const; + const rect<s32>& getSourceRect() const; + const ITexture* getTexture() const; + bool getUseAlphaColor() const; + + // Event functions + void onRender(void *p); + void onPause(void *p); + void onUnPause(void *p); + +private: + + // Private members + ITexture *mTexture; + + SColor mAlphaColor; + rect<s32> *mClipRect; + SColor mColor; + position2di mPosition; + rect<s32> mSourceRect; + + bool mVisible; + bool mUseAlphaColor; + bool mWasVisible; + +}; + + +// ImageComponent Angelscript binding. +extern void bindImageComponent(asIScriptEngine *engine); + +#endif Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-06-05 13:38:31 UTC (rev 56) +++ trunk/src/sirrf.cbp 2009-06-05 16:54:40 UTC (rev 57) @@ -65,6 +65,8 @@ <Unit filename="components/scene/BillboardComponent.h" /> <Unit filename="components/scene/CameraComponent.cpp" /> <Unit filename="components/scene/CameraComponent.h" /> + <Unit filename="components/scene/ImageComponent.cpp" /> + <Unit filename="components/scene/ImageComponent.h" /> <Unit filename="components/scene/LightComponent.cpp" /> <Unit filename="components/scene/LightComponent.h" /> <Unit filename="components/scene/MeshComponent.cpp" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-05 13:38:31 UTC (rev 56) +++ trunk/src/sirrf.depend 2009-06-05 16:54:40 UTC (rev 57) @@ -1044,7 +1044,7 @@ "../dependencies.h" "Entity.h" -1244208736 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp +1244208867 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp "GameManager.h" 1244199700 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h @@ -2337,11 +2337,12 @@ 1242564474 /home/michael/Programming/Projects/sirrf/src/sound/SoundStream.h "../dependencies.h" -1243891464 /home/michael/Programming/Projects/sirrf/src/components/components.h +1244219828 /home/michael/Programming/Projects/sirrf/src/components/components.h "scene/SceneComponent.h" "scene/AnimatedMeshComponent.h" "scene/BillboardComponent.h" "scene/CameraComponent.h" + "scene/ImageComponent.h" "scene/LightComponent.h" "scene/MeshComponent.h" "scene/OctTreeComponent.h" @@ -2353,7 +2354,7 @@ "sound/SoundListenerComponent.h" "sound/SoundSourceComponent.h" -1243891464 source:/home/michael/Programming/Projects/sirrf/src/components/components.cpp +1244219828 source:/home/michael/Programming/Projects/sirrf/src/components/components.cpp "components.h" 1244207793 source:/home/michael/Programming/Projects/sirrf/src/scripting/Script.cpp @@ -2474,3 +2475,11 @@ 1244040706 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asRect.h "../../dependencies.h" +1244220541 source:/home/michael/Programming/Projects/sirrf/src/components/scene/ImageComponent.cpp + "ImageComponent.h" + "../../core/GameManager.h" + +1244220541 /home/michael/Programming/Projects/sirrf/src/components/scene/ImageComponent.h + "../../dependencies.h" + "../../core/EntityComponent.h" + Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-06-05 13:38:31 UTC (rev 56) +++ trunk/src/sirrf.layout 2009-06-05 16:54:40 UTC (rev 57) @@ -50,10 +50,10 @@ <Cursor position="320" topLine="7" /> </File> <File name="components/scene/SceneComponent.cpp" open="0" top="0" tabpos="1"> - <Cursor position="8457" topLine="326" /> + <Cursor position="11168" topLine="335" /> </File> <File name="components/scene/SceneComponent.h" open="0" top="0" tabpos="3"> - <Cursor position="7978" topLine="116" /> + <Cursor position="9464" topLine="145" /> </File> <File name="components/scene/SkyBoxComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="369" topLine="8" /> @@ -92,34 +92,34 @@ <Cursor position="2157" topLine="49" /> </File> <File name="core/DataStack.cpp" open="0" top="0" tabpos="1"> - <Cursor position="517" topLine="27" /> + <Cursor position="1766" topLine="34" /> </File> <File name="core/DataStack.h" open="0" top="0" tabpos="1"> - <Cursor position="298" topLine="7" /> + <Cursor position="2807" topLine="81" /> </File> <File name="core/DataStore.cpp" open="0" top="0" tabpos="0"> - <Cursor position="365" topLine="199" /> + <Cursor position="6370" topLine="192" /> </File> <File name="core/DataStore.h" open="0" top="0" tabpos="0"> - <Cursor position="298" topLine="7" /> + <Cursor position="1249" topLine="23" /> </File> <File name="core/Entity.cpp" open="0" top="0" tabpos="3"> - <Cursor position="1533" topLine="386" /> + <Cursor position="13628" topLine="452" /> </File> <File name="core/Entity.h" open="0" top="0" tabpos="4"> - <Cursor position="1978" topLine="48" /> + <Cursor position="1553" topLine="30" /> </File> <File name="core/EntityComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="854" topLine="1" /> + <Cursor position="2816" topLine="36" /> </File> <File name="core/EntityComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="310" topLine="7" /> + <Cursor position="1517" topLine="45" /> </File> <File name="core/EntityManager.cpp" open="0" top="0" tabpos="0"> - <Cursor position="387" topLine="8" /> + <Cursor position="6660" topLine="198" /> </File> <File name="core/EntityManager.h" open="0" top="0" tabpos="0"> - <Cursor position="306" topLine="7" /> + <Cursor position="1299" topLine="19" /> </File> <File name="core/EventManager.cpp" open="0" top="0" tabpos="0"> <Cursor position="384" topLine="0" /> @@ -128,16 +128,16 @@ <Cursor position="1211" topLine="19" /> </File> <File name="core/GameManager.cpp" open="0" top="0" tabpos="1"> - <Cursor position="3610" topLine="81" /> + <Cursor position="2143" topLine="48" /> </File> <File name="core/GameManager.h" open="0" top="0" tabpos="0"> - <Cursor position="932" topLine="0" /> + <Cursor position="871" topLine="33" /> </File> <File name="core/GameState.cpp" open="0" top="0" tabpos="0"> - <Cursor position="1177" topLine="12" /> + <Cursor position="7674" topLine="209" /> </File> <File name="core/GameState.h" open="0" top="0" tabpos="0"> - <Cursor position="1221" topLine="20" /> + <Cursor position="751" topLine="30" /> </File> <File name="dependencies.h" open="0" top="0" tabpos="0"> <Cursor position="309" topLine="7" /> @@ -146,16 +146,16 @@ <Cursor position="319" topLine="7" /> </File> <File name="scripting/Script.cpp" open="0" top="0" tabpos="0"> - <Cursor position="383" topLine="0" /> + <Cursor position="1939" topLine="172" /> </File> <File name="scripting/Script.h" open="0" top="0" tabpos="0"> - <Cursor position="292" topLine="7" /> + <Cursor position="1606" topLine="27" /> </File> <File name="scripting/ScriptManager.cpp" open="0" top="0" tabpos="2"> - <Cursor position="3508" topLine="119" /> + <Cursor position="2153" topLine="51" /> </File> <File name="scripting/ScriptManager.h" open="0" top="0" tabpos="1"> - <Cursor position="306" topLine="7" /> + <Cursor position="1507" topLine="30" /> </File> <File name="scripting/irrlicht/asAabbox3d.cpp" open="0" top="0" tabpos="1"> <Cursor position="894" topLine="0" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-05 14:22:41
|
Revision: 56 http://sirrf.svn.sourceforge.net/sirrf/?rev=56&view=rev Author: zccdark203 Date: 2009-06-05 13:38:31 +0000 (Fri, 05 Jun 2009) Log Message: ----------- Changed various small things. The most important addition, though, is the addition of AngelScript bindings of the GameState class. It's also possible to inherit from it in AngelScript through the CGameState class. Modified Paths: -------------- trunk/src/components/scene/SceneComponent.cpp trunk/src/components/scene/SceneComponent.h trunk/src/core/DataStack.cpp trunk/src/core/DataStore.cpp trunk/src/core/DataStore.h trunk/src/core/Entity.cpp trunk/src/core/Entity.h trunk/src/core/EntityManager.cpp trunk/src/core/EntityManager.h trunk/src/core/GameManager.cpp trunk/src/core/GameManager.h trunk/src/core/GameState.cpp trunk/src/core/GameState.h trunk/src/scripting/Script.cpp trunk/src/scripting/Script.h trunk/src/scripting/ScriptManager.cpp trunk/src/scripting/ScriptManager.h trunk/src/sirrf.depend trunk/src/sirrf.layout Modified: trunk/src/components/scene/SceneComponent.cpp =================================================================== --- trunk/src/components/scene/SceneComponent.cpp 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/components/scene/SceneComponent.cpp 2009-06-05 13:38:31 UTC (rev 56) @@ -303,6 +303,12 @@ mSceneNode->setScale(scale); } +// Sets if the component should be visible or not. +void SceneComponent::setVisible(bool value) +{ + mSceneNode->setVisible(value); +} + // Events // Updates the position of the component after its parent has been updated. void SceneComponent::onPositionChange(void *p) @@ -337,13 +343,16 @@ void SceneComponent::onPause(void *p) { if(mSceneNode) - mSceneNode->setVisible(false); + { + mWasVisible = mSceneNode->isVisible(); + mSceneNode->setVisible(false); + } } // Unpauses the component if the parent is paused. void SceneComponent::onUnPause(void *p) { - if(mSceneNode) + if(mSceneNode && mWasVisible) mSceneNode->setVisible(true); } Modified: trunk/src/components/scene/SceneComponent.h =================================================================== --- trunk/src/components/scene/SceneComponent.h 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/components/scene/SceneComponent.h 2009-06-05 13:38:31 UTC (rev 56) @@ -77,6 +77,7 @@ void setPosition(const vector3df &position); void setRotation(const vector3df &rotation); void setScale(const vector3df &scale); + void setVisible(bool value); // Events void onPositionChange(void *p); @@ -101,6 +102,7 @@ bool mCanAffectParent; bool mEvokedParentChange; + bool mWasVisible; }; @@ -181,6 +183,8 @@ asMETHOD(T, setRotation), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod(type, "void setScale(const vector3df &in)", asMETHOD(T, setScale), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod(type, "void setVisible(bool)", + asMETHOD(T, setVisible), asCALL_THISCALL); assert(r >= 0); } #endif Modified: trunk/src/core/DataStack.cpp =================================================================== --- trunk/src/core/DataStack.cpp 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/DataStack.cpp 2009-06-05 13:38:31 UTC (rev 56) @@ -65,7 +65,10 @@ void DataStack::refRelease() { if(--mRefCount == 0) - GameManager::Instance()->getDataStore()->removeDataStack(this); + { + if(!GameManager::Instance()->getDataStore()->removeDataStack(this)) + delete this; + } } // Gets the ID of the Data Stack. Modified: trunk/src/core/DataStore.cpp =================================================================== --- trunk/src/core/DataStore.cpp 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/DataStore.cpp 2009-06-05 13:38:31 UTC (rev 56) @@ -39,7 +39,7 @@ // Clears the Data Store. void DataStore::clear() { - removeAll(); + removeAllDataStacks(); } // Angelscript: Increases the reference counter. @@ -111,7 +111,7 @@ } // Removes all Data Stacks from this Data Store. -void DataStore::removeAll() +void DataStore::removeAllDataStacks() { // Clear the Data Stacks. for(u32 i = 0; i < mStacks.size(); i++) @@ -225,8 +225,8 @@ asMETHODPR(DataStore, getDataStack, (const std::string &), DataStack*), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("DataStore", "void removeAll()", - asMETHOD(DataStore, removeAll), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("DataStore", "void removeAllDataStacks()", + asMETHOD(DataStore, removeAllDataStacks), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("DataStore", "bool removeDataStack(DataStack @)", asMETHODPR(DataStore, removeDataStack, (DataStack*), bool), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/core/DataStore.h =================================================================== --- trunk/src/core/DataStore.h 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/DataStore.h 2009-06-05 13:38:31 UTC (rev 56) @@ -47,7 +47,7 @@ DataStack* getDataStack(const u32 id); DataStack* getDataStack(const std::string &name); - void removeAll(); + void removeAllDataStacks(); bool removeDataStack(DataStack *stack); bool removeDataStack(const u32 id); bool removeDataStack(const std::string &name); Modified: trunk/src/core/Entity.cpp =================================================================== --- trunk/src/core/Entity.cpp 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/Entity.cpp 2009-06-05 13:38:31 UTC (rev 56) @@ -66,8 +66,9 @@ // Entity deconstructor. Entity::~Entity() { - // Remove all components. - removeAll(); + // Remove all children and components. + removeAllChildren(); + removeAllComponents(); // Remove events. GameManager::Instance()->getEventManager()->removeEventGroup(std::string("ent#") + mName); @@ -210,10 +211,9 @@ return mPosition; } -// Removes all children and components. -void Entity::removeAll() +// Removes all children. +void Entity::removeAllChildren() { - // Children. for(u32 i = 0; i < mChildren.size(); i++) { if(!GameManager::Instance()->getEntityManager()->removeEntity(mChildren[i])) @@ -221,8 +221,11 @@ } mChildren.clear(); +} - // Components. +// Removes all components. +void Entity::removeAllComponents() +{ for(u32 i = 0; i < mComponents.size(); i++) delete mComponents[i]; @@ -468,8 +471,10 @@ r = engine->RegisterObjectMethod("Entity", "Entity@ getParent()", asMETHOD(Entity, getParent), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("Entity", "void removeAll()", - asMETHOD(Entity, removeAll), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("Entity", "void removeAllChildren()", + asMETHOD(Entity, removeAllChildren), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("Entity", "void removeAllComponents()", + asMETHOD(Entity, removeAllComponents), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("Entity", "bool removeChild(Entity @)", asMETHODPR(Entity, removeChild, (Entity*), bool), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/core/Entity.h =================================================================== --- trunk/src/core/Entity.h 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/Entity.h 2009-06-05 13:38:31 UTC (rev 56) @@ -53,7 +53,8 @@ const vector3df& getPosition() const; - void removeAll(); + void removeAllChildren(); + void removeAllComponents(); bool removeChild(Entity *entity); bool removeChild(const u32 id); bool removeChild(const std::string &name); Modified: trunk/src/core/EntityManager.cpp =================================================================== --- trunk/src/core/EntityManager.cpp 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/EntityManager.cpp 2009-06-05 13:38:31 UTC (rev 56) @@ -41,7 +41,7 @@ void EntityManager::clear() { // Clear entities. - removeAll(); + removeAllEntities(); } // Angelscript: Increases the reference counter. @@ -112,7 +112,7 @@ } // Removes all entities. -void EntityManager::removeAll() +void EntityManager::removeAllEntities() { for(u32 i = 0; i < mEntities.size(); i++) delete mEntities[i]; @@ -226,8 +226,8 @@ asMETHODPR(EntityManager, getEntity, (const std::string &), Entity*), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("EntityManager", "void removeAll()", - asMETHOD(EntityManager, removeAll), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("EntityManager", "void removeAllEntities()", + asMETHOD(EntityManager, removeAllEntities), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("EntityManager", "bool removeEntity(Entity @)", asMETHODPR(EntityManager, removeEntity, (Entity*), bool), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/core/EntityManager.h =================================================================== --- trunk/src/core/EntityManager.h 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/EntityManager.h 2009-06-05 13:38:31 UTC (rev 56) @@ -49,7 +49,7 @@ Entity* getEntity(const u32 id); Entity* getEntity(const std::string &name); - void removeAll(); + void removeAllEntities(); bool removeEntity(Entity *entity); bool removeEntity(const u32 id); bool removeEntity(const std::string &name); Modified: trunk/src/core/GameManager.cpp =================================================================== --- trunk/src/core/GameManager.cpp 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/GameManager.cpp 2009-06-05 13:38:31 UTC (rev 56) @@ -18,12 +18,12 @@ // Include files #include "GameManager.h" -#include "../components/components.h" + // GameManager class // Constructor of the GameManager class. GameManager::GameManager() -: pDevice(0) +: pDevice(0), mLastTime(0) { } @@ -70,19 +70,40 @@ // Initialise subsystems of the framework (stage 2); pEntityManager = new EntityManager(); pSoundManager = new SoundManager(); + pScriptManager = new ScriptManager(); - - //changeState("menu", ""); + pScriptManager->init(); } // Updates the Game Manager. void GameManager::update() { + // Updating + u32 time = pDevice->getTimer()->getTime(); + f32 deltaTime = ( (float)time - (float)mLastTime ) *0.01f; + mLastTime = time; + + if(!mGameStates.empty() && deltaTime > 0.0f) + { + mGameStates.back()->onUpdate(deltaTime); + mGameStates.back()->update(deltaTime); + } + // Rendering if(pDevice->isWindowActive()) { if(!mGameStates.empty()) - mGameStates.back()->update(); + { + pDriver->beginScene(); + + pSceneManager->drawAll(); + pGUIEnvironment->drawAll(); + + mGameStates.back()->onRender(); + mGameStates.back()->render(); + + pDriver->endScene(); + } } } @@ -97,7 +118,9 @@ } // Clean up subsystems of the framework. + pScriptManager->clear(); delete pScriptManager; + delete pSoundManager; delete pEventManager; delete pEntityManager; @@ -139,11 +162,27 @@ } } +// Close the current state and change to the given state. +void GameManager::changeState(asIScriptObject *object) +{ + // Clear the current state. + popState(); + + // Initialise the state. + if(object != NULL) + { + ScriptedGameState *state = new ScriptedGameState(object); + mGameStates.push_back(state); + state->init(); + } +} + // Pause the current state and change to the given state. void GameManager::pushState(GameState *state) { // Pause the current state. - mGameStates.back()->pause(); + if(!mGameStates.empty()) + mGameStates.back()->onPause(); // Initialise the state. if(state != NULL) @@ -153,6 +192,22 @@ } } +// Pause the current state and change to the given state. +void GameManager::pushState(asIScriptObject *object) +{ + // Pause the current state. + if(!mGameStates.empty()) + mGameStates.back()->onPause(); + + // Initialise the state. + if(object != NULL) + { + ScriptedGameState *state = new ScriptedGameState(object); + mGameStates.push_back(state); + state->init(); + } +} + // Close the current state and resume the previous state. void GameManager::popState() { @@ -165,7 +220,8 @@ } // Unpause the newly selected state. - mGameStates.back()->unpause(); + if(!mGameStates.empty()) + mGameStates.back()->onUnPause(); } // Returns a pointer to the Irrlicht Device. @@ -261,9 +317,15 @@ r = engine->RegisterObjectMethod("GameManager", "void changeState(GameState @)", asMETHODPR(GameManager, changeState, (GameState*), void), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("GameManager", "void changeState(IGameState @)", + asMETHODPR(GameManager, changeState, (asIScriptObject*), void), + asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("GameManager", "void pushState(GameState @)", asMETHODPR(GameManager, pushState, (GameState*), void), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("GameManager", "void pushState(IGameState @)", + asMETHODPR(GameManager, pushState, (asIScriptObject*), void), + asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("GameManager", "void popState()", asMETHOD(GameManager, popState), asCALL_THISCALL); assert(r >= 0); @@ -273,6 +335,8 @@ asMETHOD(GameManager, getEntityManager), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("GameManager", "EventManager@ getEventManager()", asMETHOD(GameManager, getEventManager), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("GameManager", "ScriptManager@ getScriptManager()", + asMETHOD(GameManager, getScriptManager), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("GameManager", "SoundManager@ getSoundManager()", asMETHOD(GameManager, getSoundManager), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/core/GameManager.h =================================================================== --- trunk/src/core/GameManager.h 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/GameManager.h 2009-06-05 13:38:31 UTC (rev 56) @@ -56,7 +56,9 @@ // Public methods void changeState(GameState *state); + void changeState(asIScriptObject *object); void pushState(GameState *state); + void pushState(asIScriptObject *object); void popState(); IrrlichtDevice* getDevice(); @@ -94,6 +96,7 @@ ScriptManager *pScriptManager; SoundManager *pSoundManager; + u32 mLastTime; }; Modified: trunk/src/core/GameState.cpp =================================================================== --- trunk/src/core/GameState.cpp 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/GameState.cpp 2009-06-05 13:38:31 UTC (rev 56) @@ -27,14 +27,19 @@ { mID = mIDCount++; + // Create the base entity. std::stringstream ss; ss << "GameState#" << mID; mBaseEntity = GameManager::Instance()->getEntityManager()->createEntity(ss.str()); + + // Store the name of the event group of this state. + mEventGroup = "ent#" + ss.str(); } // Deconstructor of the GameState class. GameState::~GameState() { + GameManager::Instance()->getEntityManager()->removeEntity(mBaseEntity); } // Initialises the Game State. @@ -51,7 +56,7 @@ // Updates the Game State. // -> Implemented by subclass. -void GameState::update() +void GameState::update(f32 deltaTime) { } @@ -61,34 +66,129 @@ { } -// Pauses the Game State. -void GameState::pause() +// AngelScript binding +// AngelScript: Will be used to instanciate objects of this class. +GameState* GameState::refFactory() { - std::stringstream ss; - ss << "ent#state#" << mID; - GameManager::Instance()->getEventManager()->emitEvent(ss.str(), "onPause"); + return new GameState(); } -// Unpause the Game State. -void GameState::unpause() -{ - std::stringstream ss; - ss << "ent#state#" << mID; - GameManager::Instance()->getEventManager()->emitEvent(ss.str(), "onUnPause"); -} - // Angelscript: Increases the reference counter. void GameState::refAdd() { - // Dummy function. + mRefCount++; } // Angelscript: Decreases the reference counter. void GameState::refRelease() { - // Dummy function. + if(--mRefCount == 0) + delete this; } +// Returns the base entity. +const Entity* GameState::getBaseEntity() const +{ + return mBaseEntity; +} + +// Event functions +// Sends the "onUpdate" event to all entities subscribed to this state. +void GameState::onUpdate(f32 deltaTime) +{ + GameManager::Instance()->getEventManager()->emitEvent(mEventGroup, "onUpdate", &deltaTime); +} + +// Sends the "onUpdate" event to all entities subscribed to this state. +void GameState::onRender() +{ + GameManager::Instance()->getEventManager()->emitEvent(mEventGroup, "onRender"); +} + +// Sends the "onPause" event to all entities subscribed to this state. +void GameState::onPause() +{ + GameManager::Instance()->getEventManager()->emitEvent(mEventGroup, "onPause"); +} + +// Sends the "onUnPause" event to all entities subscribed to this state. +void GameState::onUnPause() +{ + GameManager::Instance()->getEventManager()->emitEvent(mEventGroup, "onUnPause"); +} + + +// ScriptedGameState class +// ScriptedGameState constructor +ScriptedGameState::ScriptedGameState(asIScriptObject *object) +: mObject(object) +{ + // No new state was created, so lets fix the IDs. + mID--; + mIDCount--; + + // Set up pointers which will be used. + mObject->AddRef(); + mContext = GameManager::Instance()->getScriptManager()->getEngine()->CreateContext(); + + // Get the base entity. + int id = mObject->GetObjectType()->GetMethodIdByDecl("const Entity@ getBaseEntity()"); + + mContext->Prepare(id); + mContext->SetObject(mObject); + mContext->Execute(); + mBaseEntity = static_cast<Entity*>(mContext->GetReturnObject()); +} + +// ScriptedGameState deconstructor +ScriptedGameState::~ScriptedGameState() +{ + mContext->Release(); + mObject->Release(); +} + +// Initialises the Game State. +void ScriptedGameState::init() +{ + int id = mObject->GetObjectType()->GetMethodIdByDecl("void init()"); + + mContext->Prepare(id); + mContext->SetObject(mObject); + mContext->Execute(); +} + +// Clears the Game State. +void ScriptedGameState::clear() +{ + int id = mObject->GetObjectType()->GetMethodIdByDecl("void clear()"); + + mContext->Prepare(id); + mContext->SetObject(mObject); + mContext->Execute(); +} + +// Updates the Game State. +void ScriptedGameState::update(f32 deltaTime) +{ + int id = mObject->GetObjectType()->GetMethodIdByDecl("void init()"); + + mContext->Prepare(id); + mContext->SetObject(mObject); + mContext->SetArgDWord(0, deltaTime); + mContext->Execute(); +} + +// Renders the Game State. +void ScriptedGameState::render() +{ + int id = mObject->GetObjectType()->GetMethodIdByDecl("void render()"); + + mContext->Prepare(id); + mContext->SetObject(mObject); + mContext->Execute(); +} + + // GameState Angelscript binding. void bindGameState(asIScriptEngine *engine) { @@ -99,6 +199,8 @@ r = engine->RegisterObjectType("GameState", sizeof(GameState), asOBJ_REF); assert(r >= 0); // Set GameState behaviour. + r = engine->RegisterObjectBehaviour("GameState", asBEHAVE_FACTORY, "GameState@ f()", + asFUNCTION(GameState::refFactory), asCALL_CDECL); assert(r >= 0); r = engine->RegisterObjectBehaviour("GameState", asBEHAVE_ADDREF, "void f()", asMETHOD(GameState, refAdd), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectBehaviour("GameState", asBEHAVE_RELEASE, "void f()", @@ -114,5 +216,37 @@ asMETHOD(GameState, update), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("GameState", "void render()", asMETHOD(GameState, render), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod("GameState", "const Entity@ getBaseEntity()", + asMETHOD(GameState, getBaseEntity), asCALL_THISCALL); assert(r >= 0); + + // Define the interface for inheritance. + r = engine->RegisterInterface("IGameState"); assert(r >= 0); + + r = engine->RegisterInterfaceMethod("IGameState", "void init()"); + r = engine->RegisterInterfaceMethod("IGameState", "void clear()"); + r = engine->RegisterInterfaceMethod("IGameState", "void update()"); + r = engine->RegisterInterfaceMethod("IGameState", "void render()"); + r = engine->RegisterInterfaceMethod("IGameState", "const Entity@ getBaseEntity()"); + + // Define the class for inheritance. + std::string decl = "CGameState : IGameState\n" + "{\n" + " GameState _inner;\n" + "\n" + " CGameState::CGameState()\n" + " {\n" + " _inner = GameState();\n" + " }\n" + "\n" + " void init() {}\n" + " void clear() {}\n" + " void update() {}\n" + " void render() {}\n" + "\n" + " const Entity@ getBaseEntity() { return _inner.getBaseEntity(); }\n" + "}\n"; + + GameManager::Instance()->getScriptManager()->addScriptSection("CGameState", decl); } // End of File Modified: trunk/src/core/GameState.h =================================================================== --- trunk/src/core/GameState.h 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/core/GameState.h 2009-06-05 13:38:31 UTC (rev 56) @@ -24,8 +24,10 @@ // GameState class -class GameState : public sigslot::has_slots<> +class GameState { + friend class ScriptedGameState; + public: // Initialisation, deinitialisation and control... @@ -35,16 +37,23 @@ virtual void init(); virtual void clear(); - virtual void update(); + virtual void update(f32 deltaTime); virtual void render(); - void pause(); - void unpause(); - // AngelScript binding + static GameState* refFactory(); void refAdd(); void refRelease(); + // Public functions + const Entity* getBaseEntity() const; + + // Event functions + void onUpdate(f32 deltaTime); + void onRender(); + void onPause(); + void onUnPause(); + protected: // Protected members @@ -55,11 +64,39 @@ // Static members static u32 mIDCount; + // Angelscript members + s32 mRefCount; + // Private members u32 mID; + std::string mEventGroup; }; +// ScriptedGameState class +class ScriptedGameState : public GameState +{ +public: + + // Initialisation, deinitialisation and control... + ScriptedGameState(asIScriptObject *object); + virtual ~ScriptedGameState(); + + void init(); + void clear(); + + void update(f32 deltaTime); + void render(); + +private: + + // Private members + asIScriptObject *mObject; + asIScriptContext *mContext; + +}; + + // GameState Angelscript binding. extern void bindGameState(asIScriptEngine *engine); Modified: trunk/src/scripting/Script.cpp =================================================================== --- trunk/src/scripting/Script.cpp 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/scripting/Script.cpp 2009-06-05 13:38:31 UTC (rev 56) @@ -49,6 +49,28 @@ mContext->Release(); } +// AngelScript: Will be used to instanciate objects of this class. +Script* Script::refFactory(const std::string &name) +{ + return new Script(name); +} + +// Angelscript: Increases the reference counter. +void Script::refAdd() +{ + mRefCount++; +} + +// Angelscript: Decreases the reference counter. +void Script::refRelease() +{ + if(--mRefCount == 0) + { + if(!GameManager::Instance()->getScriptManager()->removeScript(this)) + delete this; + } +} + // Gets the ID of this script. u32 Script::getID() const { @@ -67,35 +89,6 @@ return mModule; } -// Initialises the script by calling the "main" function. -bool Script::initScript(const std::string &args) -{ - // Do we have a module? - if(mModule == NULL) - return false; - - // Get the ID of the main function. - int functionID = mModule->GetFunctionIdByDecl("void main(const string &args)"); - - if(functionID == asERROR || functionID == asMULTIPLE_FUNCTIONS || functionID == asNO_FUNCTION) - return false; - - // Prepare the function. - mContext->Prepare(functionID); - - std::string arguments = args; - mContext->SetArgAddress(0, &arguments); - - // Execute the function. - int r = mContext->Execute(); - if(r == asEXECUTION_FINISHED) - { - return true; - } - - else return false; -} - // Loads a script file and builds it. bool Script::loadScript(const std::string &fileName) { @@ -156,4 +149,67 @@ return false; } +// Executes the function with the given name and with the given arguments. +bool Script::executeFunctionByName(const std::string &name, const std::string &args) +{ + // Do we have a module? + if(mModule == NULL) + return false; + + // Get the ID of the main function. + int functionID = mModule->GetFunctionIdByName(name.c_str()); + + if(functionID == asERROR || functionID == asMULTIPLE_FUNCTIONS || functionID == asNO_FUNCTION) + return false; + + // Prepare the function. + std::stringstream ss; + ss << name << "(" << args << ");"; + + mModule->GetEngine()->ExecuteString(mName.c_str(), ss.str().c_str(), &mContext, + asEXECSTRING_ONLY_PREPARE | asEXECSTRING_USE_MY_CONTEXT); + + // Execute the function. + int r = mContext->Execute(); + if(r == asEXECUTION_FINISHED) + { + return true; + } + + else return false; +} + + +// Script Angelscript binding. +void bindScript(asIScriptEngine *engine) +{ + // Forward declarations. + int r; + + // Bind DataStack class. + r = engine->RegisterObjectType("Script", sizeof(Script), asOBJ_REF); assert(r >= 0); + + // Set DataStack behaviour. + r = engine->RegisterObjectBehaviour("Script", asBEHAVE_FACTORY, "Script@ f(const string &)", + asFUNCTION(Script::refFactory), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("Script", asBEHAVE_ADDREF, "void f()", + asMETHOD(Script, refAdd), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("Script", asBEHAVE_RELEASE, "void f()", + asMETHOD(Script, refRelease), asCALL_THISCALL); assert(r >= 0); + + // Bind DataStack class functions. + r = engine->RegisterObjectMethod("Script", "u32 getID()", + asMETHOD(Script, getID), asCALL_THISCALL); (r >= 0); + r = engine->RegisterObjectMethod("Script", "const string& getName()", + asMETHOD(Script, getName), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod("Script", "bool loadScript(const string &)", + asMETHOD(Script, loadScript), asCALL_THISCALL);assert(r >= 0); + r = engine->RegisterObjectMethod("Script", "bool unloadScript()", + asMETHOD(Script, unloadScript), asCALL_THISCALL);assert(r >= 0); + + r = engine->RegisterObjectMethod("Script", "bool executeFunctionByName(const string &, const string &)", + asMETHOD(Script, loadScript), asCALL_THISCALL);assert(r >= 0); +} + // End of File Modified: trunk/src/scripting/Script.h =================================================================== --- trunk/src/scripting/Script.h 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/scripting/Script.h 2009-06-05 13:38:31 UTC (rev 56) @@ -32,6 +32,11 @@ Script(const std::string &name); ~Script(); + // AngelScript binding + static Script* refFactory(const std::string &name); + void refAdd(); + void refRelease(); + // Methods u32 getID() const; const std::string& getName() const; @@ -39,15 +44,19 @@ asIScriptContext* getContext() const; asIScriptModule* getModule() const; - bool initScript(const std::string &args = ""); bool loadScript(const std::string &fileName); bool unloadScript(); + bool executeFunctionByName(const std::string &name, const std::string &args = ""); + private: // Static members static u32 mIDCount; + // Angelscript members + s32 mRefCount; + // Private members u32 mID; std::string mName; @@ -57,5 +66,8 @@ }; + +// Script Angelscript binding. +extern void bindScript(asIScriptEngine *engine); + #endif - Modified: trunk/src/scripting/ScriptManager.cpp =================================================================== --- trunk/src/scripting/ScriptManager.cpp 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/scripting/ScriptManager.cpp 2009-06-05 13:38:31 UTC (rev 56) @@ -24,13 +24,11 @@ // Constructor of the ScriptManager class. ScriptManager::ScriptManager() { - init(); } // Deconstructor of the ScriptManager class. ScriptManager::~ScriptManager() { - clear(); } // Initialises the Script Manager. @@ -58,7 +56,6 @@ bindIrrlicht(pEngine); // Register classes and functions. - bindGameState(pEngine); bindEntity(pEngine); bindEntityComponent(pEngine); bindComponents(pEngine); @@ -67,6 +64,9 @@ bindDataStack(pEngine); bindDataStore(pEngine); bindSoundManager(pEngine); + bindScript(pEngine); + bindScriptManager(pEngine); + bindGameState(pEngine); bindGameManager(pEngine); } @@ -74,19 +74,34 @@ void ScriptManager::clear() { // Remove scripts. - removeAll(); + removeAllScripts(); + // Remove script sections. + mScriptSections.clear(); + // Deinitialise the AngelScript engine. pEngine->Release(); } +// Angelscript: Increases the reference counter. +void ScriptManager::refAdd() +{ + // Dummy function. +} + +// Angelscript: Decreases the reference counter. +void ScriptManager::refRelease() +{ + // Dummy function. +} + // Gets the AngelScript engine. asIScriptEngine* ScriptManager::getEngine() const { return pEngine; } -// Adds an script to the Entity Manager. +// Adds a script to the Script Manager. bool ScriptManager::addScript(Script *script) { // Did we get a valid pointer? @@ -103,6 +118,34 @@ return true; } +// Adds a script section to the Script Manager. +bool ScriptManager::addScriptSection(const std::string &name, const std::string §ion) +{ + // Does the script section already exist? + if(mScriptSections.find(name) != mScriptSections.end()) + return false; + + // Add the new script section. + mScriptSections[name] = section; + + return true; +} + +// Adds the standard script sections to the given script. +void ScriptManager::addScriptSectionsToScript(Script *script) +{ + // Did we get a valid pointer? + if(script == NULL) + return; + + // Add the sections. + asIScriptModule *module = script->getModule(); + std::map<std::string, std::string>::iterator it; + + for(it = mScriptSections.begin(); it != mScriptSections.end(); it++) + module->AddScriptSection((it->first).c_str(), (it->second).c_str()); +} + // Creates an script with the given name and adds it to the Script Manager. Script* ScriptManager::createScript(const std::string &name) { @@ -162,7 +205,7 @@ } // Removes all scripts. -void ScriptManager::removeAll() +void ScriptManager::removeAllScripts() { for(u32 i = 0; i < mScripts.size(); i++) delete mScripts[i]; @@ -240,7 +283,72 @@ return false; } +// Removes the script section with the given name. +bool ScriptManager::removeScriptSection(const std::string &name) +{ + // Try to remove the script. + std::map<std::string, std::string>::iterator it; + it = mScriptSections.find(name); + if(it != mScriptSections.end()) + { + mScriptSections.erase(it); + return true; + } + + // We couldn't find the script section and thus couldn't remove it. + return false; +} + + +// ScriptManager Angelscript binding. +void bindScriptManager(asIScriptEngine *engine) +{ + // Forward declarations. + int r; + + // Bind DataStore class. + r = engine->RegisterObjectType("ScriptManager", sizeof(ScriptManager), asOBJ_REF); assert(r >= 0); + + // Set DataStore behaviour. + r = engine->RegisterObjectBehaviour("ScriptManager", asBEHAVE_ADDREF, "void f()", + asMETHOD(ScriptManager, refAdd), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour("ScriptManager", asBEHAVE_RELEASE, "void f()", + asMETHOD(ScriptManager, refRelease), asCALL_THISCALL); assert(r >= 0); + + // Bind DataStore class functions. + r = engine->RegisterObjectMethod("ScriptManager", "void init()", + asMETHOD(ScriptManager, init), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ScriptManager", "void clear()", + asMETHOD(ScriptManager, clear), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod("ScriptManager", "bool addScript(Script @)", + asMETHOD(ScriptManager, addScript), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScript(const string &)", + asMETHOD(ScriptManager, createScript), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScriptFromFile(const string &)", + asMETHOD(ScriptManager, createScriptFromFile), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod("ScriptManager", "Script@ getScript(const u32)", + asMETHODPR(ScriptManager, getScript, (const u32), Script*), + asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ScriptManager", "Script@ getScript(const string &)", + asMETHODPR(ScriptManager, getScript, (const std::string &), Script*), + asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod("ScriptManager", "void removeAllScripts()", + asMETHOD(ScriptManager, removeAllScripts), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ScriptManager", "bool removeScript(Script @)", + asMETHODPR(ScriptManager, removeScript, (Script*), bool), + asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ScriptManager", "bool removeScript(const u32)", + asMETHODPR(ScriptManager, removeScript, (const u32), bool), + asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("ScriptManager", "bool removeScript(const string &)", + asMETHODPR(ScriptManager, removeScript, (const std::string &), bool), + asCALL_THISCALL); assert(r >= 0); +} + // AngelScript functions // Implement a simple message callback function void MessageCallback(const asSMessageInfo *msg, void *param) Modified: trunk/src/scripting/ScriptManager.h =================================================================== --- trunk/src/scripting/ScriptManager.h 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/scripting/ScriptManager.h 2009-06-05 13:38:31 UTC (rev 56) @@ -37,20 +37,29 @@ void init(); void clear(); + // AngelScript binding + void refAdd(); + void refRelease(); + // Methods asIScriptEngine* getEngine() const; bool addScript(Script *script); + + bool addScriptSection(const std::string &name, const std::string §ion); + void addScriptSectionsToScript(Script *script); + Script* createScript(const std::string &name); Script* createScriptFromFile(const std::string &fileName); Script* getScript(const u32 id); Script* getScript(const std::string &name); - void removeAll(); + void removeAllScripts(); bool removeScript(Script *script); bool removeScript(const u32 id); bool removeScript(const std::string &name); + bool removeScriptSection(const std::string &name); private: @@ -58,8 +67,14 @@ asIScriptEngine *pEngine; std::vector<Script*> mScripts; + std::map<std::string, std::string> mScriptSections; }; + +// ScriptManager Angelscript binding. +extern void bindScriptManager(asIScriptEngine *engine); + + // AngelScript functions extern void MessageCallback(const asSMessageInfo *msg, void *param); Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/sirrf.depend 2009-06-05 13:38:31 UTC (rev 56) @@ -989,7 +989,7 @@ <assert.h> "scriptstring.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/DataStack.cpp +1244207646 source:/home/michael/Programming/Projects/sirrf/src/core/DataStack.cpp "DataStack.h" "GameManager.h" @@ -1013,18 +1013,18 @@ <SFML/System.hpp> <SFML/Audio.hpp> -1243891466 /home/michael/Programming/Projects/sirrf/src/core/DataStore.h +1244208497 /home/michael/Programming/Projects/sirrf/src/core/DataStore.h "../dependencies.h" "DataStack.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/DataStore.cpp +1244208569 source:/home/michael/Programming/Projects/sirrf/src/core/DataStore.cpp "DataStore.h" -1244058384 source:/home/michael/Programming/Projects/sirrf/src/core/Entity.cpp +1244208488 source:/home/michael/Programming/Projects/sirrf/src/core/Entity.cpp "Entity.h" "GameManager.h" -1244058274 /home/michael/Programming/Projects/sirrf/src/core/Entity.h +1244208397 /home/michael/Programming/Projects/sirrf/src/core/Entity.h "../dependencies.h" "EntityComponent.h" @@ -1033,22 +1033,21 @@ "Entity.h" "../scripting/ScriptManager.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/EntityComponent.cpp +1244198741 source:/home/michael/Programming/Projects/sirrf/src/core/EntityComponent.cpp "EntityComponent.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/EntityManager.cpp +1244208557 source:/home/michael/Programming/Projects/sirrf/src/core/EntityManager.cpp "EntityManager.h" "GameManager.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/core/EntityManager.h +1244208530 /home/michael/Programming/Projects/sirrf/src/core/EntityManager.h "../dependencies.h" "Entity.h" -1244060139 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp +1244208736 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp "GameManager.h" - "../components/components.h" -1244055639 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h +1244199700 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h "../dependencies.h" "DataStore.h" "EntityManager.h" @@ -1058,14 +1057,14 @@ "../components/components.h" "GameState.h" -1244059671 /home/michael/Programming/Projects/sirrf/src/core/GameState.h +1244199261 /home/michael/Programming/Projects/sirrf/src/core/GameState.h "GameManager.h" 1241010330 /home/michael/Programming/Projects/sirrf/src/core/ScriptManager.h "../dependencies.h" "../angelscript/add_on/scriptstring/scriptstring.h" -1244059806 source:/home/michael/Programming/Projects/sirrf/src/core/GameState.cpp +1244203081 source:/home/michael/Programming/Projects/sirrf/src/core/GameState.cpp "GameState.h" 1241017939 source:/home/michael/Programming/Projects/sirrf/src/core/ScriptManager.cpp @@ -1098,7 +1097,7 @@ <windows.h> <pthread.h> -1243891466 /home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.h +1244208374 /home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.h "../dependencies.h" "scriptstring.h" "Script.h" @@ -1107,7 +1106,7 @@ <angelscript.h> <string> -1243891466 source:/home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.cpp +1244208760 source:/home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.cpp "ScriptManager.h" "irrlicht/asIrrlicht.h" "../core/GameManager.h" @@ -1126,11 +1125,11 @@ "scriptstring.h" <string.h> -1244059849 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.cpp +1244203676 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.cpp "SceneComponent.h" "../../core/GameManager.h" -1244059901 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h +1244205765 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h "../../dependencies.h" "../../core/EntityComponent.h" @@ -2357,11 +2356,11 @@ 1243891464 source:/home/michael/Programming/Projects/sirrf/src/components/components.cpp "components.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/scripting/Script.cpp +1244207793 source:/home/michael/Programming/Projects/sirrf/src/scripting/Script.cpp "Script.h" "../core/GameManager.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/scripting/Script.h +1244207855 /home/michael/Programming/Projects/sirrf/src/scripting/Script.h "../dependencies.h" "ScriptManager.h" Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-06-03 20:19:55 UTC (rev 55) +++ trunk/src/sirrf.layout 2009-06-05 13:38:31 UTC (rev 56) @@ -11,7 +11,7 @@ <Cursor position="332" topLine="7" /> </File> <File name="components/scene/AnimatedMeshComponent.h" open="0" top="0" tabpos="6"> - <Cursor position="322" topLine="31" /> + <Cursor position="322" topLine="30" /> </File> <File name="components/scene/BillboardComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="1087" topLine="7" /> @@ -127,14 +127,14 @@ <File name="core/EventManager.h" open="0" top="0" tabpos="0"> <Cursor position="1211" topLine="19" /> </File> - <File name="core/GameManager.cpp" open="1" top="1" tabpos="1"> - <Cursor position="2355" topLine="0" /> + <File name="core/GameManager.cpp" open="0" top="0" tabpos="1"> + <Cursor position="3610" topLine="81" /> </File> <File name="core/GameManager.h" open="0" top="0" tabpos="0"> <Cursor position="932" topLine="0" /> </File> <File name="core/GameState.cpp" open="0" top="0" tabpos="0"> - <Cursor position="2174" topLine="45" /> + <Cursor position="1177" topLine="12" /> </File> <File name="core/GameState.h" open="0" top="0" tabpos="0"> <Cursor position="1221" topLine="20" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-03 20:20:03
|
Revision: 55 http://sirrf.svn.sourceforge.net/sirrf/?rev=55&view=rev Author: zccdark203 Date: 2009-06-03 20:19:55 +0000 (Wed, 03 Jun 2009) Log Message: ----------- A small update this time. I extended various EntityComponents and the Entity class itself in preparation of upcoming changes to the GameState class. The GameState class itself is still pretty much a work-in-progress. Modified Paths: -------------- trunk/src/components/scene/SceneComponent.cpp trunk/src/components/scene/SceneComponent.h trunk/src/components/sound/SoundListenerComponent.cpp trunk/src/components/sound/SoundListenerComponent.h trunk/src/components/sound/SoundSourceComponent.cpp trunk/src/components/sound/SoundSourceComponent.h trunk/src/core/Entity.cpp trunk/src/core/Entity.h trunk/src/core/GameManager.cpp trunk/src/core/GameManager.h trunk/src/core/GameState.cpp trunk/src/core/GameState.h trunk/src/sirrf.depend trunk/src/sirrf.layout Modified: trunk/src/components/scene/SceneComponent.cpp =================================================================== --- trunk/src/components/scene/SceneComponent.cpp 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/components/scene/SceneComponent.cpp 2009-06-03 20:19:55 UTC (rev 55) @@ -37,11 +37,18 @@ // Set misc. variables. mName = "SceneComponent"; + mCanAffectParent = false; + mEvokedParentChange = false; // Register events. pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onPositionChange", this, &SceneComponent::onPositionChange); - + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onUpdate", + this, &SceneComponent::onUpdate); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onPause", + this, &SceneComponent::onPause); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onUnPause", + this, &SceneComponent::onUnPause); } // SceneComponent constructor (derivatives). @@ -239,6 +246,12 @@ mSceneNode->setAutomaticCulling(state); } +// Sets whether the component can affect the parent entity. +void SceneComponent::setCanAffectParent(bool value) +{ + mCanAffectParent = value; +} + // Sets if debug data like bounding boxes should be drawn. void SceneComponent::setDebugDataVisible(s32 state) { @@ -294,11 +307,47 @@ // Updates the position of the component after its parent has been updated. void SceneComponent::onPositionChange(void *p) { - vector3df vec = static_cast<vector3df*>(p)[0]; - mSceneNode->setPosition(mSceneNode->getPosition() + vec); + if(!mEvokedParentChange) + { + vector3df diff = static_cast<vector3df*>(p)[0]; + mSceneNode->setPosition(mSceneNode->getPosition() + diff); + } } +// Updates the component if the parent is updated. +void SceneComponent::onUpdate(void *p) +{ + if(mCanAffectParent) + { + // We're going to check if an animator has changed the position of our scene node. + // If that's the case we'll have to correct the change upstream. + vector3df diff = mSceneNode->getPosition() - mLastPos; + mLastPos = mSceneNode->getPosition(); + if(diff == vector3df(0)) + { + mEvokedParentChange = true; + pParent->setPosition(pParent->getPosition() + diff); + mEvokedParentChange = false; + } + } +} + +// Pauses the component if the parent is paused. +void SceneComponent::onPause(void *p) +{ + if(mSceneNode) + mSceneNode->setVisible(false); +} + +// Unpauses the component if the parent is paused. +void SceneComponent::onUnPause(void *p) +{ + if(mSceneNode) + mSceneNode->setVisible(true); +} + + // SceneComponent Angelscript binding. void bindSceneComponent(asIScriptEngine *engine) { Modified: trunk/src/components/scene/SceneComponent.h =================================================================== --- trunk/src/components/scene/SceneComponent.h 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/components/scene/SceneComponent.h 2009-06-03 20:19:55 UTC (rev 55) @@ -68,6 +68,7 @@ void setAbsolutePosition(const vector3df &position); void setAutomaticCulling(E_CULLING_TYPE state); + void setCanAffectParent(bool value); void setDebugDataVisible(s32 state); void setMaterialFlag(E_MATERIAL_FLAG flag, bool value); void setMaterialTexture(u32 layer, const std::string &fileName); @@ -79,18 +80,27 @@ // Events void onPositionChange(void *p); + void onUpdate(void *p); + void onPause(void *p); + void onUnPause(void *p); protected: // Initialisation SceneComponent(Entity *parent, bool isDerived); - // Members + // Protected Members ISceneNode *mSceneNode; IMetaTriangleSelector *mMetaSelector; ITriangleSelector *mTriSelector; private: + + // Private members + vector3df mLastPos; + bool mCanAffectParent; + + bool mEvokedParentChange; }; @@ -154,7 +164,9 @@ asMETHOD(T, setAbsolutePosition), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod(type, "void setAutomaticCulling(E_CULLING_TYPE)", asMETHOD(T, setAutomaticCulling), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod(type, "void setDebugDataVisible(s32 state)", + r = engine->RegisterObjectMethod(type, "void setCanAffectParent(bool)", + asMETHOD(T, setCanAffectParent), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod(type, "void setDebugDataVisible(s32)", asMETHOD(T, setDebugDataVisible), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod(type, "void setMaterialFlag(E_MATERIAL_FLAG, bool)", asMETHOD(T, setMaterialFlag), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/components/sound/SoundListenerComponent.cpp =================================================================== --- trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-03 20:19:55 UTC (rev 55) @@ -44,6 +44,10 @@ // Register events. pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onPositionChange", this, &SoundListenerComponent::onPositionChange); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onPause", + this, &SoundListenerComponent::onPause); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onUnPause", + this, &SoundListenerComponent::onUnPause); } // SoundListenerComponent deconstructor. @@ -108,7 +112,21 @@ sf::Listener::SetPosition(mPosition.X, mPosition.Y, mPosition.Z); } +// Pauses the component if the parent is paused. +void SoundListenerComponent::onPause(void *p) +{ + mWasMainListener = getIsMainListener(); + setIsMainListener(false); +} +// Unpauses the component if the parent is paused. +void SoundListenerComponent::onUnPause(void *p) +{ + if(mWasMainListener) + setIsMainListener(true); +} + + // SoundListenerComponent Angelscript binding. void bindSoundListenerComponent(asIScriptEngine *engine) { Modified: trunk/src/components/sound/SoundListenerComponent.h =================================================================== --- trunk/src/components/sound/SoundListenerComponent.h 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/components/sound/SoundListenerComponent.h 2009-06-03 20:19:55 UTC (rev 55) @@ -42,6 +42,8 @@ // Events void onPositionChange(void *p); + void onPause(void *p); + void onUnPause(void *p); private: @@ -53,6 +55,7 @@ vector3df mTarget; bool mIsMainListener; + bool mWasMainListener; // For event handeling }; Modified: trunk/src/components/sound/SoundSourceComponent.cpp =================================================================== --- trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-03 20:19:55 UTC (rev 55) @@ -33,6 +33,10 @@ // Register events. pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onPositionChange", this, &SoundSourceComponent::onPositionChange); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onPause", + this, &SoundSourceComponent::onPause); + pEventMgr->connectEventSignal(std::string("ent#") + parent->getName(), "onUnPause", + this, &SoundSourceComponent::onUnPause); } // SoundSourceComponent deconstructor. @@ -367,7 +371,21 @@ mMusic->SetPosition(mPosition.X, mPosition.Y, mPosition.Z); } +// Pauses the component if the parent is paused. +void SoundSourceComponent::onPause(void *p) +{ + mWasPaused = getIsPaused(); + pause(); +} +// Unpauses the component if the parent is paused. +void SoundSourceComponent::onUnPause(void *p) +{ + if(!mWasPaused) + play(); +} + + // SoundSourceComponent Angelscript binding. void bindSoundSourceComponent(asIScriptEngine *engine) { Modified: trunk/src/components/sound/SoundSourceComponent.h =================================================================== --- trunk/src/components/sound/SoundSourceComponent.h 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/components/sound/SoundSourceComponent.h 2009-06-03 20:19:55 UTC (rev 55) @@ -63,6 +63,8 @@ // Events void onPositionChange(void *p); + void onPause(void *p); + void onUnPause(void *p); private: @@ -80,6 +82,8 @@ vector3df mPosition; f32 mVolume; + bool mWasPaused; + }; Modified: trunk/src/core/Entity.cpp =================================================================== --- trunk/src/core/Entity.cpp 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/core/Entity.cpp 2009-06-03 20:19:55 UTC (rev 55) @@ -39,12 +39,28 @@ else pParent = NULL; - // Register events. + // Create an event group and event slots. EventManager *pEventMgr = GameManager::Instance()->getEventManager(); + std::string groupName; - std::string groupName = "ent#" + mName; + groupName = "ent#" + mName; pEventMgr->createEventGroup(groupName); pEventMgr->createEventSlot(groupName, "onPositionChange"); + pEventMgr->createEventSlot(groupName, "onUpdate"); + pEventMgr->createEventSlot(groupName, "onRender"); + pEventMgr->createEventSlot(groupName, "onPause"); + pEventMgr->createEventSlot(groupName, "onUnPause"); + + // Subscribe to parents event slots. + if(pParent != NULL) + { + groupName = "ent#" + pParent->getName(); + pEventMgr->connectEventSignal(groupName, "onUpdate", this, &Entity::onPositionChange); + pEventMgr->connectEventSignal(groupName, "onUpdate", this, &Entity::onUpdate); + pEventMgr->connectEventSignal(groupName, "onRender", this, &Entity::onRender); + pEventMgr->connectEventSignal(groupName, "onPause", this, &Entity::onPause); + pEventMgr->connectEventSignal(groupName, "onUnPause", this, &Entity::onUnPause); + } } // Entity deconstructor. @@ -369,21 +385,46 @@ mPosition = position; // Set position for children, components and misc. subscribers. - for(u32 i = 0; i < mChildren.size(); i++) - mChildren[i]->onPositionChange(diff); - GameManager::Instance()->getEventManager()->emitEvent(std::string("ent#") + mName, "onPositionChange", &diff); } -// Changes the position of the entity if its parent has changed its position. -// NOTE: This is a semi-event function; it's called directly by its parent. -void Entity::onPositionChange(const vector3df &diff) +// Updates the position of the entity after its parent has been updated. +void Entity::onPositionChange(void *p) { + vector3df diff = static_cast<vector3df*>(p)[0]; mPosition += diff; } +// Updates the entity if the parent is updated. +void Entity::onUpdate(void *p) +{ + GameManager::Instance()->getEventManager()->emitEvent(std::string("ent#") + mName, + "onUpdate", p); +} +// Updates the entity if the parent is rendered. +void Entity::onRender(void *p) +{ + GameManager::Instance()->getEventManager()->emitEvent(std::string("ent#") + mName, + "onRender", p); +} + +// Updates the entity if the parent is paused. +void Entity::onPause(void *p) +{ + GameManager::Instance()->getEventManager()->emitEvent(std::string("ent#") + mName, + "onPause", p); +} + +// Updates the entity if the parent is paused. +void Entity::onUnPause(void *p) +{ + GameManager::Instance()->getEventManager()->emitEvent(std::string("ent#") + mName, + "onUnPause", p); +} + + // Entity Angelscript binding. void bindEntity(asIScriptEngine *engine) { Modified: trunk/src/core/Entity.h =================================================================== --- trunk/src/core/Entity.h 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/core/Entity.h 2009-06-03 20:19:55 UTC (rev 55) @@ -64,7 +64,11 @@ void setPosition(const vector3df &position); // Events - void onPositionChange(const vector3df &diff); + void onPositionChange(void *p); + void onUpdate(void *p); + void onRender(void *p); + void onPause(void *p); + void onUnPause(void *p); private: Modified: trunk/src/core/GameManager.cpp =================================================================== --- trunk/src/core/GameManager.cpp 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/core/GameManager.cpp 2009-06-03 20:19:55 UTC (rev 55) @@ -78,7 +78,7 @@ // Updates the Game Manager. void GameManager::update() { - // Is the window active? + // Rendering if(pDevice->isWindowActive()) { if(!mGameStates.empty()) @@ -143,7 +143,7 @@ void GameManager::pushState(GameState *state) { // Pause the current state. - //mGameStates.back()->pause(); + mGameStates.back()->pause(); // Initialise the state. if(state != NULL) @@ -163,6 +163,9 @@ delete mGameStates.back(); mGameStates.pop_back(); } + + // Unpause the newly selected state. + mGameStates.back()->unpause(); } // Returns a pointer to the Irrlicht Device. Modified: trunk/src/core/GameManager.h =================================================================== --- trunk/src/core/GameManager.h 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/core/GameManager.h 2009-06-03 20:19:55 UTC (rev 55) @@ -19,7 +19,6 @@ // Include files #include "../dependencies.h" -#include "GameState.h" #include "DataStore.h" #include "EntityManager.h" #include "EventManager.h" @@ -27,6 +26,8 @@ #include "../scripting/ScriptManager.h" #include "../components/components.h" +#include "GameState.h" + // Forward declarations class GameState; class ScriptManager; Modified: trunk/src/core/GameState.cpp =================================================================== --- trunk/src/core/GameState.cpp 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/core/GameState.cpp 2009-06-03 20:19:55 UTC (rev 55) @@ -19,9 +19,17 @@ // GameState class +// Static variables. +u32 GameState::mIDCount = 0; + // Constructer of the GameState class. GameState::GameState() { + mID = mIDCount++; + + std::stringstream ss; + ss << "GameState#" << mID; + mBaseEntity = GameManager::Instance()->getEntityManager()->createEntity(ss.str()); } // Deconstructor of the GameState class. @@ -35,18 +43,40 @@ { } +// Clears the Game State. +// -> Implemented by subclass. +void GameState::clear() +{ +} + // Updates the Game State. // -> Implemented by subclass. void GameState::update() { } -// Clears the Game State. +// Renders the Game State. // -> Implemented by subclass. -void GameState::clear() +void GameState::render() { } +// Pauses the Game State. +void GameState::pause() +{ + std::stringstream ss; + ss << "ent#state#" << mID; + GameManager::Instance()->getEventManager()->emitEvent(ss.str(), "onPause"); +} + +// Unpause the Game State. +void GameState::unpause() +{ + std::stringstream ss; + ss << "ent#state#" << mID; + GameManager::Instance()->getEventManager()->emitEvent(ss.str(), "onUnPause"); +} + // Angelscript: Increases the reference counter. void GameState::refAdd() { @@ -77,9 +107,12 @@ // Bind GameState class functions. r = engine->RegisterObjectMethod("GameState", "void init()", asMETHOD(GameState, init), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("GameState", "void clear()", + asMETHOD(DataStack, clear), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("GameState", "void update()", asMETHOD(GameState, update), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("GameState", "void clear()", - asMETHOD(DataStack, clear), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("GameState", "void render()", + asMETHOD(GameState, render), asCALL_THISCALL); assert(r >= 0); } // End of File Modified: trunk/src/core/GameState.h =================================================================== --- trunk/src/core/GameState.h 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/core/GameState.h 2009-06-03 20:19:55 UTC (rev 55) @@ -33,12 +33,30 @@ virtual ~GameState(); virtual void init(); - virtual void update(); virtual void clear(); + virtual void update(); + virtual void render(); + + void pause(); + void unpause(); + // AngelScript binding void refAdd(); void refRelease(); + +protected: + + // Protected members + Entity *mBaseEntity; + +private: + + // Static members + static u32 mIDCount; + + // Private members + u32 mID; }; Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/sirrf.depend 2009-06-03 20:19:55 UTC (rev 55) @@ -1020,11 +1020,11 @@ 1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/DataStore.cpp "DataStore.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/Entity.cpp +1244058384 source:/home/michael/Programming/Projects/sirrf/src/core/Entity.cpp "Entity.h" "GameManager.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/core/Entity.h +1244058274 /home/michael/Programming/Projects/sirrf/src/core/Entity.h "../dependencies.h" "EntityComponent.h" @@ -1044,28 +1044,28 @@ "../dependencies.h" "Entity.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp +1244060139 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp "GameManager.h" "../components/components.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h +1244055639 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h "../dependencies.h" - "GameState.h" "DataStore.h" "EntityManager.h" "EventManager.h" "../sound/SoundManager.h" "../scripting/ScriptManager.h" "../components/components.h" + "GameState.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/core/GameState.h +1244059671 /home/michael/Programming/Projects/sirrf/src/core/GameState.h "GameManager.h" 1241010330 /home/michael/Programming/Projects/sirrf/src/core/ScriptManager.h "../dependencies.h" "../angelscript/add_on/scriptstring/scriptstring.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/GameState.cpp +1244059806 source:/home/michael/Programming/Projects/sirrf/src/core/GameState.cpp "GameState.h" 1241017939 source:/home/michael/Programming/Projects/sirrf/src/core/ScriptManager.cpp @@ -1126,11 +1126,11 @@ "scriptstring.h" <string.h> -1243891465 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.cpp +1244059849 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.cpp "SceneComponent.h" "../../core/GameManager.h" -1243891465 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h +1244059901 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h "../../dependencies.h" "../../core/EntityComponent.h" @@ -1390,11 +1390,11 @@ <SFML/System/Thread.hpp> <vector> -1243891466 source:/home/michael/Programming/Projects/sirrf/src/components/sound/SoundListenerComponent.cpp +1244059349 source:/home/michael/Programming/Projects/sirrf/src/components/sound/SoundListenerComponent.cpp "SoundListenerComponent.h" "../../core/GameManager.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/components/sound/SoundListenerComponent.h +1244059258 /home/michael/Programming/Projects/sirrf/src/components/sound/SoundListenerComponent.h "../../dependencies.h" "../../core/EntityComponent.h" @@ -2324,11 +2324,11 @@ "matrix4.h" "IVideoDriver.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/components/sound/SoundSourceComponent.cpp +1244058939 source:/home/michael/Programming/Projects/sirrf/src/components/sound/SoundSourceComponent.cpp "SoundSourceComponent.h" "../../core/GameManager.h" -1243891466 /home/michael/Programming/Projects/sirrf/src/components/sound/SoundSourceComponent.h +1244058838 /home/michael/Programming/Projects/sirrf/src/components/sound/SoundSourceComponent.h "../../dependencies.h" "../../core/EntityComponent.h" @@ -2388,7 +2388,7 @@ 1244040959 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h "../../dependencies.h" -1244040724 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp +1244040965 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp "asIrrlicht.h" "asAabbox3d.h" "asDimension2d.h" Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-06-03 14:58:55 UTC (rev 54) +++ trunk/src/sirrf.layout 2009-06-03 20:19:55 UTC (rev 55) @@ -50,10 +50,10 @@ <Cursor position="320" topLine="7" /> </File> <File name="components/scene/SceneComponent.cpp" open="0" top="0" tabpos="1"> - <Cursor position="313" topLine="7" /> + <Cursor position="8457" topLine="326" /> </File> <File name="components/scene/SceneComponent.h" open="0" top="0" tabpos="3"> - <Cursor position="308" topLine="45" /> + <Cursor position="7978" topLine="116" /> </File> <File name="components/scene/SkyBoxComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="369" topLine="8" /> @@ -80,16 +80,16 @@ <Cursor position="324" topLine="16" /> </File> <File name="components/sound/SoundListenerComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="319" topLine="7" /> + <Cursor position="1961" topLine="21" /> </File> <File name="components/sound/SoundListenerComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="324" topLine="7" /> + <Cursor position="1685" topLine="19" /> </File> <File name="components/sound/SoundSourceComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="11031" topLine="64" /> + <Cursor position="1741" topLine="0" /> </File> <File name="components/sound/SoundSourceComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="320" topLine="7" /> + <Cursor position="2157" topLine="49" /> </File> <File name="core/DataStack.cpp" open="0" top="0" tabpos="1"> <Cursor position="517" topLine="27" /> @@ -104,13 +104,13 @@ <Cursor position="298" topLine="7" /> </File> <File name="core/Entity.cpp" open="0" top="0" tabpos="3"> - <Cursor position="251" topLine="7" /> + <Cursor position="1533" topLine="386" /> </File> <File name="core/Entity.h" open="0" top="0" tabpos="4"> - <Cursor position="292" topLine="7" /> + <Cursor position="1978" topLine="48" /> </File> <File name="core/EntityComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="260" topLine="7" /> + <Cursor position="854" topLine="1" /> </File> <File name="core/EntityComponent.h" open="0" top="0" tabpos="0"> <Cursor position="310" topLine="7" /> @@ -127,17 +127,17 @@ <File name="core/EventManager.h" open="0" top="0" tabpos="0"> <Cursor position="1211" topLine="19" /> </File> - <File name="core/GameManager.cpp" open="0" top="0" tabpos="1"> - <Cursor position="517" topLine="19" /> + <File name="core/GameManager.cpp" open="1" top="1" tabpos="1"> + <Cursor position="2355" topLine="0" /> </File> <File name="core/GameManager.h" open="0" top="0" tabpos="0"> - <Cursor position="302" topLine="7" /> + <Cursor position="932" topLine="0" /> </File> <File name="core/GameState.cpp" open="0" top="0" tabpos="0"> - <Cursor position="371" topLine="8" /> + <Cursor position="2174" topLine="45" /> </File> <File name="core/GameState.h" open="0" top="0" tabpos="0"> - <Cursor position="298" topLine="4" /> + <Cursor position="1221" topLine="20" /> </File> <File name="dependencies.h" open="0" top="0" tabpos="0"> <Cursor position="309" topLine="7" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-03 14:58:59
|
Revision: 54 http://sirrf.svn.sourceforge.net/sirrf/?rev=54&view=rev Author: zccdark203 Date: 2009-06-03 14:58:55 +0000 (Wed, 03 Jun 2009) Log Message: ----------- Binded some more Irrlicht classes to AngelScript. You can now also use position2d<T> and rect<T> (as rectf and recti) within AngelScript. Modified Paths: -------------- trunk/src/scripting/irrlicht/asAabbox3d.cpp trunk/src/scripting/irrlicht/asIrrlicht.cpp trunk/src/scripting/irrlicht/asIrrlicht.h trunk/src/sirrf.cbp trunk/src/sirrf.depend trunk/src/sirrf.layout Added Paths: ----------- trunk/src/scripting/irrlicht/asPosition2d.cpp trunk/src/scripting/irrlicht/asPosition2d.h trunk/src/scripting/irrlicht/asRect.cpp trunk/src/scripting/irrlicht/asRect.h Modified: trunk/src/scripting/irrlicht/asAabbox3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asAabbox3d.cpp 2009-06-03 13:41:34 UTC (rev 53) +++ trunk/src/scripting/irrlicht/asAabbox3d.cpp 2009-06-03 14:58:55 UTC (rev 54) @@ -17,6 +17,7 @@ #include "asIrrHelper.h" #include "asAabbox3d.h" #include "asVector3d.h" +#include "asLine3d.h" // aabbox3d<T> behaviour functions. @@ -157,11 +158,11 @@ r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), asMETHOD(aabbox3d<T>, intersectsWithBox), asCALL_THISCALL); assert(r >= 0); - /*ss.str(""); + ss.str(""); ss << "bool intersectsWithLine(const " << getLine3dName(asType) << " &in)"; r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), - asMETHODPR(aabbox3d<T>, intersectsWithLine, (const line3d<T>&), bool), - asCALL_THISCALL); assert(r >= 0);*/ + asMETHODPR(aabbox3d<T>, intersectsWithLine, (const line3d<T>&) const, bool), + asCALL_THISCALL); assert(r >= 0); ss.str(""); ss << "bool isFullInside(const " << typeName << " &in)"; Modified: trunk/src/scripting/irrlicht/asIrrlicht.cpp =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-03 13:41:34 UTC (rev 53) +++ trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-03 14:58:55 UTC (rev 54) @@ -15,18 +15,21 @@ // Include files #include "asIrrlicht.h" +#include "asAabbox3d.h" #include "asDimension2d.h" +#include "asLine2d.h" +#include "asLine3d.h" +#include "asMatrix4.h" +#include "asPosition2d.h" +#include "asRect.h" #include "asSColor.h" #include "asVector2d.h" #include "asVector3d.h" -#include "asAabbox3d.h" -#include "asLine2d.h" -#include "asLine3d.h" -#include "asMatrix4.h" // Enumerations -// E_CULLING_TYPE +//! Binds E_CULLING_TYPE to AngelScript. +//! @note For internal use only! void bindE_CULLING_TYPE(asIScriptEngine *engine) { // Forward declarations. @@ -45,7 +48,8 @@ #undef bindEnumValue } -// EKEY_CODE +//! Binds EKEY_CODE to AngelScript. +//! @note For internal use only! void bindEKEY_CODE(asIScriptEngine *engine) { // Forward declarations. @@ -203,7 +207,8 @@ #undef bindEnumValue } -// E_LIGHT_TYPE +//! Binds E_LIGHT_TYPE to AngelScript. +//! @note For internal use only! void bindE_LIGHT_TYPE(asIScriptEngine *engine) { // Forward declarations. @@ -221,7 +226,8 @@ #undef bindEnumValue } -// E_MATERIAL_FLAG +//! Binds E_MATERIAL_FLAG to AngelScript. +//! @note For internal use only! void bindE_MATERIAL_FLAG(asIScriptEngine *engine) { // Forward declarations. @@ -250,7 +256,8 @@ #undef bindEnumValue } -// E_MATERIAL_TYPE +//! Binds E_MATERIAL_TYPE to AngelScript. +//! @note For internal use only! void bindE_MATERIAL_TYPE(asIScriptEngine *engine) { // Forward declarations. @@ -290,7 +297,7 @@ } -// Irrlicht AngelScript binding +//! Binds various Irrlicht classes and enumerations to AngelScript. void bindIrrlicht(asIScriptEngine *engine) { // Vector3d<T> @@ -298,10 +305,12 @@ bindSColor(engine); bindVector2d(engine); bindVector3d(engine); - bindAabbox3d(engine); bindLine2d(engine); bindLine3d(engine); + bindAabbox3d(engine); bindMatrix4(engine); + bindPosition2d(engine); + bindRect(engine); // Enumerations bindE_CULLING_TYPE(engine); Modified: trunk/src/scripting/irrlicht/asIrrlicht.h =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.h 2009-06-03 13:41:34 UTC (rev 53) +++ trunk/src/scripting/irrlicht/asIrrlicht.h 2009-06-03 14:58:55 UTC (rev 54) @@ -21,6 +21,7 @@ // AngelScript binding +//! Binds various Irrlicht classes and enumerations to AngelScript. extern void bindIrrlicht(asIScriptEngine *engine); #endif Added: trunk/src/scripting/irrlicht/asPosition2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asPosition2d.cpp (rev 0) +++ trunk/src/scripting/irrlicht/asPosition2d.cpp 2009-06-03 14:58:55 UTC (rev 54) @@ -0,0 +1,200 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asPosition2d.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the position2d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "asIrrHelper.h" +#include "asPosition2d.h" +#include "asDimension2d.h" + + +// position2d<T> behaviour functions. +//! An AngelScript wrapper function so that position2d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(void *memory) +{ + new (memory) position2d<T>(); +} + +//! An AngelScript wrapper function so that position2d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const position2d<T> &other, void *memory) +{ + new (memory) position2d<T>(other); +} + +//! An AngelScript wrapper function so that position2d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(T x, T y, void *memory) +{ + new (memory) position2d<T>(x, y); +} + +//! An AngelScript wrapper function so that position2d<T> objects can be +//! deconstructed within AngelScript. +//! @note For internal use only! +template<typename T> +void deconstructor(void *memory) +{ + ((position2d<T>*)memory)->~position2d<T>(); +} + + +//! Binds position2d<T> as a value type to AngelScript with the given template. +//! @param engine Pointer to the AngelScript engine +//! @param typeName The name of the object within AngelScript; +//! @param asType The AngelScript name of the used template; +template<typename T> +void bindPosition2dT(asIScriptEngine *engine, const char *typeName, const char *asType) +{ + // Forward declarations. + int r; + std::stringstream ss; + + // Bind Position2d<T> class. + r = engine->RegisterObjectType(typeName, sizeof(position2d<T>), asOBJ_VALUE | asOBJ_APP_CLASS_CDA); assert(r >= 0); + + // Set position2d<T> behaviour. + // Initialisation and deinitialisation + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor<T>, + (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << typeName << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const position2d<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(" << asType << ", " << asType << ")"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (T, T, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor<T>), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + // Calculation behaviours. + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declActionType = ss.str(); + + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, " << getDimension2dName(asType) << ")"; + std::string declActionValue = ss.str(); + + ss.str(""); + ss << typeName << "& f(const " << typeName << " &in)"; + std::string declAssignType = ss.str(); + + ss.str(""); + ss << typeName << "& f(const " << getDimension2dName(asType) << ")"; + std::string declAssignValue = ss.str(); + + // Assignment + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ASSIGNMENT, declAssignType.c_str(), + asMETHODPR(position2d<T>, operator=, (const position2d<T>&), + position2d<T>&), asCALL_THISCALL); assert(r >= 0); + + // Multiply (*) + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), + asFUNCTIONPR((multiply< position2d<T>, position2d<T>, position2d<T> >), + (const position2d<T>&, const position2d<T>&), position2d<T>), + asCALL_CDECL); assert(r >= 0); + + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << asType << " &in)"; + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionValue.c_str(), + asFUNCTIONPR((multiply< position2d<T>, position2d<T>, T >), + (const position2d<T>&, const T&), position2d<T>), + asCALL_CDECL); assert(r >= 0); + + // Add (+) + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), + asFUNCTIONPR((add< position2d<T>, position2d<T>, position2d<T> >), + (const position2d<T>&, const position2d<T>&), position2d<T>), + asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionValue.c_str(), + asFUNCTIONPR((add< position2d<T>, position2d<T>, dimension2d<T> >), + (const position2d<T>&, const dimension2d<T>&), position2d<T>), + asCALL_CDECL); assert(r >= 0); + + // Add Assign (+=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, declAssignType.c_str(), + asMETHODPR(position2d<T>, operator+=, (const position2d<T>&), + position2d<T>&), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, declAssignValue.c_str(), + asMETHODPR(position2d<T>, operator+=, (const dimension2d<T>&), position2d<T>&), + asCALL_THISCALL); assert(r >= 0); + + // Subtract (-) + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), + asFUNCTIONPR((substract< position2d<T>, position2d<T>, position2d<T> >), + (const position2d<T>&, const position2d<T>&), position2d<T>), + asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionValue.c_str(), + asFUNCTIONPR((substract< position2d<T>, position2d<T>, dimension2d<T> >), + (const position2d<T>&, const dimension2d<T>&), position2d<T>), + asCALL_CDECL); assert(r >= 0); + + // Subtract Assign (-=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, declAssignType.c_str(), + asMETHODPR(position2d<T>, operator-=, (const position2d<T>&), + position2d<T>&), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, declAssignValue.c_str(), + asMETHODPR(position2d<T>, operator-=, (const dimension2d<T>&), position2d<T>&), + asCALL_THISCALL); assert(r >= 0); + + // Comparison behaviours. + ss.str(""); + ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declComparison = ss.str(); + + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< position2d<T> >, + (const position2d<T>&, const position2d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< position2d<T> >, + (const position2d<T>&, const position2d<T>&), bool), asCALL_CDECL); assert(r >= 0); + + // Bind position2d<T> class properties. + ss.str(""); + ss << asType << " X"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(position2d<T>, X)); assert(r >= 0); + + ss.str(""); + ss << asType << " Y"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(position2d<T>, Y)); assert(r >= 0); +} + +//! Binds all needed position2d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +void bindPosition2d(asIScriptEngine *engine) +{ + bindPosition2dT<f32>(engine, "position2df", "f32"); + bindPosition2dT<s32>(engine, "position2di", "s32"); +} + +//! Gets the name of the position2d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +std::string getPosition2dName(const std::string &asType) +{ + if(asType == "f32") return std::string("position2df"); + if(asType == "s32") return std::string("position2di"); + else return std::string(""); +} + +// End of File Added: trunk/src/scripting/irrlicht/asPosition2d.h =================================================================== --- trunk/src/scripting/irrlicht/asPosition2d.h (rev 0) +++ trunk/src/scripting/irrlicht/asPosition2d.h 2009-06-03 14:58:55 UTC (rev 54) @@ -0,0 +1,33 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asPosition2d.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the position2d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASPOSITION2D_H__ +#define __ASPOSITION2D_H__ + +// Include files +#include "../../dependencies.h" + + +// AngelScript binding +//! Binds all needed position2d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +extern void bindPosition2d(asIScriptEngine *engine); + +//! Gets the name of the position2d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +extern std::string getPosition2dName(const std::string &asType); + +#endif + Added: trunk/src/scripting/irrlicht/asRect.cpp =================================================================== --- trunk/src/scripting/irrlicht/asRect.cpp (rev 0) +++ trunk/src/scripting/irrlicht/asRect.cpp 2009-06-03 14:58:55 UTC (rev 54) @@ -0,0 +1,225 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asRect.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the rect<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "asIrrHelper.h" +#include "asRect.h" +#include "asDimension2d.h" +#include "asPosition2d.h" + + +// rect<T> behaviour functions. +//! An AngelScript wrapper function so that rect<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(void *memory) +{ + new (memory) rect<T>(); +} + +//! An AngelScript wrapper function so that rect<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const position2d<T> &pos, const dimension2d<T> &size, void *memory) +{ + new (memory) rect<T>(pos, size); +} + +//! An AngelScript wrapper function so that rect<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const position2d<T> &upperLeft, const position2d<T> &lowerRight, void *memory) +{ + new (memory) rect<T>(upperLeft, lowerRight); +} + +//! An AngelScript wrapper function so that rect<T> objects can be +//! deconstructed within AngelScript. +//! @note For internal use only! +template<typename T> +void deconstructor(void *memory) +{ + ((rect<T>*)memory)->~rect<T>(); +} + + +//! Binds rect<T> as a value type to AngelScript with the given template. +//! @param engine Pointer to the AngelScript engine +//! @param typeName The name of the object within AngelScript; +//! @param asType The AngelScript name of the used template; +template<typename T> +void bindRectT(asIScriptEngine *engine, const char *typeName, const char *asType) +{ + // Forward declarations. + int r; + std::stringstream ss; + + // Bind Rect<T> class. + r = engine->RegisterObjectType(typeName, sizeof(rect<T>), asOBJ_VALUE | asOBJ_APP_CLASS_CDA); assert(r >= 0); + + // Set rect<T> behaviour. + // Initialisation and deinitialisation + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor<T>, + (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << getPosition2dName(asType) << " &in, const " << getDimension2dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const position2d<T>&, const dimension2d<T>&, void*), void), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << getPosition2dName(asType) << " &in, const " << getPosition2dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const position2d<T>&, const position2d<T>&, void*), void), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor<T>), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + // Calculation behaviours. + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << getPosition2dName(asType) << "&in)"; + std::string declActionType = ss.str(); + + ss.str(""); + ss << typeName << "& f(const " << getPosition2dName(asType) << "&in)"; + std::string declAssignType = ss.str(); + + // Add (+) + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), + asFUNCTIONPR((add< rect<T>, rect<T>, position2d<T> >), + (const rect<T>&, const position2d<T>&), rect<T>), + asCALL_CDECL); assert(r >= 0); + + // Add Assign (+=) + ss.str(""); + ss << typeName << "& f(const " << getPosition2dName(asType) << "&in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, declAssignType.c_str(), + asMETHODPR(rect<T>, operator+=, (const position2d<T>&), + rect<T>&), asCALL_THISCALL); assert(r >= 0); + + // Subtract (-) + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), + asFUNCTIONPR((substract< rect<T>, rect<T>, position2d<T> >), + (const rect<T>&, const position2d<T>&), rect<T>), + asCALL_CDECL); assert(r >= 0); + + // Subtract Assign (-=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, declAssignType.c_str(), + asMETHODPR(rect<T>, operator-=, (const position2d<T>&), + rect<T>&), asCALL_THISCALL); assert(r >= 0); + + // Comparison behaviours. + ss.str(""); + ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declComparison = ss.str(); + + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< rect<T> >, + (const rect<T>&, const rect<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< rect<T> >, + (const rect<T>&, const rect<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_LESSTHAN, declComparison.c_str(), asFUNCTIONPR(less_than< rect<T> >, + (const rect<T>&, const rect<T>&), bool), asCALL_CDECL); assert(r >= 0); + + // Bind rect<T> class functions. + ss.str(""); + ss << "void addInternalPoint(const " << getPosition2dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(rect<T>, addInternalPoint, (const position2d<T>&), void), + asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void clipAgainst(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(rect<T>, clipAgainst), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void constrainTo(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(rect<T>, constrainTo), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getArea()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(rect<T>, getArea), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getPosition2dName(asType) << " getCenter()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(rect<T>, getCenter), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getHeight()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(rect<T>, getHeight), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getDimension2dName(asType) << " getSize()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(rect<T>, getSize), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getWidth()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(rect<T>, getWidth), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool isPointInside(const " << getPosition2dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(rect<T>, isPointInside), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool isRectCollided(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(rect<T>, isRectCollided), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod(typeName, "bool isValid()", + asMETHOD(rect<T>, isValid), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod(typeName, "void repair()", + asMETHOD(rect<T>, repair), asCALL_THISCALL); assert(r >= 0); + + // Bind rect<T> class properties. + ss.str(""); + ss << getPosition2dName(asType) << " LowerRightCorner"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(rect<T>, LowerRightCorner)); assert(r >= 0); + + ss.str(""); + ss << getPosition2dName(asType) << " UpperLeftCorner"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(rect<T>, UpperLeftCorner)); assert(r >= 0); +} + +//! Binds all needed rect<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +void bindRect(asIScriptEngine *engine) +{ + bindRectT<f32>(engine, "rectf", "f32"); + bindRectT<s32>(engine, "recti", "s32"); +} + +//! Gets the name of the rect<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +std::string getRectName(const std::string &asType) +{ + if(asType == "f32") return std::string("rectf"); + if(asType == "s32") return std::string("recti"); + else return std::string(""); +} + +// End of File Added: trunk/src/scripting/irrlicht/asRect.h =================================================================== --- trunk/src/scripting/irrlicht/asRect.h (rev 0) +++ trunk/src/scripting/irrlicht/asRect.h 2009-06-03 14:58:55 UTC (rev 54) @@ -0,0 +1,33 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asRect.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the rect<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASRECT_H__ +#define __ASRECT_H__ + +// Include files +#include "../../dependencies.h" + + +// AngelScript binding +//! Binds all needed rect<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +extern void bindRect(asIScriptEngine *engine); + +//! Gets the name of the rect<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +extern std::string getRectName(const std::string &asType); + +#endif + Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-06-03 13:41:34 UTC (rev 53) +++ trunk/src/sirrf.cbp 2009-06-03 14:58:55 UTC (rev 54) @@ -122,6 +122,10 @@ <Unit filename="scripting/irrlicht/asLine3d.h" /> <Unit filename="scripting/irrlicht/asMatrix4.cpp" /> <Unit filename="scripting/irrlicht/asMatrix4.h" /> + <Unit filename="scripting/irrlicht/asPosition2d.cpp" /> + <Unit filename="scripting/irrlicht/asPosition2d.h" /> + <Unit filename="scripting/irrlicht/asRect.cpp" /> + <Unit filename="scripting/irrlicht/asRect.h" /> <Unit filename="scripting/irrlicht/asSColor.cpp" /> <Unit filename="scripting/irrlicht/asSColor.h" /> <Unit filename="scripting/irrlicht/asVector2d.cpp" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-03 13:41:34 UTC (rev 53) +++ trunk/src/sirrf.depend 2009-06-03 14:58:55 UTC (rev 54) @@ -2385,19 +2385,21 @@ "asIrrHelper.h" "asVector2d.h" -1243891467 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h +1244040959 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h "../../dependencies.h" -1244036367 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp +1244040724 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp "asIrrlicht.h" + "asAabbox3d.h" "asDimension2d.h" + "asLine2d.h" + "asLine3d.h" + "asMatrix4.h" + "asPosition2d.h" + "asRect.h" "asSColor.h" "asVector2d.h" "asVector3d.h" - "asAabbox3d.h" - "asLine2d.h" - "asLine3d.h" - "asMatrix4.h" 1243891467 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.h "../../dependencies.h" @@ -2413,10 +2415,11 @@ 1243891466 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.h "../../dependencies.h" -1244029819 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.cpp +1244038482 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.cpp "asIrrHelper.h" "asAabbox3d.h" "asVector3d.h" + "asLine3d.h" 1243891466 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.h "../../dependencies.h" @@ -2455,3 +2458,20 @@ 1244036354 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asLine3d.h "../../dependencies.h" +1244040827 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asPosition2d.cpp + "asIrrHelper.h" + "asPosition2d.h" + "asDimension2d.h" + +1244038198 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asPosition2d.h + "../../dependencies.h" + +1244040627 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asRect.cpp + "asIrrHelper.h" + "asRect.h" + "asDimension2d.h" + "asPosition2d.h" + +1244040706 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asRect.h + "../../dependencies.h" + Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-06-03 13:41:34 UTC (rev 53) +++ trunk/src/sirrf.layout 2009-06-03 14:58:55 UTC (rev 54) @@ -157,44 +157,62 @@ <File name="scripting/ScriptManager.h" open="0" top="0" tabpos="1"> <Cursor position="306" topLine="7" /> </File> - <File name="scripting/irrlicht/asAabbox3d.cpp" open="0" top="0" tabpos="0"> - <Cursor position="9722" topLine="198" /> + <File name="scripting/irrlicht/asAabbox3d.cpp" open="0" top="0" tabpos="1"> + <Cursor position="894" topLine="0" /> </File> - <File name="scripting/irrlicht/asAabbox3d.h" open="0" top="0" tabpos="0"> - <Cursor position="316" topLine="0" /> - </File> <File name="scripting/irrlicht/asDimension2d.cpp" open="0" top="0" tabpos="0"> - <Cursor position="325" topLine="7" /> + <Cursor position="6967" topLine="133" /> </File> <File name="scripting/irrlicht/asDimension2d.h" open="0" top="0" tabpos="0"> <Cursor position="323" topLine="0" /> </File> + <File name="scripting/irrlicht/asIrrHelper.h" open="0" top="0" tabpos="0"> + <Cursor position="1650" topLine="0" /> + </File> <File name="scripting/irrlicht/asIrrlicht.cpp" open="0" top="0" tabpos="0"> - <Cursor position="314" topLine="0" /> + <Cursor position="9294" topLine="280" /> </File> <File name="scripting/irrlicht/asIrrlicht.h" open="0" top="0" tabpos="0"> - <Cursor position="312" topLine="0" /> + <Cursor position="827" topLine="0" /> </File> + <File name="scripting/irrlicht/asLine2d.cpp" open="0" top="0" tabpos="0"> + <Cursor position="0" topLine="180" /> + </File> + <File name="scripting/irrlicht/asLine3d.cpp" open="0" top="0" tabpos="0"> + <Cursor position="8518" topLine="162" /> + </File> + <File name="scripting/irrlicht/asLine3d.h" open="0" top="0" tabpos="0"> + <Cursor position="1064" topLine="0" /> + </File> <File name="scripting/irrlicht/asMatrix4.cpp" open="0" top="0" tabpos="0"> - <Cursor position="318" topLine="7" /> + <Cursor position="3046" topLine="262" /> </File> <File name="scripting/irrlicht/asMatrix4.h" open="0" top="0" tabpos="0"> <Cursor position="316" topLine="0" /> </File> + <File name="scripting/irrlicht/asPosition2d.cpp" open="0" top="0" tabpos="0"> + <Cursor position="8615" topLine="154" /> + </File> + <File name="scripting/irrlicht/asPosition2d.h" open="0" top="0" tabpos="0"> + <Cursor position="1095" topLine="0" /> + </File> + <File name="scripting/irrlicht/asRect.cpp" open="0" top="0" tabpos="0"> + <Cursor position="9329" topLine="179" /> + </File> + <File name="scripting/irrlicht/asRect.h" open="0" top="0" tabpos="0"> + <Cursor position="1049" topLine="0" /> + </File> <File name="scripting/irrlicht/asSColor.cpp" open="0" top="0" tabpos="0"> - <Cursor position="310" topLine="7" /> + <Cursor position="6578" topLine="88" /> </File> <File name="scripting/irrlicht/asSColor.h" open="0" top="0" tabpos="0"> <Cursor position="310" topLine="0" /> </File> <File name="scripting/irrlicht/asVector2d.cpp" open="0" top="0" tabpos="3"> - <Cursor position="319" topLine="0" /> + <Cursor position="15004" topLine="265" /> </File> - <File name="scripting/irrlicht/asVector2d.h" open="0" top="0" tabpos="0"> - <Cursor position="317" topLine="0" /> - </File> <File name="scripting/irrlicht/asVector3d.cpp" open="0" top="0" tabpos="1"> - <Cursor position="319" topLine="7" /> + <Cursor position="1960" topLine="291" /> </File> <File name="scripting/irrlicht/asVector3d.h" open="0" top="0" tabpos="2"> <Cursor position="317" topLine="0" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-03 14:15:06
|
Revision: 53 http://sirrf.svn.sourceforge.net/sirrf/?rev=53&view=rev Author: zccdark203 Date: 2009-06-03 13:41:34 +0000 (Wed, 03 Jun 2009) Log Message: ----------- Added AngelScript bindings of Irrlicht's line2d<T> en line3d<T> clases. Modified Paths: -------------- trunk/src/scripting/irrlicht/asIrrlicht.cpp trunk/src/sirrf.cbp trunk/src/sirrf.depend Added Paths: ----------- trunk/src/scripting/irrlicht/asLine2d.cpp trunk/src/scripting/irrlicht/asLine2d.h trunk/src/scripting/irrlicht/asLine3d.cpp trunk/src/scripting/irrlicht/asLine3d.h Modified: trunk/src/scripting/irrlicht/asIrrlicht.cpp =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-03 12:32:19 UTC (rev 52) +++ trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-03 13:41:34 UTC (rev 53) @@ -20,6 +20,8 @@ #include "asVector2d.h" #include "asVector3d.h" #include "asAabbox3d.h" +#include "asLine2d.h" +#include "asLine3d.h" #include "asMatrix4.h" @@ -297,6 +299,8 @@ bindVector2d(engine); bindVector3d(engine); bindAabbox3d(engine); + bindLine2d(engine); + bindLine3d(engine); bindMatrix4(engine); // Enumerations Added: trunk/src/scripting/irrlicht/asLine2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asLine2d.cpp (rev 0) +++ trunk/src/scripting/irrlicht/asLine2d.cpp 2009-06-03 13:41:34 UTC (rev 53) @@ -0,0 +1,226 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asVector2d.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the line2d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "asIrrHelper.h" +#include "asLine2d.h" +#include "asVector2d.h" + + +// line2d<T> behaviour functions. +//! An AngelScript wrapper function so that line2d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(void *memory) +{ + new (memory) line2d<T>(); +} + +//! An AngelScript wrapper function so that line2d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const line2d<T> &other, void *memory) +{ + new (memory) line2d<T>(other); +} + +//! An AngelScript wrapper function so that line2d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const vector2d<T> &start, const vector2d<T> &end, void *memory) +{ + new (memory) line2d<T>(start, end); +} + +//! An AngelScript wrapper function so that line2d<T> objects can be +//! deconstructed within AngelScript. +//! @note For internal use only! +template<typename T> +void deconstructor(void *memory) +{ + ((line2d<T>*)memory)->~line2d<T>(); +} + + +//! Binds line2d<T> as a value type to AngelScript with the given template. +//! @param engine Pointer to the AngelScript engine +//! @param typeName The name of the object within AngelScript; +//! @param asType The AngelScript name of the used template; +template<typename T> +void bindLine2dT(asIScriptEngine *engine, const char *typeName, const char *asType) +{ + // Forward declarations. + int r; + std::stringstream ss; + + // Bind Vector2d<T> class. + r = engine->RegisterObjectType(typeName, sizeof(line2d<T>), asOBJ_VALUE | asOBJ_APP_CLASS_CD); assert(r >= 0); + + // Set line2d<T> behaviour. + // Initialisation and deinitialisation + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor<T>, + (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << typeName << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const line2d<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << getVector2dName(asType) << " &in, const " << getVector2dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const vector2d<T>&, const vector2d<T>&, void*), void), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor<T>), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + // Calculation behaviours. + // Add (+) + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << getVector2dName(asType) << " &in)"; + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, ss.str().c_str(), + asFUNCTIONPR((add< line2d<T>, line2d<T>, vector2d<T> >), + (const line2d<T>&, const vector2d<T>&), line2d<T>), + asCALL_CDECL); assert(r >= 0); + + // Add Assign (+=) + ss.str(""); + ss << typeName << "& f(const " << getVector2dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, ss.str().c_str(), + asMETHODPR(line2d<T>, operator+=, (const vector2d<T>&), + line2d<T>&), asCALL_THISCALL); assert(r >= 0); + + // Subtract (-) + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << getVector2dName(asType) << " &in)"; + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, ss.str().c_str(), + asFUNCTIONPR((substract< line2d<T>, line2d<T>, vector2d<T> >), + (const line2d<T>&, const vector2d<T>&), line2d<T>), + asCALL_CDECL); assert(r >= 0); + + // Subtract Assign (-=) + ss.str(""); + ss << typeName << "& f(const " << getVector2dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, ss.str().c_str(), + asMETHODPR(line2d<T>, operator-=, (const vector2d<T>&), + line2d<T>&), asCALL_THISCALL); assert(r >= 0); + + // Comparison behaviours. + ss.str(""); + ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declComparison = ss.str(); + + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< line2d<T> >, + (const line2d<T>&, const line2d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< line2d<T> >, + (const line2d<T>&, const line2d<T>&), bool), asCALL_CDECL); assert(r >= 0); + + // Bind line2d<T> class functions. + ss.str(""); + ss << "f64 getAngleWith(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, getAngleWith), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector2dName(asType) << " getClosestPoint(const " << getVector2dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, getClosestPoint), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod(typeName, "f64 getLength()", + asMETHOD(line2d<T>, getLength), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getLengthSQ()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, getLengthSQ), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector2dName(asType) << " getMiddle()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, getMiddle), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getPointOrientation(const " << getVector2dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, getPointOrientation), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector2dName(asType) << " getUnitVector()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, getUnitVector), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector2dName(asType) << " getVector()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, getVector), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool intersectWith(const " << typeName << " &in, const " << getVector2dName(asType) << " &out)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, intersectWith), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool isPointBetweenStartAndEnd(const " << getVector2dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, isPointBetweenStartAndEnd), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool isPointOnLine(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line2d<T>, isPointOnLine), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void setLine(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(line2d<T>, setLine, (const line2d<T>&), void), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void setLine(const " << getVector2dName(asType) << " &in, const " << getVector2dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(line2d<T>, setLine, (const vector2d<T>&, const vector2d<T>&), void), + asCALL_THISCALL); assert(r >= 0); + + // Bind line2d<T> class properties. + ss.str(""); + ss << getVector2dName(asType) << " end"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(line2d<T>, end)); assert(r >= 0); + + ss.str(""); + ss << getVector2dName(asType) << " start"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(line2d<T>, start)); assert(r >= 0); +} + +//! Binds all needed line2d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +void bindLine2d(asIScriptEngine *engine) +{ + bindLine2dT<f32>(engine, "line2df", "f32"); + bindLine2dT<s32>(engine, "line2di", "s32"); +} + +//! Gets the name of the line2d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +std::string getLine2dName(const std::string &asType) +{ + if(asType == "f32") return std::string("line2df"); + if(asType == "s32") return std::string("line2di"); + else return std::string(""); +} + +// End of File Added: trunk/src/scripting/irrlicht/asLine2d.h =================================================================== --- trunk/src/scripting/irrlicht/asLine2d.h (rev 0) +++ trunk/src/scripting/irrlicht/asLine2d.h 2009-06-03 13:41:34 UTC (rev 53) @@ -0,0 +1,33 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asLine2d.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the line2d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASLINE2D_H__ +#define __ASLINE2D_H__ + +// Include files +#include "../../dependencies.h" + + +// AngelScript binding +//! Binds all needed line2d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +extern void bindLine2d(asIScriptEngine *engine); + +//! Gets the name of the line2d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +extern std::string getLine2dName(const std::string &asType); + +#endif + Added: trunk/src/scripting/irrlicht/asLine3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asLine3d.cpp (rev 0) +++ trunk/src/scripting/irrlicht/asLine3d.cpp 2009-06-03 13:41:34 UTC (rev 53) @@ -0,0 +1,208 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asVector3d.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the line3d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "asIrrHelper.h" +#include "asLine3d.h" +#include "asVector3d.h" + + +// line3d<T> behaviour functions. +//! An AngelScript wrapper function so that line3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(void *memory) +{ + new (memory) line3d<T>(); +} + +//! An AngelScript wrapper function so that line3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const line3d<T> &other, void *memory) +{ + new (memory) line3d<T>(other); +} + +//! An AngelScript wrapper function so that line3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const vector3d<T> &start, const vector3d<T> &end, void *memory) +{ + new (memory) line3d<T>(start, end); +} + +//! An AngelScript wrapper function so that line3d<T> objects can be +//! deconstructed within AngelScript. +//! @note For internal use only! +template<typename T> +void deconstructor(void *memory) +{ + ((line3d<T>*)memory)->~line3d<T>(); +} + + +//! Binds line3d<T> as a value type to AngelScript with the given template. +//! @param engine Pointer to the AngelScript engine +//! @param typeName The name of the object within AngelScript; +//! @param asType The AngelScript name of the used template; +template<typename T> +void bindLine3dT(asIScriptEngine *engine, const char *typeName, const char *asType) +{ + // Forward declarations. + int r; + std::stringstream ss; + + // Bind line3d<T> class. + r = engine->RegisterObjectType(typeName, sizeof(line3d<T>), asOBJ_VALUE | asOBJ_APP_CLASS_CD); assert(r >= 0); + + // Set line3d<T> behaviour. + // Initialisation and deinitialisation + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor<T>, + (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << typeName << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const line3d<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << getVector3dName(asType) << " &in, const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const vector3d<T>&, const vector3d<T>&, void*), void), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor<T>), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + // Calculation behaviours. + // Add (+) + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, ss.str().c_str(), + asFUNCTIONPR((add< line3d<T>, line3d<T>, vector3d<T> >), + (const line3d<T>&, const vector3d<T>&), line3d<T>), + asCALL_CDECL); assert(r >= 0); + + // Add Assign (+=) + ss.str(""); + ss << typeName << "& f(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, ss.str().c_str(), + asMETHODPR(line3d<T>, operator+=, (const vector3d<T>&), + line3d<T>&), asCALL_THISCALL); assert(r >= 0); + + // Subtract (-) + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, ss.str().c_str(), + asFUNCTIONPR((substract< line3d<T>, line3d<T>, vector3d<T> >), + (const line3d<T>&, const vector3d<T>&), line3d<T>), + asCALL_CDECL); assert(r >= 0); + + // Subtract Assign (-=) + ss.str(""); + ss << typeName << "& f(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, ss.str().c_str(), + asMETHODPR(line3d<T>, operator-=, (const vector3d<T>&), + line3d<T>&), asCALL_THISCALL); assert(r >= 0); + + // Comparison behaviours. + ss.str(""); + ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declComparison = ss.str(); + + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< line3d<T> >, + (const line3d<T>&, const line3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< line3d<T> >, + (const line3d<T>&, const line3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + + // Bind line3d<T> class functions. + ss.str(""); + ss << getVector3dName(asType) << " getClosestPoint(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line3d<T>, getClosestPoint), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool getIntersectionWithSphere(" << getVector3dName(asType) << ", " << asType << ", f64)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line3d<T>, getIntersectionWithSphere), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getLength()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line3d<T>, getLength), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getLengthSQ()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line3d<T>, getLengthSQ), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " getMiddle()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line3d<T>, getMiddle), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " getVector()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line3d<T>, getVector), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool isPointBetweenStartAndEnd(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(line3d<T>, isPointBetweenStartAndEnd), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void setLine(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(line3d<T>, setLine, (const line3d<T>&), void), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void setLine(const " << getVector3dName(asType) << " &in, const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(line3d<T>, setLine, (const vector3d<T>&, const vector3d<T>&), void), + asCALL_THISCALL); assert(r >= 0); + + // Bind line3d<T> class properties. + ss.str(""); + ss << getVector3dName(asType) << " end"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(line3d<T>, end)); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " start"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(line3d<T>, start)); assert(r >= 0); +} + +//! Binds all needed line3d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +void bindLine3d(asIScriptEngine *engine) +{ + bindLine3dT<f32>(engine, "line3df", "f32"); + bindLine3dT<s32>(engine, "line3di", "s32"); +} + +//! Gets the name of the line3d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +std::string getLine3dName(const std::string &asType) +{ + if(asType == "f32") return std::string("line3df"); + if(asType == "s32") return std::string("line3di"); + else return std::string(""); +} + +// End of File Added: trunk/src/scripting/irrlicht/asLine3d.h =================================================================== --- trunk/src/scripting/irrlicht/asLine3d.h (rev 0) +++ trunk/src/scripting/irrlicht/asLine3d.h 2009-06-03 13:41:34 UTC (rev 53) @@ -0,0 +1,34 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asLine3d.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the line3d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASLINE3D_H__ +#define __ASLINE3D_H__ + +// Include files +#include "../../dependencies.h" + + +// AngelScript binding +//! Binds all needed line3d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +extern void bindLine3d(asIScriptEngine *engine); + +//! Gets the name of the line3d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +extern std::string getLine3dName(const std::string &asType); + +#endif + + Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-06-03 12:32:19 UTC (rev 52) +++ trunk/src/sirrf.cbp 2009-06-03 13:41:34 UTC (rev 53) @@ -116,6 +116,10 @@ <Unit filename="scripting/irrlicht/asIrrHelper.h" /> <Unit filename="scripting/irrlicht/asIrrlicht.cpp" /> <Unit filename="scripting/irrlicht/asIrrlicht.h" /> + <Unit filename="scripting/irrlicht/asLine2d.cpp" /> + <Unit filename="scripting/irrlicht/asLine2d.h" /> + <Unit filename="scripting/irrlicht/asLine3d.cpp" /> + <Unit filename="scripting/irrlicht/asLine3d.h" /> <Unit filename="scripting/irrlicht/asMatrix4.cpp" /> <Unit filename="scripting/irrlicht/asMatrix4.h" /> <Unit filename="scripting/irrlicht/asSColor.cpp" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-03 12:32:19 UTC (rev 52) +++ trunk/src/sirrf.depend 2009-06-03 13:41:34 UTC (rev 53) @@ -2388,13 +2388,15 @@ 1243891467 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h "../../dependencies.h" -1243891467 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp +1244036367 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp "asIrrlicht.h" "asDimension2d.h" "asSColor.h" "asVector2d.h" "asVector3d.h" "asAabbox3d.h" + "asLine2d.h" + "asLine3d.h" "asMatrix4.h" 1243891467 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.h @@ -2419,7 +2421,7 @@ 1243891466 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.h "../../dependencies.h" -1244031750 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asSColor.cpp +1244032026 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asSColor.cpp "asIrrHelper.h" "asSColor.h" @@ -2437,3 +2439,19 @@ 1244031441 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrHelper.h "../../dependencies.h" +1244035713 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asLine2d.cpp + "asIrrHelper.h" + "asLine2d.h" + "asVector2d.h" + +1244032883 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asLine2d.h + "../../dependencies.h" + +1244036300 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asLine3d.cpp + "asIrrHelper.h" + "asLine3d.h" + "asVector3d.h" + +1244036354 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asLine3d.h + "../../dependencies.h" + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-03 13:14:42
|
Revision: 52 http://sirrf.svn.sourceforge.net/sirrf/?rev=52&view=rev Author: zccdark203 Date: 2009-06-03 12:32:19 +0000 (Wed, 03 Jun 2009) Log Message: ----------- The AngelScript bindings of Irrlicht value types often required similar base functions to implement certain behaviours. I've removed these functions and replaced them with the more general equivalents in the asIrrHelper.h file. Modified Paths: -------------- trunk/src/scripting/irrlicht/asAabbox3d.cpp trunk/src/scripting/irrlicht/asDimension2d.cpp trunk/src/scripting/irrlicht/asMatrix4.cpp trunk/src/scripting/irrlicht/asSColor.cpp trunk/src/scripting/irrlicht/asVector2d.cpp trunk/src/scripting/irrlicht/asVector3d.cpp trunk/src/sirrf.cbp trunk/src/sirrf.depend trunk/src/sirrf.layout Added Paths: ----------- trunk/src/scripting/irrlicht/asIrrHelper.h Modified: trunk/src/scripting/irrlicht/asAabbox3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asAabbox3d.cpp 2009-06-02 07:16:58 UTC (rev 51) +++ trunk/src/scripting/irrlicht/asAabbox3d.cpp 2009-06-03 12:32:19 UTC (rev 52) @@ -14,6 +14,7 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asIrrHelper.h" #include "asAabbox3d.h" #include "asVector3d.h" @@ -64,23 +65,7 @@ ((aabbox3d<T>*)memory)->~aabbox3d<T>(); } -//! An AngelScript wrapper function for the equal behaviour. -//! @note For internal use only! -template<typename T> -bool equal(const aabbox3d<T> &a, const aabbox3d<T> &b) -{ - return (a==b); -} -//! An AngelScript wrapper function for the not-equal behaviour. -//! @note For internal use only! -template<typename T> -bool not_equal(const aabbox3d<T> &a, const aabbox3d<T> &b) -{ - return (a!=b); -} - - //! Binds aabbox3d<T> as a value type to AngelScript with the given template. //! @param engine Pointer to the AngelScript engine //! @param typeName The name of the object within AngelScript; @@ -125,9 +110,9 @@ ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; std::string declComparison = ss.str(); - r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< aabbox3d<T> >, (const aabbox3d<T>&, const aabbox3d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< aabbox3d<T> >, (const aabbox3d<T>&, const aabbox3d<T>&), bool), asCALL_CDECL); assert(r >= 0); // Bind aabbox3d<T> class functions. Modified: trunk/src/scripting/irrlicht/asDimension2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asDimension2d.cpp 2009-06-02 07:16:58 UTC (rev 51) +++ trunk/src/scripting/irrlicht/asDimension2d.cpp 2009-06-03 12:32:19 UTC (rev 52) @@ -14,6 +14,7 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asIrrHelper.h" #include "asDimension2d.h" @@ -45,47 +46,7 @@ ((dimension2d<T>*)memory)->~dimension2d<T>(); } -//! An AngelScript wrapper function for the multiply behaviour. -//! @note For internal use only! -template<typename T> -dimension2d<T> multiply(const dimension2d<T> &a, const T &b) -{ - return a * b; -} -//! An AngelScript wrapper function for the addition behaviour. -//! @note For internal use only! -template<typename T> -dimension2d<T> add(const dimension2d<T> &a, const dimension2d<T> &b) -{ - return a + b; -} - -//! An AngelScript wrapper function for the divide behaviour. -//! @note For internal use only! -template<typename T> -dimension2d<T> divide(const dimension2d<T> &a, const T &b) -{ - return a / b; -} - -//! An AngelScript wrapper function for the equal behaviour. -//! @note For internal use only! -template<typename T> -bool equal(const dimension2d<T> &a, const dimension2d<T> &b) -{ - return (a==b); -} - -//! An AngelScript wrapper function for the not-equal behaviour. -//! @note For internal use only! -template<typename T> -bool not_equal(const dimension2d<T> &a, const dimension2d<T> &b) -{ - return (a!=b); -} - - //! Binds dimension2d<T> as a value type to AngelScript with the given template. //! @param engine Pointer to the AngelScript engine //! @param typeName The name of the object within AngelScript; @@ -117,7 +78,8 @@ // Multiply (*) ss.str(""); ss << typeName << " f(const " << typeName << " &in, const "<< asType << ")"; - r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, ss.str().c_str(), asFUNCTIONPR(multiply<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, ss.str().c_str(), + asFUNCTIONPR((multiply< dimension2d<T>, dimension2d<T>, T >), (const dimension2d<T>&, const T&), dimension2d<T>), asCALL_CDECL); assert(r >= 0); @@ -131,7 +93,8 @@ // Add (+) ss.str(""); ss << typeName << " f(const " << typeName << " &in, const " << typeName << " &in)"; - r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, ss.str().c_str(), asFUNCTIONPR(add<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, ss.str().c_str(), + asFUNCTIONPR((add< dimension2d<T>, dimension2d<T>, dimension2d<T> >), (const dimension2d<T>&, const dimension2d<T>&), dimension2d<T>), asCALL_CDECL); assert(r >= 0); @@ -145,7 +108,8 @@ // Divide (/) ss.str(""); ss << typeName << " f(const " << typeName << " &in, const " << asType << ")"; - r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, ss.str().c_str(), asFUNCTIONPR(divide<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, ss.str().c_str(), + asFUNCTIONPR((divide< dimension2d<T>, dimension2d<T>, T >), (const dimension2d<T>&, const T&), dimension2d<T>), asCALL_CDECL); assert(r >= 0); @@ -161,9 +125,9 @@ ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; std::string declComparison = ss.str(); - r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< dimension2d<T> >, (const dimension2d<T>&, const dimension2d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< dimension2d<T> >, (const dimension2d<T>&, const dimension2d<T>&), bool), asCALL_CDECL); assert(r >= 0); // Bind dimension2d<T> class functions. @@ -210,4 +174,3 @@ } // End of File - Added: trunk/src/scripting/irrlicht/asIrrHelper.h =================================================================== --- trunk/src/scripting/irrlicht/asIrrHelper.h (rev 0) +++ trunk/src/scripting/irrlicht/asIrrHelper.h 2009-06-03 12:32:19 UTC (rev 52) @@ -0,0 +1,107 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asIrrHelper.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Contains various convenience functions which can be used +// for wrapping Irrlicht value types to AngelScript. +// +// License: Copyright (C) 2009 Michael Bartsch and Contributors +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASIRRHELPER_H__ +#define __ASIRRHELPER_H__ + +// Include files +#include "../../dependencies.h" + + +// Calculation functions. +//! An AngelScript wrapper function for the multiply behaviour. +//! @note For internal use only! +template<typename R, typename T1, typename T2> +R multiply(const T1 &a, const T2 &b) +{ + return a * b; +} + +//! An AngelScript wrapper function for the addition behaviour. +//! @note For internal use only! +template<typename R, typename T1, typename T2> +R add(const T1 &a, const T2 &b) +{ + return a + b; +} + +//! An AngelScript wrapper function for the substraction behaviour. +//! @note For internal use only! +template<typename R, typename T1, typename T2> +R substract(const T1 &a, const T2 &b) +{ + return a - b; +} + +//! An AngelScript wrapper function for the divide behaviour. +//! @note For internal use only! +template<typename R, typename T1, typename T2> +R divide(const T1 &a, const T2 &b) +{ + return a / b; +} + + +// Comparison functions. +//! An AngelScript wrapper function for the equal behaviour. +//! @note For internal use only! +template<typename T> +bool equal(const T &a, const T &b) +{ + return (a==b); +} + +//! An AngelScript wrapper function for the not-equal behaviour. +//! @note For internal use only! +template<typename T> +bool not_equal(const T &a, const T &b) +{ + return (a!=b); +} + +//! An AngelScript wrapper function for the less-than behaviour. +//! @note For internal use only! +template<typename T> +bool less_than(const T &a, const T &b) +{ + return (a<b); +} + +//! An AngelScript wrapper function for the greater-than behaviour. +//! @note For internal use only! +template<typename T> +bool greater_than(const T &a, const T &b) +{ + return (a>b); +} + +//! An AngelScript wrapper function for the less-or-equal behaviour. +//! @note For internal use only! +template<typename T> +bool l_equal(const T &a, const T &b) +{ + return (a<=b); +} + +//! An AngelScript wrapper function for the greater-or-equal behaviour. +//! @note For internal use only! +template<typename T> +bool g_equal(const T &a, const T &b) +{ + return (a>=b); +} + +#endif Modified: trunk/src/scripting/irrlicht/asMatrix4.cpp =================================================================== --- trunk/src/scripting/irrlicht/asMatrix4.cpp 2009-06-02 07:16:58 UTC (rev 51) +++ trunk/src/scripting/irrlicht/asMatrix4.cpp 2009-06-03 12:32:19 UTC (rev 52) @@ -14,6 +14,7 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asIrrHelper.h" #include "asMatrix4.h" #include "asVector3d.h" @@ -46,47 +47,7 @@ ((CMatrix4<T>*)memory)->~CMatrix4<T>(); } -//! An AngelScript wrapper function for the multiply behaviour. -//! @note For internal use only! -template<typename T> -CMatrix4<T> multiply(const CMatrix4<T> &a, const CMatrix4<T> &b) -{ - return a * b; -} -//! An AngelScript wrapper function for the addition behaviour. -//! @note For internal use only! -template<typename T> -CMatrix4<T> add(const CMatrix4<T> &a, const CMatrix4<T> &b) -{ - return a + b; -} - -//! An AngelScript wrapper function for the substraction behaviour. -//! @note For internal use only! -template<typename T> -CMatrix4<T> subtract(const CMatrix4<T> &a, const CMatrix4<T> &b) -{ - return a - b; -} - -//! An AngelScript wrapper function for the equal behaviour. -//! @note For internal use only! -template<typename T> -bool equal(const CMatrix4<T> &a, const CMatrix4<T> &b) -{ - return (a==b); -} - -//! An AngelScript wrapper function for the not-equal behaviour. -//! @note For internal use only! -template<typename T> -bool not_equal(const CMatrix4<T> &a, const CMatrix4<T> &b) -{ - return (a!=b); -} - - //! Binds CMatrix4<T> as a value type to AngelScript with the given template. //! @param engine Pointer to the AngelScript engine //! @param typeName The name of the object within AngelScript; @@ -137,7 +98,8 @@ CMatrix4<T>&), asCALL_THISCALL); assert(r >= 0); // Multiply (*) - r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), asFUNCTIONPR(multiply<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), + asFUNCTIONPR((multiply< CMatrix4<T>, CMatrix4<T>, CMatrix4<T> >), (const CMatrix4<T>&, const CMatrix4<T>&), CMatrix4<T>), asCALL_CDECL); assert(r >= 0); @@ -147,7 +109,8 @@ CMatrix4<T>&), asCALL_THISCALL); assert(r >= 0); // Add (+) - r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), asFUNCTIONPR(add<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), + asFUNCTIONPR((add< CMatrix4<T>, CMatrix4<T>, CMatrix4<T> >), (const CMatrix4<T>&, const CMatrix4<T>&), CMatrix4<T>), asCALL_CDECL); assert(r >= 0); @@ -157,7 +120,8 @@ CMatrix4<T>&), asCALL_THISCALL); assert(r >= 0); // Subtract (-) - r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), asFUNCTIONPR(subtract<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), + asFUNCTIONPR((substract< CMatrix4<T>, CMatrix4<T>, CMatrix4<T> >), (const CMatrix4<T>&, const CMatrix4<T>&), CMatrix4<T>), asCALL_CDECL); assert(r >= 0); @@ -171,9 +135,9 @@ ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; std::string declComparison = ss.str(); - r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< CMatrix4<T> >, (const CMatrix4<T>&, const CMatrix4<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< CMatrix4<T> >, (const CMatrix4<T>&, const CMatrix4<T>&), bool), asCALL_CDECL); assert(r >= 0); // Misc. behaviours. Modified: trunk/src/scripting/irrlicht/asSColor.cpp =================================================================== --- trunk/src/scripting/irrlicht/asSColor.cpp 2009-06-02 07:16:58 UTC (rev 51) +++ trunk/src/scripting/irrlicht/asSColor.cpp 2009-06-03 12:32:19 UTC (rev 52) @@ -14,6 +14,7 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asIrrHelper.h" #include "asSColor.h" @@ -50,35 +51,7 @@ ((SColor*)memory)->~SColor(); } -//! An AngelScript wrapper function for the addition behaviour. -//! @note For internal use only! -SColor add(const SColor &a, const SColor &b) -{ - return a + b; -} -//! An AngelScript wrapper function for the equal behaviour. -//! @note For internal use only! -bool equal(const SColor &a, const SColor &b) -{ - return (a==b); -} - -//! An AngelScript wrapper function for the not-equal behaviour. -//! @note For internal use only! -bool not_equal(const SColor &a, const SColor &b) -{ - return (a!=b); -} - -//! An AngelScript wrapper function for the less-than behaviour. -//! @note For internal use only! -bool less_than(const SColor &a, const SColor &b) -{ - return (a<b); -} - - //! Binds Irrlicht's SColor class. //! @param engine Pointer to the AngelScript engine void bindSColor(asIScriptEngine *engine) @@ -105,17 +78,18 @@ // Calculation behaviours. r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, "SColor f(const SColor &in, const SColor &in)", - asFUNCTIONPR(add, (const SColor&, const SColor&), SColor), + asFUNCTIONPR((add< SColor, SColor, SColor >), + (const SColor&, const SColor&), SColor), asCALL_CDECL); assert(r >= 0); // Comparison behaviours. std::string declComparison = "bool f(const SColor &in, const SColor &in)"; - r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal, + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<SColor>, (const SColor&, const SColor&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal, + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<SColor>, (const SColor&, const SColor&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_LESSTHAN, declComparison.c_str(), asFUNCTIONPR(less_than, + r = engine->RegisterGlobalBehaviour(asBEHAVE_LESSTHAN, declComparison.c_str(), asFUNCTIONPR(less_than<SColor>, (const SColor&, const SColor&), bool), asCALL_CDECL); assert(r >= 0); // Bind SColor class functions. Modified: trunk/src/scripting/irrlicht/asVector2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector2d.cpp 2009-06-02 07:16:58 UTC (rev 51) +++ trunk/src/scripting/irrlicht/asVector2d.cpp 2009-06-03 12:32:19 UTC (rev 52) @@ -14,6 +14,7 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asIrrHelper.h" #include "asVector2d.h" @@ -63,119 +64,7 @@ ((vector2d<T>*)memory)->~vector2d<T>(); } -//! An AngelScript wrapper function for the multiply behaviour. -//! @note For internal use only! -template<typename T> -vector2d<T> multiply(const vector2d<T> &a, const vector2d<T> &b) -{ - return a * b; -} -//! An AngelScript wrapper function for the multiply behaviour. -//! @note For internal use only! -template<typename T> -vector2d<T> multiply(const vector2d<T> &a, const T &b) -{ - return a * b; -} - -//! An AngelScript wrapper function for the addition behaviour. -//! @note For internal use only! -template<typename T> -vector2d<T> add(const vector2d<T> &a, const vector2d<T> &b) -{ - return a + b; -} - -//! An AngelScript wrapper function for the addition behaviour. -//! @note For internal use only! -template<typename T> -vector2d<T> add(const vector2d<T> &a, const T &b) -{ - return a + b; -} - -//! An AngelScript wrapper function for the substraction behaviour. -//! @note For internal use only! -template<typename T> -vector2d<T> subtract(const vector2d<T> &a, const vector2d<T> &b) -{ - return a - b; -} - -//! An AngelScript wrapper function for the substraction behaviour. -//! @note For internal use only! -template<typename T> -vector2d<T> subtract(const vector2d<T> &a, const T &b) -{ - return a - b; -} - -//! An AngelScript wrapper function for the divide behaviour. -//! @note For internal use only! -template<typename T> -vector2d<T> divide(const vector2d<T> &a, const vector2d<T> &b) -{ - return a / b; -} - -//! An AngelScript wrapper function for the divide behaviour. -//! @note For internal use only! -template<typename T> -vector2d<T> divide(const vector2d<T> &a, const T &b) -{ - return a / b; -} - -//! An AngelScript wrapper function for the equal behaviour. -//! @note For internal use only! -template<typename T> -bool equal(const vector2d<T> &a, const vector2d<T> &b) -{ - return (a==b); -} - -//! An AngelScript wrapper function for the not-equal behaviour. -//! @note For internal use only! -template<typename T> -bool not_equal(const vector2d<T> &a, const vector2d<T> &b) -{ - return (a!=b); -} - -//! An AngelScript wrapper function for the less-than behaviour. -//! @note For internal use only! -template<typename T> -bool less_than(const vector2d<T> &a, const vector2d<T> &b) -{ - return (a<b); -} - -//! An AngelScript wrapper function for the greater-than behaviour. -//! @note For internal use only! -template<typename T> -bool greater_than(const vector2d<T> &a, const vector2d<T> &b) -{ - return (a>b); -} - -//! An AngelScript wrapper function for the less-or-equal behaviour. -//! @note For internal use only! -template<typename T> -bool l_equal(const vector2d<T> &a, const vector2d<T> &b) -{ - return (a<=b); -} - -//! An AngelScript wrapper function for the greater-or-equal behaviour. -//! @note For internal use only! -template<typename T> -bool g_equal(const vector2d<T> &a, const vector2d<T> &b) -{ - return (a>=b); -} - - //! Binds vector2d<T> as a value type to AngelScript with the given template. //! @param engine Pointer to the AngelScript engine //! @param typeName The name of the object within AngelScript; @@ -236,10 +125,12 @@ vector2d<T>&), asCALL_THISCALL); assert(r >= 0); // Multiply (*) - r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), asFUNCTIONPR(multiply<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), + asFUNCTIONPR((multiply< vector2d<T>, vector2d<T>, vector2d<T> >), (const vector2d<T>&, const vector2d<T>&), vector2d<T>), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionValue.c_str(), asFUNCTIONPR(multiply<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionValue.c_str(), + asFUNCTIONPR((multiply< vector2d<T>, vector2d<T>, T >), (const vector2d<T>&, const T&), vector2d<T>), asCALL_CDECL); assert(r >= 0); @@ -252,10 +143,12 @@ asCALL_THISCALL); assert(r >= 0); // Add (+) - r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), asFUNCTIONPR(add<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), + asFUNCTIONPR((add< vector2d<T>, vector2d<T>, vector2d<T> >), (const vector2d<T>&, const vector2d<T>&), vector2d<T>), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionValue.c_str(), asFUNCTIONPR(add<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionValue.c_str(), + asFUNCTIONPR((add< vector2d<T>, vector2d<T>, T >), (const vector2d<T>&, const T&), vector2d<T>), asCALL_CDECL); assert(r >= 0); @@ -268,10 +161,12 @@ asCALL_THISCALL); assert(r >= 0); // Subtract (-) - r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), asFUNCTIONPR(subtract<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), + asFUNCTIONPR((substract< vector2d<T>, vector2d<T>, vector2d<T> >), (const vector2d<T>&, const vector2d<T>&), vector2d<T>), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionValue.c_str(), asFUNCTIONPR(subtract<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionValue.c_str(), + asFUNCTIONPR((substract< vector2d<T>, vector2d<T>, T >), (const vector2d<T>&, const T&), vector2d<T>), asCALL_CDECL); assert(r >= 0); @@ -284,10 +179,12 @@ asCALL_THISCALL); assert(r >= 0); // Divide (/) - r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionType.c_str(), asFUNCTIONPR(divide<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionType.c_str(), + asFUNCTIONPR((divide< vector2d<T>, vector2d<T>, vector2d<T> >), (const vector2d<T>&, const vector2d<T>&), vector2d<T>), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionValue.c_str(), asFUNCTIONPR(divide<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionValue.c_str(), + asFUNCTIONPR((divide< vector2d<T>, vector2d<T>, T >), (const vector2d<T>&, const T&), vector2d<T>), asCALL_CDECL); assert(r >= 0); @@ -304,17 +201,17 @@ ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; std::string declComparison = ss.str(); - r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< vector2d<T> >, (const vector2d<T>&, const vector2d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< vector2d<T> >, (const vector2d<T>&, const vector2d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_LESSTHAN, declComparison.c_str(), asFUNCTIONPR(less_than<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_LESSTHAN, declComparison.c_str(), asFUNCTIONPR(less_than< vector2d<T> >, (const vector2d<T>&, const vector2d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_GREATERTHAN, declComparison.c_str(), asFUNCTIONPR(greater_than<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_GREATERTHAN, declComparison.c_str(), asFUNCTIONPR(greater_than< vector2d<T> >, (const vector2d<T>&, const vector2d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_LEQUAL, declComparison.c_str(), asFUNCTIONPR(l_equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_LEQUAL, declComparison.c_str(), asFUNCTIONPR(l_equal< vector2d<T> >, (const vector2d<T>&, const vector2d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_GEQUAL, declComparison.c_str(), asFUNCTIONPR(g_equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_GEQUAL, declComparison.c_str(), asFUNCTIONPR(g_equal< vector2d<T> >, (const vector2d<T>&, const vector2d<T>&), bool), asCALL_CDECL); assert(r >= 0); // Bind vector2d<T> class functions. Modified: trunk/src/scripting/irrlicht/asVector3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector3d.cpp 2009-06-02 07:16:58 UTC (rev 51) +++ trunk/src/scripting/irrlicht/asVector3d.cpp 2009-06-03 12:32:19 UTC (rev 52) @@ -14,6 +14,7 @@ // ///////////////////////////////////////////////////////////////////////////// // Include files +#include "asIrrHelper.h" #include "asVector3d.h" @@ -63,119 +64,7 @@ ((vector3d<T>*)memory)->~vector3d<T>(); } -//! An AngelScript wrapper function for the multiply behaviour. -//! @note For internal use only! -template<typename T> -vector3d<T> multiply(const vector3d<T> &a, const vector3d<T> &b) -{ - return a * b; -} -//! An AngelScript wrapper function for the multiply behaviour. -//! @note For internal use only! -template<typename T> -vector3d<T> multiply(const vector3d<T> &a, const T &b) -{ - return a * b; -} - -//! An AngelScript wrapper function for the addition behaviour. -//! @note For internal use only! -template<typename T> -vector3d<T> add(const vector3d<T> &a, const vector3d<T> &b) -{ - return a + b; -} - -//! An AngelScript wrapper function for the addition behaviour. -//! @note For internal use only! -template<typename T> -vector3d<T> add(const vector3d<T> &a, const T &b) -{ - return a + b; -} - -//! An AngelScript wrapper function for the substraction behaviour. -//! @note For internal use only! -template<typename T> -vector3d<T> subtract(const vector3d<T> &a, const vector3d<T> &b) -{ - return a - b; -} - -//! An AngelScript wrapper function for the substraction behaviour. -//! @note For internal use only! -template<typename T> -vector3d<T> subtract(const vector3d<T> &a, const T &b) -{ - return a - b; -} - -//! An AngelScript wrapper function for the divide behaviour. -//! @note For internal use only! -template<typename T> -vector3d<T> divide(const vector3d<T> &a, const vector3d<T> &b) -{ - return a / b; -} - -//! An AngelScript wrapper function for the divide behaviour. -//! @note For internal use only! -template<typename T> -vector3d<T> divide(const vector3d<T> &a, const T &b) -{ - return a / b; -} - -//! An AngelScript wrapper function for the equal behaviour. -//! @note For internal use only! -template<typename T> -bool equal(const vector3d<T> &a, const vector3d<T> &b) -{ - return (a==b); -} - -//! An AngelScript wrapper function for the not-equal behaviour. -//! @note For internal use only! -template<typename T> -bool not_equal(const vector3d<T> &a, const vector3d<T> &b) -{ - return (a!=b); -} - -//! An AngelScript wrapper function for the less-than behaviour. -//! @note For internal use only! -template<typename T> -bool less_than(const vector3d<T> &a, const vector3d<T> &b) -{ - return (a<b); -} - -//! An AngelScript wrapper function for the greater-than behaviour. -//! @note For internal use only! -template<typename T> -bool greater_than(const vector3d<T> &a, const vector3d<T> &b) -{ - return (a>b); -} - -//! An AngelScript wrapper function for the less-or-equal behaviour. -//! @note For internal use only! -template<typename T> -bool l_equal(const vector3d<T> &a, const vector3d<T> &b) -{ - return (a<=b); -} - -//! An AngelScript wrapper function for the greater-or-equal behaviour. -//! @note For internal use only! -template<typename T> -bool g_equal(const vector3d<T> &a, const vector3d<T> &b) -{ - return (a>=b); -} - - //! Binds vector3d<T> as a value type to AngelScript with the given template. //! @param engine Pointer to the AngelScript engine //! @param typeName The name of the object within AngelScript; @@ -236,10 +125,12 @@ vector3d<T>&), asCALL_THISCALL); assert(r >= 0); // Multiply (*) - r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), asFUNCTIONPR(multiply<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), + asFUNCTIONPR((multiply< vector3d<T>, vector3d<T>, vector3d<T> >), (const vector3d<T>&, const vector3d<T>&), vector3d<T>), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionValue.c_str(), asFUNCTIONPR(multiply<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionValue.c_str(), + asFUNCTIONPR((multiply< vector3d<T>, vector3d<T>, T >), (const vector3d<T>&, const T&), vector3d<T>), asCALL_CDECL); assert(r >= 0); @@ -252,10 +143,12 @@ asCALL_THISCALL); assert(r >= 0); // Add (+) - r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), asFUNCTIONPR(add<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), + asFUNCTIONPR((add< vector3d<T>, vector3d<T>, vector3d<T> >), (const vector3d<T>&, const vector3d<T>&), vector3d<T>), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionValue.c_str(), asFUNCTIONPR(add<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionValue.c_str(), + asFUNCTIONPR((add< vector3d<T>, vector3d<T>, T >), (const vector3d<T>&, const T&), vector3d<T>), asCALL_CDECL); assert(r >= 0); @@ -268,10 +161,12 @@ asCALL_THISCALL); assert(r >= 0); // Subtract (-) - r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), asFUNCTIONPR(subtract<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), + asFUNCTIONPR((substract< vector3d<T>, vector3d<T>, vector3d<T> >), (const vector3d<T>&, const vector3d<T>&), vector3d<T>), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionValue.c_str(), asFUNCTIONPR(subtract<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionValue.c_str(), + asFUNCTIONPR((substract< vector3d<T>, vector3d<T>, T >), (const vector3d<T>&, const T&), vector3d<T>), asCALL_CDECL); assert(r >= 0); @@ -284,10 +179,12 @@ asCALL_THISCALL); assert(r >= 0); // Divide (/) - r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionType.c_str(), asFUNCTIONPR(divide<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionType.c_str(), + asFUNCTIONPR((divide< vector3d<T>, vector3d<T>, vector3d<T> >), (const vector3d<T>&, const vector3d<T>&), vector3d<T>), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionValue.c_str(), asFUNCTIONPR(divide<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionValue.c_str(), + asFUNCTIONPR((divide< vector3d<T>, vector3d<T>, T >), (const vector3d<T>&, const T&), vector3d<T>), asCALL_CDECL); assert(r >= 0); @@ -304,17 +201,17 @@ ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; std::string declComparison = ss.str(); - r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal< vector3d<T> >, (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal< vector3d<T> >, (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_LESSTHAN, declComparison.c_str(), asFUNCTIONPR(less_than<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_LESSTHAN, declComparison.c_str(), asFUNCTIONPR(less_than< vector3d<T> >, (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_GREATERTHAN, declComparison.c_str(), asFUNCTIONPR(greater_than<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_GREATERTHAN, declComparison.c_str(), asFUNCTIONPR(greater_than< vector3d<T> >, (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_LEQUAL, declComparison.c_str(), asFUNCTIONPR(l_equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_LEQUAL, declComparison.c_str(), asFUNCTIONPR(l_equal< vector3d<T> >, (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); - r = engine->RegisterGlobalBehaviour(asBEHAVE_GEQUAL, declComparison.c_str(), asFUNCTIONPR(g_equal<T>, + r = engine->RegisterGlobalBehaviour(asBEHAVE_GEQUAL, declComparison.c_str(), asFUNCTIONPR(g_equal< vector3d<T> >, (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); // Bind vector3d<T> class functions. @@ -435,4 +332,3 @@ } // End of File - Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-06-02 07:16:58 UTC (rev 51) +++ trunk/src/sirrf.cbp 2009-06-03 12:32:19 UTC (rev 52) @@ -113,6 +113,7 @@ <Unit filename="scripting/irrlicht/asAabbox3d.h" /> <Unit filename="scripting/irrlicht/asDimension2d.cpp" /> <Unit filename="scripting/irrlicht/asDimension2d.h" /> + <Unit filename="scripting/irrlicht/asIrrHelper.h" /> <Unit filename="scripting/irrlicht/asIrrlicht.cpp" /> <Unit filename="scripting/irrlicht/asIrrlicht.h" /> <Unit filename="scripting/irrlicht/asMatrix4.cpp" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-02 07:16:58 UTC (rev 51) +++ trunk/src/sirrf.depend 2009-06-03 12:32:19 UTC (rev 52) @@ -1134,7 +1134,7 @@ "../../dependencies.h" "../../core/EntityComponent.h" -1243891464 source:/home/michael/Programming/Projects/sirrf/src/components/scene/BillboardComponent.cpp +1243936383 source:/home/michael/Programming/Projects/sirrf/src/components/scene/BillboardComponent.cpp "BillboardComponent.h" "../../core/GameManager.h" @@ -1250,7 +1250,7 @@ 1216759683 /usr/local/include//AL/alc.h -1243891467 source:/home/michael/Programming/Projects/sirrf/src/sound/SoundManager.cpp +1243926043 source:/home/michael/Programming/Projects/sirrf/src/sound/SoundManager.cpp "SoundManager.h" "../core/GameManager.h" @@ -2381,7 +2381,8 @@ 1243891467 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.h "../../dependencies.h" -1243891467 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.cpp +1244031403 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.cpp + "asIrrHelper.h" "asVector2d.h" 1243891467 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h @@ -2399,23 +2400,27 @@ 1243891467 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.h "../../dependencies.h" -1243891467 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.cpp +1244031468 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.cpp + "asIrrHelper.h" "asVector3d.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.cpp +1244031816 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.cpp + "asIrrHelper.h" "asDimension2d.h" 1243891466 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.h "../../dependencies.h" -1243891466 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.cpp +1244029819 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.cpp + "asIrrHelper.h" "asAabbox3d.h" "asVector3d.h" 1243891466 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.h "../../dependencies.h" -1243891467 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asSColor.cpp +1244031750 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asSColor.cpp + "asIrrHelper.h" "asSColor.h" 1243891467 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asSColor.h @@ -2424,7 +2429,11 @@ 1243891467 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asMatrix4.h "../../dependencies.h" -1243891467 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asMatrix4.cpp +1244031980 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asMatrix4.cpp + "asIrrHelper.h" "asMatrix4.h" "asVector3d.h" +1244031441 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrHelper.h + "../../dependencies.h" + Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-06-02 07:16:58 UTC (rev 51) +++ trunk/src/sirrf.layout 2009-06-03 12:32:19 UTC (rev 52) @@ -11,10 +11,10 @@ <Cursor position="332" topLine="7" /> </File> <File name="components/scene/AnimatedMeshComponent.h" open="0" top="0" tabpos="6"> - <Cursor position="322" topLine="7" /> + <Cursor position="322" topLine="31" /> </File> <File name="components/scene/BillboardComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="326" topLine="7" /> + <Cursor position="1087" topLine="7" /> </File> <File name="components/scene/BillboardComponent.h" open="0" top="0" tabpos="0"> <Cursor position="316" topLine="7" /> @@ -23,7 +23,7 @@ <Cursor position="320" topLine="7" /> </File> <File name="components/scene/CameraComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="310" topLine="7" /> + <Cursor position="310" topLine="34" /> </File> <File name="components/scene/LightComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="318" topLine="7" /> @@ -53,7 +53,7 @@ <Cursor position="313" topLine="7" /> </File> <File name="components/scene/SceneComponent.h" open="0" top="0" tabpos="3"> - <Cursor position="308" topLine="0" /> + <Cursor position="308" topLine="45" /> </File> <File name="components/scene/SkyBoxComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="369" topLine="8" /> @@ -74,10 +74,10 @@ <Cursor position="312" topLine="7" /> </File> <File name="components/scene/TextBillboardComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="334" topLine="7" /> + <Cursor position="1541" topLine="28" /> </File> <File name="components/scene/TextBillboardComponent.h" open="0" top="0" tabpos="2"> - <Cursor position="324" topLine="7" /> + <Cursor position="324" topLine="16" /> </File> <File name="components/sound/SoundListenerComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="319" topLine="7" /> @@ -125,9 +125,9 @@ <Cursor position="384" topLine="0" /> </File> <File name="core/EventManager.h" open="0" top="0" tabpos="0"> - <Cursor position="305" topLine="7" /> + <Cursor position="1211" topLine="19" /> </File> - <File name="core/GameManager.cpp" open="1" top="1" tabpos="1"> + <File name="core/GameManager.cpp" open="0" top="0" tabpos="1"> <Cursor position="517" topLine="19" /> </File> <File name="core/GameManager.h" open="0" top="0" tabpos="0"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-02 07:17:01
|
Revision: 51 http://sirrf.svn.sourceforge.net/sirrf/?rev=51&view=rev Author: zccdark203 Date: 2009-06-02 07:16:58 +0000 (Tue, 02 Jun 2009) Log Message: ----------- FuzzYspo0N from the Irrlicht community made some bug-fixes. Thanks to this Sirrf should now run on Windows. And of course it also raises the quality of the source code. Modified Paths: -------------- trunk/src/components/components.cpp trunk/src/components/components.h trunk/src/components/scene/AnimatedMeshComponent.cpp trunk/src/components/scene/AnimatedMeshComponent.h trunk/src/components/scene/BillboardComponent.cpp trunk/src/components/scene/BillboardComponent.h trunk/src/components/scene/CameraComponent.cpp trunk/src/components/scene/CameraComponent.h trunk/src/components/scene/LightComponent.cpp trunk/src/components/scene/LightComponent.h trunk/src/components/scene/MeshComponent.cpp trunk/src/components/scene/MeshComponent.h trunk/src/components/scene/OctTreeComponent.cpp trunk/src/components/scene/OctTreeComponent.h trunk/src/components/scene/ParticleSysComponent.cpp trunk/src/components/scene/ParticleSysComponent.h trunk/src/components/scene/SceneComponent.cpp trunk/src/components/scene/SceneComponent.h trunk/src/components/scene/SkyBoxComponent.cpp trunk/src/components/scene/SkyBoxComponent.h trunk/src/components/scene/SkyDomeComponent.cpp trunk/src/components/scene/SkyDomeComponent.h trunk/src/components/scene/TerrainComponent.cpp trunk/src/components/scene/TerrainComponent.h trunk/src/components/scene/TextBillboardComponent.cpp trunk/src/components/scene/TextBillboardComponent.h trunk/src/components/sound/SoundListenerComponent.cpp trunk/src/components/sound/SoundListenerComponent.h trunk/src/components/sound/SoundSourceComponent.cpp trunk/src/components/sound/SoundSourceComponent.h trunk/src/core/DataStack.cpp trunk/src/core/DataStack.h trunk/src/core/DataStore.cpp trunk/src/core/DataStore.h trunk/src/core/Entity.cpp trunk/src/core/Entity.h trunk/src/core/EntityComponent.cpp trunk/src/core/EntityComponent.h trunk/src/core/EntityManager.cpp trunk/src/core/EntityManager.h trunk/src/core/EventManager.cpp trunk/src/core/EventManager.h trunk/src/core/GameManager.cpp trunk/src/core/GameManager.h trunk/src/core/GameState.cpp trunk/src/core/GameState.h trunk/src/dependencies.h trunk/src/main.cpp trunk/src/scripting/Script.cpp trunk/src/scripting/Script.h trunk/src/scripting/ScriptManager.cpp trunk/src/scripting/ScriptManager.h trunk/src/scripting/irrlicht/asAabbox3d.cpp trunk/src/scripting/irrlicht/asAabbox3d.h trunk/src/scripting/irrlicht/asDimension2d.cpp trunk/src/scripting/irrlicht/asDimension2d.h trunk/src/scripting/irrlicht/asIrrlicht.cpp trunk/src/scripting/irrlicht/asIrrlicht.h trunk/src/scripting/irrlicht/asMatrix4.cpp trunk/src/scripting/irrlicht/asMatrix4.h trunk/src/scripting/irrlicht/asSColor.cpp trunk/src/scripting/irrlicht/asSColor.h trunk/src/scripting/irrlicht/asVector2d.cpp trunk/src/scripting/irrlicht/asVector2d.h trunk/src/scripting/irrlicht/asVector3d.cpp trunk/src/scripting/irrlicht/asVector3d.h trunk/src/sirrf.cbp trunk/src/sirrf.depend trunk/src/sirrf.layout trunk/src/sound/SoundManager.cpp trunk/src/sound/SoundManager.h Added Paths: ----------- trunk/CONTRIBUTORS Added: trunk/CONTRIBUTORS =================================================================== --- trunk/CONTRIBUTORS (rev 0) +++ trunk/CONTRIBUTORS 2009-06-02 07:16:58 UTC (rev 51) @@ -0,0 +1,8 @@ +========================================================================== +Sirrf version 0.10 (SVN) - Contributors +========================================================================== + + Please also note contributors who have contributed to the framework: + + FuzzYspo0N - Made various small bug-fixes in order to + let Sirrf run on the Windows platform; Modified: trunk/src/components/components.cpp =================================================================== --- trunk/src/components/components.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/components.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Control functions for derived EntityComponent classes. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/components.h =================================================================== --- trunk/src/components/components.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/components.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Header file with all components. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/AnimatedMeshComponent.cpp =================================================================== --- trunk/src/components/scene/AnimatedMeshComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/AnimatedMeshComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of Irrlicht's IAnimatedMeshSceneNode. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. @@ -115,7 +115,7 @@ } // Returns the current displayed frame number. -s32 AnimatedMeshComponent::getFrame() const +f32 AnimatedMeshComponent::getFrame() const { return mAnimatedMeshSN->getFrameNr(); } @@ -145,7 +145,7 @@ } // Sets the current frame number. -void AnimatedMeshComponent::setCurrentFrame(s32 frame) +void AnimatedMeshComponent::setCurrentFrame(f32 frame) { mAnimatedMeshSN->setCurrentFrame(frame); } @@ -246,14 +246,14 @@ r = engine->RegisterObjectMethod("AnimatedMeshComponent", "s32 getEndFrame()", asMETHOD(AnimatedMeshComponent, getEndFrame), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "s32 getFrame()", + r = engine->RegisterObjectMethod("AnimatedMeshComponent", "f32 getFrame()", asMETHOD(AnimatedMeshComponent, getFrame), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("AnimatedMeshComponent", "s32 getStartFrame()", asMETHOD(AnimatedMeshComponent, getStartFrame), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setAnimationSpeed(f32)", asMETHOD(AnimatedMeshComponent, setAnimationSpeed), asCALL_THISCALL); assert(r >= 0); - r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setCurrentFrame(s32)", + r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setCurrentFrame(f32)", asMETHOD(AnimatedMeshComponent, setCurrentFrame), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("AnimatedMeshComponent", "void setFrameLoop(s32, s32)", asMETHOD(AnimatedMeshComponent, setFrameLoop), asCALL_THISCALL); assert(r >= 0); Modified: trunk/src/components/scene/AnimatedMeshComponent.h =================================================================== --- trunk/src/components/scene/AnimatedMeshComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/AnimatedMeshComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the AnimatedMeshComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. @@ -47,13 +47,13 @@ void animate(); s32 getEndFrame() const; - s32 getFrame() const; + f32 getFrame() const; IMesh* getMesh(); IShadowVolumeSceneNode* getShadowVolumeSceneNode(); s32 getStartFrame() const; void setAnimationSpeed(f32 speed); - void setCurrentFrame(s32 frame); + void setCurrentFrame(f32 frame); void setFrameLoop(s32 start, s32 end); void setLoopMode(bool value); void setMD2Animation(const std::string &animationName); Modified: trunk/src/components/scene/BillboardComponent.cpp =================================================================== --- trunk/src/components/scene/BillboardComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/BillboardComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of Irrlicht's IBillboardSceneNode. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/BillboardComponent.h =================================================================== --- trunk/src/components/scene/BillboardComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/BillboardComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the BillboardComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/CameraComponent.cpp =================================================================== --- trunk/src/components/scene/CameraComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/CameraComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of Irrlicht's ICameraSceneNode. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/CameraComponent.h =================================================================== --- trunk/src/components/scene/CameraComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/CameraComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the CameraComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/LightComponent.cpp =================================================================== --- trunk/src/components/scene/LightComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/LightComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of Irrlicht's ILightSceneNode. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/LightComponent.h =================================================================== --- trunk/src/components/scene/LightComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/LightComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the LightComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/MeshComponent.cpp =================================================================== --- trunk/src/components/scene/MeshComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/MeshComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of Irrlicht's IMeshSceneNode. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/MeshComponent.h =================================================================== --- trunk/src/components/scene/MeshComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/MeshComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the MeshComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/OctTreeComponent.cpp =================================================================== --- trunk/src/components/scene/OctTreeComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/OctTreeComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -6,7 +6,7 @@ // Desc : Component wrapper of Irrlicht's SceneManager function // addOctTreeSceneNode(...). // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/OctTreeComponent.h =================================================================== --- trunk/src/components/scene/OctTreeComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/OctTreeComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the OctTreeComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/ParticleSysComponent.cpp =================================================================== --- trunk/src/components/scene/ParticleSysComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/ParticleSysComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of Irrlicht's IParticleSystemSceneNode. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/ParticleSysComponent.h =================================================================== --- trunk/src/components/scene/ParticleSysComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/ParticleSysComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the ParticleSysComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/SceneComponent.cpp =================================================================== --- trunk/src/components/scene/SceneComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/SceneComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of Irrlicht's ISceneNode. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/SceneComponent.h =================================================================== --- trunk/src/components/scene/SceneComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/SceneComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the SceneComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/SkyBoxComponent.cpp =================================================================== --- trunk/src/components/scene/SkyBoxComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/SkyBoxComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -6,7 +6,7 @@ // Desc : Component wrapper of Irrlicht's SceneManager function // addSkyBoxSceneNode(...). // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/SkyBoxComponent.h =================================================================== --- trunk/src/components/scene/SkyBoxComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/SkyBoxComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the SkyBoxComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/SkyDomeComponent.cpp =================================================================== --- trunk/src/components/scene/SkyDomeComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/SkyDomeComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -6,7 +6,7 @@ // Desc : Component wrapper of Irrlicht's SceneManager function // addSkyDomeSceneNode(...). // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/SkyDomeComponent.h =================================================================== --- trunk/src/components/scene/SkyDomeComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/SkyDomeComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the SkyDomeComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/TerrainComponent.cpp =================================================================== --- trunk/src/components/scene/TerrainComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/TerrainComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of Irrlicht's ITerrainSceneNode. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/TerrainComponent.h =================================================================== --- trunk/src/components/scene/TerrainComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/TerrainComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the TerrainComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/scene/TextBillboardComponent.cpp =================================================================== --- trunk/src/components/scene/TextBillboardComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/TextBillboardComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of Irrlicht's IBillboardTextSceneNode. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. @@ -72,11 +72,9 @@ IGUIEnvironment *pGUIEnv = GameManager::Instance()->getGUIEnvironment(); // Create the internal scene node. - wchar_t wchartBuffer[text.length()+1]; - mbstowcs(wchartBuffer, text.c_str(), text.length()+1); - + core::stringw wBuffer = core::stringw(text.c_str()); mBillboardTextSN = pSceneMgr->addBillboardTextSceneNode(pGUIEnv->getFont(fontFilename.c_str()), - wchartBuffer, 0, size, + wBuffer.c_str(), 0, size, parent->getPosition(), parent->getID(), colorTop, colorBottom); mBillboardSN = mBillboardTextSN; @@ -121,10 +119,8 @@ // Sets the text string. void TextBillboardComponent::setText(const std::string &text) { - wchar_t wchartBuffer[text.length()+2]; - mbstowcs(wchartBuffer, text.c_str(), text.length()+1); - - mBillboardTextSN->setText(wchartBuffer); + core::stringw wBuffer = core::stringw(text.c_str()); + mBillboardTextSN->setText(wBuffer.c_str()); } // Sets the text string. Modified: trunk/src/components/scene/TextBillboardComponent.h =================================================================== --- trunk/src/components/scene/TextBillboardComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/scene/TextBillboardComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the TextBillboardComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/sound/SoundListenerComponent.cpp =================================================================== --- trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/sound/SoundListenerComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of SFML's sf::Listener. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/sound/SoundListenerComponent.h =================================================================== --- trunk/src/components/sound/SoundListenerComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/sound/SoundListenerComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the SoundListenerComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/sound/SoundSourceComponent.cpp =================================================================== --- trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/sound/SoundSourceComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Component wrapper of SFML's sf::Music. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/components/sound/SoundSourceComponent.h =================================================================== --- trunk/src/components/sound/SoundSourceComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/components/sound/SoundSourceComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the SoundSourceComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/DataStack.cpp =================================================================== --- trunk/src/core/DataStack.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/DataStack.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -8,7 +8,7 @@ // framework. Furthermore it's also possible to save these // variables into files. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. @@ -164,7 +164,7 @@ // Read from the file. file.seekg(0); - for(unsigned int i = 0; i < fSize; i++) + for(long i = 0; i < fSize; i++) fBuffer += file.get(); // Indentify the file as Bencoded Data Stack. Modified: trunk/src/core/DataStack.h =================================================================== --- trunk/src/core/DataStack.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/DataStack.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the DataStack class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/DataStore.cpp =================================================================== --- trunk/src/core/DataStore.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/DataStore.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -6,7 +6,7 @@ // Desc : The DataStore class manages the DataStacks that are being // used by the framework. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/DataStore.h =================================================================== --- trunk/src/core/DataStore.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/DataStore.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the DataStore class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/Entity.cpp =================================================================== --- trunk/src/core/Entity.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/Entity.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/Entity.h =================================================================== --- trunk/src/core/Entity.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/Entity.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the Entity class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/EntityComponent.cpp =================================================================== --- trunk/src/core/EntityComponent.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/EntityComponent.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/EntityComponent.h =================================================================== --- trunk/src/core/EntityComponent.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/EntityComponent.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the EntityComponent class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/EntityManager.cpp =================================================================== --- trunk/src/core/EntityManager.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/EntityManager.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -6,7 +6,7 @@ // Desc : The Entity Manager is the central interface point to all // entity related functions of this program. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/EntityManager.h =================================================================== --- trunk/src/core/EntityManager.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/EntityManager.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the EntityManager class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/EventManager.cpp =================================================================== --- trunk/src/core/EventManager.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/EventManager.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -6,7 +6,7 @@ // Desc : The Event Manager is the central interface point to all // event related functions of this program. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/EventManager.h =================================================================== --- trunk/src/core/EventManager.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/EventManager.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the EventManager class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/GameManager.cpp =================================================================== --- trunk/src/core/GameManager.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/GameManager.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -8,7 +8,7 @@ // deinitialisation. It's main purpose though is to control // the flow of the game. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/GameManager.h =================================================================== --- trunk/src/core/GameManager.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/GameManager.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the GameManager class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/GameState.cpp =================================================================== --- trunk/src/core/GameState.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/GameState.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -6,7 +6,7 @@ // Desc : The GameState object is a base class which is implemented // through derived sub-classes. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/core/GameState.h =================================================================== --- trunk/src/core/GameState.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/core/GameState.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the GameState class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/dependencies.h =================================================================== --- trunk/src/dependencies.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/dependencies.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Header file with all external dependencies. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/main.cpp =================================================================== --- trunk/src/main.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/main.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : This is the main file in which we'll start the application. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This software is provided 'as-is', without any express or // implied warranty. In no event will the authors be held Modified: trunk/src/scripting/Script.cpp =================================================================== --- trunk/src/scripting/Script.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/Script.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -6,7 +6,7 @@ // Desc : The Script class is technically a wrapper for every // AngelScript file that is loaded by the framework. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/Script.h =================================================================== --- trunk/src/scripting/Script.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/Script.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the Script class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/ScriptManager.cpp =================================================================== --- trunk/src/scripting/ScriptManager.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/ScriptManager.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -6,7 +6,7 @@ // Desc : The Script Manager is the central interface point to all // script related functions of this program. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. @@ -123,7 +123,8 @@ IFileSystem *fileSystem = GameManager::Instance()->getDevice()->getFileSystem(); // Retrieve base name. - std::string fileBase = (fileSystem->getFileBasename(fileName.c_str())).c_str(); + core::stringw wFilename = core::stringw(fileName.c_str()); + std::string fileBase = (fileSystem->getFileBasename(wFilename)).c_str(); // Look if a script with given name doesn't already exist. if(getScript(fileBase)) Modified: trunk/src/scripting/ScriptManager.h =================================================================== --- trunk/src/scripting/ScriptManager.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/ScriptManager.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Declaration of the ScriptManager class. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asAabbox3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asAabbox3d.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asAabbox3d.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the aabbox3d<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. @@ -242,4 +242,3 @@ } // End of File - Modified: trunk/src/scripting/irrlicht/asAabbox3d.h =================================================================== --- trunk/src/scripting/irrlicht/asAabbox3d.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asAabbox3d.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the aabboxd<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asDimension2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asDimension2d.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asDimension2d.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the dimension2d<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asDimension2d.h =================================================================== --- trunk/src/scripting/irrlicht/asDimension2d.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asDimension2d.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the dimension2d<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asIrrlicht.cpp =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds various Irrlicht objects to AngelScript. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asIrrlicht.h =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asIrrlicht.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds various Irrlicht objects to AngelScript. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asMatrix4.cpp =================================================================== --- trunk/src/scripting/irrlicht/asMatrix4.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asMatrix4.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the CMatrix4<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asMatrix4.h =================================================================== --- trunk/src/scripting/irrlicht/asMatrix4.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asMatrix4.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the CMatrix4<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asSColor.cpp =================================================================== --- trunk/src/scripting/irrlicht/asSColor.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asSColor.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the SColor class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asSColor.h =================================================================== --- trunk/src/scripting/irrlicht/asSColor.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asSColor.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the SColor class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asVector2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector2d.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asVector2d.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the vector2d<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asVector2d.h =================================================================== --- trunk/src/scripting/irrlicht/asVector2d.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asVector2d.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the vector2d<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asVector3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector3d.cpp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asVector3d.cpp 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the vector3d<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/scripting/irrlicht/asVector3d.h =================================================================== --- trunk/src/scripting/irrlicht/asVector3d.h 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/scripting/irrlicht/asVector3d.h 2009-06-02 07:16:58 UTC (rev 51) @@ -5,7 +5,7 @@ // // Desc : Binds the vector3d<T> class from the Irrlicht engine. // -// License: Copyright (C) 2009 Michael Bartsch +// License: Copyright (C) 2009 Michael Bartsch and Contributors // // This program is free software: you can redistribute it // and/or modify it under the terms of the zlib/libpng License. Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/sirrf.cbp 2009-06-02 07:16:58 UTC (rev 51) @@ -12,6 +12,7 @@ <Option type="1" /> <Option compiler="gcc" /> <Compiler> + <Add option="-pedantic" /> <Add option="-g" /> <Add directory="/usr/local/include/" /> <Add directory="/usr/local/include/irrlicht-svn2329" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-01 15:18:59 UTC (rev 50) +++ trunk/src/sirrf.depend 2009-06-02 07:16:58 UTC (rev 51) @@ -989,15 +989,15 @@ <assert.h> "scriptstring.h" -1243451281 source:/home/michael/Programming/Projects/sirrf/src/core/DataStack.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/DataStack.cpp "DataStack.h" "GameManager.h" -1243451281 /home/michael/Programming/Projects/sirrf/src/core/DataStack.h +1243891466 /home/michael/Programming/Projects/sirrf/src/core/DataStack.h "../dependencies.h" "DataStore.h" -1243791640 /home/michael/Programming/Projects/sirrf/src/dependencies.h +1243891466 /home/michael/Programming/Projects/sirrf/src/dependencies.h <assert.h> <stddef.h> <fstream> @@ -1013,42 +1013,42 @@ <SFML/System.hpp> <SFML/Audio.hpp> -1243271618 /home/michael/Programming/Projects/sirrf/src/core/DataStore.h +1243891466 /home/michael/Programming/Projects/sirrf/src/core/DataStore.h "../dependencies.h" "DataStack.h" -1243451282 source:/home/michael/Programming/Projects/sirrf/src/core/DataStore.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/DataStore.cpp "DataStore.h" -1243451608 source:/home/michael/Programming/Projects/sirrf/src/core/Entity.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/Entity.cpp "Entity.h" "GameManager.h" -1243271665 /home/michael/Programming/Projects/sirrf/src/core/Entity.h +1243891466 /home/michael/Programming/Projects/sirrf/src/core/Entity.h "../dependencies.h" "EntityComponent.h" -1243691973 /home/michael/Programming/Projects/sirrf/src/core/EntityComponent.h +1243891466 /home/michael/Programming/Projects/sirrf/src/core/EntityComponent.h "../dependencies.h" "Entity.h" "../scripting/ScriptManager.h" -1243774766 source:/home/michael/Programming/Projects/sirrf/src/core/EntityComponent.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/EntityComponent.cpp "EntityComponent.h" -1243451609 source:/home/michael/Programming/Projects/sirrf/src/core/EntityManager.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/EntityManager.cpp "EntityManager.h" "GameManager.h" -1243004384 /home/michael/Programming/Projects/sirrf/src/core/EntityManager.h +1243891466 /home/michael/Programming/Projects/sirrf/src/core/EntityManager.h "../dependencies.h" "Entity.h" -1243867473 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp "GameManager.h" "../components/components.h" -1243853944 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h +1243891466 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h "../dependencies.h" "GameState.h" "DataStore.h" @@ -1058,29 +1058,29 @@ "../scripting/ScriptManager.h" "../components/components.h" -1243271961 /home/michael/Programming/Projects/sirrf/src/core/GameState.h +1243891466 /home/michael/Programming/Projects/sirrf/src/core/GameState.h "GameManager.h" 1241010330 /home/michael/Programming/Projects/sirrf/src/core/ScriptManager.h "../dependencies.h" "../angelscript/add_on/scriptstring/scriptstring.h" -1243451609 source:/home/michael/Programming/Projects/sirrf/src/core/GameState.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/GameState.cpp "GameState.h" 1241017939 source:/home/michael/Programming/Projects/sirrf/src/core/ScriptManager.cpp "ScriptManager.h" "GameManager.h" -1242995529 source:/home/michael/Programming/Projects/sirrf/src/main.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/main.cpp "core/GameManager.h" 1240939945 source:/home/michael/Programming/Projects/sirrf/src/core/EventSubscriber.cpp -1243691838 source:/home/michael/Programming/Projects/sirrf/src/core/EventManager.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/core/EventManager.cpp "EventManager.h" -1243691838 /home/michael/Programming/Projects/sirrf/src/core/EventManager.h +1243891466 /home/michael/Programming/Projects/sirrf/src/core/EventManager.h "../dependencies.h" 1240941730 /home/michael/Programming/Projects/sirrf/src/core/EventSubscriber.h @@ -1098,7 +1098,7 @@ <windows.h> <pthread.h> -1243853944 /home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.h +1243891466 /home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.h "../dependencies.h" "scriptstring.h" "Script.h" @@ -1107,7 +1107,7 @@ <angelscript.h> <string> -1243782795 source:/home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.cpp "ScriptManager.h" "irrlicht/asIrrlicht.h" "../core/GameManager.h" @@ -1126,27 +1126,27 @@ "scriptstring.h" <string.h> -1243452824 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.cpp +1243891465 source:/home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.cpp "SceneComponent.h" "../../core/GameManager.h" -1243692206 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h +1243891465 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h "../../dependencies.h" "../../core/EntityComponent.h" -1243452840 source:/home/michael/Programming/Projects/sirrf/src/components/scene/BillboardComponent.cpp +1243891464 source:/home/michael/Programming/Projects/sirrf/src/components/scene/BillboardComponent.cpp "BillboardComponent.h" "../../core/GameManager.h" -1243452841 /home/michael/Programming/Projects/sirrf/src/components/scene/BillboardComponent.h +1243891464 /home/michael/Programming/Projects/sirrf/src/components/scene/BillboardComponent.h "../../dependencies.h" "SceneComponent.h" -1243452855 source:/home/michael/Programming/Projects/sirrf/src/components/scene/TextBillboardComponent.cpp +1243891466 source:/home/michael/Programming/Projects/sirrf/src/components/scene/TextBillboardComponent.cpp "TextBillboardComponent.h" "../../core/GameManager.h" -1243432728 /home/michael/Programming/Projects/sirrf/src/components/scene/TextBillboardComponent.h +1243891466 /home/michael/Programming/Projects/sirrf/src/components/scene/TextBillboardComponent.h "../../dependencies.h" "BillboardComponent.h" @@ -1158,11 +1158,11 @@ "../../dependencies.h" "SceneComponent.h" -1243451607 source:/home/michael/Programming/Projects/sirrf/src/components/scene/MeshComponent.cpp +1243891464 source:/home/michael/Programming/Projects/sirrf/src/components/scene/MeshComponent.cpp "MeshComponent.h" "../../core/GameManager.h" -1243446359 /home/michael/Programming/Projects/sirrf/src/components/scene/MeshComponent.h +1243891464 /home/michael/Programming/Projects/sirrf/src/components/scene/MeshComponent.h "../../dependencies.h" "SceneComponent.h" @@ -1172,43 +1172,43 @@ 1241639151 source:/home/michael/Programming/Projects/sirrf/src/core/support.cpp "support.h" -1243451607 source:/home/michael/Programming/Projects/sirrf/src/components/scene/LightComponent.cpp +1243891464 source:/home/michael/Programming/Projects/sirrf/src/components/scene/LightComponent.cpp "LightComponent.h" "../../core/GameManager.h" -1243449116 /home/michael/Programming/Projects/sirrf/src/components/scene/LightComponent.h +1243891464 /home/michael/Programming/Projects/sirrf/src/components/scene/LightComponent.h "../../dependencies.h" "SceneComponent.h" -1243454092 source:/home/michael/Programming/Projects/sirrf/src/components/scene/AnimatedMeshComponent.cpp +1243891464 source:/home/michael/Programming/Projects/sirrf/src/components/scene/AnimatedMeshCo... [truncated message content] |
From: <zcc...@us...> - 2009-06-01 15:19:01
|
Revision: 50 http://sirrf.svn.sourceforge.net/sirrf/?rev=50&view=rev Author: zccdark203 Date: 2009-06-01 15:18:59 +0000 (Mon, 01 Jun 2009) Log Message: ----------- This revision adds the AngelScript binding of Irrlicht's CMatrix4<T> class, which is the last class that was needed in order to make AngelScript scripts run normally. Modified Paths: -------------- trunk/src/scripting/irrlicht/asIrrlicht.cpp trunk/src/sirrf.cbp trunk/src/sirrf.depend trunk/src/sirrf.layout Added Paths: ----------- trunk/src/scripting/irrlicht/asMatrix4.cpp trunk/src/scripting/irrlicht/asMatrix4.h Modified: trunk/src/scripting/irrlicht/asIrrlicht.cpp =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-01 12:54:38 UTC (rev 49) +++ trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-01 15:18:59 UTC (rev 50) @@ -20,25 +20,9 @@ #include "asVector2d.h" #include "asVector3d.h" #include "asAabbox3d.h" +#include "asMatrix4.h" -// CMatrix4<T> binding. -template<typename T> -void bindMatrix4(asIScriptEngine *engine, const char *typeName, const char *asType) -{ - // Forward declarations. - int r; - - // Bind CMatrix4<T> class. - r = engine->RegisterObjectType(typeName, sizeof(CMatrix4<T>), asOBJ_REF); assert(r >= 0); - - // Set CMatrix4<T> behaviour. - - - // Bind CMatrix4<T> class functions. - -} - // Enumerations // E_CULLING_TYPE void bindE_CULLING_TYPE(asIScriptEngine *engine) @@ -309,13 +293,11 @@ { // Vector3d<T> bindDimension2d(engine); - - bindMatrix4<f32>(engine, "matrix4", "f32"); - bindSColor(engine); bindVector2d(engine); bindVector3d(engine); bindAabbox3d(engine); + bindMatrix4(engine); // Enumerations bindE_CULLING_TYPE(engine); Added: trunk/src/scripting/irrlicht/asMatrix4.cpp =================================================================== --- trunk/src/scripting/irrlicht/asMatrix4.cpp (rev 0) +++ trunk/src/scripting/irrlicht/asMatrix4.cpp 2009-06-01 15:18:59 UTC (rev 50) @@ -0,0 +1,341 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asMatrix4.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the CMatrix4<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "asMatrix4.h" +#include "asVector3d.h" + + +// CMatrix4<T> behaviour functions. +//! An AngelScript wrapper function so that CMatrix4<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(void *memory) +{ + new (memory) CMatrix4<T>(); +} + +//! An AngelScript wrapper function so that CMatrix4<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const CMatrix4<T> &other, void *memory) +{ + new (memory) CMatrix4<T>(other); +} + +//! An AngelScript wrapper function so that CMatrix4<T> objects can be +//! deconstructed within AngelScript. +//! @note For internal use only! +template<typename T> +void deconstructor(void *memory) +{ + ((CMatrix4<T>*)memory)->~CMatrix4<T>(); +} + +//! An AngelScript wrapper function for the multiply behaviour. +//! @note For internal use only! +template<typename T> +CMatrix4<T> multiply(const CMatrix4<T> &a, const CMatrix4<T> &b) +{ + return a * b; +} + +//! An AngelScript wrapper function for the addition behaviour. +//! @note For internal use only! +template<typename T> +CMatrix4<T> add(const CMatrix4<T> &a, const CMatrix4<T> &b) +{ + return a + b; +} + +//! An AngelScript wrapper function for the substraction behaviour. +//! @note For internal use only! +template<typename T> +CMatrix4<T> subtract(const CMatrix4<T> &a, const CMatrix4<T> &b) +{ + return a - b; +} + +//! An AngelScript wrapper function for the equal behaviour. +//! @note For internal use only! +template<typename T> +bool equal(const CMatrix4<T> &a, const CMatrix4<T> &b) +{ + return (a==b); +} + +//! An AngelScript wrapper function for the not-equal behaviour. +//! @note For internal use only! +template<typename T> +bool not_equal(const CMatrix4<T> &a, const CMatrix4<T> &b) +{ + return (a!=b); +} + + +//! Binds CMatrix4<T> as a value type to AngelScript with the given template. +//! @param engine Pointer to the AngelScript engine +//! @param typeName The name of the object within AngelScript; +//! @param asType The AngelScript name of the used template; +template<typename T> +void bindMatrix4T(asIScriptEngine *engine, const char *typeName, const char *asType) +{ + // Forward declarations. + int r; + std::stringstream ss; + + // Bind CMatrix4<T> class. + r = engine->RegisterObjectType(typeName, sizeof(CMatrix4<T>), asOBJ_VALUE | asOBJ_APP_CLASS_CDA); assert(r >= 0); + + // Set CMatrix4<T> behaviour. + // Initialisation and deinitialisation + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor<T>, + (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << typeName << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const CMatrix4<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor<T>), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + // Calculation behaviours. + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declActionType = ss.str(); + + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, " << asType << ")"; + std::string declActionValue = ss.str(); + + ss.str(""); + ss << typeName << "& f(const " << typeName << " &in)"; + std::string declAssignType = ss.str(); + + ss.str(""); + ss << typeName << "& f(const " << asType << ")"; + std::string declAssignValue = ss.str(); + + // Assignment + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ASSIGNMENT, declAssignType.c_str(), + asMETHODPR(CMatrix4<T>, operator=, (const CMatrix4<T>&), + CMatrix4<T>&), asCALL_THISCALL); assert(r >= 0); + + // Multiply (*) + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), asFUNCTIONPR(multiply<T>, + (const CMatrix4<T>&, const CMatrix4<T>&), CMatrix4<T>), + asCALL_CDECL); assert(r >= 0); + + // Multiply Assign (*=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_MUL_ASSIGN, declAssignType.c_str(), + asMETHODPR(CMatrix4<T>, operator*=, (const CMatrix4<T>&), + CMatrix4<T>&), asCALL_THISCALL); assert(r >= 0); + + // Add (+) + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), asFUNCTIONPR(add<T>, + (const CMatrix4<T>&, const CMatrix4<T>&), CMatrix4<T>), + asCALL_CDECL); assert(r >= 0); + + // Add Assign (+=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, declAssignType.c_str(), + asMETHODPR(CMatrix4<T>, operator+=, (const CMatrix4<T>&), + CMatrix4<T>&), asCALL_THISCALL); assert(r >= 0); + + // Subtract (-) + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), asFUNCTIONPR(subtract<T>, + (const CMatrix4<T>&, const CMatrix4<T>&), CMatrix4<T>), + asCALL_CDECL); assert(r >= 0); + + // Subtract Assign (-=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, declAssignType.c_str(), + asMETHODPR(CMatrix4<T>, operator-=, (const CMatrix4<T>&), + CMatrix4<T>&), asCALL_THISCALL); assert(r >= 0); + + // Comparison behaviours. + ss.str(""); + ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declComparison = ss.str(); + + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<T>, + (const CMatrix4<T>&, const CMatrix4<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<T>, + (const CMatrix4<T>&, const CMatrix4<T>&), bool), asCALL_CDECL); assert(r >= 0); + + // Misc. behaviours. + ss.str(""); + ss << "const " << asType << "& f(u32)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_INDEX, ss.str().c_str(), + asMETHODPR(CMatrix4<T>, operator[], (u32) const, const T&), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << "& f(u32)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_INDEX, ss.str().c_str(), + asMETHODPR(CMatrix4<T>, operator[], (u32), T&), asCALL_THISCALL); assert(r >= 0); + + + // Bind vector2d<T> class functions. + r = engine->RegisterObjectMethod(typeName, "bool getDefinitelyIdentityMatrix()", + asMETHOD(CMatrix4<T>, getDefinitelyIdentityMatrix), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool getInverse(const " << typeName << " &out)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, getInverse), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool getInversePrimitive(const " << typeName << " &out)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, getInversePrimitive), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " getRotationDegrees()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, getRotationDegrees), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " getScale()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, getScale), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " getTranslation()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, getTranslation), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << " getTransposed()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(CMatrix4<T>, getTransposed, () const, CMatrix4<T>), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " interpolate(const " << typeName << " &in, f32)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, getTranslation), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void inverseRotateVect(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, inverseRotateVect), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void inverseTranslateVect(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, inverseTranslateVect), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod(typeName, "bool isIdentity()", + asMETHOD(CMatrix4<T>, isIdentity), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod(typeName, "bool isIdentity_integer_base()", + asMETHOD(CMatrix4<T>, isIdentity_integer_base), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& makeIndentity()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, isIdentity), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod(typeName, "bool makeInverse()", + asMETHOD(CMatrix4<T>, makeInverse), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void rotateVect(" << getVector3dName(asType) << " &out, const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(CMatrix4<T>, rotateVect, (vector3d<T>&, const vector3d<T>&) + const, void), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod(typeName, "void setDefinitelyIdentityMatrix(bool)", + asMETHOD(CMatrix4<T>, setDefinitelyIdentityMatrix), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setInverseRotationDegrees(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setInverseRotationDegrees), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setInverseRotationRadians(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setInverseRotationRadians), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setInverseTranslation(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setInverseTranslation), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setRotationDegrees(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setRotationDegrees), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setRotationRadians(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setRotationRadians), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setScale(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(CMatrix4<T>, setScale, (const vector3d<T>&), CMatrix4<T>&), + asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setScale(const " << asType << ")"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(CMatrix4<T>, setScale, (const vector3d<T>&), CMatrix4<T>&), + asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setTextureScale(f32, f32)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setTextureScale), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setTextureScaleCenter(f32, f32)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setTextureScaleCenter), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setTextureTranslate(f32, f32)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setTextureTranslate), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setTextureTranslateTransposed(f32, f32)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setTextureTranslateTransposed), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& setTranslation(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(CMatrix4<T>, setTranslation), asCALL_THISCALL); assert(r >= 0); +} + +//! Binds all needed CMatrix4<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +void bindMatrix4(asIScriptEngine *engine) +{ + bindMatrix4T<f32>(engine, "matrix4", "f32"); +} + +//! Gets the name of the CMatrix4<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +std::string getMatrix4Name(const std::string &asType) +{ + if(asType == "f32") return std::string("matrix4"); + else return std::string(""); +} + +// End of File Added: trunk/src/scripting/irrlicht/asMatrix4.h =================================================================== --- trunk/src/scripting/irrlicht/asMatrix4.h (rev 0) +++ trunk/src/scripting/irrlicht/asMatrix4.h 2009-06-01 15:18:59 UTC (rev 50) @@ -0,0 +1,33 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asMatrix4.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the CMatrix4<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASMATRIX4_H__ +#define __ASMATRIX4_H__ + +// Include files +#include "../../dependencies.h" + + +// AngelScript binding +//! Binds all needed CMatrix4<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; +extern void bindMatrix4(asIScriptEngine *engine); + +//! Gets the name of the CMatrix4<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +extern std::string getMatrix4Name(const std::string &asType); + +#endif + Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-06-01 12:54:38 UTC (rev 49) +++ trunk/src/sirrf.cbp 2009-06-01 15:18:59 UTC (rev 50) @@ -114,6 +114,8 @@ <Unit filename="scripting/irrlicht/asDimension2d.h" /> <Unit filename="scripting/irrlicht/asIrrlicht.cpp" /> <Unit filename="scripting/irrlicht/asIrrlicht.h" /> + <Unit filename="scripting/irrlicht/asMatrix4.cpp" /> + <Unit filename="scripting/irrlicht/asMatrix4.h" /> <Unit filename="scripting/irrlicht/asSColor.cpp" /> <Unit filename="scripting/irrlicht/asSColor.h" /> <Unit filename="scripting/irrlicht/asVector2d.cpp" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-01 12:54:38 UTC (rev 49) +++ trunk/src/sirrf.depend 2009-06-01 15:18:59 UTC (rev 50) @@ -1044,7 +1044,7 @@ "../dependencies.h" "Entity.h" -1243857536 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp +1243867473 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp "GameManager.h" "../components/components.h" @@ -2387,13 +2387,14 @@ 1243782761 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h "../../dependencies.h" -1243860506 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp +1243866802 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp "asIrrlicht.h" "asDimension2d.h" "asSColor.h" "asVector2d.h" "asVector3d.h" "asAabbox3d.h" + "asMatrix4.h" 1243857000 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.h "../../dependencies.h" @@ -2420,3 +2421,6 @@ 1243858530 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asSColor.h "../../dependencies.h" +1243866212 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asMatrix4.h + "../../dependencies.h" + Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-06-01 12:54:38 UTC (rev 49) +++ trunk/src/sirrf.layout 2009-06-01 15:18:59 UTC (rev 50) @@ -89,10 +89,10 @@ <Cursor position="1149" topLine="23" /> </File> <File name="core/DataStack.cpp" open="0" top="0" tabpos="1"> - <Cursor position="3648" topLine="226" /> + <Cursor position="5786" topLine="226" /> </File> <File name="core/DataStack.h" open="0" top="0" tabpos="1"> - <Cursor position="1161" topLine="47" /> + <Cursor position="1161" topLine="0" /> </File> <File name="core/DataStore.cpp" open="0" top="0" tabpos="0"> <Cursor position="2046" topLine="89" /> @@ -128,7 +128,7 @@ <Cursor position="2214" topLine="39" /> </File> <File name="core/GameManager.h" open="0" top="0" tabpos="0"> - <Cursor position="1032" topLine="29" /> + <Cursor position="654" topLine="0" /> </File> <File name="core/GameState.cpp" open="0" top="0" tabpos="0"> <Cursor position="1460" topLine="42" /> @@ -143,37 +143,49 @@ <Cursor position="1636" topLine="8" /> </File> <File name="scripting/Script.cpp" open="0" top="0" tabpos="0"> - <Cursor position="2056" topLine="62" /> + <Cursor position="2056" topLine="116" /> </File> <File name="scripting/Script.h" open="0" top="0" tabpos="0"> - <Cursor position="0" topLine="15" /> + <Cursor position="634" topLine="15" /> </File> <File name="scripting/ScriptManager.cpp" open="0" top="0" tabpos="2"> <Cursor position="751" topLine="0" /> </File> <File name="scripting/ScriptManager.h" open="0" top="0" tabpos="1"> - <Cursor position="1616" topLine="0" /> + <Cursor position="662" topLine="0" /> </File> + <File name="scripting/irrlicht/asAabbox3d.cpp" open="0" top="0" tabpos="0"> + <Cursor position="9705" topLine="198" /> + </File> + <File name="scripting/irrlicht/asAabbox3d.h" open="0" top="0" tabpos="0"> + <Cursor position="1031" topLine="0" /> + </File> <File name="scripting/irrlicht/asDimension2d.cpp" open="0" top="0" tabpos="0"> - <Cursor position="7671" topLine="160" /> + <Cursor position="2485" topLine="66" /> </File> - <File name="scripting/irrlicht/asDimension2d.h" open="0" top="0" tabpos="0"> - <Cursor position="794" topLine="0" /> - </File> <File name="scripting/irrlicht/asIrrlicht.cpp" open="0" top="0" tabpos="0"> - <Cursor position="10048" topLine="321" /> + <Cursor position="9667" topLine="261" /> </File> <File name="scripting/irrlicht/asIrrlicht.h" open="0" top="0" tabpos="0"> <Cursor position="701" topLine="0" /> </File> + <File name="scripting/irrlicht/asSColor.cpp" open="0" top="0" tabpos="0"> + <Cursor position="2205" topLine="56" /> + </File> + <File name="scripting/irrlicht/asSColor.h" open="0" top="0" tabpos="0"> + <Cursor position="868" topLine="0" /> + </File> <File name="scripting/irrlicht/asVector2d.cpp" open="0" top="0" tabpos="3"> - <Cursor position="17138" topLine="358" /> + <Cursor position="4724" topLine="163" /> </File> + <File name="scripting/irrlicht/asVector2d.h" open="0" top="0" tabpos="0"> + <Cursor position="1033" topLine="0" /> + </File> <File name="scripting/irrlicht/asVector3d.cpp" open="0" top="0" tabpos="1"> - <Cursor position="6162" topLine="177" /> + <Cursor position="4732" topLine="157" /> </File> <File name="scripting/irrlicht/asVector3d.h" open="0" top="0" tabpos="2"> - <Cursor position="780" topLine="0" /> + <Cursor position="1032" topLine="0" /> </File> <File name="sound/SoundManager.cpp" open="0" top="0" tabpos="1"> <Cursor position="3962" topLine="144" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-01 13:03:38
|
Revision: 49 http://sirrf.svn.sourceforge.net/sirrf/?rev=49&view=rev Author: zccdark203 Date: 2009-06-01 12:54:38 +0000 (Mon, 01 Jun 2009) Log Message: ----------- Added the AngelScript binding of Irrlicht's SColor class. Only the CMatrix class is remaining. Also, a quick note on the usage of the offsetof macro. Apparently GCC generates warnings when you're using non-POD classes, but it works correctly nevertheless. Modified Paths: -------------- trunk/src/scripting/irrlicht/asAabbox3d.cpp trunk/src/scripting/irrlicht/asDimension2d.cpp trunk/src/scripting/irrlicht/asIrrlicht.cpp trunk/src/scripting/irrlicht/asVector2d.cpp trunk/src/scripting/irrlicht/asVector3d.cpp trunk/src/sirrf.cbp trunk/src/sirrf.depend Added Paths: ----------- trunk/src/scripting/irrlicht/asSColor.cpp trunk/src/scripting/irrlicht/asSColor.h Modified: trunk/src/scripting/irrlicht/asAabbox3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asAabbox3d.cpp 2009-06-01 11:56:41 UTC (rev 48) +++ trunk/src/scripting/irrlicht/asAabbox3d.cpp 2009-06-01 12:54:38 UTC (rev 49) @@ -80,6 +80,7 @@ return (a!=b); } + //! Binds aabbox3d<T> as a value type to AngelScript with the given template. //! @param engine Pointer to the AngelScript engine //! @param typeName The name of the object within AngelScript; Modified: trunk/src/scripting/irrlicht/asDimension2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asDimension2d.cpp 2009-06-01 11:56:41 UTC (rev 48) +++ trunk/src/scripting/irrlicht/asDimension2d.cpp 2009-06-01 12:54:38 UTC (rev 49) @@ -85,6 +85,7 @@ return (a!=b); } + //! Binds dimension2d<T> as a value type to AngelScript with the given template. //! @param engine Pointer to the AngelScript engine //! @param typeName The name of the object within AngelScript; Modified: trunk/src/scripting/irrlicht/asIrrlicht.cpp =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-01 11:56:41 UTC (rev 48) +++ trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-01 12:54:38 UTC (rev 49) @@ -16,6 +16,7 @@ // Include files #include "asIrrlicht.h" #include "asDimension2d.h" +#include "asSColor.h" #include "asVector2d.h" #include "asVector3d.h" #include "asAabbox3d.h" @@ -38,23 +39,6 @@ } -// SColor binding. -void bindSColor(asIScriptEngine *engine) -{ - // Forward declarations. - int r; - - // Bind SColor class. - r = engine->RegisterObjectType("SColor", sizeof(SColor), asOBJ_REF); assert(r >= 0); - - // Set SColor behaviour. - - - // Bind SColor class functions. - -} - - // Enumerations // E_CULLING_TYPE void bindE_CULLING_TYPE(asIScriptEngine *engine) @@ -329,7 +313,6 @@ bindMatrix4<f32>(engine, "matrix4", "f32"); bindSColor(engine); - bindVector2d(engine); bindVector3d(engine); bindAabbox3d(engine); @@ -343,4 +326,3 @@ } // End of File - Added: trunk/src/scripting/irrlicht/asSColor.cpp =================================================================== --- trunk/src/scripting/irrlicht/asSColor.cpp (rev 0) +++ trunk/src/scripting/irrlicht/asSColor.cpp 2009-06-01 12:54:38 UTC (rev 49) @@ -0,0 +1,157 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: SColor.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the SColor class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "asSColor.h" + + +// SColor behaviour functions. +//! An AngelScript wrapper function so that SColor objects can be +//! constructed within AngelScript. +//! @note For internal use only! +void constructor(void *memory) +{ + new (memory) SColor(); +} + +//! An AngelScript wrapper function so that SColor objects can be +//! constructed within AngelScript. +//! @note For internal use only! +void constructor(u32 clr, void *memory) +{ + new (memory) SColor(clr); +} + +//! An AngelScript wrapper function so that SColor objects can be +//! constructed within AngelScript. +//! @note For internal use only! +void constructor(u32 a, u32 r, u32 g, u32 b, void *memory) +{ + new (memory) SColor(a, r, g, b); +} + +//! An AngelScript wrapper function so that SColor objects can be +//! deconstructed within AngelScript. +//! @note For internal use only! +void deconstructor(void *memory) +{ + ((SColor*)memory)->~SColor(); +} + +//! An AngelScript wrapper function for the addition behaviour. +//! @note For internal use only! +SColor add(const SColor &a, const SColor &b) +{ + return a + b; +} + +//! An AngelScript wrapper function for the equal behaviour. +//! @note For internal use only! +bool equal(const SColor &a, const SColor &b) +{ + return (a==b); +} + +//! An AngelScript wrapper function for the not-equal behaviour. +//! @note For internal use only! +bool not_equal(const SColor &a, const SColor &b) +{ + return (a!=b); +} + +//! An AngelScript wrapper function for the less-than behaviour. +//! @note For internal use only! +bool less_than(const SColor &a, const SColor &b) +{ + return (a<b); +} + + +//! Binds Irrlicht's SColor class. +//! @param engine Pointer to the AngelScript engine +void bindSColor(asIScriptEngine *engine) +{ + // Forward declarations. + int r; + + // Bind dimension2d<T> class. + r = engine->RegisterObjectType("SColor", sizeof(SColor), asOBJ_VALUE | asOBJ_APP_CLASS_CD); assert(r >= 0); + + // Set SColor behaviour. + // Initialisation and deinitialisation + r = engine->RegisterObjectBehaviour("SColor", asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor, + (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour("SColor", asBEHAVE_CONSTRUCT, "void f(u32)", asFUNCTIONPR(constructor, + (u32, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour("SColor", asBEHAVE_CONSTRUCT, "void f(u32)", asFUNCTIONPR(constructor, + (u32, u32, u32, u32, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour("SColor", asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + // Calculation behaviours. + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, "SColor f(const SColor &in, const SColor &in)", + asFUNCTIONPR(add, (const SColor&, const SColor&), SColor), + asCALL_CDECL); assert(r >= 0); + + // Comparison behaviours. + std::string declComparison = "bool f(const SColor &in, const SColor &in)"; + + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal, + (const SColor&, const SColor&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal, + (const SColor&, const SColor&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_LESSTHAN, declComparison.c_str(), asFUNCTIONPR(less_than, + (const SColor&, const SColor&), bool), asCALL_CDECL); assert(r >= 0); + + // Bind SColor class functions. + r = engine->RegisterObjectMethod("SColor", "u32 getAlpha()", + asMETHOD(SColor, getAlpha), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "u32 getAverage()", + asMETHOD(SColor, getAverage), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "u32 getBlue()", + asMETHOD(SColor, getBlue), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "u32 getGreen()", + asMETHOD(SColor, getGreen), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "SColor getInterpolated(const SColor &in, f32)", + asMETHOD(SColor, getInterpolated), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "SColor getInterpolated_quadratic(const SColor &in, " \ + "const SColor &in, f32)", asMETHOD(SColor, getInterpolated_quadratic), + asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "f32 getLuminance()", + asMETHOD(SColor, getLuminance), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "u32 getRed()", + asMETHOD(SColor, getRed), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "void set(u32)", + asMETHODPR(SColor, set, (u32), void), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "void set(u32, u32, u32, u32)", + asMETHODPR(SColor, set, (u32, u32, u32, u32), void), asCALL_THISCALL); + assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "void setAlpha(u32)", + asMETHOD(SColor, setAlpha), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "void setBlue(u32)", + asMETHOD(SColor, setBlue), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "void setGreen(u32)", + asMETHOD(SColor, setGreen), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectMethod("SColor", "void setRed(u32)", + asMETHOD(SColor, setRed), asCALL_THISCALL); assert(r >= 0); + + // Bind SColor class properties. + r = engine->RegisterObjectProperty("SColor", "u32 color", offsetof(SColor, color)); assert(r >= 0); +} + +// End of File Added: trunk/src/scripting/irrlicht/asSColor.h =================================================================== --- trunk/src/scripting/irrlicht/asSColor.h (rev 0) +++ trunk/src/scripting/irrlicht/asSColor.h 2009-06-01 12:54:38 UTC (rev 49) @@ -0,0 +1,30 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asSColor.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the SColor class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASSCOLOR_H__ +#define __ASSCOLOR_H__ + +// Include files +#include "../../dependencies.h" + + +// AngelScript binding +//! Binds Irrlicht's SColor class. +//! @param engine Pointer to the AngelScript engine +extern void bindSColor(asIScriptEngine *engine); + +#endif + + Modified: trunk/src/scripting/irrlicht/asVector2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector2d.cpp 2009-06-01 11:56:41 UTC (rev 48) +++ trunk/src/scripting/irrlicht/asVector2d.cpp 2009-06-01 12:54:38 UTC (rev 49) @@ -175,6 +175,7 @@ return (a>=b); } + //! Binds vector2d<T> as a value type to AngelScript with the given template. //! @param engine Pointer to the AngelScript engine //! @param typeName The name of the object within AngelScript; Modified: trunk/src/scripting/irrlicht/asVector3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector3d.cpp 2009-06-01 11:56:41 UTC (rev 48) +++ trunk/src/scripting/irrlicht/asVector3d.cpp 2009-06-01 12:54:38 UTC (rev 49) @@ -175,6 +175,7 @@ return (a>=b); } + //! Binds vector3d<T> as a value type to AngelScript with the given template. //! @param engine Pointer to the AngelScript engine //! @param typeName The name of the object within AngelScript; Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-06-01 11:56:41 UTC (rev 48) +++ trunk/src/sirrf.cbp 2009-06-01 12:54:38 UTC (rev 49) @@ -108,10 +108,14 @@ <Unit filename="scripting/Script.h" /> <Unit filename="scripting/ScriptManager.cpp" /> <Unit filename="scripting/ScriptManager.h" /> + <Unit filename="scripting/irrlicht/asAabbox3d.cpp" /> + <Unit filename="scripting/irrlicht/asAabbox3d.h" /> <Unit filename="scripting/irrlicht/asDimension2d.cpp" /> <Unit filename="scripting/irrlicht/asDimension2d.h" /> <Unit filename="scripting/irrlicht/asIrrlicht.cpp" /> <Unit filename="scripting/irrlicht/asIrrlicht.h" /> + <Unit filename="scripting/irrlicht/asSColor.cpp" /> + <Unit filename="scripting/irrlicht/asSColor.h" /> <Unit filename="scripting/irrlicht/asVector2d.cpp" /> <Unit filename="scripting/irrlicht/asVector2d.h" /> <Unit filename="scripting/irrlicht/asVector3d.cpp" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-06-01 11:56:41 UTC (rev 48) +++ trunk/src/sirrf.depend 2009-06-01 12:54:38 UTC (rev 49) @@ -1044,7 +1044,7 @@ "../dependencies.h" "Entity.h" -1243793597 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp +1243857536 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp "GameManager.h" "../components/components.h" @@ -2381,15 +2381,16 @@ 1243856955 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.h "../../dependencies.h" -1243854839 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.cpp +1243860570 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.cpp "asVector2d.h" 1243782761 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h "../../dependencies.h" -1243854553 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp +1243860506 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp "asIrrlicht.h" "asDimension2d.h" + "asSColor.h" "asVector2d.h" "asVector3d.h" "asAabbox3d.h" @@ -2397,19 +2398,25 @@ 1243857000 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.h "../../dependencies.h" -1243854884 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.cpp +1243860582 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.cpp "asVector3d.h" -1243857072 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.cpp +1243860554 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.cpp "asDimension2d.h" 1243856938 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.h "../../dependencies.h" -1243856888 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.cpp +1243860560 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.cpp "asAabbox3d.h" "asVector3d.h" 1243856889 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.h "../../dependencies.h" +1243860542 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asSColor.cpp + "asSColor.h" + +1243858530 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asSColor.h + "../../dependencies.h" + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-06-01 11:57:09
|
Revision: 48 http://sirrf.svn.sourceforge.net/sirrf/?rev=48&view=rev Author: zccdark203 Date: 2009-06-01 11:56:41 +0000 (Mon, 01 Jun 2009) Log Message: ----------- First commit of this month. This revision adds the AngelScript binding of Irrlicht's aabbox3d<T>. Furthermore some convenience functions have been added for sharing registered templated Irrlicht value types accros multiple files. And I also changed some of the defines in order to maintain the same overall template for header files. Modified Paths: -------------- trunk/src/core/GameManager.h trunk/src/dependencies.h trunk/src/scripting/Script.h trunk/src/scripting/ScriptManager.h trunk/src/scripting/irrlicht/asDimension2d.cpp trunk/src/scripting/irrlicht/asDimension2d.h trunk/src/scripting/irrlicht/asIrrlicht.cpp trunk/src/scripting/irrlicht/asVector2d.cpp trunk/src/scripting/irrlicht/asVector2d.h trunk/src/scripting/irrlicht/asVector3d.cpp trunk/src/scripting/irrlicht/asVector3d.h trunk/src/sirrf.depend trunk/src/sirrf.layout Added Paths: ----------- trunk/src/scripting/irrlicht/asAabbox3d.cpp trunk/src/scripting/irrlicht/asAabbox3d.h Modified: trunk/src/core/GameManager.h =================================================================== --- trunk/src/core/GameManager.h 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/core/GameManager.h 2009-06-01 11:56:41 UTC (rev 48) @@ -13,8 +13,8 @@ // // ///////////////////////////////////////////////////////////////////////////// -#ifndef __GAMEMANAGER_INCLUDED__ -#define __GAMEMANAGER_INCLUDED__ +#ifndef __GAMEMANAGER_H__ +#define __GAMEMANAGER_H__ // Include files #include "../dependencies.h" Modified: trunk/src/dependencies.h =================================================================== --- trunk/src/dependencies.h 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/dependencies.h 2009-06-01 11:56:41 UTC (rev 48) @@ -19,6 +19,7 @@ // Include files. // C Library #include <assert.h> +#include <stddef.h> // C++ Library #include <fstream> Modified: trunk/src/scripting/Script.h =================================================================== --- trunk/src/scripting/Script.h 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/scripting/Script.h 2009-06-01 11:56:41 UTC (rev 48) @@ -13,8 +13,8 @@ // // ///////////////////////////////////////////////////////////////////////////// -#ifndef __SCRIPT_INCLUDED__ -#define __SCRIPT_INCLUDED__ +#ifndef __SCRIPT_H__ +#define __SCRIPT_H__ // Include files #include "../dependencies.h" Modified: trunk/src/scripting/ScriptManager.h =================================================================== --- trunk/src/scripting/ScriptManager.h 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/scripting/ScriptManager.h 2009-06-01 11:56:41 UTC (rev 48) @@ -13,8 +13,8 @@ // // ///////////////////////////////////////////////////////////////////////////// -#ifndef __SCRIPTMANAGER_INCLUDED__ -#define __SCRIPTMANAGER_INCLUDED__ +#ifndef __SCRIPTMANAGER_H__ +#define __SCRIPTMANAGER_H__ // Include files #include "../dependencies.h" Added: trunk/src/scripting/irrlicht/asAabbox3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asAabbox3d.cpp (rev 0) +++ trunk/src/scripting/irrlicht/asAabbox3d.cpp 2009-06-01 11:56:41 UTC (rev 48) @@ -0,0 +1,244 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asAabbox3d.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the aabbox3d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "asAabbox3d.h" +#include "asVector3d.h" + + +// aabbox3d<T> behaviour functions. +//! An AngelScript wrapper function so that aabbox3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(void *memory) +{ + new (memory) aabbox3d<T>(); +} + +//! An AngelScript wrapper function so that aabbox3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(T minX, T minY, T minZ, T maxX, T maxY, T maxZ, void *memory) +{ + new (memory) aabbox3d<T>(minX, minY, minZ, maxX, maxY, maxZ); +} + +//! An AngelScript wrapper function so that aabbox3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const vector3d<T> &init, void *memory) +{ + new (memory) aabbox3d<T>(init); +} + +//! An AngelScript wrapper function so that aabbox3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const vector3d<T> &min, const vector3d<T> &max, void *memory) +{ + new (memory) aabbox3d<T>(min, max); +} + +//! An AngelScript wrapper function so that aabbox3d<T> objects can be +//! deconstructed within AngelScript. +//! @note For internal use only! +template<typename T> +void deconstructor(void *memory) +{ + ((aabbox3d<T>*)memory)->~aabbox3d<T>(); +} + +//! An AngelScript wrapper function for the equal behaviour. +//! @note For internal use only! +template<typename T> +bool equal(const aabbox3d<T> &a, const aabbox3d<T> &b) +{ + return (a==b); +} + +//! An AngelScript wrapper function for the not-equal behaviour. +//! @note For internal use only! +template<typename T> +bool not_equal(const aabbox3d<T> &a, const aabbox3d<T> &b) +{ + return (a!=b); +} + +//! Binds aabbox3d<T> as a value type to AngelScript with the given template. +//! @param engine Pointer to the AngelScript engine +//! @param typeName The name of the object within AngelScript; +//! @param asType The AngelScript name of the used template; +template<typename T> +void bindAabbox3dT(asIScriptEngine *engine, const char *typeName, const char *asType) +{ + // Forward declarations. + int r; + std::stringstream ss; + + // Bind aabbox3d<T> class. + r = engine->RegisterObjectType(typeName, sizeof(aabbox3d<T>), asOBJ_VALUE | asOBJ_APP_CLASS_CD); assert(r >= 0); + + // Set aabbox3d<T> behaviour. + // Initialisation and deinitialisation + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor<T>, + (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(" << asType << ", " << asType << ", " << asType << ", " << asType << ", " + << asType << ", " << asType << ", " << asType << ")"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (T, T, T, T, T, T, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const vector3d<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << getVector3dName(asType) << " &in, const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const vector3d<T>&, const vector3d<T>&, void*), void), asCALL_CDECL_OBJLAST); + assert(r >= 0); + + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor<T>), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + // Comparison behaviours. + ss.str(""); + ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declComparison = ss.str(); + + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<T>, + (const aabbox3d<T>&, const aabbox3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<T>, + (const aabbox3d<T>&, const aabbox3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + + // Bind aabbox3d<T> class functions. + ss.str(""); + ss << "void addInternalBox(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, addInternalBox), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void addInternalPoint(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(aabbox3d<T>, addInternalPoint, (const vector3d<T>&), void), + asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getArea()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, getArea), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " getCenter()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, getCenter), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " getExtent()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, getExtent), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << " getInterpolated(const " << typeName << " &in, f64)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, getInterpolated), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getVolume()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, getVolume), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool intersectsWithBox(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, intersectsWithBox), asCALL_THISCALL); assert(r >= 0); + + /*ss.str(""); + ss << "bool intersectsWithLine(const " << getLine3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(aabbox3d<T>, intersectsWithLine, (const line3d<T>&), bool), + asCALL_THISCALL); assert(r >= 0);*/ + + ss.str(""); + ss << "bool isFullInside(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, isFullInside), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool isPointInside(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, isPointInside), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool isPointTotalInside(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(aabbox3d<T>, isPointTotalInside), asCALL_THISCALL); assert(r >= 0); + + r = engine->RegisterObjectMethod(typeName, "void repair()", + asMETHOD(aabbox3d<T>, repair), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void reset(const " << getVector3dName(asType) << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(aabbox3d<T>, reset, (const vector3d<T>&), void), asCALL_THISCALL); + assert(r >= 0); + + ss.str(""); + ss << "void reset(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(aabbox3d<T>, reset, (const aabbox3d<T>&), void), asCALL_THISCALL); + assert(r >= 0); + + ss.str(""); + ss << "void reset(" << asType << ", " << asType << ", " << asType << ")"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHODPR(aabbox3d<T>, reset, (T, T, T), void), asCALL_THISCALL); + assert(r >= 0); + + // Bind aabbox3d<T> class properties. + ss.str(""); + ss << getVector3dName(asType) << " MaxEdge"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(aabbox3d<T>, MaxEdge)); assert(r >= 0); + + ss.str(""); + ss << getVector3dName(asType) << " MinEdge"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(aabbox3d<T>, MinEdge)); assert(r >= 0); +} + +//! Binds all needed aabbox3d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine +void bindAabbox3d(asIScriptEngine *engine) +{ + bindAabbox3dT<f32>(engine, "aabbox3df", "f32"); + bindAabbox3dT<s32>(engine, "aabbox3di", "s32"); +} + +//! Gets the name of the aabbox3d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +std::string getAabbox3dName(const std::string &asType) +{ + if(asType == "f32") return std::string("aabbox3df"); + if(asType == "s32") return std::string("aabbox3di"); + else return std::string(""); +} + +// End of File + Added: trunk/src/scripting/irrlicht/asAabbox3d.h =================================================================== --- trunk/src/scripting/irrlicht/asAabbox3d.h (rev 0) +++ trunk/src/scripting/irrlicht/asAabbox3d.h 2009-06-01 11:56:41 UTC (rev 48) @@ -0,0 +1,34 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asAabbox3d.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the aabboxd<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASAABBOX3D_H__ +#define __ASAABBOX3D_H__ + +// Include files +#include "../../dependencies.h" + + +// AngelScript binding +//! Binds all needed aabbox3d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine +extern void bindAabbox3d(asIScriptEngine *engine); + +//! Gets the name of the aabbox3d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +extern std::string getAabbox3dName(const std::string &asType); + +#endif + + Modified: trunk/src/scripting/irrlicht/asDimension2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asDimension2d.cpp 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/scripting/irrlicht/asDimension2d.cpp 2009-06-01 11:56:41 UTC (rev 48) @@ -199,5 +199,14 @@ bindDimension2dT<s32>(engine, "dimension2di", "s32"); } +//! Gets the name of the dimension2d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +std::string getDimension2dName(const std::string &asType) +{ + if(asType == "f32") return std::string("dimension2df"); + if(asType == "s32") return std::string("dimension2di"); + else return std::string(""); +} + // End of File Modified: trunk/src/scripting/irrlicht/asDimension2d.h =================================================================== --- trunk/src/scripting/irrlicht/asDimension2d.h 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/scripting/irrlicht/asDimension2d.h 2009-06-01 11:56:41 UTC (rev 48) @@ -13,15 +13,21 @@ // // ///////////////////////////////////////////////////////////////////////////// -#ifndef __ASDIMENSION2D_INCLUDED__ -#define __ASDIMENSION2D_INCLUDED__ +#ifndef __ASDIMENSION2D_H__ +#define __ASDIMENSION2D_H__ // Include files #include "../../dependencies.h" // AngelScript binding +//! Binds all needed dimension2d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine extern void bindDimension2d(asIScriptEngine *engine); +//! Gets the name of the dimension2d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +extern std::string getDimension2dName(const std::string &asType); + #endif Modified: trunk/src/scripting/irrlicht/asIrrlicht.cpp =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-06-01 11:56:41 UTC (rev 48) @@ -18,25 +18,9 @@ #include "asDimension2d.h" #include "asVector2d.h" #include "asVector3d.h" +#include "asAabbox3d.h" -// aabbox3d<T> binding. -template<typename T> -void bindaabbox3d(asIScriptEngine *engine, const char *typeName, const char *asType) -{ - // Forward declarations. - int r; - - // Bind aabbox3d<T> class. - r = engine->RegisterObjectType(typeName, sizeof(aabbox3d<T>), asOBJ_REF); assert(r >= 0); - - // Set aabbox3d<T> behaviour. - - - // Bind aabbox3d<T> class functions. - -} - // CMatrix4<T> binding. template<typename T> void bindMatrix4(asIScriptEngine *engine, const char *typeName, const char *asType) @@ -340,9 +324,6 @@ void bindIrrlicht(asIScriptEngine *engine) { // Vector3d<T> - bindaabbox3d<f32>(engine, "aabbox3df", "f32"); - bindaabbox3d<s32>(engine, "aabbox3di", "s32"); - bindDimension2d(engine); bindMatrix4<f32>(engine, "matrix4", "f32"); @@ -351,6 +332,7 @@ bindVector2d(engine); bindVector3d(engine); + bindAabbox3d(engine); // Enumerations bindE_CULLING_TYPE(engine); Modified: trunk/src/scripting/irrlicht/asVector2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector2d.cpp 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/scripting/irrlicht/asVector2d.cpp 2009-06-01 11:56:41 UTC (rev 48) @@ -394,11 +394,20 @@ } //! Binds all needed vector2d<T> objects to AngelScript. -//! @param engine Pointer to the AngelScript engine +//! @param engine Pointer to the AngelScript engine; void bindVector2d(asIScriptEngine *engine) { bindVector2dT<f32>(engine, "vector2df", "f32"); bindVector2dT<s32>(engine, "vector2di", "s32"); } +//! Gets the name of the vector2d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +std::string getVector2dName(const std::string &asType) +{ + if(asType == "f32") return std::string("vector2df"); + if(asType == "s32") return std::string("vector2di"); + else return std::string(""); +} + // End of File Modified: trunk/src/scripting/irrlicht/asVector2d.h =================================================================== --- trunk/src/scripting/irrlicht/asVector2d.h 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/scripting/irrlicht/asVector2d.h 2009-06-01 11:56:41 UTC (rev 48) @@ -13,14 +13,20 @@ // // ///////////////////////////////////////////////////////////////////////////// -#ifndef __ASVECTOR2D_INCLUDED__ -#define __ASVECTOR2D_INCLUDED__ +#ifndef __ASVECTOR2D_H__ +#define __ASVECTOR2D_H__ // Include files #include "../../dependencies.h" // AngelScript binding +//! Binds all needed vector2d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine; extern void bindVector2d(asIScriptEngine *engine); +//! Gets the name of the vector2d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +extern std::string getVector2dName(const std::string &asType); + #endif Modified: trunk/src/scripting/irrlicht/asVector3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector3d.cpp 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/scripting/irrlicht/asVector3d.cpp 2009-06-01 11:56:41 UTC (rev 48) @@ -424,5 +424,14 @@ bindVector3dT<s32>(engine, "vector3di", "s32"); } +//! Gets the name of the vector3d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +std::string getVector3dName(const std::string &asType) +{ + if(asType == "f32") return std::string("vector3df"); + if(asType == "s32") return std::string("vector3di"); + else return std::string(""); +} + // End of File Modified: trunk/src/scripting/irrlicht/asVector3d.h =================================================================== --- trunk/src/scripting/irrlicht/asVector3d.h 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/scripting/irrlicht/asVector3d.h 2009-06-01 11:56:41 UTC (rev 48) @@ -13,15 +13,21 @@ // // ///////////////////////////////////////////////////////////////////////////// -#ifndef __ASVECTOR3D_INCLUDED__ -#define __ASVECTOR3D_INCLUDED__ +#ifndef __ASVECTOR3D_H__ +#define __ASVECTOR3D_H__ // Include files #include "../../dependencies.h" // AngelScript binding +//! Binds all needed vector3d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine extern void bindVector3d(asIScriptEngine *engine); +//! Gets the name of the vector3d<T> registered within AngelScript. +//! @param asType The AngelScript name of the used template; +extern std::string getVector3dName(const std::string &asType); + #endif Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/sirrf.depend 2009-06-01 11:56:41 UTC (rev 48) @@ -1048,7 +1048,7 @@ "GameManager.h" "../components/components.h" -1243683226 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h +1243853944 /home/michael/Programming/Projects/sirrf/src/core/GameManager.h "../dependencies.h" "GameState.h" "DataStore.h" @@ -1098,7 +1098,7 @@ <windows.h> <pthread.h> -1243272609 /home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.h +1243853944 /home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.h "../dependencies.h" "scriptstring.h" "Script.h" @@ -2361,7 +2361,7 @@ "Script.h" "../core/GameManager.h" -1242936783 /home/michael/Programming/Projects/sirrf/src/scripting/Script.h +1243853944 /home/michael/Programming/Projects/sirrf/src/scripting/Script.h "../dependencies.h" "ScriptManager.h" @@ -2378,30 +2378,38 @@ "asIrrlicht.h" "irrlicht/asVector2d.h" -1243782623 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.h +1243856955 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.h "../../dependencies.h" -1243794971 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.cpp +1243854839 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.cpp "asVector2d.h" 1243782761 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h "../../dependencies.h" -1243797421 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp +1243854553 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp "asIrrlicht.h" "asDimension2d.h" "asVector2d.h" "asVector3d.h" + "asAabbox3d.h" -1243793251 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.h +1243857000 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.h "../../dependencies.h" -1243794943 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.cpp +1243854884 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.cpp "asVector3d.h" -1243798140 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.cpp +1243857072 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.cpp "asDimension2d.h" -1243796010 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.h +1243856938 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.h "../../dependencies.h" +1243856888 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.cpp + "asAabbox3d.h" + "asVector3d.h" + +1243856889 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asAabbox3d.h + "../../dependencies.h" + Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-05-31 19:32:07 UTC (rev 47) +++ trunk/src/sirrf.layout 2009-06-01 11:56:41 UTC (rev 48) @@ -154,19 +154,25 @@ <File name="scripting/ScriptManager.h" open="0" top="0" tabpos="1"> <Cursor position="1616" topLine="0" /> </File> + <File name="scripting/irrlicht/asDimension2d.cpp" open="0" top="0" tabpos="0"> + <Cursor position="7671" topLine="160" /> + </File> + <File name="scripting/irrlicht/asDimension2d.h" open="0" top="0" tabpos="0"> + <Cursor position="794" topLine="0" /> + </File> <File name="scripting/irrlicht/asIrrlicht.cpp" open="0" top="0" tabpos="0"> - <Cursor position="2152" topLine="338" /> + <Cursor position="10048" topLine="321" /> </File> <File name="scripting/irrlicht/asIrrlicht.h" open="0" top="0" tabpos="0"> <Cursor position="701" topLine="0" /> </File> - <File name="scripting/irrlicht/asVector2d.cpp" open="1" top="0" tabpos="3"> - <Cursor position="16109" topLine="332" /> + <File name="scripting/irrlicht/asVector2d.cpp" open="0" top="0" tabpos="3"> + <Cursor position="17138" topLine="358" /> </File> - <File name="scripting/irrlicht/asVector3d.cpp" open="1" top="1" tabpos="1"> - <Cursor position="17589" topLine="10" /> + <File name="scripting/irrlicht/asVector3d.cpp" open="0" top="0" tabpos="1"> + <Cursor position="6162" topLine="177" /> </File> - <File name="scripting/irrlicht/asVector3d.h" open="1" top="0" tabpos="2"> + <File name="scripting/irrlicht/asVector3d.h" open="0" top="0" tabpos="2"> <Cursor position="780" topLine="0" /> </File> <File name="sound/SoundManager.cpp" open="0" top="0" tabpos="1"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-05-31 19:32:15
|
Revision: 47 http://sirrf.svn.sourceforge.net/sirrf/?rev=47&view=rev Author: zccdark203 Date: 2009-05-31 19:32:07 +0000 (Sun, 31 May 2009) Log Message: ----------- Added the AngelScript binding of Irrlicht's dimension2d<T>. Three more value types to go in order to make scripts run perfectly. I might add some extra value types, though. Modified Paths: -------------- trunk/src/scripting/irrlicht/asIrrlicht.cpp trunk/src/sirrf.cbp trunk/src/sirrf.depend Added Paths: ----------- trunk/src/scripting/irrlicht/asDimension2d.cpp trunk/src/scripting/irrlicht/asDimension2d.h Added: trunk/src/scripting/irrlicht/asDimension2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asDimension2d.cpp (rev 0) +++ trunk/src/scripting/irrlicht/asDimension2d.cpp 2009-05-31 19:32:07 UTC (rev 47) @@ -0,0 +1,203 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asDimension2d.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the dimension2d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "asDimension2d.h" + + +// dimension2d<T> behaviour functions. +//! An AngelScript wrapper function so that dimension2d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(void *memory) +{ + new (memory) dimension2d<T>(); +} + +//! An AngelScript wrapper function so that dimension2d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(T width, T height, void *memory) +{ + new (memory) dimension2d<T>(width, height); +} + +//! An AngelScript wrapper function so that dimension2d<T> objects can be +//! deconstructed within AngelScript. +//! @note For internal use only! +template<typename T> +void deconstructor(void *memory) +{ + ((dimension2d<T>*)memory)->~dimension2d<T>(); +} + +//! An AngelScript wrapper function for the multiply behaviour. +//! @note For internal use only! +template<typename T> +dimension2d<T> multiply(const dimension2d<T> &a, const T &b) +{ + return a * b; +} + +//! An AngelScript wrapper function for the addition behaviour. +//! @note For internal use only! +template<typename T> +dimension2d<T> add(const dimension2d<T> &a, const dimension2d<T> &b) +{ + return a + b; +} + +//! An AngelScript wrapper function for the divide behaviour. +//! @note For internal use only! +template<typename T> +dimension2d<T> divide(const dimension2d<T> &a, const T &b) +{ + return a / b; +} + +//! An AngelScript wrapper function for the equal behaviour. +//! @note For internal use only! +template<typename T> +bool equal(const dimension2d<T> &a, const dimension2d<T> &b) +{ + return (a==b); +} + +//! An AngelScript wrapper function for the not-equal behaviour. +//! @note For internal use only! +template<typename T> +bool not_equal(const dimension2d<T> &a, const dimension2d<T> &b) +{ + return (a!=b); +} + +//! Binds dimension2d<T> as a value type to AngelScript with the given template. +//! @param engine Pointer to the AngelScript engine +//! @param typeName The name of the object within AngelScript; +//! @param asType The AngelScript name of the used template; +template<typename T> +void bindDimension2dT(asIScriptEngine *engine, const char *typeName, const char *asType) +{ + // Forward declarations. + int r; + std::stringstream ss; + + // Bind dimension2d<T> class. + r = engine->RegisterObjectType(typeName, sizeof(dimension2d<T>), asOBJ_VALUE | asOBJ_APP_CLASS_CD); assert(r >= 0); + + // Set dimension2d<T> behaviour. + // Initialisation and deinitialisation + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor<T>, + (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(" << asType << ", " << asType << ")"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (T, T, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor<T>), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + // Calculation behaviours. + // Multiply (*) + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const "<< asType << ")"; + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, ss.str().c_str(), asFUNCTIONPR(multiply<T>, + (const dimension2d<T>&, const T&), dimension2d<T>), asCALL_CDECL); + assert(r >= 0); + + // Multiply Assign (*=) + ss.str(""); + ss << typeName << "& f(const " << asType << ")"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_MUL_ASSIGN, ss.str().c_str(), + asMETHODPR(dimension2d<T>, operator*=, (const T&), + dimension2d<T>&), asCALL_THISCALL); assert(r >= 0); + + // Add (+) + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << typeName << " &in)"; + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, ss.str().c_str(), asFUNCTIONPR(add<T>, + (const dimension2d<T>&, const dimension2d<T>&), dimension2d<T>), + asCALL_CDECL); assert(r >= 0); + + // Add Assign (+=) + ss.str(""); + ss << typeName << "& f(const " << typeName << " &in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, ss.str().c_str(), + asMETHODPR(dimension2d<T>, operator+=, (const dimension2d<T>&), + dimension2d<T>&), asCALL_THISCALL); assert(r >= 0); + + // Divide (/) + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << asType << ")"; + r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, ss.str().c_str(), asFUNCTIONPR(divide<T>, + (const dimension2d<T>&, const T&), dimension2d<T>), + asCALL_CDECL); assert(r >= 0); + + // Divide Assign (/=) + ss.str(""); + ss << typeName << "& f(const " << asType << ")"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DIV_ASSIGN, ss.str().c_str(), + asMETHODPR(dimension2d<T>, operator/=, (const T&), + dimension2d<T>&), asCALL_THISCALL); assert(r >= 0); + + // Comparison behaviours. + ss.str(""); + ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declComparison = ss.str(); + + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<T>, + (const dimension2d<T>&, const dimension2d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<T>, + (const dimension2d<T>&, const dimension2d<T>&), bool), asCALL_CDECL); assert(r >= 0); + + // Bind dimension2d<T> class functions. + ss.str(""); + ss << asType << " getArea()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(dimension2d<T>, getArea), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << " getInterpolated(const " << typeName << " &in, f32)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(dimension2d<T>, getInterpolated), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << " getOptimalSize(bool, bool, bool)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(dimension2d<T>, getOptimalSize), asCALL_THISCALL); assert(r >= 0); + + // Bind dimension2d<T> class properties. + ss.str(""); + ss << asType << " Height"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(dimension2d<T>, Height)); assert(r >= 0); + + ss.str(""); + ss << asType << " Width"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(dimension2d<T>, Width)); assert(r >= 0); +} + +//! Binds all needed dimension2d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine +void bindDimension2d(asIScriptEngine *engine) +{ + bindDimension2dT<f32>(engine, "dimension2df", "f32"); + bindDimension2dT<s32>(engine, "dimension2di", "s32"); +} + +// End of File + Added: trunk/src/scripting/irrlicht/asDimension2d.h =================================================================== --- trunk/src/scripting/irrlicht/asDimension2d.h (rev 0) +++ trunk/src/scripting/irrlicht/asDimension2d.h 2009-05-31 19:32:07 UTC (rev 47) @@ -0,0 +1,27 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asDimension2d.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the dimension2d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASDIMENSION2D_INCLUDED__ +#define __ASDIMENSION2D_INCLUDED__ + +// Include files +#include "../../dependencies.h" + + +// AngelScript binding +extern void bindDimension2d(asIScriptEngine *engine); + +#endif + Modified: trunk/src/scripting/irrlicht/asIrrlicht.cpp =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-05-31 18:40:43 UTC (rev 46) +++ trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-05-31 19:32:07 UTC (rev 47) @@ -15,6 +15,7 @@ // Include files #include "asIrrlicht.h" +#include "asDimension2d.h" #include "asVector2d.h" #include "asVector3d.h" @@ -36,23 +37,6 @@ } -// dimension2d<T> binding. -template<typename T> -void bindDimension2d(asIScriptEngine *engine, const char *typeName, const char *asType) -{ - // Forward declarations. - int r; - - // Bind dimension2d<T> class. - r = engine->RegisterObjectType(typeName, sizeof(dimension2d<T>), asOBJ_REF); assert(r >= 0); - - // Set dimension2d<T> behaviour. - - - // Bind dimension2d<T> class functions. - -} - // CMatrix4<T> binding. template<typename T> void bindMatrix4(asIScriptEngine *engine, const char *typeName, const char *asType) @@ -359,8 +343,7 @@ bindaabbox3d<f32>(engine, "aabbox3df", "f32"); bindaabbox3d<s32>(engine, "aabbox3di", "s32"); - bindDimension2d<f32>(engine, "dimension2df", "f32"); - bindDimension2d<s32>(engine, "dimension2di", "s32"); + bindDimension2d(engine); bindMatrix4<f32>(engine, "matrix4", "f32"); Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-05-31 18:40:43 UTC (rev 46) +++ trunk/src/sirrf.cbp 2009-05-31 19:32:07 UTC (rev 47) @@ -108,6 +108,8 @@ <Unit filename="scripting/Script.h" /> <Unit filename="scripting/ScriptManager.cpp" /> <Unit filename="scripting/ScriptManager.h" /> + <Unit filename="scripting/irrlicht/asDimension2d.cpp" /> + <Unit filename="scripting/irrlicht/asDimension2d.h" /> <Unit filename="scripting/irrlicht/asIrrlicht.cpp" /> <Unit filename="scripting/irrlicht/asIrrlicht.h" /> <Unit filename="scripting/irrlicht/asVector2d.cpp" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-05-31 18:40:43 UTC (rev 46) +++ trunk/src/sirrf.depend 2009-05-31 19:32:07 UTC (rev 47) @@ -2387,8 +2387,9 @@ 1243782761 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h "../../dependencies.h" -1243793393 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp +1243797421 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp "asIrrlicht.h" + "asDimension2d.h" "asVector2d.h" "asVector3d.h" @@ -2398,3 +2399,9 @@ 1243794943 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.cpp "asVector3d.h" +1243798140 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.cpp + "asDimension2d.h" + +1243796010 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asDimension2d.h + "../../dependencies.h" + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-05-31 18:40:48
|
Revision: 46 http://sirrf.svn.sourceforge.net/sirrf/?rev=46&view=rev Author: zccdark203 Date: 2009-05-31 18:40:43 +0000 (Sun, 31 May 2009) Log Message: ----------- Added the AngelScript binding of Irrlicht's vector3d<T>. Besides that I've also added some more functions and properties to the AngelScript binding of vector2d<T>. Unfortunately the compiler complains about the property bindings. I can't investigate it properly, though, untill I've finished binding all Irrlicht value types. Modified Paths: -------------- trunk/src/scripting/irrlicht/asIrrlicht.cpp trunk/src/scripting/irrlicht/asVector2d.cpp trunk/src/sirrf.cbp trunk/src/sirrf.depend trunk/src/sirrf.layout Added Paths: ----------- trunk/src/scripting/irrlicht/asVector3d.cpp trunk/src/scripting/irrlicht/asVector3d.h Modified: trunk/src/scripting/irrlicht/asIrrlicht.cpp =================================================================== --- trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-05-31 15:31:15 UTC (rev 45) +++ trunk/src/scripting/irrlicht/asIrrlicht.cpp 2009-05-31 18:40:43 UTC (rev 46) @@ -16,6 +16,7 @@ // Include files #include "asIrrlicht.h" #include "asVector2d.h" +#include "asVector3d.h" // aabbox3d<T> binding. @@ -85,24 +86,7 @@ } -// Vector3d<T> binding. -template<typename T> -void bindVector3d(asIScriptEngine *engine, const char *typeName, const char *asType) -{ - // Forward declarations. - int r; - // Bind Vector3d<T> class. - r = engine->RegisterObjectType(typeName, sizeof(vector3d<T>), asOBJ_REF); assert(r >= 0); - - // Set vector3d<T> behaviour. - - - // Bind vector3d<T> class functions. - -} - - // Enumerations // E_CULLING_TYPE void bindE_CULLING_TYPE(asIScriptEngine *engine) @@ -383,10 +367,8 @@ bindSColor(engine); bindVector2d(engine); + bindVector3d(engine); - bindVector3d<f32>(engine, "vector3df", "f32"); - bindVector3d<s32>(engine, "vector3di", "s32"); - // Enumerations bindE_CULLING_TYPE(engine); bindEKEY_CODE(engine); Modified: trunk/src/scripting/irrlicht/asVector2d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector2d.cpp 2009-05-31 15:31:15 UTC (rev 45) +++ trunk/src/scripting/irrlicht/asVector2d.cpp 2009-05-31 18:40:43 UTC (rev 46) @@ -40,6 +40,15 @@ //! constructed within AngelScript. //! @note For internal use only! template<typename T> +void constructor(T n, void *memory) +{ + new (memory) vector2d<T>(n); +} + +//! An AngelScript wrapper function so that vector2d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> void constructor(T x, T y, void *memory) { new (memory) vector2d<T>(x, y); @@ -191,6 +200,11 @@ (const vector2d<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); ss.str(""); + ss << "void f(" << asType << ")"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (T, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); ss << "void f(" << asType << ", " << asType << ")"; r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, (T, T, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); @@ -364,6 +378,19 @@ r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), asMETHOD(vector2d<T>, normalize), asCALL_THISCALL); assert(r >= 0); + ss.str(""); + ss << typeName << "& rotateBy(f64, const " << typeName << "&in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector2d<T>, rotateBy), asCALL_THISCALL); assert(r >= 0); + + // Bind vector2d<T> class properties. + ss.str(""); + ss << asType << " X"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(vector2d<T>, X)); assert(r >= 0); + + ss.str(""); + ss << asType << " Y"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(vector2d<T>, Y)); assert(r >= 0); } //! Binds all needed vector2d<T> objects to AngelScript. Added: trunk/src/scripting/irrlicht/asVector3d.cpp =================================================================== --- trunk/src/scripting/irrlicht/asVector3d.cpp (rev 0) +++ trunk/src/scripting/irrlicht/asVector3d.cpp 2009-05-31 18:40:43 UTC (rev 46) @@ -0,0 +1,428 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asVector3d.cpp +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the vector3d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +// Include files +#include "asVector3d.h" + + +// vector3d<T> behaviour functions. +//! An AngelScript wrapper function so that vector3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(void *memory) +{ + new (memory) vector3d<T>(); +} + +//! An AngelScript wrapper function so that vector3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(const vector3d<T> &other, void *memory) +{ + new (memory) vector3d<T>(other); +} + +//! An AngelScript wrapper function so that vector3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(T n, void *memory) +{ + new (memory) vector3d<T>(n); +} + +//! An AngelScript wrapper function so that vector3d<T> objects can be +//! constructed within AngelScript. +//! @note For internal use only! +template<typename T> +void constructor(T x, T y, T z, void *memory) +{ + new (memory) vector3d<T>(x, y, z); +} + +//! An AngelScript wrapper function so that vector3d<T> objects can be +//! deconstructed within AngelScript. +//! @note For internal use only! +template<typename T> +void deconstructor(void *memory) +{ + ((vector3d<T>*)memory)->~vector3d<T>(); +} + +//! An AngelScript wrapper function for the multiply behaviour. +//! @note For internal use only! +template<typename T> +vector3d<T> multiply(const vector3d<T> &a, const vector3d<T> &b) +{ + return a * b; +} + +//! An AngelScript wrapper function for the multiply behaviour. +//! @note For internal use only! +template<typename T> +vector3d<T> multiply(const vector3d<T> &a, const T &b) +{ + return a * b; +} + +//! An AngelScript wrapper function for the addition behaviour. +//! @note For internal use only! +template<typename T> +vector3d<T> add(const vector3d<T> &a, const vector3d<T> &b) +{ + return a + b; +} + +//! An AngelScript wrapper function for the addition behaviour. +//! @note For internal use only! +template<typename T> +vector3d<T> add(const vector3d<T> &a, const T &b) +{ + return a + b; +} + +//! An AngelScript wrapper function for the substraction behaviour. +//! @note For internal use only! +template<typename T> +vector3d<T> subtract(const vector3d<T> &a, const vector3d<T> &b) +{ + return a - b; +} + +//! An AngelScript wrapper function for the substraction behaviour. +//! @note For internal use only! +template<typename T> +vector3d<T> subtract(const vector3d<T> &a, const T &b) +{ + return a - b; +} + +//! An AngelScript wrapper function for the divide behaviour. +//! @note For internal use only! +template<typename T> +vector3d<T> divide(const vector3d<T> &a, const vector3d<T> &b) +{ + return a / b; +} + +//! An AngelScript wrapper function for the divide behaviour. +//! @note For internal use only! +template<typename T> +vector3d<T> divide(const vector3d<T> &a, const T &b) +{ + return a / b; +} + +//! An AngelScript wrapper function for the equal behaviour. +//! @note For internal use only! +template<typename T> +bool equal(const vector3d<T> &a, const vector3d<T> &b) +{ + return (a==b); +} + +//! An AngelScript wrapper function for the not-equal behaviour. +//! @note For internal use only! +template<typename T> +bool not_equal(const vector3d<T> &a, const vector3d<T> &b) +{ + return (a!=b); +} + +//! An AngelScript wrapper function for the less-than behaviour. +//! @note For internal use only! +template<typename T> +bool less_than(const vector3d<T> &a, const vector3d<T> &b) +{ + return (a<b); +} + +//! An AngelScript wrapper function for the greater-than behaviour. +//! @note For internal use only! +template<typename T> +bool greater_than(const vector3d<T> &a, const vector3d<T> &b) +{ + return (a>b); +} + +//! An AngelScript wrapper function for the less-or-equal behaviour. +//! @note For internal use only! +template<typename T> +bool l_equal(const vector3d<T> &a, const vector3d<T> &b) +{ + return (a<=b); +} + +//! An AngelScript wrapper function for the greater-or-equal behaviour. +//! @note For internal use only! +template<typename T> +bool g_equal(const vector3d<T> &a, const vector3d<T> &b) +{ + return (a>=b); +} + +//! Binds vector3d<T> as a value type to AngelScript with the given template. +//! @param engine Pointer to the AngelScript engine +//! @param typeName The name of the object within AngelScript; +//! @param asType The AngelScript name of the used template; +template<typename T> +void bindVector3dT(asIScriptEngine *engine, const char *typeName, const char *asType) +{ + // Forward declarations. + int r; + std::stringstream ss; + + // Bind Vector2d<T> class. + r = engine->RegisterObjectType(typeName, sizeof(vector3d<T>), asOBJ_VALUE | asOBJ_APP_CLASS_CDA); assert(r >= 0); + + // Set vector3d<T> behaviour. + // Initialisation and deinitialisation + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, "void f()", asFUNCTIONPR(constructor<T>, + (void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(const " << typeName << "&in)"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (const vector3d<T>&, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(" << asType << ")"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (T, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + ss.str(""); + ss << "void f(" << asType << ", " << asType << ", " << asType << ")"; + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_CONSTRUCT, ss.str().c_str(), asFUNCTIONPR(constructor<T>, + (T, T, T, void*), void), asCALL_CDECL_OBJLAST); assert(r >= 0); + + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DESTRUCT, "void f()", asFUNCTION(deconstructor<T>), + asCALL_CDECL_OBJLAST); assert(r >= 0); + + // Calculation behaviours. + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declActionType = ss.str(); + + ss.str(""); + ss << typeName << " f(const " << typeName << " &in, " << asType << ")"; + std::string declActionValue = ss.str(); + + ss.str(""); + ss << typeName << "& f(const " << typeName << " &in)"; + std::string declAssignType = ss.str(); + + ss.str(""); + ss << typeName << "& f(const " << asType << ")"; + std::string declAssignValue = ss.str(); + + // Assignment + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ASSIGNMENT, declAssignType.c_str(), + asMETHODPR(vector3d<T>, operator=, (const vector3d<T>&), + vector3d<T>&), asCALL_THISCALL); assert(r >= 0); + + // Multiply (*) + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionType.c_str(), asFUNCTIONPR(multiply<T>, + (const vector3d<T>&, const vector3d<T>&), vector3d<T>), + asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_MULTIPLY, declActionValue.c_str(), asFUNCTIONPR(multiply<T>, + (const vector3d<T>&, const T&), vector3d<T>), + asCALL_CDECL); assert(r >= 0); + + // Multiply Assign (*=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_MUL_ASSIGN, declAssignType.c_str(), + asMETHODPR(vector3d<T>, operator*=, (const vector3d<T>&), + vector3d<T>&), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_MUL_ASSIGN, declAssignValue.c_str(), + asMETHODPR(vector3d<T>, operator*=, (const T), vector3d<T>&), + asCALL_THISCALL); assert(r >= 0); + + // Add (+) + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionType.c_str(), asFUNCTIONPR(add<T>, + (const vector3d<T>&, const vector3d<T>&), vector3d<T>), + asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_ADD, declActionValue.c_str(), asFUNCTIONPR(add<T>, + (const vector3d<T>&, const T&), vector3d<T>), + asCALL_CDECL); assert(r >= 0); + + // Add Assign (+=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, declAssignType.c_str(), + asMETHODPR(vector3d<T>, operator+=, (const vector3d<T>&), + vector3d<T>&), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_ADD_ASSIGN, declAssignValue.c_str(), + asMETHODPR(vector3d<T>, operator+=, (const T), vector3d<T>&), + asCALL_THISCALL); assert(r >= 0); + + // Subtract (-) + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionType.c_str(), asFUNCTIONPR(subtract<T>, + (const vector3d<T>&, const vector3d<T>&), vector3d<T>), + asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT, declActionValue.c_str(), asFUNCTIONPR(subtract<T>, + (const vector3d<T>&, const T&), vector3d<T>), + asCALL_CDECL); assert(r >= 0); + + // Subtract Assign (-=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, declAssignType.c_str(), + asMETHODPR(vector3d<T>, operator-=, (const vector3d<T>&), + vector3d<T>&), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_SUB_ASSIGN, declAssignValue.c_str(), + asMETHODPR(vector3d<T>, operator-=, (const T), vector3d<T>&), + asCALL_THISCALL); assert(r >= 0); + + // Divide (/) + r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionType.c_str(), asFUNCTIONPR(divide<T>, + (const vector3d<T>&, const vector3d<T>&), vector3d<T>), + asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_DIVIDE, declActionValue.c_str(), asFUNCTIONPR(divide<T>, + (const vector3d<T>&, const T&), vector3d<T>), + asCALL_CDECL); assert(r >= 0); + + // Divide Assign (/=) + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DIV_ASSIGN, declAssignType.c_str(), + asMETHODPR(vector3d<T>, operator/=, (const vector3d<T>&), + vector3d<T>&), asCALL_THISCALL); assert(r >= 0); + r = engine->RegisterObjectBehaviour(typeName, asBEHAVE_DIV_ASSIGN, declAssignValue.c_str(), + asMETHODPR(vector3d<T>, operator/=, (const T), vector3d<T>&), + asCALL_THISCALL); assert(r >= 0); + + // Comparison behaviours. + ss.str(""); + ss << "bool f(const " << typeName << " &in, const " << typeName << " &in)"; + std::string declComparison = ss.str(); + + r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, declComparison.c_str(), asFUNCTIONPR(equal<T>, + (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_NOTEQUAL, declComparison.c_str(), asFUNCTIONPR(not_equal<T>, + (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_LESSTHAN, declComparison.c_str(), asFUNCTIONPR(less_than<T>, + (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_GREATERTHAN, declComparison.c_str(), asFUNCTIONPR(greater_than<T>, + (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_LEQUAL, declComparison.c_str(), asFUNCTIONPR(l_equal<T>, + (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalBehaviour(asBEHAVE_GEQUAL, declComparison.c_str(), asFUNCTIONPR(g_equal<T>, + (const vector3d<T>&, const vector3d<T>&), bool), asCALL_CDECL); assert(r >= 0); + + // Bind vector3d<T> class functions. + ss.str(""); + ss << typeName << " crossProduct(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, crossProduct), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " dotProduct(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, dotProduct), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getDistanceFrom(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, getDistanceFrom), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getDistanceFromSQ(const " << typeName << " &in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, getDistanceFromSQ), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << " getHorizontalAngle()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, getHorizontalAngle), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << " getInterpolated(const " << typeName << " &in, f64)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, getInterpolated), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << " getInterpolated_quadratic(const " << typeName << " &in, const " << typeName << "&in, f64)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, getInterpolated_quadratic), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getLength()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, getLength), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << asType << " getLengthSQ()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, getLengthSQ), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& interpolate(const " << typeName << " &in, const " << typeName << "&in, f64)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, interpolate), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& invert()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, invert), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "bool isBetweenPoints(const " << typeName << " &in, const " << typeName << "&in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, isBetweenPoints), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << typeName << "& normalize()"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector2d<T>, normalize), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void rotateXYBy(f64, const " << typeName << "&in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, rotateXYBy), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void rotateXZBy(f64, const " << typeName << "&in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, rotateXZBy), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void rotateYZBy(f64, const " << typeName << "&in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, rotateYZBy), asCALL_THISCALL); assert(r >= 0); + + ss.str(""); + ss << "void rotationToDirection(const " << typeName << "&in)"; + r = engine->RegisterObjectMethod(typeName, ss.str().c_str(), + asMETHOD(vector3d<T>, rotationToDirection), asCALL_THISCALL); assert(r >= 0); + + // Bind vector3d<T> class properties. + ss.str(""); + ss << asType << " X"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(vector3d<T>, X)); assert(r >= 0); + + ss.str(""); + ss << asType << " Y"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(vector3d<T>, Y)); assert(r >= 0); + + ss.str(""); + ss << asType << " Z"; + r = engine->RegisterObjectProperty(typeName, ss.str().c_str(), offsetof(vector3d<T>, Z)); assert(r >= 0); +} + +//! Binds all needed vector3d<T> objects to AngelScript. +//! @param engine Pointer to the AngelScript engine +void bindVector3d(asIScriptEngine *engine) +{ + bindVector3dT<f32>(engine, "vector3df", "f32"); + bindVector3dT<s32>(engine, "vector3di", "s32"); +} + +// End of File + Added: trunk/src/scripting/irrlicht/asVector3d.h =================================================================== --- trunk/src/scripting/irrlicht/asVector3d.h (rev 0) +++ trunk/src/scripting/irrlicht/asVector3d.h 2009-05-31 18:40:43 UTC (rev 46) @@ -0,0 +1,27 @@ +// ///////////////////////////////////////////////////////////////////////////// +// +// Name: asVector3d.h +// Author: Michael Bartsch (ZCCdark203) +// +// Desc : Binds the vector3d<T> class from the Irrlicht engine. +// +// License: Copyright (C) 2009 Michael Bartsch +// +// This program is free software: you can redistribute it +// and/or modify it under the terms of the zlib/libpng License. +// See main.cpp for conditions of distribution and use. +// +// ///////////////////////////////////////////////////////////////////////////// + +#ifndef __ASVECTOR3D_INCLUDED__ +#define __ASVECTOR3D_INCLUDED__ + +// Include files +#include "../../dependencies.h" + + +// AngelScript binding +extern void bindVector3d(asIScriptEngine *engine); + +#endif + Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-05-31 15:31:15 UTC (rev 45) +++ trunk/src/sirrf.cbp 2009-05-31 18:40:43 UTC (rev 46) @@ -112,6 +112,8 @@ <Unit filename="scripting/irrlicht/asIrrlicht.h" /> <Unit filename="scripting/irrlicht/asVector2d.cpp" /> <Unit filename="scripting/irrlicht/asVector2d.h" /> + <Unit filename="scripting/irrlicht/asVector3d.cpp" /> + <Unit filename="scripting/irrlicht/asVector3d.h" /> <Unit filename="scripting/scriptstring.cpp" /> <Unit filename="scripting/scriptstring.h" /> <Unit filename="scripting/scriptstring_utils.cpp" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-05-31 15:31:15 UTC (rev 45) +++ trunk/src/sirrf.depend 2009-05-31 18:40:43 UTC (rev 46) @@ -997,8 +997,9 @@ "../dependencies.h" "DataStore.h" -1242411405 /home/michael/Programming/Projects/sirrf/src/dependencies.h +1243791640 /home/michael/Programming/Projects/sirrf/src/dependencies.h <assert.h> + <stddef.h> <fstream> <iostream> <map> @@ -1043,7 +1044,7 @@ "../dependencies.h" "Entity.h" -1243783005 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp +1243793597 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp "GameManager.h" "../components/components.h" @@ -2380,13 +2381,20 @@ 1243782623 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.h "../../dependencies.h" -1243782927 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.cpp +1243794971 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.cpp "asVector2d.h" 1243782761 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h "../../dependencies.h" -1243782752 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp +1243793393 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp "asIrrlicht.h" "asVector2d.h" + "asVector3d.h" +1243793251 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.h + "../../dependencies.h" + +1243794943 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector3d.cpp + "asVector3d.h" + Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-05-31 15:31:15 UTC (rev 45) +++ trunk/src/sirrf.layout 2009-05-31 18:40:43 UTC (rev 46) @@ -89,7 +89,7 @@ <Cursor position="1149" topLine="23" /> </File> <File name="core/DataStack.cpp" open="0" top="0" tabpos="1"> - <Cursor position="3648" topLine="145" /> + <Cursor position="3648" topLine="226" /> </File> <File name="core/DataStack.h" open="0" top="0" tabpos="1"> <Cursor position="1161" topLine="47" /> @@ -101,16 +101,16 @@ <Cursor position="1436" topLine="22" /> </File> <File name="core/Entity.cpp" open="0" top="0" tabpos="3"> - <Cursor position="8988" topLine="351" /> + <Cursor position="8988" topLine="409" /> </File> <File name="core/Entity.h" open="0" top="0" tabpos="4"> <Cursor position="2227" topLine="52" /> </File> <File name="core/EntityComponent.cpp" open="0" top="0" tabpos="0"> - <Cursor position="2201" topLine="75" /> + <Cursor position="2798" topLine="75" /> </File> <File name="core/EntityComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="3180" topLine="58" /> + <Cursor position="3135" topLine="58" /> </File> <File name="core/EntityManager.cpp" open="0" top="0" tabpos="0"> <Cursor position="4379" topLine="197" /> @@ -125,7 +125,7 @@ <Cursor position="3562" topLine="92" /> </File> <File name="core/GameManager.cpp" open="0" top="0" tabpos="2"> - <Cursor position="5382" topLine="0" /> + <Cursor position="2214" topLine="39" /> </File> <File name="core/GameManager.h" open="0" top="0" tabpos="0"> <Cursor position="1032" topLine="29" /> @@ -137,29 +137,38 @@ <Cursor position="1063" topLine="4" /> </File> <File name="dependencies.h" open="0" top="0" tabpos="0"> - <Cursor position="0" topLine="15" /> + <Cursor position="735" topLine="0" /> </File> <File name="main.cpp" open="0" top="0" tabpos="0"> <Cursor position="1636" topLine="8" /> </File> <File name="scripting/Script.cpp" open="0" top="0" tabpos="0"> - <Cursor position="2012" topLine="62" /> + <Cursor position="2056" topLine="62" /> </File> <File name="scripting/Script.h" open="0" top="0" tabpos="0"> - <Cursor position="1075" topLine="15" /> + <Cursor position="0" topLine="15" /> </File> - <File name="scripting/ScriptManager.cpp" open="1" top="0" tabpos="2"> - <Cursor position="744" topLine="0" /> + <File name="scripting/ScriptManager.cpp" open="0" top="0" tabpos="2"> + <Cursor position="751" topLine="0" /> </File> <File name="scripting/ScriptManager.h" open="0" top="0" tabpos="1"> <Cursor position="1616" topLine="0" /> </File> - <File name="scripting/asIrrlicht.cpp" open="1" top="1" tabpos="1"> - <Cursor position="2748" topLine="88" /> + <File name="scripting/irrlicht/asIrrlicht.cpp" open="0" top="0" tabpos="0"> + <Cursor position="2152" topLine="338" /> </File> - <File name="scripting/asIrrlicht.h" open="0" top="0" tabpos="2"> - <Cursor position="763" topLine="0" /> + <File name="scripting/irrlicht/asIrrlicht.h" open="0" top="0" tabpos="0"> + <Cursor position="701" topLine="0" /> </File> + <File name="scripting/irrlicht/asVector2d.cpp" open="1" top="0" tabpos="3"> + <Cursor position="16109" topLine="332" /> + </File> + <File name="scripting/irrlicht/asVector3d.cpp" open="1" top="1" tabpos="1"> + <Cursor position="17589" topLine="10" /> + </File> + <File name="scripting/irrlicht/asVector3d.h" open="1" top="0" tabpos="2"> + <Cursor position="780" topLine="0" /> + </File> <File name="sound/SoundManager.cpp" open="0" top="0" tabpos="1"> <Cursor position="3962" topLine="144" /> </File> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zcc...@us...> - 2009-05-31 15:31:17
|
Revision: 45 http://sirrf.svn.sourceforge.net/sirrf/?rev=45&view=rev Author: zccdark203 Date: 2009-05-31 15:31:15 +0000 (Sun, 31 May 2009) Log Message: ----------- Files which were forgotten on the last revision commit. Modified Paths: -------------- trunk/src/sirrf.cbp trunk/src/sirrf.depend trunk/src/sirrf.layout Modified: trunk/src/sirrf.cbp =================================================================== --- trunk/src/sirrf.cbp 2009-05-31 15:30:20 UTC (rev 44) +++ trunk/src/sirrf.cbp 2009-05-31 15:31:15 UTC (rev 45) @@ -108,8 +108,10 @@ <Unit filename="scripting/Script.h" /> <Unit filename="scripting/ScriptManager.cpp" /> <Unit filename="scripting/ScriptManager.h" /> - <Unit filename="scripting/bindIrrlicht.cpp" /> - <Unit filename="scripting/bindIrrlicht.h" /> + <Unit filename="scripting/irrlicht/asIrrlicht.cpp" /> + <Unit filename="scripting/irrlicht/asIrrlicht.h" /> + <Unit filename="scripting/irrlicht/asVector2d.cpp" /> + <Unit filename="scripting/irrlicht/asVector2d.h" /> <Unit filename="scripting/scriptstring.cpp" /> <Unit filename="scripting/scriptstring.h" /> <Unit filename="scripting/scriptstring_utils.cpp" /> Modified: trunk/src/sirrf.depend =================================================================== --- trunk/src/sirrf.depend 2009-05-31 15:30:20 UTC (rev 44) +++ trunk/src/sirrf.depend 2009-05-31 15:31:15 UTC (rev 45) @@ -1027,12 +1027,12 @@ "../dependencies.h" "EntityComponent.h" -1243451609 /home/michael/Programming/Projects/sirrf/src/core/EntityComponent.h +1243691973 /home/michael/Programming/Projects/sirrf/src/core/EntityComponent.h "../dependencies.h" "Entity.h" "../scripting/ScriptManager.h" -1243451608 source:/home/michael/Programming/Projects/sirrf/src/core/EntityComponent.cpp +1243774766 source:/home/michael/Programming/Projects/sirrf/src/core/EntityComponent.cpp "EntityComponent.h" 1243451609 source:/home/michael/Programming/Projects/sirrf/src/core/EntityManager.cpp @@ -1043,7 +1043,7 @@ "../dependencies.h" "Entity.h" -1243683215 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp +1243783005 source:/home/michael/Programming/Projects/sirrf/src/core/GameManager.cpp "GameManager.h" "../components/components.h" @@ -1076,10 +1076,10 @@ 1240939945 source:/home/michael/Programming/Projects/sirrf/src/core/EventSubscriber.cpp -1243687542 source:/home/michael/Programming/Projects/sirrf/src/core/EventManager.cpp +1243691838 source:/home/michael/Programming/Projects/sirrf/src/core/EventManager.cpp "EventManager.h" -1243687542 /home/michael/Programming/Projects/sirrf/src/core/EventManager.h +1243691838 /home/michael/Programming/Projects/sirrf/src/core/EventManager.h "../dependencies.h" 1240941730 /home/michael/Programming/Projects/sirrf/src/core/EventSubscriber.h @@ -1106,9 +1106,9 @@ <angelscript.h> <string> -1243450575 source:/home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.cpp +1243782795 source:/home/michael/Programming/Projects/sirrf/src/scripting/ScriptManager.cpp "ScriptManager.h" - "bindIrrlicht.h" + "irrlicht/asIrrlicht.h" "../core/GameManager.h" 1228771288 /home/michael/Programming/Projects/sirrf/src/scripting/scriptstring.h @@ -1129,7 +1129,7 @@ "SceneComponent.h" "../../core/GameManager.h" -1243451607 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h +1243692206 /home/michael/Programming/Projects/sirrf/src/components/scene/SceneComponent.h "../../dependencies.h" "../../core/EntityComponent.h" @@ -1195,11 +1195,11 @@ "../../dependencies.h" "SceneComponent.h" -1243451608 source:/home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.cpp +1243692206 source:/home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.cpp "TerrainComponent.h" "../../core/GameManager.h" -1243450693 /home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.h +1243692206 /home/michael/Programming/Projects/sirrf/src/components/scene/TerrainComponent.h "../../dependencies.h" "SceneComponent.h" @@ -2367,6 +2367,26 @@ 1243269810 /home/michael/Programming/Projects/sirrf/src/scripting/bindIrrlicht.h "../dependencies.h" -1243451609 source:/home/michael/Programming/Projects/sirrf/src/scripting/bindIrrlicht.cpp +1243689101 source:/home/michael/Programming/Projects/sirrf/src/scripting/bindIrrlicht.cpp "bindIrrlicht.h" +1243269810 /home/michael/Programming/Projects/sirrf/src/scripting/asIrrlicht.h + "../dependencies.h" + +1243782623 source:/home/michael/Programming/Projects/sirrf/src/scripting/asIrrlicht.cpp + "asIrrlicht.h" + "irrlicht/asVector2d.h" + +1243782623 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.h + "../../dependencies.h" + +1243782927 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asVector2d.cpp + "asVector2d.h" + +1243782761 /home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.h + "../../dependencies.h" + +1243782752 source:/home/michael/Programming/Projects/sirrf/src/scripting/irrlicht/asIrrlicht.cpp + "asIrrlicht.h" + "asVector2d.h" + Modified: trunk/src/sirrf.layout =================================================================== --- trunk/src/sirrf.layout 2009-05-31 15:30:20 UTC (rev 44) +++ trunk/src/sirrf.layout 2009-05-31 15:31:15 UTC (rev 45) @@ -8,7 +8,7 @@ <Cursor position="11077" topLine="231" /> </File> <File name="components/scene/AnimatedMeshComponent.h" open="0" top="0" tabpos="6"> - <Cursor position="2600" topLine="35" /> + <Cursor position="2600" topLine="26" /> </File> <File name="components/scene/BillboardComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="4392" topLine="86" /> @@ -50,7 +50,7 @@ <Cursor position="9956" topLine="277" /> </File> <File name="components/scene/SceneComponent.h" open="0" top="0" tabpos="3"> - <Cursor position="947" topLine="3" /> + <Cursor position="2193" topLine="59" /> </File> <File name="components/scene/SkyBoxComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="3429" topLine="56" /> @@ -65,10 +65,10 @@ <Cursor position="1493" topLine="2" /> </File> <File name="components/scene/TerrainComponent.cpp" open="0" top="0" tabpos="3"> - <Cursor position="4843" topLine="121" /> + <Cursor position="3572" topLine="86" /> </File> <File name="components/scene/TerrainComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="1795" topLine="25" /> + <Cursor position="1720" topLine="25" /> </File> <File name="components/scene/TextBillboardComponent.cpp" open="0" top="0" tabpos="0"> <Cursor position="6388" topLine="131" /> @@ -101,7 +101,7 @@ <Cursor position="1436" topLine="22" /> </File> <File name="core/Entity.cpp" open="0" top="0" tabpos="3"> - <Cursor position="8988" topLine="390" /> + <Cursor position="8988" topLine="351" /> </File> <File name="core/Entity.h" open="0" top="0" tabpos="4"> <Cursor position="2227" topLine="52" /> @@ -110,7 +110,7 @@ <Cursor position="2201" topLine="75" /> </File> <File name="core/EntityComponent.h" open="0" top="0" tabpos="0"> - <Cursor position="1734" topLine="58" /> + <Cursor position="3180" topLine="58" /> </File> <File name="core/EntityManager.cpp" open="0" top="0" tabpos="0"> <Cursor position="4379" topLine="197" /> @@ -119,16 +119,16 @@ <Cursor position="974" topLine="24" /> </File> <File name="core/EventManager.cpp" open="0" top="0" tabpos="0"> - <Cursor position="4946" topLine="180" /> + <Cursor position="7732" topLine="0" /> </File> <File name="core/EventManager.h" open="0" top="0" tabpos="0"> - <Cursor position="3193" topLine="72" /> + <Cursor position="3562" topLine="92" /> </File> <File name="core/GameManager.cpp" open="0" top="0" tabpos="2"> - <Cursor position="5566" topLine="240" /> + <Cursor position="5382" topLine="0" /> </File> <File name="core/GameManager.h" open="0" top="0" tabpos="0"> - <Cursor position="2368" topLine="59" /> + <Cursor position="1032" topLine="29" /> </File> <File name="core/GameState.cpp" open="0" top="0" tabpos="0"> <Cursor position="1460" topLine="42" /> @@ -148,16 +148,16 @@ <File name="scripting/Script.h" open="0" top="0" tabpos="0"> <Cursor position="1075" topLine="15" /> </File> - <File name="scripting/ScriptManager.cpp" open="0" top="0" tabpos="2"> - <Cursor position="1531" topLine="24" /> + <File name="scripting/ScriptManager.cpp" open="1" top="0" tabpos="2"> + <Cursor position="744" topLine="0" /> </File> <File name="scripting/ScriptManager.h" open="0" top="0" tabpos="1"> - <Cursor position="2104" topLine="42" /> + <Cursor position="1616" topLine="0" /> </File> - <File name="scripting/bindIrrlicht.cpp" open="0" top="0" tabpos="1"> - <Cursor position="5614" topLine="123" /> + <File name="scripting/asIrrlicht.cpp" open="1" top="1" tabpos="1"> + <Cursor position="2748" topLine="88" /> </File> - <File name="scripting/bindIrrlicht.h" open="0" top="0" tabpos="2"> + <File name="scripting/asIrrlicht.h" open="0" top="0" tabpos="2"> <Cursor position="763" topLine="0" /> </File> <File name="sound/SoundManager.cpp" open="0" top="0" tabpos="1"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |