diff options
author | Nick Samarin <nicks1987@bigmir.net> | 2011-05-17 00:30:59 +0400 |
---|---|---|
committer | Nick Samarin <nicks1987@bigmir.net> | 2011-05-17 00:30:59 +0400 |
commit | a918040902bdeb7c9793168710871e4a3b7777a3 (patch) | |
tree | 7380f00bce5448d777d09f4be4d7127e8eecec49 /source/gameengine/Ketsji | |
parent | daeca2f8262884c436c5678225704b594ce5347b (diff) | |
parent | 99ee18c684da65ba774175c0b57a086e8222464a (diff) |
synched with trunk at revision 36569
Diffstat (limited to 'source/gameengine/Ketsji')
161 files changed, 1095 insertions, 521 deletions
diff --git a/source/gameengine/Ketsji/BL_BlenderShader.cpp b/source/gameengine/Ketsji/BL_BlenderShader.cpp index 109a693ec6d..91982a424c7 100644 --- a/source/gameengine/Ketsji/BL_BlenderShader.cpp +++ b/source/gameengine/Ketsji/BL_BlenderShader.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/BL_BlenderShader.cpp + * \ingroup ketsji + */ #include "DNA_customdata_types.h" #include "DNA_material_types.h" diff --git a/source/gameengine/Ketsji/BL_BlenderShader.h b/source/gameengine/Ketsji/BL_BlenderShader.h index c2d4245b77f..2f22e121b8c 100644 --- a/source/gameengine/Ketsji/BL_BlenderShader.h +++ b/source/gameengine/Ketsji/BL_BlenderShader.h @@ -1,3 +1,35 @@ +/* + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) Blender Foundation + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file BL_BlenderShader.h + * \ingroup ketsji + */ #ifndef __BL_GPUSHADER_H__ #define __BL_GPUSHADER_H__ diff --git a/source/gameengine/Ketsji/BL_Material.cpp b/source/gameengine/Ketsji/BL_Material.cpp index c63b9d55306..25fd5467e93 100644 --- a/source/gameengine/Ketsji/BL_Material.cpp +++ b/source/gameengine/Ketsji/BL_Material.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/BL_Material.cpp + * \ingroup ketsji + */ // ------------------------------------ #include "BL_Material.h" #include "DNA_material_types.h" diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h index 62e5a6e638b..126135f3d46 100644 --- a/source/gameengine/Ketsji/BL_Material.h +++ b/source/gameengine/Ketsji/BL_Material.h @@ -1,3 +1,8 @@ + +/** \file BL_Material.h + * \ingroup ketsji + */ + #ifndef __BL_MATERIAL_H__ #define __BL_MATERIAL_H__ diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp index b00c1b7efb7..621cabfe0cf 100644 --- a/source/gameengine/Ketsji/BL_Shader.cpp +++ b/source/gameengine/Ketsji/BL_Shader.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/BL_Shader.cpp + * \ingroup ketsji + */ #include "GL/glew.h" diff --git a/source/gameengine/Ketsji/BL_Shader.h b/source/gameengine/Ketsji/BL_Shader.h index 77c642ecc7b..41802a0a19f 100644 --- a/source/gameengine/Ketsji/BL_Shader.h +++ b/source/gameengine/Ketsji/BL_Shader.h @@ -1,3 +1,8 @@ + +/** \file BL_Shader.h + * \ingroup ketsji + */ + #ifndef __BL_SHADER_H__ #define __BL_SHADER_H__ diff --git a/source/gameengine/Ketsji/BL_Texture.cpp b/source/gameengine/Ketsji/BL_Texture.cpp index e708775b184..d2438a66367 100644 --- a/source/gameengine/Ketsji/BL_Texture.cpp +++ b/source/gameengine/Ketsji/BL_Texture.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/BL_Texture.cpp + * \ingroup ketsji + */ // ------------------------------------ #include "GL/glew.h" diff --git a/source/gameengine/Ketsji/BL_Texture.h b/source/gameengine/Ketsji/BL_Texture.h index eb3888b4862..3c60cad4fbf 100644 --- a/source/gameengine/Ketsji/BL_Texture.h +++ b/source/gameengine/Ketsji/BL_Texture.h @@ -1,3 +1,8 @@ + +/** \file BL_Texture.h + * \ingroup ketsji + */ + #ifndef __BL_TEXTURE_H__ #define __BL_TEXTURE_H__ diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt index 12b4ae171bd..61c635c7b5a 100644 --- a/source/gameengine/Ketsji/CMakeLists.txt +++ b/source/gameengine/Ketsji/CMakeLists.txt @@ -26,11 +26,12 @@ set(INC . - ../../../source/kernel/gen_system ../../../intern/string ../../../intern/guardedalloc + ../../../intern/container ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer ../../../source/gameengine/Converter + ../../../source/gameengine/BlenderRoutines ../../../source/blender/imbuf ../../../intern/moto/include ../../../source/gameengine/Ketsji @@ -52,7 +53,7 @@ set(INC ../../../intern/audaspace/intern ../../../source/blender/blenloader ../../../source/blender/gpu - ../../../extern/glew/include + ${GLEW_INCLUDE_PATH} ../../../extern/recastnavigation/Recast/Include ../../../extern/recastnavigation/Detour/Include ../../../source/blender/editors/include diff --git a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt index 5f251c832ee..17a5929420d 100644 --- a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt +++ b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt @@ -26,8 +26,8 @@ set(INC . - ../../../../source/kernel/gen_system ../../../../intern/string + ../../../../intern/container ../../../../intern/moto/include ../../../../source/gameengine/Ketsji ../../../../source/gameengine/GameLogic diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp index d922fb63b4f..e8e65371d3a 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * Ketsji Logic Extenstion: Network Event Manager generic implementation */ +/** \file gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp + * \ingroup ketsjinet + */ + + // Ketsji specific sensor part #include "SCA_ISensor.h" diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.h index 80139c67fd3..ff9131f464e 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.h +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,8 +25,13 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * Ketsji Logic Extenstion: Network Event Manager class */ + +/** \file KX_NetworkEventManager.h + * \ingroup ketsjinet + * \brief Ketsji Logic Extenstion: Network Event Manager class + */ + #ifndef KX_NETWORK_EVENTMANAGER_H #define KX_NETWORK_EVENTMANAGER_H diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp index 3ac95d7eaf8..2e0abc0290c 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * Ketsji Logic Extenstion: Network Message Actuator generic implementation */ +/** \file gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp + * \ingroup ketsjinet + */ + + #include <stddef.h> #include "NG_NetworkScene.h" diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h index 62bcca19955..3cea20c56d2 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,8 +25,13 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * Ketsji Logic Extenstion: Network Message Actuator class */ + +/** \file KX_NetworkMessageActuator.h + * \ingroup ketsjinet + * \brief Ketsji Logic Extenstion: Network Message Actuator class + */ + #ifndef __KX_NETWORKMESSAGEACTUATOR_H #define __KX_NETWORKMESSAGEACTUATOR_H diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp index 5d05534b258..6dcf50fa18f 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * Ketsji Logic Extenstion: Network Message Sensor generic implementation */ +/** \file gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp + * \ingroup ketsjinet + */ + + #include <stddef.h> #include "KX_NetworkMessageSensor.h" diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h index 8f5a11426a7..721e80195c3 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,7 +25,11 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * Ketsji Logic Extenstion: Network Message Sensor class + */ + +/** \file KX_NetworkMessageSensor.h + * \ingroup ketsjinet + * \brief Ketsji Logic Extenstion: Network Message Sensor class */ #ifndef __KX_NETWORKMESSAGE_SENSOR_H #define __KX_NETWORKMESSAGE_SENSOR_H diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.cpp index 5350c32fff7..0679e34eaad 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,3 +26,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.cpp + * \ingroup ketsjinet + */ + diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.h index aca0805c337..74b6dfede97 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.h +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,3 +27,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.h + * \ingroup ketsjinet + */ + + diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.cpp index aca0805c337..6140ec337e3 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,3 +27,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.cpp + * \ingroup ketsjinet + */ + + diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.h index aca0805c337..b7264bbf4b6 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.h +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,3 +27,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.h + * \ingroup ketsjinet + */ + + diff --git a/source/gameengine/Ketsji/KXNetwork/SConscript b/source/gameengine/Ketsji/KXNetwork/SConscript index 78cdc8df9af..3d696501203 100644 --- a/source/gameengine/Ketsji/KXNetwork/SConscript +++ b/source/gameengine/Ketsji/KXNetwork/SConscript @@ -3,7 +3,8 @@ Import ('env') sources = env.Glob('*.cpp') -incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/Ketsji' +incs = '. #intern/string #intern/moto/include' +incs += ' #source/gameengine/Ketsji #intern/container' incs += ' #source/gameengine/GameLogic #source/gameengine/Expressions' incs += ' #source/gameengine/Network #source/gameengine/SceneGraph' diff --git a/source/gameengine/Ketsji/KX_ArmatureSensor.cpp b/source/gameengine/Ketsji/KX_ArmatureSensor.cpp index 732c0b910df..f39793e0493 100644 --- a/source/gameengine/Ketsji/KX_ArmatureSensor.cpp +++ b/source/gameengine/Ketsji/KX_ArmatureSensor.cpp @@ -1,4 +1,4 @@ -/** +/* * Armature sensor * * $Id$ @@ -29,6 +29,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_ArmatureSensor.cpp + * \ingroup ketsji + */ + + #include "DNA_action_types.h" #include "DNA_constraint_types.h" #include "BKE_constraint.h" diff --git a/source/gameengine/Ketsji/KX_ArmatureSensor.h b/source/gameengine/Ketsji/KX_ArmatureSensor.h index b007899c4ff..42e042e1401 100644 --- a/source/gameengine/Ketsji/KX_ArmatureSensor.h +++ b/source/gameengine/Ketsji/KX_ArmatureSensor.h @@ -1,6 +1,4 @@ -/** - * Property sensor - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_ArmatureSensor.h + * \ingroup ketsji + * \brief Property sensor + */ + #ifndef __KX_ARMATURESENSOR #define __KX_ARMATURESENSOR diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index a4dc68b92e5..9ff32ba57c5 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/KX_BlenderMaterial.cpp + * \ingroup ketsji + */ // ------------------------------------ // ... diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h index 745045ff784..766e20be825 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.h +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h @@ -1,3 +1,8 @@ + +/** \file KX_BlenderMaterial.h + * \ingroup ketsji + */ + #ifndef __KX_BLENDER_MATERIAL_H__ #define __KX_BLENDER_MATERIAL_H__ @@ -91,9 +96,9 @@ public: virtual void Replace_IScene(SCA_IScene *val) { + mScene= static_cast<KX_Scene *>(val); if (mBlenderShader) { - mScene= static_cast<KX_Scene *>(val); mBlenderShader->SetScene(mScene); } }; diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp index c2fb21bf31a..fde01961fd5 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/KX_BulletPhysicsController.cpp + * \ingroup ketsji + */ //under visual studio the #define in KX_ConvertPhysicsObject.h is quicker for recompilation #include "KX_ConvertPhysicsObject.h" @@ -521,4 +524,15 @@ bool KX_BulletPhysicsController::Update(double time) // return false; } + +const char* KX_BulletPhysicsController::getName() +{ + if (m_pObject) + { + KX_GameObject* gameobj = (KX_GameObject*) m_pObject->GetSGClientObject(); + return gameobj->GetName(); + } + return 0; +} + #endif // USE_BULLET diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.h b/source/gameengine/Ketsji/KX_BulletPhysicsController.h index a3e8fafec1d..c0ff143919d 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.h +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.h @@ -1,3 +1,8 @@ + +/** \file KX_BulletPhysicsController.h + * \ingroup ketsji + */ + #ifndef KX_BULLET2PHYSICS_CONTROLLER #define KX_BULLET2PHYSICS_CONTROLLER @@ -75,6 +80,8 @@ public: virtual bool Update(double time); void* GetUserData() { return m_userdata;} + virtual const char* getName(); + void SetOption( int option, diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index 1711ba7f64f..98ea25c135a 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -27,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** * Camera in the gameengine. Cameras are also used for views. */ + +/** \file gameengine/Ketsji/KX_Camera.cpp + * \ingroup ketsji + */ + #include "GL/glew.h" #include "KX_Camera.h" @@ -382,7 +387,7 @@ int KX_Camera::BoxInsideFrustum(const MT_Point3 *box) for( unsigned int p = 0; p < 6 ; p++ ) { unsigned int behindCount = 0; - // 8 box verticies. + // 8 box vertices. for (unsigned int v = 0; v < 8 ; v++) { if (m_planes[p][0]*box[v][0] + m_planes[p][1]*box[v][1] + m_planes[p][2]*box[v][2] + m_planes[p][3] < 0.) @@ -398,7 +403,7 @@ int KX_Camera::BoxInsideFrustum(const MT_Point3 *box) insideCount++; } - // All box verticies are on the front side of all frustum planes. + // All box vertices are on the front side of all frustum planes. if (insideCount == 6) return INSIDE; diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h index 130dfd4067d..61a0e39e546 100644 --- a/source/gameengine/Ketsji/KX_Camera.h +++ b/source/gameengine/Ketsji/KX_Camera.h @@ -25,7 +25,11 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * Camera in the gameengine. Cameras are also used for views. + */ + +/** \file KX_Camera.h + * \ingroup ketsji + * \brief Camera in the gameengine. Cameras are also used for views. */ #ifndef __KX_CAMERA diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index 18d3e046577..d68cb453fe8 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * KX_CameraActuator.cpp * * $Id$ @@ -30,6 +30,11 @@ * */ +/** \file gameengine/Ketsji/KX_CameraActuator.cpp + * \ingroup ketsji + */ + + #include "KX_CameraActuator.h" #include <iostream> #include <math.h> @@ -96,7 +101,7 @@ bool KX_CameraActuator::UnlinkObject(SCA_IObject* clientobj) } -void KX_CameraActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map) +void KX_CameraActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map) { void **h_obj = (*obj_map)[m_ob]; if (h_obj) { diff --git a/source/gameengine/Ketsji/KX_CameraActuator.h b/source/gameengine/Ketsji/KX_CameraActuator.h index 0a0a47f1ce2..d59fcff9370 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.h +++ b/source/gameengine/Ketsji/KX_CameraActuator.h @@ -1,4 +1,4 @@ -/** +/* * KX_CameraActuator.h * * $Id$ @@ -29,6 +29,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_CameraActuator.h + * \ingroup ketsji + */ + #ifndef __KX_CAMERAACTUATOR #define __KX_CAMERAACTUATOR @@ -112,7 +116,7 @@ private : virtual bool UnlinkObject(SCA_IObject* clientobj); /** Methods inherited from SCA_ILogicBrick */ - virtual void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map); + virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); #ifdef WITH_PYTHON diff --git a/source/gameengine/Ketsji/KX_CameraIpoSGController.cpp b/source/gameengine/Ketsji/KX_CameraIpoSGController.cpp index 0bfa1133a1c..bd3ab1d0580 100644 --- a/source/gameengine/Ketsji/KX_CameraIpoSGController.cpp +++ b/source/gameengine/Ketsji/KX_CameraIpoSGController.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_CameraIpoSGController.cpp + * \ingroup ketsji + */ + + #include "KX_CameraIpoSGController.h" #include "KX_ScalarInterpolator.h" #include "KX_Camera.h" diff --git a/source/gameengine/Ketsji/KX_CameraIpoSGController.h b/source/gameengine/Ketsji/KX_CameraIpoSGController.h index e6596edbd1d..967decfa7b0 100644 --- a/source/gameengine/Ketsji/KX_CameraIpoSGController.h +++ b/source/gameengine/Ketsji/KX_CameraIpoSGController.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_CameraIpoSGController.h + * \ingroup ketsji + */ + #ifndef KX_CAMERAIPOSGCONTROLLER_H #define KX_CAMERAIPOSGCONTROLLER_H diff --git a/source/gameengine/Ketsji/KX_ClientObjectInfo.h b/source/gameengine/Ketsji/KX_ClientObjectInfo.h index c42843274b3..ae84cf2e300 100644 --- a/source/gameengine/Ketsji/KX_ClientObjectInfo.h +++ b/source/gameengine/Ketsji/KX_ClientObjectInfo.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_ClientObjectInfo.h + * \ingroup ketsji + */ + #ifndef __KX_CLIENTOBJECT_INFO_H #define __KX_CLIENTOBJECT_INFO_H diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index 15a4a4680bb..708424cae3a 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * Apply a constraint to a position or rotation value * * $Id$ @@ -29,6 +29,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_ConstraintActuator.cpp + * \ingroup ketsji + */ + + #include "SCA_IActuator.h" #include "KX_ConstraintActuator.h" #include "SCA_IObject.h" diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h index 7bde2c1d3f7..d2eea1f7414 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.h +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h @@ -1,6 +1,4 @@ -/** - * KX_ConstraintActuator.h - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_ConstraintActuator.h + * \ingroup ketsji + */ + #ifndef __KX_CONSTRAINTACTUATOR #define __KX_CONSTRAINTACTUATOR diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp index 2882ca5a371..95ec6e94f18 100644 --- a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_ConstraintWrapper.cpp + * \ingroup ketsji + */ + + #include "PyObjectPlus.h" #include "KX_ConstraintWrapper.h" #include "PHY_IPhysicsEnvironment.h" diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.h b/source/gameengine/Ketsji/KX_ConstraintWrapper.h index 58c204d5da0..1177586b95f 100644 --- a/source/gameengine/Ketsji/KX_ConstraintWrapper.h +++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_ConstraintWrapper.h + * \ingroup ketsji + */ + #ifndef KX_CONSTRAINT_WRAPPER #define KX_CONSTRAINT_WRAPPER diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h index 2bb3534bde7..fa8c8d253e7 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_ConvertPhysicsObject.h + * \ingroup ketsji + */ + #ifndef KX_CONVERTPHYSICSOBJECTS #define KX_CONVERTPHYSICSOBJECTS diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index e238d7babec..7bd8c445849 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp + * \ingroup ketsji + */ + #if defined(WIN32) && !defined(FREE_WINDOWS) #pragma warning (disable : 4786) #endif @@ -37,13 +42,13 @@ #include "BL_DeformableGameObject.h" #include "RAS_MeshObject.h" #include "KX_Scene.h" -#include "SYS_System.h" +#include "BL_System.h" #include "PHY_Pro.h" //todo cleanup #include "KX_ClientObjectInfo.h" -#include "GEN_Map.h" -#include "GEN_HashedPtr.h" +#include "CTR_Map.h" +#include "CTR_HashedPtr.h" #include "KX_PhysicsEngineEnums.h" #include "PHY_Pro.h" diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index 36fc02ab833..2e1fb933ad0 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/KX_Dome.cpp + * \ingroup ketsji + */ /* $Id$ ----------------------------------------------------------------------------- diff --git a/source/gameengine/Ketsji/KX_Dome.h b/source/gameengine/Ketsji/KX_Dome.h index 749fbebe61c..844f40f0578 100644 --- a/source/gameengine/Ketsji/KX_Dome.h +++ b/source/gameengine/Ketsji/KX_Dome.h @@ -22,6 +22,10 @@ Developed as part of a Research and Development project for SAT - La Soci�t� ----------------------------------------------------------------------------- */ +/** \file KX_Dome.h + * \ingroup ketsji + */ + #if !defined KX_DOME_H #define KX_DOME_H diff --git a/source/gameengine/Ketsji/KX_EmptyObject.cpp b/source/gameengine/Ketsji/KX_EmptyObject.cpp index 7dc66b3fb88..27ed6c6a6cc 100644 --- a/source/gameengine/Ketsji/KX_EmptyObject.cpp +++ b/source/gameengine/Ketsji/KX_EmptyObject.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file gameengine/Ketsji/KX_EmptyObject.cpp + * \ingroup ketsji + */ + #include "KX_EmptyObject.h" KX_EmptyObject::~KX_EmptyObject() diff --git a/source/gameengine/Ketsji/KX_EmptyObject.h b/source/gameengine/Ketsji/KX_EmptyObject.h index c41e40fdd41..e22e1aa7926 100644 --- a/source/gameengine/Ketsji/KX_EmptyObject.h +++ b/source/gameengine/Ketsji/KX_EmptyObject.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_EmptyObject.h + * \ingroup ketsji + */ + #ifndef __KX_EMPTYOBJECT #define __KX_EMPTYOBJECT #include "KX_GameObject.h" diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index 7056b0bee53..dbb98588127 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -1,5 +1,5 @@ -/** - * $Id: KX_FontObject.cpp 34077 2011-01-04 21:27:44Z dfelinto $ +/* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file gameengine/Ketsji/KX_FontObject.cpp + * \ingroup ketsji + */ + #include "KX_FontObject.h" #include "DNA_curve_types.h" #include "KX_Scene.h" diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h index 99f3f2b713d..c29ee4bcdcf 100644 --- a/source/gameengine/Ketsji/KX_FontObject.h +++ b/source/gameengine/Ketsji/KX_FontObject.h @@ -1,5 +1,5 @@ -/** - * $Id: KX_FontObject.h 34077 2011-01-04 21:27:44Z dfelinto $ +/* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_FontObject.h + * \ingroup ketsji + */ + #ifndef __KX_FONTOBJECT #define __KX_FONTOBJECT #include "KX_GameObject.h" diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp index 4929187c3ee..e0c269d6e26 100644 --- a/source/gameengine/Ketsji/KX_GameActuator.cpp +++ b/source/gameengine/Ketsji/KX_GameActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * global game stuff * * $Id$ @@ -29,6 +29,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_GameActuator.cpp + * \ingroup ketsji + */ + + #include <stddef.h> #include "SCA_IActuator.h" diff --git a/source/gameengine/Ketsji/KX_GameActuator.h b/source/gameengine/Ketsji/KX_GameActuator.h index 273d6664e1d..eee38b02406 100644 --- a/source/gameengine/Ketsji/KX_GameActuator.h +++ b/source/gameengine/Ketsji/KX_GameActuator.h @@ -1,7 +1,3 @@ - -// -// actuator for global game stuff -// // $Id$ // // ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +26,11 @@ // ***** END GPL LICENSE BLOCK ***** // +/** \file KX_GameActuator.h + * \ingroup ketsji + * \brief actuator for global game stuff + */ + #ifndef __KX_GAMEACTUATOR #define __KX_GAMEACTUATOR diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 8cab7c17d8a..d4ef462fb27 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * Game object wrapper */ +/** \file gameengine/Ketsji/KX_GameObject.cpp + * \ingroup ketsji + */ + + #if defined(_WIN64) typedef unsigned __int64 uint_ptr; #else @@ -159,8 +164,9 @@ KX_GameObject::~KX_GameObject() #ifdef WITH_PYTHON if (m_attr_dict) { - PyDict_Clear(m_attr_dict); /* incase of circular refs or other weired cases */ - Py_DECREF(m_attr_dict); + PyDict_Clear(m_attr_dict); /* incase of circular refs or other weird cases */ + /* Py_CLEAR: Py_DECREF's and NULL's */ + Py_CLEAR(m_attr_dict); } #endif // WITH_PYTHON } @@ -1234,7 +1240,7 @@ CListValue* KX_GameObject::GetChildrenRecursive() /* --------------------------------------------------------------------- * Some stuff taken from the header * --------------------------------------------------------------------- */ -void KX_GameObject::Relink(GEN_Map<GEN_HashedPtr, void*> *map_parameter) +void KX_GameObject::Relink(CTR_Map<CTR_HashedPtr, void*> *map_parameter) { // we will relink the sensors and actuators that use object references // if the object is part of the replicated hierarchy, use the new @@ -1273,16 +1279,16 @@ static int mathutils_kxgameob_generic_check(BaseMathObject *bmo) { KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; - return 1; + return 0; } static int mathutils_kxgameob_vector_get(BaseMathObject *bmo, int subtype) { KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; #define PHYS_ERR(attr) PyErr_SetString(PyExc_AttributeError, "KX_GameObject." attr ", is missing a physics controller") @@ -1300,26 +1306,26 @@ static int mathutils_kxgameob_vector_get(BaseMathObject *bmo, int subtype) self->NodeGetWorldScaling().getValue(bmo->data); break; case MATHUTILS_VEC_CB_INERTIA_LOCAL: - if(!self->GetPhysicsController()) return PHYS_ERR("localInertia"), 0; + if(!self->GetPhysicsController()) return PHYS_ERR("localInertia"), -1; self->GetPhysicsController()->GetLocalInertia().getValue(bmo->data); break; case MATHUTILS_VEC_CB_OBJECT_COLOR: self->GetObjectColor().getValue(bmo->data); break; case MATHUTILS_VEC_CB_LINVEL_LOCAL: - if(!self->GetPhysicsController()) return PHYS_ERR("localLinearVelocity"), 0; + if(!self->GetPhysicsController()) return PHYS_ERR("localLinearVelocity"), -1; self->GetLinearVelocity(true).getValue(bmo->data); break; case MATHUTILS_VEC_CB_LINVEL_GLOBAL: - if(!self->GetPhysicsController()) return PHYS_ERR("worldLinearVelocity"), 0; + if(!self->GetPhysicsController()) return PHYS_ERR("worldLinearVelocity"), -1; self->GetLinearVelocity(false).getValue(bmo->data); break; case MATHUTILS_VEC_CB_ANGVEL_LOCAL: - if(!self->GetPhysicsController()) return PHYS_ERR("localLinearVelocity"), 0; + if(!self->GetPhysicsController()) return PHYS_ERR("localLinearVelocity"), -1; self->GetAngularVelocity(true).getValue(bmo->data); break; case MATHUTILS_VEC_CB_ANGVEL_GLOBAL: - if(!self->GetPhysicsController()) return PHYS_ERR("worldLinearVelocity"), 0; + if(!self->GetPhysicsController()) return PHYS_ERR("worldLinearVelocity"), -1; self->GetAngularVelocity(false).getValue(bmo->data); break; @@ -1327,14 +1333,14 @@ static int mathutils_kxgameob_vector_get(BaseMathObject *bmo, int subtype) #undef PHYS_ERR - return 1; + return 0; } static int mathutils_kxgameob_vector_set(BaseMathObject *bmo, int subtype) { KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; switch(subtype) { case MATHUTILS_VEC_CB_POS_LOCAL: @@ -1351,7 +1357,7 @@ static int mathutils_kxgameob_vector_set(BaseMathObject *bmo, int subtype) break; case MATHUTILS_VEC_CB_SCALE_GLOBAL: PyErr_SetString(PyExc_AttributeError, "KX_GameObject.worldScale is read-only"); - return 0; + return -1; case MATHUTILS_VEC_CB_INERTIA_LOCAL: /* read only */ break; @@ -1372,15 +1378,15 @@ static int mathutils_kxgameob_vector_set(BaseMathObject *bmo, int subtype) break; } - return 1; + return 0; } static int mathutils_kxgameob_vector_get_index(BaseMathObject *bmo, int subtype, int index) { /* lazy, avoid repeteing the case statement */ - if(!mathutils_kxgameob_vector_get(bmo, subtype)) - return 0; - return 1; + if(mathutils_kxgameob_vector_get(bmo, subtype) == -1) + return -1; + return 0; } static int mathutils_kxgameob_vector_set_index(BaseMathObject *bmo, int subtype, int index) @@ -1388,8 +1394,8 @@ static int mathutils_kxgameob_vector_set_index(BaseMathObject *bmo, int subtype, float f= bmo->data[index]; /* lazy, avoid repeteing the case statement */ - if(!mathutils_kxgameob_vector_get(bmo, subtype)) - return 0; + if(mathutils_kxgameob_vector_get(bmo, subtype) == -1) + return -1; bmo->data[index]= f; return mathutils_kxgameob_vector_set(bmo, subtype); @@ -1413,7 +1419,7 @@ static int mathutils_kxgameob_matrix_get(BaseMathObject *bmo, int subtype) { KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; switch(subtype) { case MATHUTILS_MAT_CB_ORI_LOCAL: @@ -1424,7 +1430,7 @@ static int mathutils_kxgameob_matrix_get(BaseMathObject *bmo, int subtype) break; } - return 1; + return 0; } @@ -1432,7 +1438,7 @@ static int mathutils_kxgameob_matrix_set(BaseMathObject *bmo, int subtype) { KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; MT_Matrix3x3 mat3x3; switch(subtype) { @@ -1448,7 +1454,7 @@ static int mathutils_kxgameob_matrix_set(BaseMathObject *bmo, int subtype) break; } - return 1; + return 0; } Mathutils_Callback mathutils_kxgameob_matrix_cb = { diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 4ca979786ae..2ea6e9552a2 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -25,7 +25,11 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * General KX game object. + */ + +/** \file KX_GameObject.h + * \ingroup ketsji + * \brief General KX game object. */ #ifndef __KX_GAMEOBJECT @@ -43,8 +47,8 @@ #include "SG_Node.h" #include "MT_Transform.h" #include "MT_CmMatrix4x4.h" -#include "GEN_Map.h" -#include "GEN_HashedPtr.h" +#include "CTR_Map.h" +#include "CTR_HashedPtr.h" #include "KX_Scene.h" #include "KX_KetsjiEngine.h" /* for m_anim_framerate */ #include "KX_IPhysicsController.h" /* for suspend/resume */ @@ -141,7 +145,7 @@ public: virtual void /* This function should be virtual - derived classed override it */ Relink( - GEN_Map<GEN_HashedPtr, void*> *map + CTR_Map<CTR_HashedPtr, void*> *map ); /** diff --git a/source/gameengine/Ketsji/KX_IInterpolator.h b/source/gameengine/Ketsji/KX_IInterpolator.h index aadc964fe49..8eb62f84883 100644 --- a/source/gameengine/Ketsji/KX_IInterpolator.h +++ b/source/gameengine/Ketsji/KX_IInterpolator.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_IInterpolator.h + * \ingroup ketsji + */ + #ifndef KX_IINTERPOLATOR_H #define KX_IINTERPOLATOR_H diff --git a/source/gameengine/Ketsji/KX_IPOTransform.h b/source/gameengine/Ketsji/KX_IPOTransform.h index ba2adfe2ef6..98eefa83e0d 100644 --- a/source/gameengine/Ketsji/KX_IPOTransform.h +++ b/source/gameengine/Ketsji/KX_IPOTransform.h @@ -1,6 +1,4 @@ -/** - * An abstract object you can move around in a 3d world, and has some logic - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_IPOTransform.h + * \ingroup ketsji + * \brief An abstract object you can move around in a 3d world, and has some logic + */ + #ifndef KX_IPOTRANSFORM_H #define KX_IPOTRANSFORM_H diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.cpp b/source/gameengine/Ketsji/KX_IPO_SGController.cpp index abe63a68e79..3c73bb6a619 100644 --- a/source/gameengine/Ketsji/KX_IPO_SGController.cpp +++ b/source/gameengine/Ketsji/KX_IPO_SGController.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * Scenegraph controller for ipos. */ +/** \file gameengine/Ketsji/KX_IPO_SGController.cpp + * \ingroup ketsji + */ + + #if defined(_WIN64) typedef unsigned __int64 uint_ptr; #else diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.h b/source/gameengine/Ketsji/KX_IPO_SGController.h index 12803cde2f1..3d52eaea679 100644 --- a/source/gameengine/Ketsji/KX_IPO_SGController.h +++ b/source/gameengine/Ketsji/KX_IPO_SGController.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_IPO_SGController.h + * \ingroup ketsji + */ + #ifndef __IPO_SGCONTROLLER_H #define __IPO_SGCONTROLLER_H diff --git a/source/gameengine/Ketsji/KX_IPhysicsController.cpp b/source/gameengine/Ketsji/KX_IPhysicsController.cpp index 18816e92bbb..4595fa22310 100644 --- a/source/gameengine/Ketsji/KX_IPhysicsController.cpp +++ b/source/gameengine/Ketsji/KX_IPhysicsController.cpp @@ -1,4 +1,4 @@ -/** +/* * @file KX_IPhysicsController.cpp * $Id$ * @@ -27,6 +27,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file gameengine/Ketsji/KX_IPhysicsController.cpp + * \ingroup ketsji + */ + #include "KX_IPhysicsController.h" #include "PHY_DynamicTypes.h" diff --git a/source/gameengine/Ketsji/KX_IPhysicsController.h b/source/gameengine/Ketsji/KX_IPhysicsController.h index 288e779fee4..8bc28aa82b8 100644 --- a/source/gameengine/Ketsji/KX_IPhysicsController.h +++ b/source/gameengine/Ketsji/KX_IPhysicsController.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_IPhysicsController.h + * \ingroup ketsji + */ + #ifndef __KX_IPHYSICSCONTROLLER_H #define __KX_IPHYSICSCONTROLLER_H diff --git a/source/gameengine/Ketsji/KX_IScalarInterpolator.h b/source/gameengine/Ketsji/KX_IScalarInterpolator.h index a84e1b570fd..46781557a01 100644 --- a/source/gameengine/Ketsji/KX_IScalarInterpolator.h +++ b/source/gameengine/Ketsji/KX_IScalarInterpolator.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_IScalarInterpolator.h + * \ingroup ketsji + */ + #ifndef KX_ISCALARINTERPOLATOR_H #define KX_ISCALARINTERPOLATOR_H diff --git a/source/gameengine/Ketsji/KX_ISceneConverter.h b/source/gameengine/Ketsji/KX_ISceneConverter.h index 8a11b875347..7d85e69ecdd 100644 --- a/source/gameengine/Ketsji/KX_ISceneConverter.h +++ b/source/gameengine/Ketsji/KX_ISceneConverter.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_ISceneConverter.h + * \ingroup ketsji + */ + #ifndef __KX_ISCENECONVERTER_H #define __KX_ISCENECONVERTER_H diff --git a/source/gameengine/Ketsji/KX_ISystem.h b/source/gameengine/Ketsji/KX_ISystem.h index fb019299135..da79bec51d5 100644 --- a/source/gameengine/Ketsji/KX_ISystem.h +++ b/source/gameengine/Ketsji/KX_ISystem.h @@ -1,6 +1,4 @@ -/** -* Abstract system -* +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_ISystem.h + * \ingroup ketsji + * \brief Abstract system + */ + #ifndef __KX_ISYSTEM #define __KX_ISYSTEM diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index d6ff1ee822e..aed6c666404 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * Do Ipo stuff * * $Id$ @@ -29,6 +29,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_IpoActuator.cpp + * \ingroup ketsji + */ + + #if defined (__sgi) #include <math.h> #else diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index 61e7f0451d1..56a60f48049 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -1,6 +1,4 @@ -/** - * Do an object ipo - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_IpoActuator.h + * \ingroup ketsji + * \brief Do an object ipo + */ + #ifndef __KX_IPOACTUATOR #define __KX_IPOACTUATOR diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 0eec3bd8731..eef543e629c 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -28,11 +28,17 @@ * The engine ties all game modules together. */ +/** \file gameengine/Ketsji/KX_KetsjiEngine.cpp + * \ingroup ketsji + */ + + #if defined(WIN32) && !defined(FREE_WINDOWS) #pragma warning (disable : 4786) #endif //WIN32 #include <iostream> +#include <stdio.h> #include "KX_KetsjiEngine.h" @@ -72,7 +78,6 @@ #include "KX_TimeCategoryLogger.h" #include "RAS_FramingManager.h" -#include "stdio.h" #include "DNA_world_types.h" #include "DNA_scene_types.h" diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h index 8b07a998c33..8cd6fdb8f5f 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.h +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h @@ -27,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** * */ + +/** \file KX_KetsjiEngine.h + * \ingroup ketsji + */ + #ifndef __KX_KETSJI_ENGINE #define __KX_KETSJI_ENGINE diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index 3e03a33e82f..49f00e39110 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_Light.cpp + * \ingroup ketsji + */ + + #if defined(WIN32) && !defined(FREE_WINDOWS) #pragma warning (disable : 4786) #endif diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h index f7b40d24293..08e4e9da2e5 100644 --- a/source/gameengine/Ketsji/KX_Light.h +++ b/source/gameengine/Ketsji/KX_Light.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_Light.h + * \ingroup ketsji + */ + #ifndef __KX_LIGHT #define __KX_LIGHT diff --git a/source/gameengine/Ketsji/KX_LightIpoSGController.cpp b/source/gameengine/Ketsji/KX_LightIpoSGController.cpp index 3a010556cfe..8ffaf3e0e63 100644 --- a/source/gameengine/Ketsji/KX_LightIpoSGController.cpp +++ b/source/gameengine/Ketsji/KX_LightIpoSGController.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_LightIpoSGController.cpp + * \ingroup ketsji + */ + + #include "KX_LightIpoSGController.h" #include "KX_ScalarInterpolator.h" #include "KX_Light.h" diff --git a/source/gameengine/Ketsji/KX_LightIpoSGController.h b/source/gameengine/Ketsji/KX_LightIpoSGController.h index c857994d145..8271343907c 100644 --- a/source/gameengine/Ketsji/KX_LightIpoSGController.h +++ b/source/gameengine/Ketsji/KX_LightIpoSGController.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_LightIpoSGController.h + * \ingroup ketsji + */ + #ifndef KX_LIGHTIPOSGCONTROLLER_H #define KX_LIGHTIPOSGCONTROLLER_H diff --git a/source/gameengine/Ketsji/KX_MaterialIpoController.cpp b/source/gameengine/Ketsji/KX_MaterialIpoController.cpp index 13d272ee92d..9a19cb08fad 100644 --- a/source/gameengine/Ketsji/KX_MaterialIpoController.cpp +++ b/source/gameengine/Ketsji/KX_MaterialIpoController.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/KX_MaterialIpoController.cpp + * \ingroup ketsji + */ #include "KX_MaterialIpoController.h" #include "KX_ScalarInterpolator.h" diff --git a/source/gameengine/Ketsji/KX_MaterialIpoController.h b/source/gameengine/Ketsji/KX_MaterialIpoController.h index a979f59ec95..85b2a971fbe 100644 --- a/source/gameengine/Ketsji/KX_MaterialIpoController.h +++ b/source/gameengine/Ketsji/KX_MaterialIpoController.h @@ -1,3 +1,8 @@ + +/** \file KX_MaterialIpoController.h + * \ingroup ketsji + */ + #ifndef __KX_MATERIALIPOCONTROLLER_H__ #define __KX_MATERIALIPOCONTROLLER_H__ diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index 6fa7e023139..ba41dc355f7 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_MeshProxy.cpp + * \ingroup ketsji + */ + + #ifdef WITH_PYTHON #include "KX_MeshProxy.h" diff --git a/source/gameengine/Ketsji/KX_MeshProxy.h b/source/gameengine/Ketsji/KX_MeshProxy.h index 29231498163..7074c120988 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.h +++ b/source/gameengine/Ketsji/KX_MeshProxy.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_MeshProxy.h + * \ingroup ketsji + */ + #ifndef __KX_MESHPROXY #define __KX_MESHPROXY diff --git a/source/gameengine/Ketsji/KX_MotionState.cpp b/source/gameengine/Ketsji/KX_MotionState.cpp index 08f8ee556d1..db98097a3ce 100644 --- a/source/gameengine/Ketsji/KX_MotionState.cpp +++ b/source/gameengine/Ketsji/KX_MotionState.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file gameengine/Ketsji/KX_MotionState.cpp + * \ingroup ketsji + */ + #include "KX_MotionState.h" #include "SG_Spatial.h" diff --git a/source/gameengine/Ketsji/KX_MotionState.h b/source/gameengine/Ketsji/KX_MotionState.h index 1267abc7fa9..ec6469e4672 100644 --- a/source/gameengine/Ketsji/KX_MotionState.h +++ b/source/gameengine/Ketsji/KX_MotionState.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_MotionState.h + * \ingroup ketsji + */ + #ifndef __KX_MOTIONSTATE #define __KX_MOTIONSTATE diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index 637210525f8..6cb80028858 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * KX_MouseFocusSensor determines mouse in/out/over events. */ +/** \file gameengine/Ketsji/KX_MouseFocusSensor.cpp + * \ingroup ketsji + */ + + #if defined(WIN32) && !defined(FREE_WINDOWS) // This warning tells us about truncation of __long__ stl-generated names. // It can occasionally cause DevStudio to have internal compiler warnings. diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h index 3ea0f932314..73c5d94e4a5 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,7 +25,11 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * KX_MouseFocusSensor determines mouse in/out/over events. + */ + +/** \file KX_MouseFocusSensor.h + * \ingroup ketsji + * \brief KX_MouseFocusSensor determines mouse in/out/over events. */ #ifndef __KX_MOUSEFOCUSSENSOR diff --git a/source/gameengine/Ketsji/KX_NavMeshObject.cpp b/source/gameengine/Ketsji/KX_NavMeshObject.cpp index 55b35a3a180..499cbae85e9 100644 --- a/source/gameengine/Ketsji/KX_NavMeshObject.cpp +++ b/source/gameengine/Ketsji/KX_NavMeshObject.cpp @@ -26,6 +26,7 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include "BLI_math_vector.h" #include "KX_NavMeshObject.h" #include "RAS_MeshObject.h" @@ -37,7 +38,7 @@ extern "C" { #include "BKE_customdata.h" #include "BKE_cdderivedmesh.h" #include "BKE_DerivedMesh.h" -#include "BLI_math_vector.h" + #include "ED_navmesh_conversion.h" } diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp index c9af5d8d2a5..913a1adac55 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.cpp +++ b/source/gameengine/Ketsji/KX_NearSensor.cpp @@ -1,4 +1,4 @@ -/** +/* * Sense if other objects are near * * $Id$ @@ -29,6 +29,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_NearSensor.cpp + * \ingroup ketsji + */ + + #include "KX_NearSensor.h" #include "SCA_LogicManager.h" #include "KX_GameObject.h" diff --git a/source/gameengine/Ketsji/KX_NearSensor.h b/source/gameengine/Ketsji/KX_NearSensor.h index 67f235ceae2..d3de44429ff 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.h +++ b/source/gameengine/Ketsji/KX_NearSensor.h @@ -1,6 +1,4 @@ -/** - * Sense if other objects are near - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_NearSensor.h + * \ingroup ketsji + * \brief Sense if other objects are near + */ + #ifndef KX_NEARSENSOR_H #define KX_NEARSENSOR_H diff --git a/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp b/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp index 108cff0232d..0fc410f9d6f 100644 --- a/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp +++ b/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_ObColorIpoSGController.cpp + * \ingroup ketsji + */ + + #include "KX_ObColorIpoSGController.h" #include "KX_ScalarInterpolator.h" #include "KX_GameObject.h" diff --git a/source/gameengine/Ketsji/KX_ObColorIpoSGController.h b/source/gameengine/Ketsji/KX_ObColorIpoSGController.h index 4bb18fb392b..67bf561bd22 100644 --- a/source/gameengine/Ketsji/KX_ObColorIpoSGController.h +++ b/source/gameengine/Ketsji/KX_ObColorIpoSGController.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_ObColorIpoSGController.h + * \ingroup ketsji + */ + #ifndef KX_OBCOLORIPOSGCONTROLLER_H #define KX_OBCOLORIPOSGCONTROLLER_H diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index 9f1df329005..7289ffc6e29 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * Do translation/rotation actions * * $Id$ @@ -29,6 +29,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_ObjectActuator.cpp + * \ingroup ketsji + */ + + #include "KX_ObjectActuator.h" #include "KX_GameObject.h" #include "KX_PyMath.h" // For PyVecTo - should this include be put in PyObjectPlus? @@ -294,7 +299,7 @@ bool KX_ObjectActuator::UnlinkObject(SCA_IObject* clientobj) return false; } -void KX_ObjectActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map) +void KX_ObjectActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map) { void **h_obj = (*obj_map)[m_reference]; if (h_obj) { @@ -387,16 +392,16 @@ static int mathutils_obactu_generic_check(BaseMathObject *bmo) { KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; - return 1; + return 0; } static int mathutils_obactu_vector_get(BaseMathObject *bmo, int subtype) { KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; switch(subtype) { case MATHUTILS_VEC_CB_LINV: @@ -407,14 +412,14 @@ static int mathutils_obactu_vector_get(BaseMathObject *bmo, int subtype) break; } - return 1; + return 0; } static int mathutils_obactu_vector_set(BaseMathObject *bmo, int subtype) { KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; switch(subtype) { case MATHUTILS_VEC_CB_LINV: @@ -425,15 +430,15 @@ static int mathutils_obactu_vector_set(BaseMathObject *bmo, int subtype) break; } - return 1; + return 0; } static int mathutils_obactu_vector_get_index(BaseMathObject *bmo, int subtype, int index) { /* lazy, avoid repeteing the case statement */ - if(!mathutils_obactu_vector_get(bmo, subtype)) - return 0; - return 1; + if(mathutils_obactu_vector_get(bmo, subtype) == -1) + return -1; + return 0; } static int mathutils_obactu_vector_set_index(BaseMathObject *bmo, int subtype, int index) @@ -441,8 +446,8 @@ static int mathutils_obactu_vector_set_index(BaseMathObject *bmo, int subtype, i float f= bmo->data[index]; /* lazy, avoid repeteing the case statement */ - if(!mathutils_obactu_vector_get(bmo, subtype)) - return 0; + if(mathutils_obactu_vector_get(bmo, subtype) == -1) + return -1; bmo->data[index]= f; return mathutils_obactu_vector_set(bmo, subtype); diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h index 9dab1e39cba..0737535b84c 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.h +++ b/source/gameengine/Ketsji/KX_ObjectActuator.h @@ -1,6 +1,4 @@ -/** - * Do translation/rotation actions - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_ObjectActuator.h + * \ingroup ketsji + * \brief Do translation/rotation actions + */ + #ifndef __KX_OBJECTACTUATOR #define __KX_OBJECTACTUATOR @@ -141,7 +144,7 @@ public: CValue* GetReplica(); void ProcessReplica(); bool UnlinkObject(SCA_IObject* clientobj); - void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map); + void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); void SetForceLoc(const double force[3]) { /*m_force=force;*/ } void UpdateFuzzyFlags() diff --git a/source/gameengine/Ketsji/KX_OrientationInterpolator.cpp b/source/gameengine/Ketsji/KX_OrientationInterpolator.cpp index 8949a85066c..d9483083aa1 100644 --- a/source/gameengine/Ketsji/KX_OrientationInterpolator.cpp +++ b/source/gameengine/Ketsji/KX_OrientationInterpolator.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_OrientationInterpolator.cpp + * \ingroup ketsji + */ + + #include "KX_OrientationInterpolator.h" #include "MT_Matrix3x3.h" #include "KX_IScalarInterpolator.h" diff --git a/source/gameengine/Ketsji/KX_OrientationInterpolator.h b/source/gameengine/Ketsji/KX_OrientationInterpolator.h index de41323c289..2ae7b00cb86 100644 --- a/source/gameengine/Ketsji/KX_OrientationInterpolator.h +++ b/source/gameengine/Ketsji/KX_OrientationInterpolator.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_OrientationInterpolator.h + * \ingroup ketsji + */ + #ifndef KX_ORIENTATIONINTERPOLATOR #define KX_ORIENTATIONINTERPOLATOR diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp index b41d48f5cf3..a73f4c38627 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.cpp +++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * Set or remove an objects parent * * $Id$ @@ -32,6 +32,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_ParentActuator.cpp + * \ingroup ketsji + */ + + #include "KX_ParentActuator.h" #include "KX_GameObject.h" #include "KX_PythonInit.h" @@ -94,7 +99,7 @@ bool KX_ParentActuator::UnlinkObject(SCA_IObject* clientobj) return false; } -void KX_ParentActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map) +void KX_ParentActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map) { void **h_obj = (*obj_map)[m_ob]; if (h_obj) { diff --git a/source/gameengine/Ketsji/KX_ParentActuator.h b/source/gameengine/Ketsji/KX_ParentActuator.h index 28745c6d0f5..a850cc72eb9 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.h +++ b/source/gameengine/Ketsji/KX_ParentActuator.h @@ -1,7 +1,4 @@ -/** - * Set or remove an objects parent - * - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -33,6 +30,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_ParentActuator.h + * \ingroup ketsji + * \brief Set or remove an objects parent + */ + #ifndef __KX_PARENTACTUATOR #define __KX_PARENTACTUATOR @@ -74,7 +76,7 @@ class KX_ParentActuator : public SCA_IActuator virtual CValue* GetReplica(); virtual void ProcessReplica(); - virtual void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map); + virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); virtual bool UnlinkObject(SCA_IObject* clientobj); #ifdef WITH_PYTHON diff --git a/source/gameengine/Ketsji/KX_PhysicsEngineEnums.h b/source/gameengine/Ketsji/KX_PhysicsEngineEnums.h index 506ba6365a0..6a9e40e187a 100644 --- a/source/gameengine/Ketsji/KX_PhysicsEngineEnums.h +++ b/source/gameengine/Ketsji/KX_PhysicsEngineEnums.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_PhysicsEngineEnums.h + * \ingroup ketsji + */ + #ifndef __KX_PHYSICSENGINEENUMS #define __KX_PHYSICSENGINEENUMS diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp index 471774866ac..ad1ea7c1bda 100644 --- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp +++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp + * \ingroup ketsji + */ + + #include "PyObjectPlus.h" #include "KX_PhysicsObjectWrapper.h" diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h index ca7e99350c4..739d6b38ea1 100644 --- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h +++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_PhysicsObjectWrapper.h + * \ingroup ketsji + */ + #ifndef PHYP_PHYSICSOBJECT_WRAPPER #define PHYP_PHYSICSOBJECT_WRAPPER diff --git a/source/gameengine/Ketsji/KX_PhysicsPropertiesobsolete.h b/source/gameengine/Ketsji/KX_PhysicsPropertiesobsolete.h index d94b5328488..4cbd1f8b3b2 100644 --- a/source/gameengine/Ketsji/KX_PhysicsPropertiesobsolete.h +++ b/source/gameengine/Ketsji/KX_PhysicsPropertiesobsolete.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,12 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_PhysicsPropertiesobsolete.h + * \ingroup ketsji + * \todo check if this file is still needed + */ + #ifndef KX_PROPSH #define KX_PROPSH diff --git a/source/gameengine/Ketsji/KX_PolyProxy.cpp b/source/gameengine/Ketsji/KX_PolyProxy.cpp index 9843d93c506..8c3b2a993e2 100644 --- a/source/gameengine/Ketsji/KX_PolyProxy.cpp +++ b/source/gameengine/Ketsji/KX_PolyProxy.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_PolyProxy.cpp + * \ingroup ketsji + */ + + #ifdef WITH_PYTHON #include "KX_PolyProxy.h" diff --git a/source/gameengine/Ketsji/KX_PolyProxy.h b/source/gameengine/Ketsji/KX_PolyProxy.h index 179fb67f85f..c99ac20673c 100644 --- a/source/gameengine/Ketsji/KX_PolyProxy.h +++ b/source/gameengine/Ketsji/KX_PolyProxy.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_PolyProxy.h + * \ingroup ketsji + */ + #ifndef __KX_POLYROXY #define __KX_POLYPROXY diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp index 39f017625dd..9d0597051ad 100644 --- a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp +++ b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_PolygonMaterial.cpp + * \ingroup ketsji + */ + + #include <stddef.h> #include "KX_PolygonMaterial.h" @@ -167,7 +172,7 @@ void KX_PolygonMaterial::DefaultActivate(RAS_IRasterizer* rasty, TCachingInfo& c cachingInfo = GetCachingInfo(); - if ((m_drawingmode & 4)&& (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED)) + if ((m_drawingmode & RAS_IRasterizer::KX_TEX)&& (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED)) { Image *ima = (Image*)m_tface->tpage; GPU_update_image_time(ima, rasty->GetTime()); diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.h b/source/gameengine/Ketsji/KX_PolygonMaterial.h index d71a34989a0..3520995def3 100644 --- a/source/gameengine/Ketsji/KX_PolygonMaterial.h +++ b/source/gameengine/Ketsji/KX_PolygonMaterial.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_PolygonMaterial.h + * \ingroup ketsji + */ + #ifndef __KX_POLYGONMATERIAL_H__ #define __KX_POLYGONMATERIAL_H__ diff --git a/source/gameengine/Ketsji/KX_PositionInterpolator.cpp b/source/gameengine/Ketsji/KX_PositionInterpolator.cpp index 6e047180cdf..8cd6a6dc2c1 100644 --- a/source/gameengine/Ketsji/KX_PositionInterpolator.cpp +++ b/source/gameengine/Ketsji/KX_PositionInterpolator.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_PositionInterpolator.cpp + * \ingroup ketsji + */ + + #include "KX_PositionInterpolator.h" #include "MT_Point3.h" #include "KX_IScalarInterpolator.h" diff --git a/source/gameengine/Ketsji/KX_PositionInterpolator.h b/source/gameengine/Ketsji/KX_PositionInterpolator.h index 764c7bd8750..e053770e57e 100644 --- a/source/gameengine/Ketsji/KX_PositionInterpolator.h +++ b/source/gameengine/Ketsji/KX_PositionInterpolator.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_PositionInterpolator.h + * \ingroup ketsji + */ + #ifndef KX_POSITIONINTERPOLATOR #define KX_POSITIONINTERPOLATOR diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp index d2cb9aef985..bf288e1f1ad 100644 --- a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp +++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file gameengine/Ketsji/KX_PyConstraintBinding.cpp + * \ingroup ketsji + */ + #include "KX_PyConstraintBinding.h" #include "PHY_IPhysicsEnvironment.h" #include "KX_ConstraintWrapper.h" @@ -400,6 +405,7 @@ static PyObject* gPyCreateConstraint(PyObject* self, PyObject* args, PyObject* kwds) { + /* FIXME - physicsid is an int being cast to a pointer, should at least use PyCapsule */ int physicsid=0,physicsid2 = 0,constrainttype=0,extrainfo=0; int len = PyTuple_Size(args); int success = 1; @@ -537,6 +543,18 @@ static PyObject* gPyRemoveConstraint(PyObject* self, Py_RETURN_NONE; } +static PyObject* gPyExportBulletFile(PyObject*, PyObject* args) +{ + char* filename; + if (!PyArg_ParseTuple(args,"s:exportBulletFile",&filename)) + return NULL; + + if (PHY_GetActiveEnvironment()) + { + PHY_GetActiveEnvironment()->exportFile(filename); + } + Py_RETURN_NONE; +} static struct PyMethodDef physicsconstraints_methods[] = { {"setGravity",(PyCFunction) gPySetGravity, @@ -589,6 +607,9 @@ static struct PyMethodDef physicsconstraints_methods[] = { {"getAppliedImpulse",(PyCFunction) gPyGetAppliedImpulse, METH_VARARGS, (const char *)gPyGetAppliedImpulse__doc__}, + {"exportBulletFile",(PyCFunction)gPyExportBulletFile, + METH_VARARGS, "export a .bullet file"}, + //sentinel { NULL, (PyCFunction) NULL, 0, NULL } @@ -659,5 +680,7 @@ PHY_IPhysicsEnvironment* PHY_GetActiveEnvironment() return g_CurrentActivePhysicsEnvironment; } + + #endif // WITH_PYTHON diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.h b/source/gameengine/Ketsji/KX_PyConstraintBinding.h index 6da60794eb0..9fbdf037caa 100644 --- a/source/gameengine/Ketsji/KX_PyConstraintBinding.h +++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_PyConstraintBinding.h + * \ingroup ketsji + */ + #ifndef PHY_PYTHON_CONSTRAINTBINDING #define PHY_PYTHON_CONSTRAINTBINDING diff --git a/source/gameengine/Ketsji/KX_PyMath.cpp b/source/gameengine/Ketsji/KX_PyMath.cpp index 45957ca1911..857a61e56a0 100644 --- a/source/gameengine/Ketsji/KX_PyMath.cpp +++ b/source/gameengine/Ketsji/KX_PyMath.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * Initialize Python thingies. */ +/** \file gameengine/Ketsji/KX_PyMath.cpp + * \ingroup ketsji + */ + + #if defined(WIN32) && !defined(FREE_WINDOWS) #pragma warning (disable : 4786) #endif //WIN32 diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h index 282e9a8f1f6..9b198f85664 100644 --- a/source/gameengine/Ketsji/KX_PyMath.h +++ b/source/gameengine/Ketsji/KX_PyMath.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,7 +25,11 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * Initialize Python thingies. + */ + +/** \file KX_PyMath.h + * \ingroup ketsji + * \brief Initialize Python thingies. */ #ifndef __KX_PYMATH_H__ @@ -110,7 +114,7 @@ bool PyVecTo(PyObject* pyval, T& vec) if(VectorObject_Check(pyval)) { VectorObject *pyvec= (VectorObject *)pyval; - if(!BaseMath_ReadCallback(pyvec)) { + if(BaseMath_ReadCallback(pyvec) == -1) { return false; /* exception raised */ } if (pyvec->size != Size(vec)) { @@ -122,7 +126,7 @@ bool PyVecTo(PyObject* pyval, T& vec) } else if(QuaternionObject_Check(pyval)) { QuaternionObject *pyquat= (QuaternionObject *)pyval; - if(!BaseMath_ReadCallback(pyquat)) { + if(BaseMath_ReadCallback(pyquat) == -1) { return false; /* exception raised */ } if (4 != Size(vec)) { @@ -135,7 +139,7 @@ bool PyVecTo(PyObject* pyval, T& vec) } else if(EulerObject_Check(pyval)) { EulerObject *pyeul= (EulerObject *)pyval; - if(!BaseMath_ReadCallback(pyeul)) { + if(BaseMath_ReadCallback(pyeul) == -1) { return false; /* exception raised */ } if (3 != Size(vec)) { diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index a9202378ea5..69d6ebc0bed 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * Initialize Python thingies. */ +/** \file gameengine/Ketsji/KX_PythonInit.cpp + * \ingroup ketsji + */ + + #include "GL/glew.h" #if defined(WIN32) && !defined(FREE_WINDOWS) @@ -642,7 +647,7 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *) Py_RETURN_NONE; } -static PyObject *gLibLoad(PyObject*, PyObject* args) +static PyObject *gLibLoad(PyObject*, PyObject* args, PyObject* kwds) { KX_Scene *kx_scene= gp_KetsjiScene; char *path; @@ -650,20 +655,37 @@ static PyObject *gLibLoad(PyObject*, PyObject* args) Py_buffer py_buffer; py_buffer.buf = NULL; char *err_str= NULL; + + short options=0; + int load_actions=0, verbose=0; + + static const char *kwlist[] = {"path", "group", "buffer", "load_actions", "verbose", NULL}; - if (!PyArg_ParseTuple(args,"ss|y*:LibLoad",&path, &group, &py_buffer)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "ss|y*ii:LibLoad", const_cast<char**>(kwlist), + &path, &group, &py_buffer, &load_actions, &verbose)) return NULL; + /* setup options */ + if (load_actions != 0) + options |= KX_BlenderSceneConverter::LIB_LOAD_LOAD_ACTIONS; + if (verbose != 0) + options |= KX_BlenderSceneConverter::LIB_LOAD_VERBOSE; + if (!py_buffer.buf) { - if(kx_scene->GetSceneConverter()->LinkBlendFilePath(path, group, kx_scene, &err_str)) { + char abs_path[FILE_MAX]; + // Make the path absolute + BLI_strncpy(abs_path, path, sizeof(abs_path)); + BLI_path_abs(abs_path, gp_GamePythonPath); + + if(kx_scene->GetSceneConverter()->LinkBlendFilePath(abs_path, group, kx_scene, &err_str, options)) { Py_RETURN_TRUE; } } else { - if(kx_scene->GetSceneConverter()->LinkBlendFileMemory(py_buffer.buf, py_buffer.len, path, group, kx_scene, &err_str)) { + if(kx_scene->GetSceneConverter()->LinkBlendFileMemory(py_buffer.buf, py_buffer.len, path, group, kx_scene, &err_str, options)) { PyBuffer_Release(&py_buffer); Py_RETURN_TRUE; } @@ -797,7 +819,7 @@ static struct PyMethodDef game_methods[] = { {"PrintMemInfo", (PyCFunction)pyPrintStats, METH_NOARGS, (const char *)"Print engine stastics"}, /* library functions */ - {"LibLoad", (PyCFunction)gLibLoad, METH_VARARGS, (const char *)""}, + {"LibLoad", (PyCFunction)gLibLoad, METH_VARARGS|METH_KEYWORDS, (const char *)""}, {"LibNew", (PyCFunction)gLibNew, METH_VARARGS, (const char *)""}, {"LibFree", (PyCFunction)gLibFree, METH_VARARGS, (const char *)""}, {"LibList", (PyCFunction)gLibList, METH_VARARGS, (const char *)""}, @@ -930,12 +952,12 @@ static PyObject* gPySetBackgroundColor(PyObject*, PyObject* value) if (gp_Canvas) { - gp_Rasterizer->SetBackColor(vec[0], vec[1], vec[2], vec[3]); + gp_Rasterizer->SetBackColor((float)vec[0], (float)vec[1], (float)vec[2], (float)vec[3]); } KX_WorldInfo *wi = gp_KetsjiScene->GetWorldInfo(); if (wi->hasWorld()) - wi->setBackColor(vec[0], vec[1], vec[2]); + wi->setBackColor((float)vec[0], (float)vec[1], (float)vec[2]); Py_RETURN_NONE; } @@ -953,7 +975,7 @@ static PyObject* gPySetMistColor(PyObject*, PyObject* value) PyErr_SetString(PyExc_RuntimeError, "Rasterizer.setMistColor(color), Rasterizer not available"); return NULL; } - gp_Rasterizer->SetFogColor(vec[0], vec[1], vec[2]); + gp_Rasterizer->SetFogColor((float)vec[0], (float)vec[1], (float)vec[2]); Py_RETURN_NONE; } @@ -1018,7 +1040,7 @@ static PyObject* gPySetAmbientColor(PyObject*, PyObject* value) PyErr_SetString(PyExc_RuntimeError, "Rasterizer.setAmbientColor(color), Rasterizer not available"); return NULL; } - gp_Rasterizer->SetAmbientColor(vec[0], vec[1], vec[2]); + gp_Rasterizer->SetAmbientColor((float)vec[0], (float)vec[1], (float)vec[2]); Py_RETURN_NONE; } @@ -1407,6 +1429,7 @@ PyObject* initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack /* 7. Action actuator */ KX_MACRO_addTypesToDict(d, KX_ACTIONACT_PLAY, ACT_ACTION_PLAY); + KX_MACRO_addTypesToDict(d, KX_ACTIONACT_PINGPONG, ACT_ACTION_PINGPONG); KX_MACRO_addTypesToDict(d, KX_ACTIONACT_FLIPPER, ACT_ACTION_FLIPPER); KX_MACRO_addTypesToDict(d, KX_ACTIONACT_LOOPSTOP, ACT_ACTION_LOOP_STOP); KX_MACRO_addTypesToDict(d, KX_ACTIONACT_LOOPEND, ACT_ACTION_LOOP_END); @@ -1633,176 +1656,6 @@ PyObject* initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack return m; } -// Python Sandbox code -// override builtin functions import() and open() - - -PyObject *KXpy_open(PyObject *self, PyObject *args) { - PyErr_SetString(PyExc_RuntimeError, "Sandbox: open() function disabled!\nGame Scripts should not use this function."); - return NULL; -} - -PyObject *KXpy_file(PyObject *self, PyObject *args) { - PyErr_SetString(PyExc_RuntimeError, "Sandbox: file() function disabled!\nGame Scripts should not use this function."); - return NULL; -} - -PyObject *KXpy_execfile(PyObject *self, PyObject *args) { - PyErr_SetString(PyExc_RuntimeError, "Sandbox: execfile() function disabled!\nGame Scripts should not use this function."); - return NULL; -} - -PyObject *KXpy_compile(PyObject *self, PyObject *args) { - PyErr_SetString(PyExc_RuntimeError, "Sandbox: compile() function disabled!\nGame Scripts should not use this function."); - return NULL; -} - -PyObject *KXpy_import(PyObject *self, PyObject *args) -{ - char *name; - int found; - PyObject *globals = NULL; - PyObject *locals = NULL; - PyObject *fromlist = NULL; - PyObject *l, *m, *n; - int level; /* not used yet */ - - if (!PyArg_ParseTuple(args, "s|OOOi:m_import", - &name, &globals, &locals, &fromlist, &level)) - return NULL; - - /* check for builtin modules */ - m = PyImport_AddModule("sys"); - l = PyObject_GetAttrString(m, "builtin_module_names"); - n = PyUnicode_FromString(name); - - if (PySequence_Contains(l, n)) { - return PyImport_ImportModuleEx(name, globals, locals, fromlist); - } - - /* quick hack for GamePython modules - TODO: register builtin modules properly by ExtendInittab */ - if (!strcmp(name, "GameLogic") || !strcmp(name, "GameKeys") || !strcmp(name, "PhysicsConstraints") || - !strcmp(name, "Rasterizer") || !strcmp(name, "mathutils") || !strcmp(name, "bgl") || !strcmp(name, "geometry")) { - return PyImport_ImportModuleEx(name, globals, locals, fromlist); - } - - /* Import blender texts as python modules */ - m= bpy_text_import_name(name, &found); - if (m) - return m; - - if(found==0) /* if its found but could not import then it has its own error */ - PyErr_Format(PyExc_ImportError, "Import of external Module %.20s not allowed.", name); - - return NULL; - -} - -PyObject *KXpy_reload(PyObject *self, PyObject *args) { - - /* Used to be sandboxed, bettet to allow importing of internal text only */ -#if 0 - PyErr_SetString(PyExc_RuntimeError, "Sandbox: reload() function disabled!\nGame Scripts should not use this function."); - return NULL; -#endif - int found; - PyObject *module = NULL; - PyObject *newmodule = NULL; - - /* check for a module arg */ - if( !PyArg_ParseTuple( args, "O:bpy_reload_meth", &module ) ) - return NULL; - - newmodule= bpy_text_reimport( module, &found ); - if (newmodule) - return newmodule; - - if (found==0) /* if its found but could not import then it has its own error */ - PyErr_SetString(PyExc_ImportError, "reload(module): failed to reload from blenders internal text"); - - return newmodule; -} - -/* override python file type functions */ -#if 0 -static int -file_init(PyObject *self, PyObject *args, PyObject *kwds) -{ - KXpy_file(NULL, NULL); - return -1; -} - -static PyObject * -file_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return KXpy_file(NULL, NULL); -} -#endif - -static PyMethodDef meth_open[] = {{ "open", KXpy_open, METH_VARARGS, "(disabled)"}}; -static PyMethodDef meth_reload[] = {{ "reload", KXpy_reload, METH_VARARGS, "(disabled)"}}; -static PyMethodDef meth_file[] = {{ "file", KXpy_file, METH_VARARGS, "(disabled)"}}; -static PyMethodDef meth_execfile[] = {{ "execfile", KXpy_execfile, METH_VARARGS, "(disabled)"}}; -static PyMethodDef meth_compile[] = {{ "compile", KXpy_compile, METH_VARARGS, "(disabled)"}}; - -static PyMethodDef meth_import[] = {{ "import", KXpy_import, METH_VARARGS, "our own import"}}; - -//static PyObject *g_oldopen = 0; -//static PyObject *g_oldimport = 0; -//static int g_security = 0; - -static void setSandbox(TPythonSecurityLevel level) -{ - PyObject *m = PyImport_AddModule("__builtin__"); - PyObject *d = PyModule_GetDict(m); - PyObject *item; - switch (level) { - case psl_Highest: - //if (!g_security) { - //g_oldopen = PyDict_GetItemString(d, "open"); - - // functions we cant trust - PyDict_SetItemString(d, "open", item=PyCFunction_New(meth_open, NULL)); Py_DECREF(item); - PyDict_SetItemString(d, "reload", item=PyCFunction_New(meth_reload, NULL)); Py_DECREF(item); - PyDict_SetItemString(d, "file", item=PyCFunction_New(meth_file, NULL)); Py_DECREF(item); - PyDict_SetItemString(d, "execfile", item=PyCFunction_New(meth_execfile, NULL)); Py_DECREF(item); - PyDict_SetItemString(d, "compile", item=PyCFunction_New(meth_compile, NULL)); Py_DECREF(item); - - // our own import - PyDict_SetItemString(d, "__import__", PyCFunction_New(meth_import, NULL)); - //g_security = level; - - // Overiding file dosnt stop it being accessed if your sneaky - // f = [ t for t in (1).__class__.__mro__[-1].__subclasses__() if t.__name__ == 'file'][0]('/some_file.txt', 'w') - // f.write('...') - // so overwrite the file types functions. be very careful here still, since python uses python. - // ps - python devs frown deeply upon this. - - /* this could mess up pythons internals, if we are serious about sandboxing - * issues like the one above need to be solved, possibly modify __subclasses__ is safer? */ -#if 0 - PyFile_Type.tp_init = file_init; - PyFile_Type.tp_new = file_new; -#endif - //} - break; - /* - case psl_Lowest: - if (g_security) { - PyDict_SetItemString(d, "open", g_oldopen); - PyDict_SetItemString(d, "__import__", g_oldimport); - g_security = level; - } - */ - default: - /* Allow importing internal text, from bpy_internal_import.py */ - PyDict_SetItemString(d, "reload", item=PyCFunction_New(&bpy_reload_meth, NULL)); Py_DECREF(item); - PyDict_SetItemString(d, "__import__", item=PyCFunction_New(&bpy_import_meth, NULL)); Py_DECREF(item); - break; - } -} - /* Explanation of * * - backupPySysObjects() : stores sys.path in gp_OrigPythonSysPath @@ -1913,8 +1766,18 @@ static void restorePySysObjects(void) // PyObject_Print(sys_path, stderr, 0); } +// Copied from bpy_interface.c +static struct _inittab bge_internal_modules[]= { + {(char *)"mathutils", BPyInit_mathutils}, + {(char *)"bgl", BPyInit_bgl}, + {(char *)"blf", BPyInit_blf}, + {(char *)"aud", AUD_initPython}, + {NULL, NULL} +}; + /** * Python is not initialised. + * see bpy_interface.c's BPY_python_start() which shares the same functionality in blender. */ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecurityLevel level, Main *maggie, int argc, char** argv) { @@ -1932,6 +1795,13 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur #endif Py_NoSiteFlag=1; Py_FrozenFlag=1; + + /* must run before python initializes */ + PyImport_ExtendInittab(bge_internal_modules); + + /* find local python installation */ + PyC_SetHomePath(BLI_get_folder(BLENDER_PYTHON, NULL)); + Py_Initialize(); if(argv && first_time) { /* browser plugins dont currently set this */ @@ -1946,8 +1816,15 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur PySys_SetObject("argv", py_argv); Py_DECREF(py_argv); } - - setSandbox(level); + + bpy_import_init(PyEval_GetBuiltins()); + + /* mathutils types are used by the BGE even if we dont import them */ + { + PyObject *mod= PyImport_ImportModuleLevel((char *)"mathutils", NULL, NULL, NULL, 0); + Py_DECREF(mod); + } + initPyTypes(); bpy_import_main_set(maggie); @@ -1992,7 +1869,6 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev Py_NoSiteFlag=1; Py_FrozenFlag=1; - setSandbox(level); initPyTypes(); bpy_import_main_set(maggie); @@ -2041,11 +1917,6 @@ void setupGamePython(KX_KetsjiEngine* ketsjiengine, KX_Scene* startscene, Main * initGameKeys(); initPythonConstraintBinding(); - initMathutils(); - initGeometry(); - initBGL(); - initBLF(); - AUD_initPython(); initVideoTexture(); /* could be done a lot more nicely, but for now a quick way to get bge.* working */ @@ -2354,26 +2225,6 @@ PyObject* initGameKeys() return d; } -PyObject* initMathutils() -{ - return BPyInit_mathutils(); -} - -PyObject* initGeometry() -{ - return BPyInit_mathutils_geometry(); -} - -PyObject* initBGL() -{ - return BPyInit_bgl(); -} - -PyObject* initBLF() -{ - return BPyInit_blf(); -} - // utility function for loading and saving the globalDict int saveGamePythonConfig( char **marshal_buffer) { diff --git a/source/gameengine/Ketsji/KX_PythonInit.h b/source/gameengine/Ketsji/KX_PythonInit.h index bc092e712b0..d76e8f913df 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.h +++ b/source/gameengine/Ketsji/KX_PythonInit.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_PythonInit.h + * \ingroup ketsji + */ + #ifndef __KX_PYTHON_INIT #define __KX_PYTHON_INIT @@ -44,10 +49,6 @@ PyObject* initGameLogic(class KX_KetsjiEngine *engine, class KX_Scene* ketsjisce PyObject* initGameKeys(); PyObject* initRasterizer(class RAS_IRasterizer* rasty,class RAS_ICanvas* canvas); PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecurityLevel level, struct Main *maggie, int argc, char** argv); -PyObject* initMathutils(); -PyObject* initGeometry(); -PyObject* initBGL(); -PyObject* initBLF(); PyObject* initVideoTexture(void); void exitGamePlayerPythonScripting(); PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLevel level, struct Main *maggie); diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp index f1ce861ad5a..49a08135c38 100644 --- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp +++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_PythonInitTypes.cpp + * \ingroup ketsji + */ + + #ifndef _adr_py_init_types_h_ // only process once, diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.h b/source/gameengine/Ketsji/KX_PythonInitTypes.h index 1053f320e5e..b113c080f4a 100644 --- a/source/gameengine/Ketsji/KX_PythonInitTypes.h +++ b/source/gameengine/Ketsji/KX_PythonInitTypes.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_PythonInitTypes.h + * \ingroup ketsji + */ + #ifndef _adr_py_init_types_h_ // only process once, #define _adr_py_init_types_h_ // even if multiply included diff --git a/source/gameengine/Ketsji/KX_PythonSeq.cpp b/source/gameengine/Ketsji/KX_PythonSeq.cpp index bed3f33ab77..04a53fbb493 100644 --- a/source/gameengine/Ketsji/KX_PythonSeq.cpp +++ b/source/gameengine/Ketsji/KX_PythonSeq.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * Readonly sequence wrapper for lookups on logic bricks */ +/** \file gameengine/Ketsji/KX_PythonSeq.cpp + * \ingroup ketsji + */ + + #ifdef WITH_PYTHON #include "KX_PythonSeq.h" @@ -40,18 +45,30 @@ PyObject *KX_PythonSeq_CreatePyObject( PyObject *base, short type ) { - KX_PythonSeq *seq = PyObject_NEW( KX_PythonSeq, &KX_PythonSeq_Type); + KX_PythonSeq *seq = PyObject_GC_New(KX_PythonSeq, &KX_PythonSeq_Type); seq->base = base; Py_INCREF(base); /* so we can always access to check if its valid */ seq->type = type; seq->iter = -1; /* init */ return (PyObject *)seq; - } - - static void KX_PythonSeq_dealloc( KX_PythonSeq * self ) +} + +static int KX_PythonSeq_traverse(KX_PythonSeq *self, visitproc visit, void *arg) +{ + Py_VISIT(self->base); + return 0; +} + +static int KX_PythonSeq_clear(KX_PythonSeq *self) +{ + Py_CLEAR(self->base); + return 0; +} + +static void KX_PythonSeq_dealloc(KX_PythonSeq * self) { - Py_DECREF(self->base); - PyObject_DEL( self ); + KX_PythonSeq_clear(self); + PyObject_GC_Del(self); } static Py_ssize_t KX_PythonSeq_len( PyObject * self ) @@ -465,15 +482,15 @@ PyTypeObject KX_PythonSeq_Type = { NULL, /* PyBufferProcs *tp_as_buffer; */ /*** Flags to define presence of optional/expanded features ***/ - Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ - NULL, /* traverseproc tp_traverse; */ + (traverseproc)KX_PythonSeq_traverse, /* traverseproc tp_traverse; */ /* delete references to contained objects */ - NULL, /* inquiry tp_clear; */ + (inquiry)KX_PythonSeq_clear, /* inquiry tp_clear; */ /*** Assigned meaning in release 2.1 ***/ /*** rich comparisons ***/ diff --git a/source/gameengine/Ketsji/KX_PythonSeq.h b/source/gameengine/Ketsji/KX_PythonSeq.h index 7ca36cc19f4..7146e775a84 100644 --- a/source/gameengine/Ketsji/KX_PythonSeq.h +++ b/source/gameengine/Ketsji/KX_PythonSeq.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,7 +25,11 @@ * Contributor(s): Campbell Barton * * ***** END GPL LICENSE BLOCK ***** - * Readonly sequence wrapper for lookups on logic bricks + */ + +/** \file KX_PythonSeq.h + * \ingroup ketsji + * \brief Readonly sequence wrapper for lookups on logic bricks */ #ifndef _adr_py_seq_h_ // only process once, diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp index 7cbdd3bba66..d002d8a8935 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.cpp +++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_RadarSensor.cpp + * \ingroup ketsji + */ + + #include "KX_RadarSensor.h" #include "KX_GameObject.h" #include "KX_PyMath.h" diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h index 17305922385..6caff2758e7 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.h +++ b/source/gameengine/Ketsji/KX_RadarSensor.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_RadarSensor.h + * \ingroup ketsji + */ + #ifndef __KX_RADAR_SENSOR_H #define __KX_RADAR_SENSOR_H diff --git a/source/gameengine/Ketsji/KX_RayCast.cpp b/source/gameengine/Ketsji/KX_RayCast.cpp index 7562265a536..e0fc212f1b0 100644 --- a/source/gameengine/Ketsji/KX_RayCast.cpp +++ b/source/gameengine/Ketsji/KX_RayCast.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,6 +28,11 @@ * KX_MouseFocusSensor determines mouse in/out/over events. */ +/** \file gameengine/Ketsji/KX_RayCast.cpp + * \ingroup ketsji + */ + + #include <stdlib.h> #include <stdio.h> diff --git a/source/gameengine/Ketsji/KX_RayCast.h b/source/gameengine/Ketsji/KX_RayCast.h index 1512d81e940..963467c5958 100644 --- a/source/gameengine/Ketsji/KX_RayCast.h +++ b/source/gameengine/Ketsji/KX_RayCast.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_RayCast.h + * \ingroup ketsji + */ + #ifndef __KX_RAYCAST_H__ #define __KX_RAYCAST_H__ diff --git a/source/gameengine/Ketsji/KX_RayEventManager.cpp b/source/gameengine/Ketsji/KX_RayEventManager.cpp index 9c9d6722784..3956fa04dff 100644 --- a/source/gameengine/Ketsji/KX_RayEventManager.cpp +++ b/source/gameengine/Ketsji/KX_RayEventManager.cpp @@ -1,4 +1,4 @@ -/** +/* * Manager for ray events * * $Id$ @@ -28,6 +28,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file gameengine/Ketsji/KX_RayEventManager.cpp + * \ingroup ketsji + */ + #include "KX_RayEventManager.h" #include "SCA_LogicManager.h" #include "SCA_ISensor.h" diff --git a/source/gameengine/Ketsji/KX_RayEventManager.h b/source/gameengine/Ketsji/KX_RayEventManager.h index 55c2b81b068..92ce836b950 100644 --- a/source/gameengine/Ketsji/KX_RayEventManager.h +++ b/source/gameengine/Ketsji/KX_RayEventManager.h @@ -1,6 +1,4 @@ -/** - * Manager for ray events - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_RayEventManager.h + * \ingroup ketsji + * \brief Manager for ray events + */ + #ifndef __KX_RAYEVENTMGR #define __KX_RAYEVENTMGR #include "SCA_EventManager.h" diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index 2434c031a6a..a683c9857aa 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -1,4 +1,4 @@ -/** +/* * Cast a ray and feel for objects * * $Id$ @@ -29,6 +29,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_RaySensor.cpp + * \ingroup ketsji + */ + + #include "KX_RaySensor.h" #include "SCA_EventManager.h" #include "SCA_RandomEventManager.h" diff --git a/source/gameengine/Ketsji/KX_RaySensor.h b/source/gameengine/Ketsji/KX_RaySensor.h index ac0b5eba26b..ef8340e9f80 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.h +++ b/source/gameengine/Ketsji/KX_RaySensor.h @@ -1,6 +1,4 @@ -/** - * Cast a ray and feel for objects - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_RaySensor.h + * \ingroup ketsji + * \brief Cast a ray and feel for objects + */ + #ifndef __KX_RAYSENSOR_H #define __KX_RAYSENSOR_H diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp index 34b49045337..62a51fb4efc 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp + * \ingroup ketsji + */ // // Add an object when this actuator is triggered // @@ -148,7 +151,7 @@ bool KX_SCA_AddObjectActuator::UnlinkObject(SCA_IObject* clientobj) return false; } -void KX_SCA_AddObjectActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map) +void KX_SCA_AddObjectActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map) { void **h_obj = (*obj_map)[m_OriginalObject]; if (h_obj) { diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h index 16612f9a743..a8304667b66 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h @@ -1,8 +1,3 @@ -// -// Add object to the game world on action of this actuator. A copy is made -// of a referenced object. The copy inherits some properties from the owner -// of this actuator. -// // $Id$ // // ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,10 +24,12 @@ // Contributor(s): none yet. // // ***** END GPL LICENSE BLOCK ***** -// -// Previously existed as: -// \source\gameengine\GameLogic\SCA_AddObjectActuator.h -// Please look here for revision history. + +/** \file KX_SCA_AddObjectActuator.h + * \ingroup ketsji + * \attention Previously existed as: \source\gameengine\GameLogic\SCA_AddObjectActuator.h + * Please look here for revision history. + */ #ifndef __KX_SCA_AddObjectActuator #define __KX_SCA_AddObjectActuator @@ -111,7 +108,7 @@ public: UnlinkObject(SCA_IObject* clientobj); virtual void - Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map); + Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); virtual bool Update(); diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp index 6e36bde59ec..40c9c182d99 100644 --- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/KX_SCA_DynamicActuator.cpp + * \ingroup ketsji + */ // // Adjust dynamics settins for this object // diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h index 43322fdfd96..04b2c00f4c1 100644 --- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h +++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h @@ -1,6 +1,3 @@ -// -// Add object to the game world on action of this actuator -// // $Id$ // // ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +26,11 @@ // ***** END GPL LICENSE BLOCK ***** // +/** \file KX_SCA_DynamicActuator.h + * \ingroup ketsji + * \brief Add object to the game world on action of this actuator + */ + #ifndef __KX_SCA_DYNAMICACTUATOR #define __KX_SCA_DYNAMICACTUATOR diff --git a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp index f50dc9fc46a..076669e325a 100644 --- a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp + * \ingroup ketsji + */ + + // // Remove the actuator's parent when triggered diff --git a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h index cedf17c599b..c8e1af86466 100644 --- a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h +++ b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h @@ -1,6 +1,3 @@ -// -// Add object to the game world on action of this actuator -// // $Id$ // // ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,9 +25,13 @@ // // ***** END GPL LICENSE BLOCK ***** // -// Previously existed as: -// \source\gameengine\GameLogic\SCA_EndObjectActuator.h -// Please look here for revision history. + +/** \file KX_SCA_EndObjectActuator.h + * \ingroup ketsji + * \brief Add object to the game world on action of this actuator + * \attention Previously existed as: \source\gameengine\GameLogic\SCA_EndObjectActuator.h + * Please look here for revision history. + */ #ifndef __KX_SCA_ENDOBJECTACTUATOR #define __KX_SCA_ENDOBJECTACTUATOR diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp index aff4f4080fd..1c6e5e20250 100644 --- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp + * \ingroup ketsji + */ // // Replace the mesh for this actuator's parent // diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h index 573ec76782c..7838cb63b17 100644 --- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h +++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h @@ -1,6 +1,3 @@ -// -// Add object to the game world on action of this actuator -// // $Id$ // // ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,10 +25,13 @@ // // ***** END GPL LICENSE BLOCK ***** // -// Previously existed as: -// \source\gameengine\GameLogic\SCA_ReplaceMeshActuator.h -// Please look here for revision history. -// + +/** \file KX_SCA_ReplaceMeshActuator.h + * \ingroup ketsji + * \brief Add object to the game world on action of this actuator + * \attention Previously existed as: \source\gameengine\GameLogic\SCA_ReplaceMeshActuator.h + * Please look here for revision history. + */ #ifndef __KX_SCA_REPLACEMESHACTUATOR #define __KX_SCA_REPLACEMESHACTUATOR diff --git a/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp b/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp index 0529195e933..3fec33b119d 100644 --- a/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp +++ b/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp + * \ingroup ketsji + */ + + #include <iostream> #include "KX_SG_BoneParentNodeRelationship.h" diff --git a/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.h b/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.h index 05e9d9f02de..6e6c197517f 100644 --- a/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.h +++ b/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.h @@ -1,19 +1,4 @@ -/** - * @mainpage KX_SG_NodeRelationships - - * @section - * - * This file provides common concrete implementations of - * SG_ParentRelation used by the game engine. These are - * KX_SlowParentRelation a slow parent relationship. - * KX_NormalParentRelation a normal parent relationship where - * orientation and position are inherited from the parent by - * the child. - * KX_VertexParentRelation only location information is - * inherited by the child. - * - * interface - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -43,6 +28,10 @@ * */ +/** \file KX_SG_BoneParentNodeRelationship.h + * \ingroup ketsji + */ + #ifndef __KX_SG_BONEPARENTRELATION_H__ #define __KX_SG_BONEPARENTRELATION_H__ diff --git a/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp b/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp index ccdaac8edb7..f376dd399f2 100644 --- a/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp +++ b/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_SG_NodeRelationships.cpp + * \ingroup ketsji + */ + + #include "KX_SG_NodeRelationships.h" /** diff --git a/source/gameengine/Ketsji/KX_SG_NodeRelationships.h b/source/gameengine/Ketsji/KX_SG_NodeRelationships.h index 7bb6f767308..3e18ddf2611 100644 --- a/source/gameengine/Ketsji/KX_SG_NodeRelationships.h +++ b/source/gameengine/Ketsji/KX_SG_NodeRelationships.h @@ -1,19 +1,4 @@ -/** - * @mainpage KX_SG_NodeRelationships - - * @section - * - * This file provides common concrete implementations of - * SG_ParentRelation used by the game engine. These are - * KX_SlowParentRelation a slow parent relationship. - * KX_NormalParentRelation a normal parent relationship where - * orientation and position are inherited from the parent by - * the child. - * KX_VertexParentRelation only location information is - * inherited by the child. - * - * interface - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -43,6 +28,19 @@ * */ +/** \file KX_SG_NodeRelationships.h + * \ingroup ketsji + * \section KX_SG_NodeRelationships + * This file provides common concrete implementations of + * SG_ParentRelation used by the game engine. These are + * KX_SlowParentRelation a slow parent relationship. + * KX_NormalParentRelation a normal parent relationship where + * orientation and position are inherited from the parent by + * the child. + * KX_VertexParentRelation only location information is + * inherited by the child. + */ + #ifndef __KX_SG_NODERELATIONS_H__ #define __KX_SG_NODERELATIONS_H__ diff --git a/source/gameengine/Ketsji/KX_ScalarInterpolator.cpp b/source/gameengine/Ketsji/KX_ScalarInterpolator.cpp index 9fc544feaff..c9ca9d704e1 100644 --- a/source/gameengine/Ketsji/KX_ScalarInterpolator.cpp +++ b/source/gameengine/Ketsji/KX_ScalarInterpolator.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_ScalarInterpolator.cpp + * \ingroup ketsji + */ + + #include "KX_ScalarInterpolator.h" #include "KX_IScalarInterpolator.h" diff --git a/source/gameengine/Ketsji/KX_ScalarInterpolator.h b/source/gameengine/Ketsji/KX_ScalarInterpolator.h index 5b66ad42bd9..1abc4f4f06f 100644 --- a/source/gameengine/Ketsji/KX_ScalarInterpolator.h +++ b/source/gameengine/Ketsji/KX_ScalarInterpolator.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_ScalarInterpolator.h + * \ingroup ketsji + */ + #ifndef KX_SCALARINTERPOLATOR #define KX_SCALARINTERPOLATOR diff --git a/source/gameengine/Ketsji/KX_ScalingInterpolator.cpp b/source/gameengine/Ketsji/KX_ScalingInterpolator.cpp index 3f5ac8ee8a4..a7b5d1415da 100644 --- a/source/gameengine/Ketsji/KX_ScalingInterpolator.cpp +++ b/source/gameengine/Ketsji/KX_ScalingInterpolator.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_ScalingInterpolator.cpp + * \ingroup ketsji + */ + + #include "KX_ScalingInterpolator.h" #include "MT_Vector3.h" #include "KX_IScalarInterpolator.h" diff --git a/source/gameengine/Ketsji/KX_ScalingInterpolator.h b/source/gameengine/Ketsji/KX_ScalingInterpolator.h index 87b85a30d1f..72b91c1a421 100644 --- a/source/gameengine/Ketsji/KX_ScalingInterpolator.h +++ b/source/gameengine/Ketsji/KX_ScalingInterpolator.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_ScalingInterpolator.h + * \ingroup ketsji + */ + #ifndef KX_SCALINGINTERPOLATOR #define KX_SCALINGINTERPOLATOR diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 0a74f8ad66f..5e0e46026df 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -28,6 +28,11 @@ * Ketsji scene. Holds references to all scene data. */ +/** \file gameengine/Ketsji/KX_Scene.cpp + * \ingroup ketsji + */ + + #if defined(WIN32) && !defined(FREE_WINDOWS) #pragma warning (disable : 4786) #endif //WIN32 @@ -62,7 +67,7 @@ #include "SCA_IController.h" #include "SCA_IActuator.h" #include "SG_Node.h" -#include "SYS_System.h" +#include "BL_System.h" #include "SG_Controller.h" #include "SG_IObject.h" #include "SG_Tree.h" @@ -281,10 +286,12 @@ KX_Scene::~KX_Scene() #ifdef WITH_PYTHON PyDict_Clear(m_attr_dict); - Py_DECREF(m_attr_dict); + /* Py_CLEAR: Py_DECREF's and NULL's */ + Py_CLEAR(m_attr_dict); - Py_XDECREF(m_draw_call_pre); - Py_XDECREF(m_draw_call_post); + /* these may be NULL but the macro checks */ + Py_CLEAR(m_draw_call_pre); + Py_CLEAR(m_draw_call_post); #endif } @@ -1524,7 +1531,7 @@ void KX_Scene::LogicUpdateFrame(double curtime, bool frame) void KX_Scene::LogicEndFrame() { m_logicmgr->EndFrame(); - int numobj = m_euthanasyobjects->GetCount(); + int numobj; KX_GameObject* obj; @@ -1878,6 +1885,16 @@ bool KX_Scene::MergeScene(KX_Scene *other) /* when merging objects sensors are moved across into the new manager, dont need to do this here */ } + + /* grab any timer properties from the other scene */ + SCA_TimeEventManager *timemgr= GetTimeEventManager(); + SCA_TimeEventManager *timemgr_other= other->GetTimeEventManager(); + vector<CValue*> times = timemgr_other->GetTimeValues(); + + for(unsigned int i= 0; i < times.size(); i++) { + timemgr->AddTimeProperty(times[i]); + } + } return true; } @@ -2142,8 +2159,7 @@ PyObject* KX_Scene::pyattr_get_drawing_callback_pre(void *self_v, const KX_PYATT if(self->m_draw_call_pre==NULL) self->m_draw_call_pre= PyList_New(0); - else - Py_INCREF(self->m_draw_call_pre); + Py_INCREF(self->m_draw_call_pre); return self->m_draw_call_pre; } @@ -2153,8 +2169,7 @@ PyObject* KX_Scene::pyattr_get_drawing_callback_post(void *self_v, const KX_PYAT if(self->m_draw_call_post==NULL) self->m_draw_call_post= PyList_New(0); - else - Py_INCREF(self->m_draw_call_post); + Py_INCREF(self->m_draw_call_post); return self->m_draw_call_post; } diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 474aac41675..26dec2d612b 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_Scene.h + * \ingroup ketsji + */ + #ifndef __KX_SCENE_H #define __KX_SCENE_H @@ -36,8 +41,8 @@ #include <set> #include <list> -#include "GEN_Map.h" -#include "GEN_HashedPtr.h" +#include "CTR_Map.h" +#include "CTR_HashedPtr.h" #include "SG_IObject.h" #include "SCA_IScene.h" #include "MT_Transform.h" @@ -56,7 +61,7 @@ struct SM_MaterialProps; struct SM_ShapeProps; struct Scene; -class GEN_HashedPtr; +class CTR_HashedPtr; class CListValue; class CValue; class SCA_LogicManager; @@ -203,7 +208,7 @@ protected: * used in AddReplicaObject to map game objects to their * replicas so pointers can be updated. */ - GEN_Map <GEN_HashedPtr, void*> m_map_gameobject_to_replica; + CTR_Map <CTR_HashedPtr, void*> m_map_gameobject_to_replica; /** * Another temporary variable outstaying its welcome diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp index f991b843c99..f572f8eb36d 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.cpp +++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * Set scene/camera stuff * * $Id$ @@ -29,6 +29,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_SceneActuator.cpp + * \ingroup ketsji + */ + + #include "SCA_IActuator.h" #include "KX_SceneActuator.h" #include <iostream> @@ -92,7 +97,7 @@ bool KX_SceneActuator::UnlinkObject(SCA_IObject* clientobj) return false; } -void KX_SceneActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map) +void KX_SceneActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map) { void **h_obj = (*obj_map)[m_camera]; if (h_obj) { diff --git a/source/gameengine/Ketsji/KX_SceneActuator.h b/source/gameengine/Ketsji/KX_SceneActuator.h index b49357b21ca..288f4acc280 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.h +++ b/source/gameengine/Ketsji/KX_SceneActuator.h @@ -1,7 +1,3 @@ - -// -// Add object to the game world on action of this actuator -// // $Id$ // // ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +26,10 @@ // ***** END GPL LICENSE BLOCK ***** // +/** \file KX_SceneActuator.h + * \ingroup ketsji + */ + #ifndef __KX_SCENEACTUATOR #define __KX_SCENEACTUATOR @@ -85,7 +85,7 @@ class KX_SceneActuator : public SCA_IActuator virtual CValue* GetReplica(); virtual void ProcessReplica(); virtual bool UnlinkObject(SCA_IObject* clientobj); - virtual void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map); + virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); virtual bool Update(); diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index d5f8aa74880..45ba827a1b8 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -1,4 +1,4 @@ -/** +/* * KX_SoundActuator.cpp * * $Id$ @@ -30,6 +30,11 @@ * */ +/** \file gameengine/Ketsji/KX_SoundActuator.cpp + * \ingroup ketsji + */ + + #include "KX_SoundActuator.h" #include "AUD_C-API.h" #include "KX_GameObject.h" diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h index 7c1108ea8fb..e7257245a80 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.h +++ b/source/gameengine/Ketsji/KX_SoundActuator.h @@ -1,6 +1,4 @@ -/** - * KX_SoundActuator.h - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_SoundActuator.h + * \ingroup ketsji + */ + #ifndef __KX_SOUNDACTUATOR #define __KX_SOUNDACTUATOR diff --git a/source/gameengine/Ketsji/KX_StateActuator.cpp b/source/gameengine/Ketsji/KX_StateActuator.cpp index ff4c3985a04..7ebfae2ca25 100644 --- a/source/gameengine/Ketsji/KX_StateActuator.cpp +++ b/source/gameengine/Ketsji/KX_StateActuator.cpp @@ -28,6 +28,11 @@ * Actuator to toggle visibility/invisibility of objects */ +/** \file gameengine/Ketsji/KX_StateActuator.cpp + * \ingroup ketsji + */ + + #include "KX_StateActuator.h" #include "KX_GameObject.h" diff --git a/source/gameengine/Ketsji/KX_StateActuator.h b/source/gameengine/Ketsji/KX_StateActuator.h index 3af03f5d1fb..bdaaa0ffbc2 100644 --- a/source/gameengine/Ketsji/KX_StateActuator.h +++ b/source/gameengine/Ketsji/KX_StateActuator.h @@ -25,7 +25,11 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * Actuator to toggle visibility/invisibility of objects + */ + +/** \file KX_StateActuator.h + * \ingroup ketsji + * \brief Actuator to toggle visibility/invisibility of objects */ #ifndef __KX_STATEACTUATOR diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.cpp b/source/gameengine/Ketsji/KX_SteeringActuator.cpp index 31dcd00e61f..a0a2e148c1e 100644 --- a/source/gameengine/Ketsji/KX_SteeringActuator.cpp +++ b/source/gameengine/Ketsji/KX_SteeringActuator.cpp @@ -137,7 +137,7 @@ bool KX_SteeringActuator::UnlinkObject(SCA_IObject* clientobj) return false; } -void KX_SteeringActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map) +void KX_SteeringActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map) { void **h_obj = (*obj_map)[m_target]; if (h_obj) { diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.h b/source/gameengine/Ketsji/KX_SteeringActuator.h index 2b2dc9ae923..4f8303107f7 100644 --- a/source/gameengine/Ketsji/KX_SteeringActuator.h +++ b/source/gameengine/Ketsji/KX_SteeringActuator.h @@ -104,7 +104,7 @@ public: virtual CValue* GetReplica(); virtual void ProcessReplica(); - virtual void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map); + virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); virtual bool UnlinkObject(SCA_IObject* clientobj); const MT_Vector3& GetSteeringVec(); diff --git a/source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp b/source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp index 4f10c72b50b..65cc9c581d8 100644 --- a/source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp +++ b/source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_TimeCategoryLogger.cpp + * \ingroup ketsji + */ + + #include "KX_TimeCategoryLogger.h" KX_TimeCategoryLogger::KX_TimeCategoryLogger(unsigned int maxNumMeasurements) diff --git a/source/gameengine/Ketsji/KX_TimeCategoryLogger.h b/source/gameengine/Ketsji/KX_TimeCategoryLogger.h index f4eb4d18ab3..95358e99cb7 100644 --- a/source/gameengine/Ketsji/KX_TimeCategoryLogger.h +++ b/source/gameengine/Ketsji/KX_TimeCategoryLogger.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_TimeCategoryLogger.h + * \ingroup ketsji + */ + #ifndef __KX_TIME_CATEGORY_LOGGER_H #define __KX_TIME_CATEGORY_LOGGER_H diff --git a/source/gameengine/Ketsji/KX_TimeLogger.cpp b/source/gameengine/Ketsji/KX_TimeLogger.cpp index 5ec09df2791..b904e857ad3 100644 --- a/source/gameengine/Ketsji/KX_TimeLogger.cpp +++ b/source/gameengine/Ketsji/KX_TimeLogger.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_TimeLogger.cpp + * \ingroup ketsji + */ + + #include "KX_TimeLogger.h" KX_TimeLogger::KX_TimeLogger(unsigned int maxNumMeasurements) : diff --git a/source/gameengine/Ketsji/KX_TimeLogger.h b/source/gameengine/Ketsji/KX_TimeLogger.h index 9a5c124a462..a43c0bfddc7 100644 --- a/source/gameengine/Ketsji/KX_TimeLogger.h +++ b/source/gameengine/Ketsji/KX_TimeLogger.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -27,6 +27,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_TimeLogger.h + * \ingroup ketsji + */ + #ifndef __KX_TIME_LOGGER_H #define __KX_TIME_LOGGER_H diff --git a/source/gameengine/Ketsji/KX_TouchEventManager.cpp b/source/gameengine/Ketsji/KX_TouchEventManager.cpp index 95928ac5889..d57c1b73eec 100644 --- a/source/gameengine/Ketsji/KX_TouchEventManager.cpp +++ b/source/gameengine/Ketsji/KX_TouchEventManager.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_TouchEventManager.cpp + * \ingroup ketsji + */ + + #include "KX_TouchEventManager.h" #include "SCA_ISensor.h" #include "KX_TouchSensor.h" diff --git a/source/gameengine/Ketsji/KX_TouchEventManager.h b/source/gameengine/Ketsji/KX_TouchEventManager.h index 388195367b9..c8b86e854ae 100644 --- a/source/gameengine/Ketsji/KX_TouchEventManager.h +++ b/source/gameengine/Ketsji/KX_TouchEventManager.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_TouchEventManager.h + * \ingroup ketsji + */ + #ifndef __KX_TOUCHEVENTMANAGER #define __KX_TOUCHEVENTMANAGER diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp index b590624e6c7..6186254c34c 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.cpp +++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp @@ -1,4 +1,4 @@ -/** +/* * Senses touch and collision events * * $Id$ @@ -29,6 +29,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_TouchSensor.cpp + * \ingroup ketsji + */ + + #include "KX_TouchSensor.h" #include "SCA_EventManager.h" #include "SCA_LogicManager.h" diff --git a/source/gameengine/Ketsji/KX_TouchSensor.h b/source/gameengine/Ketsji/KX_TouchSensor.h index 80e5a0f938e..39011345267 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.h +++ b/source/gameengine/Ketsji/KX_TouchSensor.h @@ -1,6 +1,4 @@ -/** - * Senses touch and collision events - * +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file KX_TouchSensor.h + * \ingroup ketsji + * \brief Senses touch and collision events + */ + #ifndef __KX_TOUCHSENSOR #define __KX_TOUCHSENSOR diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index cae183ac4a2..edcba969811 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/KX_TrackToActuator.cpp + * \ingroup ketsji + */ // // Replace the mesh for this actuator's parent // @@ -216,7 +219,7 @@ bool KX_TrackToActuator::UnlinkObject(SCA_IObject* clientobj) return false; } -void KX_TrackToActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map) +void KX_TrackToActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map) { void **h_obj = (*obj_map)[m_object]; if (h_obj) { diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.h b/source/gameengine/Ketsji/KX_TrackToActuator.h index 33b2ecb1aa5..c5e96bd7454 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.h +++ b/source/gameengine/Ketsji/KX_TrackToActuator.h @@ -1,6 +1,3 @@ -// -// Add object to the game world on action of this actuator -// // $Id$ // // ***** BEGIN GPL LICENSE BLOCK ***** @@ -29,6 +26,10 @@ // ***** END GPL LICENSE BLOCK ***** // +/** \file KX_TrackToActuator.h + * \ingroup ketsji + */ + #ifndef __KX_TrackToActuator #define __KX_TrackToActuator @@ -66,7 +67,7 @@ class KX_TrackToActuator : public SCA_IActuator virtual void ProcessReplica(); virtual bool UnlinkObject(SCA_IObject* clientobj); - virtual void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map); + virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); virtual bool Update(double curtime, bool frame); #ifdef WITH_PYTHON diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp index 17368357cc4..1c03df80dc1 100644 --- a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp +++ b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp @@ -1,3 +1,6 @@ +/** \file gameengine/Ketsji/KX_VehicleWrapper.cpp + * \ingroup ketsji + */ #include "PyObjectPlus.h" diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.h b/source/gameengine/Ketsji/KX_VehicleWrapper.h index 4cde50b0932..f750912c95b 100644 --- a/source/gameengine/Ketsji/KX_VehicleWrapper.h +++ b/source/gameengine/Ketsji/KX_VehicleWrapper.h @@ -1,3 +1,8 @@ + +/** \file KX_VehicleWrapper.h + * \ingroup ketsji + */ + #ifndef KX_VEHICLE_WRAPPER #define KX_VEHICLE_WRAPPER diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp index f66d11394fd..5589d35f44a 100644 --- a/source/gameengine/Ketsji/KX_VertexProxy.cpp +++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_VertexProxy.cpp + * \ingroup ketsji + */ + + #ifdef WITH_PYTHON #include "KX_VertexProxy.h" diff --git a/source/gameengine/Ketsji/KX_VertexProxy.h b/source/gameengine/Ketsji/KX_VertexProxy.h index a5f2e5a08e0..e34330ebefe 100644 --- a/source/gameengine/Ketsji/KX_VertexProxy.h +++ b/source/gameengine/Ketsji/KX_VertexProxy.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_VertexProxy.h + * \ingroup ketsji + */ + #ifndef __KX_VERTEXPROXY #define __KX_VERTEXPROXY diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp index 464dbd14721..6dc9961fe2d 100644 --- a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp +++ b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp @@ -28,6 +28,11 @@ * Actuator to toggle visibility/invisibility of objects */ +/** \file gameengine/Ketsji/KX_VisibilityActuator.cpp + * \ingroup ketsji + */ + + #include "KX_VisibilityActuator.h" #include "KX_GameObject.h" diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.h b/source/gameengine/Ketsji/KX_VisibilityActuator.h index 4969dda1158..9b40aec4506 100644 --- a/source/gameengine/Ketsji/KX_VisibilityActuator.h +++ b/source/gameengine/Ketsji/KX_VisibilityActuator.h @@ -25,7 +25,11 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * Actuator to toggle visibility/invisibility of objects + */ + +/** \file KX_VisibilityActuator.h + * \ingroup ketsji + * \brief Actuator to toggle visibility/invisibility of objects */ #ifndef __KX_VISIBILITYACTUATOR diff --git a/source/gameengine/Ketsji/KX_WorldInfo.cpp b/source/gameengine/Ketsji/KX_WorldInfo.cpp index bf059ca543c..fd83e44f793 100644 --- a/source/gameengine/Ketsji/KX_WorldInfo.cpp +++ b/source/gameengine/Ketsji/KX_WorldInfo.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_WorldInfo.cpp + * \ingroup ketsji + */ + + #include "KX_WorldInfo.h" KX_WorldInfo::~KX_WorldInfo() diff --git a/source/gameengine/Ketsji/KX_WorldInfo.h b/source/gameengine/Ketsji/KX_WorldInfo.h index fb730c5502f..35e1d50af12 100644 --- a/source/gameengine/Ketsji/KX_WorldInfo.h +++ b/source/gameengine/Ketsji/KX_WorldInfo.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_WorldInfo.h + * \ingroup ketsji + */ + #ifndef __KX_WORLDINFO_H #define __KX_WORLDINFO_H diff --git a/source/gameengine/Ketsji/KX_WorldIpoController.cpp b/source/gameengine/Ketsji/KX_WorldIpoController.cpp index 476b23a5cbf..a6ad7c83b72 100644 --- a/source/gameengine/Ketsji/KX_WorldIpoController.cpp +++ b/source/gameengine/Ketsji/KX_WorldIpoController.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file gameengine/Ketsji/KX_WorldIpoController.cpp + * \ingroup ketsji + */ + + #include "KX_WorldIpoController.h" #include "KX_ScalarInterpolator.h" #include "KX_WorldInfo.h" diff --git a/source/gameengine/Ketsji/KX_WorldIpoController.h b/source/gameengine/Ketsji/KX_WorldIpoController.h index f6c36198ae7..7771628b5bc 100644 --- a/source/gameengine/Ketsji/KX_WorldIpoController.h +++ b/source/gameengine/Ketsji/KX_WorldIpoController.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file KX_WorldIpoController.h + * \ingroup ketsji + */ + #ifndef KX_WORLDIPOCONTROLLER_H #define KX_WORLDIPOCONTROLLER_H @@ -42,7 +47,7 @@ public: private: T_InterpolatorList m_interpolators; - unsigned short m_modify_mist_color : 1; + unsigned short m_modify_mist_color : 1; unsigned short m_modify_mist_start : 1; unsigned short m_modify_mist_dist : 1; bool m_modified; diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index f14bff76148..11dd0e5a4bf 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -8,7 +8,7 @@ defs = [ 'GLEW_STATIC' ] incs = '. #source/blender/python/generic' # Only for Mathutils! and bpy_internal_import.h, be very careful -incs += ' #source/kernel/gen_system #intern/string #intern/guardedalloc' +incs += ' #intern/string #intern/guardedalloc #intern/container' incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer' incs += ' #intern/audaspace/intern #source/gameengine/Converter' incs += ' #source/gameengine/BlenderRoutines #source/blender/imbuf #intern/moto/include' |