Code cleanup: remove source/kernel module, this wasn't really the kernel of
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 May 2011 20:18:42 +0000 (20:18 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 May 2011 20:18:42 +0000 (20:18 +0000)
anything, only contained a hash map and functions to pass command line args
to the game engine. Moved those to container and BlenderRoutines modules.

115 files changed:
SConstruct
build_files/scons/config/darwin-config.py
doc/doxygen/doxygen.source
intern/container/CMakeLists.txt
intern/container/CTR_HashedPtr.h [moved from source/kernel/gen_system/GEN_HashedPtr.h with 67% similarity]
intern/container/CTR_Map.h
intern/container/SConscript
source/CMakeLists.txt
source/SConscript
source/blender/editors/space_view3d/CMakeLists.txt
source/blender/editors/space_view3d/SConscript
source/blender/editors/space_view3d/view3d_view.c
source/blender/readblenfile/CMakeLists.txt
source/blender/readblenfile/SConscript
source/blender/readblenfile/stub/BLO_readblenfileSTUB.c
source/blender/render/CMakeLists.txt
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/SConscript
source/blender/windowmanager/intern/wm_init_exit.c
source/blenderplayer/CMakeLists.txt
source/creator/CMakeLists.txt
source/creator/SConscript
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/BL_System.cpp [moved from source/kernel/gen_system/SYS_System.cpp with 60% similarity]
source/gameengine/BlenderRoutines/BL_System.h [moved from source/kernel/gen_system/SYS_System.h with 75% similarity]
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/BlenderRoutines/SConscript
source/gameengine/Converter/BL_ActionActuator.h
source/gameengine/Converter/BL_ArmatureActuator.cpp
source/gameengine/Converter/BL_ArmatureActuator.h
source/gameengine/Converter/BL_ArmatureChannel.h
source/gameengine/Converter/BL_ArmatureConstraint.cpp
source/gameengine/Converter/BL_ArmatureConstraint.h
source/gameengine/Converter/BL_ArmatureObject.cpp
source/gameengine/Converter/BL_ArmatureObject.h
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_BlenderDataConversion.h
source/gameengine/Converter/BL_DeformableGameObject.h
source/gameengine/Converter/BL_MeshDeformer.cpp
source/gameengine/Converter/BL_MeshDeformer.h
source/gameengine/Converter/BL_ModifierDeformer.cpp
source/gameengine/Converter/BL_ShapeActionActuator.h
source/gameengine/Converter/BL_ShapeDeformer.cpp
source/gameengine/Converter/BL_SkinDeformer.cpp
source/gameengine/Converter/BL_SkinDeformer.h
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.h
source/gameengine/Converter/KX_SoftBodyDeformer.cpp
source/gameengine/Converter/KX_SoftBodyDeformer.h
source/gameengine/Converter/SConscript
source/gameengine/Expressions/CMakeLists.txt
source/gameengine/Expressions/SConscript
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.h
source/gameengine/GameLogic/SCA_LogicManager.h
source/gameengine/GameLogic/SCA_PropertyActuator.cpp
source/gameengine/GameLogic/SCA_PropertyActuator.h
source/gameengine/GameLogic/SConscript
source/gameengine/GamePlayer/common/CMakeLists.txt
source/gameengine/GamePlayer/common/GPC_Engine.cpp
source/gameengine/GamePlayer/common/SConscript
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/SConscript
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_CameraActuator.h
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_ObjectActuator.h
source/gameengine/Ketsji/KX_ParentActuator.cpp
source/gameengine/Ketsji/KX_ParentActuator.h
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h
source/gameengine/Ketsji/KX_SceneActuator.cpp
source/gameengine/Ketsji/KX_SceneActuator.h
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_TrackToActuator.h
source/gameengine/Ketsji/SConscript
source/gameengine/Network/CMakeLists.txt
source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
source/gameengine/Network/LoopBackNetwork/SConscript
source/gameengine/Network/NG_NetworkScene.h
source/gameengine/Network/SConscript
source/gameengine/Physics/Bullet/CMakeLists.txt
source/gameengine/Physics/Bullet/SConscript
source/gameengine/Rasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_BucketManager.cpp
source/gameengine/Rasterizer/RAS_BucketManager.h
source/gameengine/Rasterizer/RAS_Deformer.h
source/gameengine/Rasterizer/RAS_MaterialBucket.h
source/gameengine/Rasterizer/RAS_MeshObject.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
source/gameengine/Rasterizer/SConscript
source/gameengine/VideoTexture/CMakeLists.txt
source/gameengine/VideoTexture/SConscript
source/kernel/CMakeLists.txt [deleted file]
source/kernel/SConscript [deleted file]
source/kernel/gen_messaging/GEN_messaging.h [deleted file]
source/kernel/gen_messaging/intern/messaging.c [deleted file]
source/kernel/gen_system/GEN_HashedPtr.cpp [deleted file]
source/kernel/gen_system/GEN_Map.h [deleted file]
source/kernel/gen_system/SYS_SingletonSystem.cpp [deleted file]
source/kernel/gen_system/SYS_SingletonSystem.h [deleted file]

index 954422e0b3da7795d2bd35fa7da715a93172a403..e928970f6b84da541facf6d2801ca789b68d9e52 100644 (file)
@@ -568,9 +568,10 @@ pluglist.append('source/blender/blenpluginapi/plugin.DEF')
 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'plugin.def'))
 
 plugininstall = []
-for targetdir,srcfile in zip(plugtargetlist, pluglist):
-    td, tf = os.path.split(targetdir)
-    plugininstall.append(env.Install(dir=td, source=srcfile))
+# plugins in blender 2.5 don't work at the moment.
+#for targetdir,srcfile in zip(plugtargetlist, pluglist):
+#    td, tf = os.path.split(targetdir)
+#    plugininstall.append(env.Install(dir=td, source=srcfile))
 
 textlist = []
 texttargetlist = []
index 0c51476a6d0913ece91b7618198dcd722fdcbbb5..a3ee937f703f3b36ec87007dae09866b128f883d 100644 (file)
@@ -14,7 +14,7 @@ USE_SDK=True
 ###################     Cocoa & architecture settings      ##################
 #############################################################################
 WITH_GHOST_COCOA=True
-MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
+MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
 
 
 cmd = 'uname -p'
index 9cd86e23e591c52ef393df3fb876b0dc659adf06..ccdf3448f180c8c7f60eeb2004c42366dcd13f11 100644 (file)
 
 /* ================================ */
 
-/** \defgroup kernel kernel */
-
-/** \defgroup genmess gen_messaging
- *  \ingroup kernel
- */
-
-/** \defgroup gensys gen_system
- *  \ingroup kernel
- */
-
-/* ================================ */
-
 /** \defgroup undoc Undocumented
  *  \brief Modules and libraries that are still undocumented, or lacking proper integration into the doxygen system, are marked in this group. */
index 7f15854e538e41874f490e628940c3704945a214..7e83acf68cec4f2cbb3990ededdd82c40cebfb2e 100644 (file)
 
 set(INC
        .
+       ../guardedalloc
 )
 
 set(SRC
        intern/CTR_List.cpp
 
+       CTR_HashedPtr.h
        CTR_List.h
        CTR_Map.h
        CTR_TaggedIndex.h
similarity index 67%
rename from source/kernel/gen_system/GEN_HashedPtr.h
rename to intern/container/CTR_HashedPtr.h
index 86a7ceb9ae77937e359aadfbff469ddde3901571..0291535d7185c6928ab4533fa3fb5cd932a2a96a 100644 (file)
  *
  */
 
-/** \file kernel/gen_system/GEN_HashedPtr.h
- *  \ingroup gensys
+/** \file container/CTR_HashedPtr.h
+ *  \ingroup ctr
  */
 
-#ifndef __GEN_HASHEDPTR
-#define __GEN_HASHEDPTR
+#ifndef CTR_HASHEDPTR_H
+#define CTR_HASHEDPTR_H
 
-unsigned int GEN_Hash(void * inDWord);
+#include <stdlib.h>
 
-class GEN_HashedPtr
+inline unsigned int CTR_Hash(void *inDWord)
+{
+       size_t key = (size_t)inDWord;
+       return (unsigned int)(key ^ (key>>4));
+}
+
+class CTR_HashedPtr
 {
        void* m_valptr;
 public:
-       GEN_HashedPtr(void* val) : m_valptr(val) {};
-       unsigned int hash() const { return GEN_Hash(m_valptr);};
-       inline friend bool operator ==(const GEN_HashedPtr & rhs, const GEN_HashedPtr & lhs) { return rhs.m_valptr == lhs.m_valptr;};
+       CTR_HashedPtr(void* val) : m_valptr(val) {};
+       unsigned int hash() const { return CTR_Hash(m_valptr);};
+       inline friend bool operator ==(const CTR_HashedPtr & rhs, const CTR_HashedPtr & lhs) { return rhs.m_valptr == lhs.m_valptr;};
        void *getValue() const { return m_valptr; }
 };
 
-#endif //__GEN_HASHEDPTR
+#endif //CTR_HASHEDPTR_H
 
index cbd67fdeaca5bd30cbd1970a996209ff34fc4336..1991ec19e3a6e37b824d0cdb1235c510bc828031 100644 (file)
@@ -55,6 +55,19 @@ public:
             m_buckets[i] = 0;
         }
     }
+
+       CTR_Map(const CTR_Map& map)
+       {
+               m_num_buckets = map.m_num_buckets;
+               m_buckets = new Entry *[m_num_buckets];
+
+               for (int i = 0; i < m_num_buckets; ++i) {
+                       m_buckets[i] = 0;
+
+                       for(Entry *entry = map.m_buckets[i]; entry; entry=entry->m_next)
+                               insert(entry->m_key, entry->m_value);
+               }
+       }
     
     int size() { 
         int count=0;
@@ -87,6 +100,24 @@ public:
         }
         return 0;
     }
+
+    Key* getKey(int index) {
+        int count=0;
+        for (int i=0;i<m_num_buckets;i++)
+        {
+            Entry* bucket = m_buckets[i];
+            while(bucket)
+            {
+                if (count==index)
+                {
+                    return &bucket->m_key;
+                }
+                bucket = bucket->m_next;
+                count++;
+            }
+        }
+        return 0;
+    }
     
     void clear() {
         for (int i = 0; i < m_num_buckets; ++i) {
index 2d93e90b555df5aee467d741fd90366b16e0d940..8edf86d7d4acc1e8f68c8bea3cd09c7165168763 100644 (file)
@@ -2,6 +2,6 @@
 Import ('env')
 
 sources = env.Glob('intern/*.cpp')
-incs = '.'
+incs = '. #intern/guardedalloc'
 
 env.BlenderLib ('bf_intern_ctr', sources, Split(incs) , [], libtype='intern', priority = 10 )
index 1929f19f38f829a61a28b90c94ef3839b1999011..5d0354ccd721e031dd03388f416f05912d943e6f 100644 (file)
@@ -27,7 +27,6 @@
 add_subdirectory(blender)
 
 if(WITH_GAMEENGINE)
-       add_subdirectory(kernel)
        add_subdirectory(gameengine)
 endif()
        
index 8d08d9cca0838a1beb04eb2cb8a360440da3fd6e..0002cb4cf0bef0d363c5c32bea553b534ed42c29 100644 (file)
@@ -4,7 +4,7 @@ Import ('env')
 SConscript(['blender/SConscript', 'creator/SConscript'])
 
 if env['WITH_BF_GAMEENGINE']:
-    SConscript (['kernel/SConscript', 'gameengine/SConscript'])
+    SConscript (['gameengine/SConscript'])
 
 if env['WITH_BF_PLAYER']:
     SConscript (['blenderplayer/bad_level_call_stubs/SConscript'])
index 9744887ed9f077a0713ed145c166fccf70b49f3d..f923c578769367b16b42a2473b5c01be2f9dffab 100644 (file)
@@ -58,7 +58,7 @@ set(SRC
 )
 
 if(WITH_GAMEENGINE)
-       list(APPEND INC ../../../kernel/gen_system)
+       list(APPEND INC ../../../../source/gameengine/BlenderRoutines)
        add_definitions(-DWITH_GAMEENGINE)
 endif()
 
index 3df59d485d5cd84ffcb4516341ca551e36159cb9..84ba8d1fe861b195d5f8d8c10a76a788e2f9dc9f 100644 (file)
@@ -9,7 +9,7 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 incs += ' ../../render/extern/include ../../blenloader'
 incs += ' ../../gpu ../../makesrna ../../blenfont'
 incs += ' #/intern/smoke/extern'
-incs += ' #source/kernel/gen_system'
+incs += ' #source/gameengine/BlenderRoutines'
 
 if env['WITH_BF_GAMEENGINE']:
     defs.append('WITH_GAMEENGINE')
index 8a975eec40f1b088d353102c703c665f2ef0f60a..b46c7236170c9ec2f15ef7be18ea1f165f102e91 100644 (file)
@@ -65,7 +65,7 @@
 #include "ED_armature.h"
 
 #ifdef WITH_GAMEENGINE
-#include "SYS_System.h"
+#include "BL_System.h"
 #endif
 
 #include "view3d_intern.h"     // own include
@@ -1764,9 +1764,6 @@ static void game_set_commmandline_options(GameData *gm)
        }
 }
 
-/* maybe we need this defined somewhere else */
-extern void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *cam_frame, int always_use_expand_framing);
-
 #endif // WITH_GAMEENGINE
 
 static int game_engine_poll(bContext *C)
index 8d3633b4918f31a10eb0da635186f314dcfa9d99..9b869d39697d119182cb928f36b774394124e461 100644 (file)
@@ -31,7 +31,6 @@ set(INC
        ../blenkernel
        ../blenlib
        ../makesdna
-       ../../kernel/gen_messaging
 )
 
 set(SRC
index 6d8749df1e2cd78df8bb6f7aa1d18617c0efb14f..07f84eb52d5deeb21ae6aee6a42fb329c17f443b 100644 (file)
@@ -3,6 +3,6 @@ Import ('env')
 
 sources = env.Glob('intern/*.c')
 
-incs = '.  ../blenloader ../blenloader/intern ../blenkernel ../blenlib ../makesdna ../../kernel/gen_messaging'
+incs = '.  ../blenloader ../blenloader/intern ../blenkernel ../blenlib ../makesdna'
 
 env.BlenderLib ( 'bf_readblenfile', sources, Split(incs), [], libtype=['core','player'], priority = [0,5] )
index 4900f0c3338da6e384340fee03c9c0c6bb8d72b2..0f3541b510dc0111466546a8b7db31ef751944e7 100644 (file)
@@ -34,7 +34,6 @@
 
 
 #include <stdio.h>
-#include "GEN_messaging.h"
 
 int BLO_readblenfilememory( char *fromBuffer, int fromBufferSize);
 int BLO_readblenfilename( char *fileName);
@@ -47,7 +46,7 @@ BLO_readblenfilememory(
        char *fromBuffer, int fromBufferSize)
 {
 #if defined(DEBUG)
-       fprintf(GEN_errorstream,
+       fprintf(stderr,
                        "Error BLO_readblenfilename is a stub\n");
 #endif
        return(1);
@@ -58,7 +57,7 @@ BLO_readblenfilename(
        char *fileName)
 {
 #if defined(DEBUG)
-       fprintf(GEN_errorstream,
+       fprintf(stderr,
                        "Error BLO_readblenfilename is a stub\n");
 #endif
        return(1);
@@ -69,7 +68,7 @@ BLO_readblenfilehandle(
        int fileHandle)
 {
 #if defined(DEBUG)
-       fprintf(GEN_errorstream,
+       fprintf(stderr,
                        "Error BLO_readblenfilehandle is a stub\n");
 #endif
        return(1);
@@ -80,7 +79,7 @@ BLO_is_a_runtime(
        char *file)
 {
 #if defined(DEBUG)
-       fprintf(GEN_errorstream,
+       fprintf(stderr,
                        "Error BLO_is_a_runtime is a stub\n");
 #endif
        return 0;
@@ -91,7 +90,7 @@ BLO_read_runtime(
        char *file) 
 {
 #if defined(DEBUG)
-       fprintf(GEN_errorstream,
+       fprintf(stderr,
                        "Error BLO_read_runtime is a stub\n");
 #endif
        return 0;
index f00e54c1796cbbf8c7a8c6be708af9d9b7fa369c..bcb427abd6cf25b4292181ddbc4c866b3fcd9c3e 100644 (file)
@@ -36,7 +36,6 @@ set(INC
        ../makesrna
        ../blenkernel
        ../imbuf
-       ../../kernel/gen_messaging
        ../../../intern/smoke/extern
        ../../../intern/mikktspace
        ../../../intern/guardedalloc
index 251f6605f5e3eefce89388ef485b1e5fd42a96ee..6f03928e1fc562b0d3c8d51172e341cabf94ab84 100644 (file)
@@ -37,12 +37,12 @@ set(INC
        ../blenloader
        ../editors/include
        ../render/extern/include
-       ../../kernel/gen_system
        ../../../intern/guardedalloc
        ../../../intern/memutil
        ../../../intern/elbeem/extern
        ../../../intern/ghost
        ../../../intern/opennl/extern
+       ../../../source/gameengine/BlenderRoutines
        ${ZLIB_INCLUDE_DIRS}
        ${OPENGL_INCLUDE_DIR}
        ${GLEW_INCLUDE_PATH}
index 3826671736999c85df23e6fc48d20007247f68a8..f52ac8ba3cb87f852dfdeed88583c096ab9db84f 100644 (file)
@@ -8,11 +8,12 @@ sources = env.Glob('intern/*.c')
 
 incs = '. ../editors/include ../python ../makesdna ../blenlib ../blenkernel'
 incs += ' ../nodes ../imbuf ../blenloader ../render/extern/include'
-incs += ' ../radiosity/extern/include ../../kernel/gen_system'
+incs += ' ../radiosity/extern/include'
 incs += ' ../makesrna ../gpu ../blenfont'
 
 incs += ' #/intern/guardedalloc #/intern/memutil #/intern/ghost'
 incs += ' #/intern/elbeem #/extern/glew/include'
+incs += ' #source/gameengine/BlenderRoutines'
 
 incs += ' ' + env['BF_ZLIB_INC']
 
index 620d3314d431dee0ee3dbddebbd6a33286bc8efa..b09e264bd1d14d0012848756352c1b0925c4f69b 100644 (file)
@@ -72,7 +72,7 @@
 #endif
 
 #ifdef WITH_GAMEENGINE
-#include "SYS_System.h"
+#include "BL_System.h"
 #endif
 #include "GHOST_Path-api.h"
 #include "GHOST_C-api.h"
index 83dfd15f2ddbcc77d935eddd54dd86ae9db93195..b88c0fd04c1a2d7652ce1383021ea6f5b80e8a8b 100644 (file)
@@ -110,7 +110,6 @@ endif()
                bf_intern_smoke
                bf_modifiers
                bf_intern_moto 
-               bf_gen_system 
                bf_nodes
                bf_gpu
                bf_imbuf
index a039dca208e2a3c59d247eca93c6cc5994dc97ac..b39393bc8b7d39081279f5315219a96aa70c81f3 100644 (file)
@@ -82,10 +82,7 @@ if(WITH_PYTHON)
 endif()
 
 if(WITH_GAMEENGINE)
-       blender_include_dirs(
-               ../kernel/gen_messaging
-               ../kernel/gen_system
-       )
+       blender_include_dirs(../gameengine/BlenderRoutines)
 
        add_definitions(-DWITH_GAMEENGINE)
 endif()
@@ -778,7 +775,6 @@ endif()
                bf_collada
                bf_intern_bsp
                bf_intern_bop
-               bf_gen_system
                bf_intern_decimate
                bf_intern_elbeem
                bf_intern_ik
@@ -800,7 +796,6 @@ endif()
                ge_logic_expressions
                ge_scenegraph
                ge_logic_network
-               bf_gen_system
                bf_python # duplicate for BPY_driver_exec
                ge_logic_ngnetwork
                extern_bullet
index 8577872c48ac6be256256f0eebee04f2a7f8002d..79e03c8dddc03f3ffcaf13c2ab62a2021a6f04c1 100644 (file)
@@ -7,8 +7,8 @@ sources = 'creator.c'
 incs = '#/intern/guardedalloc ../blender/blenlib ../blender/blenkernel'
 incs += ' ../blender/editors/include ../blender/blenloader ../blender/imbuf'
 incs += ' ../blender/renderconverter ../blender/render/extern/include ../blender/windowmanager'
-incs += ' ../blender/makesdna ../blender/makesrna ../kernel/gen_messaging'
-incs += ' ../kernel/gen_system #/extern/glew/include ../blender/gpu'
+incs += ' ../blender/makesdna ../blender/makesrna'
+incs += ' ../gameengine/BlenderRoutines #/extern/glew/include ../blender/gpu'
 incs += ' ' + env['BF_OPENGL_INC']
 
 defs = []
index ab94131966f6ed667b2fc320cf0d2acfa2d63a20..2b146822194183394749d6b9a74b89dada18830c 100644 (file)
 
 /* for passing information between creator and gameengine */
 #ifdef WITH_GAMEENGINE
-#include "GEN_messaging.h"
-#include "SYS_System.h"
+#include "BL_System.h"
 #else /* dummy */
 #define SYS_SystemHandle int
 #endif
@@ -1216,7 +1215,6 @@ int main(int argc, const char **argv)
 
 #ifdef WITH_GAMEENGINE
        syshandle = SYS_GetSystem();
-       GEN_init_messaging_system();
 #else
        syshandle= 0;
 #endif
index b94d15d2fbf9bd8f3a000069aa1c62c1a84b4741..571cc9087b3b461c36dc56d80d51942738b3312a 100644 (file)
@@ -64,7 +64,7 @@
 
 #include "NG_LoopBackNetworkDeviceInterface.h"
 
-#include "SYS_System.h"
+#include "BL_System.h"
 
 #include "GPU_extensions.h"
 #include "Value.h"
similarity index 60%
rename from source/kernel/gen_system/SYS_System.cpp
rename to source/gameengine/BlenderRoutines/BL_System.cpp
index b2de797fc8d59cb8253fbe9a9daf0ba23f5155f8..30b8beef15689ac36f9f53272163749f84deeeba 100644 (file)
  * Contributor(s): none yet.
  *
  * ***** END GPL LICENSE BLOCK *****
- * System specific information / access.
  * Interface to the commandline arguments
  */
 
-/** \file kernel/gen_system/SYS_System.cpp
- *  \ingroup gensys
+/** \file gameengine/BlenderRoutines/BL_System.cpp
+ *  \ingroup blroutines
  */
 
-#include "SYS_System.h"
-#include "SYS_SingletonSystem.h"
+#include "CTR_Map.h"
+#include "STR_HashedString.h"
+#include "BL_System.h"
+
+struct SingletonSystem {
+       CTR_Map<STR_HashedString,int> int_params;
+       CTR_Map<STR_HashedString,float> float_params;
+       CTR_Map<STR_HashedString,STR_String> string_params;
+};
+
+static SingletonSystem *_system_instance = NULL;
 
 SYS_SystemHandle SYS_GetSystem()
 {
-       return (SYS_SystemHandle) SYS_SingletonSystem::Instance();
+       if(!_system_instance)
+               _system_instance = new SingletonSystem();
+
+       return (SYS_SystemHandle)_system_instance;
 }
 
 void SYS_DeleteSystem(SYS_SystemHandle sys)
 {
-       if (sys) {
-               ((SYS_SingletonSystem *) sys)->Destruct();
+       if(_system_instance) {
+               delete _system_instance;
+               _system_instance = NULL;
        }
 }
 
 int SYS_GetCommandLineInt(SYS_SystemHandle sys, const char *paramname, int defaultvalue)
 {
-       return ((SYS_SingletonSystem *) sys)->SYS_GetCommandLineInt(paramname, defaultvalue);
+       int *result = ((SingletonSystem *)sys)->int_params[paramname];
+       if(result)
+               return *result;
+
+       return defaultvalue;
 }
 
 float SYS_GetCommandLineFloat(SYS_SystemHandle sys, const char *paramname, float defaultvalue)
 {
-       return ((SYS_SingletonSystem *) sys)->SYS_GetCommandLineFloat(paramname, defaultvalue);
+       float *result = ((SingletonSystem *)sys)->float_params[paramname];
+       if(result)
+               return *result;
+
+       return defaultvalue;
 }
 
 const char *SYS_GetCommandLineString(SYS_SystemHandle sys, const char *paramname, const char *defaultvalue)
 {
-       return ((SYS_SingletonSystem *) sys)->SYS_GetCommandLineString(paramname, defaultvalue);
+       STR_String *result = ((SingletonSystem *)sys)->string_params[paramname];
+       if(result)
+               return *result;
+
+       return defaultvalue;
 }
 
 void SYS_WriteCommandLineInt(SYS_SystemHandle sys, const char *paramname, int value)
 {
-       ((SYS_SingletonSystem *) sys)->SYS_WriteCommandLineInt(paramname, value);
+       ((SingletonSystem *)sys)->int_params.insert(paramname, value);
 }
 
 void SYS_WriteCommandLineFloat(SYS_SystemHandle sys, const char *paramname, float value)
 {
-       ((SYS_SingletonSystem *) sys)->SYS_WriteCommandLineFloat(paramname, value);
+       ((SingletonSystem *)sys)->float_params.insert(paramname, value);
 }
 
 void SYS_WriteCommandLineString(SYS_SystemHandle sys, const char *paramname, const char *value)
 {
-       ((SYS_SingletonSystem *) sys)->SYS_WriteCommandLineString(paramname, value);
+       ((SingletonSystem *)sys)->string_params.insert(paramname, value);
 }
+
similarity index 75%
rename from source/kernel/gen_system/SYS_System.h
rename to source/gameengine/BlenderRoutines/BL_System.h
index 34fed4a81a29d214bc54652bf1ca8aacee1a6bb9..d743ef5532af7f7cb3df68c28f2d3ed976968f77 100644 (file)
  * Interface to the commandline arguments
  */
 
-/** \file kernel/gen_system/SYS_System.h
- *  \ingroup gensys
+/** \file gameengine/BlenderRoutines/BL_System.h
+ *  \ingroup blroutines
  */
 
-
-#ifndef __SYSTEM_INCLUDE
-#define __SYSTEM_INCLUDE
-
-#define SYS_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
-
-SYS_DECLARE_HANDLE(SYS_SystemHandle);
-
-/**
- System specific information / access.
- For now, only used for commandline parameters.
- One of the available implementations must be linked to the application
- that uses this system routines. 
- Please note that this protocol/interface is just for testing, 
- it needs discussion in the development group for a more final version.
-*/
+#ifndef BL_SYSTEM_H
+#define BL_SYSTEM_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+/* Game Engine command line parameters */
+
+typedef void* SYS_SystemHandle;
+
 extern SYS_SystemHandle SYS_GetSystem(void);
 extern void SYS_DeleteSystem(SYS_SystemHandle sys);
 
@@ -65,9 +55,18 @@ extern void SYS_WriteCommandLineInt(SYS_SystemHandle sys, const char *paramname,
 extern void SYS_WriteCommandLineFloat(SYS_SystemHandle sys, const char *paramname, float value);
 extern void SYS_WriteCommandLineString(SYS_SystemHandle sys, const char *paramname, const char *value);
 
+/* Start game engine */
+
+struct bContext;
+struct ARegion;
+struct rcti;
+
+extern void StartKetsjiShell(struct bContext *C, struct ARegion *ar,
+       struct rcti *cam_frame, int always_use_expand_framing);
+
 #ifdef __cplusplus
 }
 #endif
 
-#endif //__SYSTEM_INCLUDE
+#endif /* BL_SYSTEM_H */
 
index f510303431694847ae4828e2c524f4f4056f1087..6a17017f26191a1fe0bea485f81466a6b3c49668 100644 (file)
@@ -1,8 +1,8 @@
 
 set(INC
        .
-       ../../../source/kernel/gen_system
        ../../../intern/string
+       ../../../intern/container
        ../../../intern/guardedalloc
        ../../../intern/audaspace/intern
        ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer 
@@ -34,6 +34,7 @@ set(INC
 
 set(SRC
        BL_KetsjiEmbedStart.cpp
+       BL_System.cpp
        KX_BlenderCanvas.cpp
        KX_BlenderGL.cpp
        KX_BlenderInputDevice.cpp
@@ -42,6 +43,7 @@ set(SRC
        KX_BlenderRenderTools.cpp
        KX_BlenderSystem.cpp
 
+       BL_System.h
        KX_BlenderCanvas.h
        KX_BlenderGL.h
        KX_BlenderInputDevice.h
index ff70ad3bf7bdfd7896ea41b6f2bc89489b0ef408..8f59ec0bf04883d638efc1a84f4e2b16c5bfce30 100644 (file)
@@ -4,10 +4,10 @@ Import ('env')
 sources = env.Glob('*.cpp')
 defs = [ 'GLEW_STATIC' ]
 
-incs = '. #source/kernel/gen_system #intern/string #intern/guardedalloc'
+incs = '. #intern/string #intern/guardedalloc'
 incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer'
 incs += ' #source/gameengine/Converter #source/blender/imbuf'
-incs += ' #intern/ghost/include'
+incs += ' #intern/ghost/include #intern/container'
 incs += ' #intern/audaspace/intern'
 incs += ' #intern/moto/include #source/gameengine/Ketsji #source/blender/blenlib'
 incs += ' #source/blender/blenkernel #source/blender'
index c6e661f15492b13bf8b60616a7e5b620ad385c7d..ff4ca785a96143bc3f73938fcfb00fecb8f4deaf 100644 (file)
@@ -34,7 +34,7 @@
 #ifndef BL_ACTIONACTUATOR
 #define BL_ACTIONACTUATOR
 
-#include "GEN_HashedPtr.h"
+#include "CTR_HashedPtr.h"
 #include "SCA_IActuator.h"
 #include "DNA_actuator_types.h"
 #include "MT_Point3.h"
index efd1a73a44880471691923e5e2a3c1fa810be64b..a56fab31a262c78f3e135a30b37bf06600b4b925 100644 (file)
@@ -115,7 +115,7 @@ bool BL_ArmatureActuator::UnlinkObject(SCA_IObject* clientobj)
        return res;
 }
 
-void BL_ArmatureActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map)
+void BL_ArmatureActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map)
 {
        void **h_obj = (*obj_map)[m_gametarget];
        if (h_obj) {
index 4615fb067140f8770274ca36f73e1024e5731ad9..70aa526d4d30d89ddc32fb63d70660020a8e1b7d 100644 (file)
@@ -67,7 +67,7 @@ public:
        };
        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);
        virtual void ReParent(SCA_IObject* parent);
        
index 0c2c27a7fabbfca0d8b801d0b1c7a5ba5666f864..0a66d0038a266a3f7157f570079b164b7b98eb45 100644 (file)
@@ -35,8 +35,8 @@
 #define __BL_ARMATURECHANNEL
 
 #include "DNA_action_types.h"
-#include "GEN_HashedPtr.h"
-#include "GEN_Map.h"
+#include "CTR_HashedPtr.h"
+#include "CTR_Map.h"
 #include "PyObjectPlus.h"
 
 class SCA_IObject;
index c07fe6b3b41b4427cde033c4c1a37e789a4d7e03..3f1a111517cb8753bcf7ba9ec87becc9e9bc13c4 100644 (file)
@@ -147,7 +147,7 @@ void BL_ArmatureConstraint::ReParent(BL_ArmatureObject* armature)
        }
 }
 
-void BL_ArmatureConstraint::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map)
+void BL_ArmatureConstraint::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map)
 {
        void **h_obj = (*obj_map)[m_target];
        if (h_obj) {
index 1dd685b8cbad792294e3a742a9260af8c945295c..8e6ba1bc2d3e802b58ec0ee2d3305636c3bca0df 100644 (file)
@@ -35,8 +35,8 @@
 #define __BL_ARMATURECONSTRAINT
 
 #include "DNA_constraint_types.h"
-#include "GEN_HashedPtr.h"
-#include "GEN_Map.h"
+#include "CTR_HashedPtr.h"
+#include "CTR_Map.h"
 #include "PyObjectPlus.h"
 
 class SCA_IObject;
@@ -80,7 +80,7 @@ public:
 
        BL_ArmatureConstraint* GetReplica() const;
        void ReParent(BL_ArmatureObject* armature);
-       void Relink(GEN_Map<GEN_HashedPtr, void*> *map);
+       void Relink(CTR_Map<CTR_HashedPtr, void*> *map);
        bool UnlinkObject(SCA_IObject* clientobj);
 
        void UpdateTarget();
index 952af4db8bb9a64dbb0394b1feb66e254e1aaf24..c6c20a96482deae28c8084a7fd6956ebfb3e6496 100644 (file)
@@ -45,8 +45,8 @@
 #include "BKE_armature.h"
 
 #include "BKE_constraint.h"
-#include "GEN_Map.h"
-#include "GEN_HashedPtr.h"
+#include "CTR_Map.h"
+#include "CTR_HashedPtr.h"
 #include "MEM_guardedalloc.h"
 #include "DNA_action_types.h"
 #include "DNA_armature_types.h"
@@ -439,7 +439,7 @@ void BL_ArmatureObject::ReParentLogic()
        KX_GameObject::ReParentLogic();
 }
 
-void BL_ArmatureObject::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map)
+void BL_ArmatureObject::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map)
 {
        SG_DList::iterator<BL_ArmatureConstraint> cit(m_controlledConstraints);
        for (cit.begin(); !cit.end(); ++cit) {
index 8490bfadac23a0ae01b2463e8724b948be651cb6..2c3ca7404b372e285c4b7f576d339dab77939cbd 100644 (file)
@@ -60,7 +60,7 @@ public:
        short GetActivePriority();
        virtual void ProcessReplica();
        virtual void ReParentLogic();
-       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);
 
        class BL_ActionActuator * GetActiveAction();
index 34b417238aeb32c65095ab89960c7dc3e951ea07..51ab4e4c3996f1cdca808bce632747186d8deecb 100644 (file)
@@ -156,7 +156,7 @@ extern "C" {
 #include "KX_ScalarInterpolator.h"
 
 #include "KX_IpoConvert.h"
-#include "SYS_System.h"
+#include "BL_System.h"
 
 #include "SG_Node.h"
 #include "SG_BBox.h"
index cea9f7f2a8b2b2d5736ce07d1f7bff6e157df267..0e8ea17fc389caefa1a3bd819ff9dd07576bd959 100644 (file)
@@ -34,7 +34,7 @@
 #ifndef __BLENDER_CONVERT
 #define __BLENDER_CONVERT
 
-#include "GEN_HashedPtr.h"
+#include "CTR_HashedPtr.h"
 #include "STR_String.h"
 #include "KX_Python.h"
 #include "KX_PhysicsEngineEnums.h"
index 6bcdaff10e3d2181e75148de25e6eccf675ff3ef..615bb84ac2b9b554e36dedb02c91b1438db5ac90 100644 (file)
@@ -60,7 +60,7 @@ public:
        {
                return m_blendobj;
        }
-       virtual void Relink(GEN_Map<GEN_HashedPtr, void*>*map)
+       virtual void Relink(CTR_Map<CTR_HashedPtr, void*>*map)
        {
                if (m_pDeformer)
                        m_pDeformer->Relink (map);
index 2a54ea7d9aedf73743a288dff5855634ded2171c..63db91672738c77d83a5eb8baafe58548bb98e95 100644 (file)
@@ -46,7 +46,7 @@
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "STR_HashedString.h"
 #include "BLI_math.h"
 
@@ -101,7 +101,7 @@ void BL_MeshDeformer::ProcessReplica()
        m_lastDeformUpdate = -1;
 }
 
-void BL_MeshDeformer::Relink(GEN_Map<class GEN_HashedPtr, void*>*map)
+void BL_MeshDeformer::Relink(CTR_Map<class CTR_HashedPtr, void*>*map)
 {
        void **h_obj = (*map)[m_gameobj];
 
index b62958c7fd1dbf5cbbbbf747494f405814c429e5..90466e930fb507cda0e5d13d224d9f6e662acd23 100644 (file)
@@ -51,7 +51,7 @@ class BL_MeshDeformer : public RAS_Deformer
 public:
        void VerifyStorage();
        void RecalcNormals();
-       virtual void Relink(GEN_Map<class GEN_HashedPtr, void*>*map);
+       virtual void Relink(CTR_Map<class CTR_HashedPtr, void*>*map);
        BL_MeshDeformer(BL_DeformableGameObject *gameobj,
                                        struct Object* obj,
                                        class RAS_MeshObject *meshobj ):
index 95f362a2879b1227f900b9d450fdaabfbd715fb0..e504fa7e49d103d4a824c0f2a1ce06dd074d61dc 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "MEM_guardedalloc.h"
 #include "BL_ModifierDeformer.h"
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "STR_HashedString.h"
 #include "RAS_IPolygonMaterial.h"
 #include "RAS_MeshObject.h"
index 229c59a34a4f0d3a80f8421a503934be35afd859..7a4523d45541e06e3198edd96394ed754c63c8e2 100644 (file)
@@ -34,7 +34,7 @@
 #ifndef BL_SHAPEACTIONACTUATOR
 #define BL_SHAPEACTIONACTUATOR
 
-#include "GEN_HashedPtr.h"
+#include "CTR_HashedPtr.h"
 #include "SCA_IActuator.h"
 #include "BL_ActionActuator.h"
 #include "MT_Point3.h"
index 40e7c6e1bde85b9440075f267b577deba9aa2dcc..8d8f149bb6c2ee90bf8dc25fd158361694ba8a9a 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "MEM_guardedalloc.h"
 #include "BL_ShapeDeformer.h"
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "STR_HashedString.h"
 #include "RAS_IPolygonMaterial.h"
 #include "RAS_MeshObject.h"
index 4916ce53fc5cea3e0cbaa08be6063ecbff0fb745..34f9cb56c27232260436c8c666a87fa6bac19bc6 100644 (file)
@@ -37,7 +37,7 @@
 #endif //WIN32
 
 #include "BL_SkinDeformer.h"
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "STR_HashedString.h"
 #include "RAS_IPolygonMaterial.h"
 #include "RAS_MeshObject.h"
@@ -108,7 +108,7 @@ BL_SkinDeformer::~BL_SkinDeformer()
                m_armobj->Release();
 }
 
-void BL_SkinDeformer::Relink(GEN_Map<class GEN_HashedPtr, void*>*map)
+void BL_SkinDeformer::Relink(CTR_Map<class CTR_HashedPtr, void*>*map)
 {
        if (m_armobj) {
                void **h_obj = (*map)[m_armobj];
index 69b8783ce2273e394f79d635676b5cbe333515c7..e53e21e946ff58df45ea73a4041b70f05580f4e0 100644 (file)
@@ -38,7 +38,7 @@
 #pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
 #endif //WIN32
 
-#include "GEN_HashedPtr.h"
+#include "CTR_HashedPtr.h"
 #include "BL_MeshDeformer.h"
 #include "BL_ArmatureObject.h"
 
@@ -54,7 +54,7 @@ class BL_SkinDeformer : public BL_MeshDeformer
 {
 public:
 //     void SetArmatureController (BL_ArmatureController *cont);
-       virtual void Relink(GEN_Map<class GEN_HashedPtr, void*>*map);
+       virtual void Relink(CTR_Map<class CTR_HashedPtr, void*>*map);
        void SetArmature (class BL_ArmatureObject *armobj);
 
        BL_SkinDeformer(BL_DeformableGameObject *gameobj,
index 147c8b791eedb201c70331a89a3fc98ccab3707e..bdd0769e0a38c3ff44693fd6b9055d9f8fc2d37a 100644 (file)
@@ -26,9 +26,9 @@
 
 set(INC
        .
-       ../../../source/kernel/gen_system
        ../../../intern/string
        ../../../intern/guardedalloc
+       ../../../intern/container
        ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
        ../../../intern/audaspace/intern
        ../../../source/gameengine/Converter
index a0d58ece39670978ccac5088988cc0a4d05029bd..684ed0b06f9e7d2951fb723f3a87026f4bdd3688 100644 (file)
@@ -50,7 +50,7 @@
 #include "KX_PolygonMaterial.h"
 
 
-#include "SYS_System.h"
+#include "BL_System.h"
 
 #include "DummyPhysicsEnvironment.h"
 
@@ -1126,7 +1126,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(struct Main *maggie)
                        
                        /* incase the mesh might be refered to later */
                        {
-                               GEN_Map<STR_HashedString,void*> &mapStringToMeshes = scene->GetLogicManager()->GetMeshMap();
+                               CTR_Map<STR_HashedString,void*> &mapStringToMeshes = scene->GetLogicManager()->GetMeshMap();
                                
                                for(int i=0; i<mapStringToMeshes.size(); i++)
                                {
@@ -1143,7 +1143,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(struct Main *maggie)
 
                        /* Now unregister actions */
                        {
-                               GEN_Map<STR_HashedString,void*> &mapStringToActions = scene->GetLogicManager()->GetActionMap();
+                               CTR_Map<STR_HashedString,void*> &mapStringToActions = scene->GetLogicManager()->GetActionMap();
 
                                for(int i=0; i<mapStringToActions.size(); i++)
                                {
index 741b3ea8757ace3a380528991ca071dd5763e39c..2340e44d288198b2194fe113b015e2a979b4f0e4 100644 (file)
@@ -35,7 +35,7 @@
 #define __KX_BLENDERSCENECONVERTER_H
 
 #include "KX_HashedPtr.h"
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include <stdio.h>
 
 #include "KX_ISceneConverter.h"
@@ -61,12 +61,12 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter
        // Should also have a list of collision shapes. 
        // For the time being this is held in KX_Scene::m_shapes
 
-       GEN_Map<CHashedPtr,KX_GameObject*>      m_map_blender_to_gameobject;            /* cleared after conversion */
-       GEN_Map<CHashedPtr,RAS_MeshObject*>     m_map_mesh_to_gamemesh;                         /* cleared after conversion */
-       GEN_Map<CHashedPtr,SCA_IActuator*>      m_map_blender_to_gameactuator;          /* cleared after conversion */
-       GEN_Map<CHashedPtr,SCA_IController*>m_map_blender_to_gamecontroller;    /* cleared after conversion */
+       CTR_Map<CHashedPtr,KX_GameObject*>      m_map_blender_to_gameobject;            /* cleared after conversion */
+       CTR_Map<CHashedPtr,RAS_MeshObject*>     m_map_mesh_to_gamemesh;                         /* cleared after conversion */
+       CTR_Map<CHashedPtr,SCA_IActuator*>      m_map_blender_to_gameactuator;          /* cleared after conversion */
+       CTR_Map<CHashedPtr,SCA_IController*>m_map_blender_to_gamecontroller;    /* cleared after conversion */
        
-       GEN_Map<CHashedPtr,BL_InterpolatorList*> m_map_blender_to_gameAdtList;
+       CTR_Map<CHashedPtr,BL_InterpolatorList*> m_map_blender_to_gameAdtList;
        
        Main*                                   m_maggie;
        vector<struct Main*>    m_DynamicMaggie;
index d3d17bbe43357aeaa23b29854ef2057c170e50eb..02c259d793bd1d5d1d01a926078477c6b091d709 100644 (file)
@@ -41,8 +41,8 @@
 #include "KX_ConvertPhysicsObject.h"
 #include "KX_SoftBodyDeformer.h"
 #include "RAS_MeshObject.h"
-#include "GEN_Map.h"
-#include "GEN_HashedPtr.h"
+#include "CTR_Map.h"
+#include "CTR_HashedPtr.h"
 
 #ifdef USE_BULLET
 
@@ -53,7 +53,7 @@
 #include "KX_BulletPhysicsController.h"
 #include "btBulletDynamicsCommon.h"
 
-void KX_SoftBodyDeformer::Relink(GEN_Map<class GEN_HashedPtr, void*>*map)
+void KX_SoftBodyDeformer::Relink(CTR_Map<class CTR_HashedPtr, void*>*map)
 {
        void **h_obj = (*map)[m_gameobj];
 
index aa4ff9d5e54a7471cb0ab40335c4521b86e234ee..67eb9d7b2859668cb413dc2e6b8f1222f1bd1417 100644 (file)
@@ -60,7 +60,7 @@ public:
        {
                //printf("~KX_SoftBodyDeformer\n");
        };
-       virtual void Relink(GEN_Map<class GEN_HashedPtr, void*>*map);
+       virtual void Relink(CTR_Map<class CTR_HashedPtr, void*>*map);
        virtual bool Apply(class RAS_IPolyMaterial *polymat);
        virtual bool Update(void)
        {
index 9d88018d805ac3466377ea4f9ac8b120fc0d295b..9cfc341074866166be7dec7752e307fb31a1b450 100644 (file)
@@ -4,7 +4,7 @@ Import ('env')
 sources = env.Glob('*.cpp')
 defs = []
 
-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'
index c593c69061407d95d69a89e77acd7bb2254b1f58..8cda0e2dc77ace6e5b2364a42a7e1f04cac6d634 100644 (file)
@@ -26,7 +26,6 @@
 
 set(INC
        .
-       ../../../source/kernel/gen_system
        ../../../intern/string
        ../../../intern/guardedalloc
        ../../../intern/moto/include
index b1e34aa358bb4a7f66677e8910b135604e21deba..4dc165a7696f3b8bdf22a9a57cdfc4ca21e70dc3 100644 (file)
@@ -3,7 +3,7 @@ Import ('env')
 
 sources = env.Glob('*.cpp')
 
-incs ='. #source/kernel/gen_system #intern/guardedalloc #intern/string #intern/moto/include #source/gameengine/SceneGraph #source/blender/blenloader'
+incs ='. #intern/guardedalloc #intern/string #intern/moto/include #source/gameengine/SceneGraph #source/blender/blenloader'
 
 defs = []
 
index 793b8e7eed84f466f4c659d6de26cb644a41b828..2acf07584b174b1e2e395b186d31aa7b91c5855f 100644 (file)
@@ -26,8 +26,8 @@
 
 set(INC
        . 
-       ../../../source/kernel/gen_system 
        ../../../intern/string
+       ../../../intern/container
        ../../../source/gameengine/Expressions 
        ../../../source/gameengine/SceneGraph
        ../../../intern/moto/include
index 2d0cb16b63c93e6ed21e0ab2654e247fec9116bc..596118855d201fbc7339eb5ddaf64c9a79db138e 100644 (file)
@@ -78,7 +78,7 @@ void SCA_ILogicBrick::ReParent(SCA_IObject* parent)
        m_gameobj = parent;
 }
 
-void SCA_ILogicBrick::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map)
+void SCA_ILogicBrick::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map)
 {
        // nothing to do
 }
index e74cd601b6ba6fca7ece54b982f394721a238496..4de0562339e79cc180fb25784f060e14bd93e887 100644 (file)
@@ -37,8 +37,8 @@
 #include "Value.h"
 #include "SCA_IObject.h"
 #include "BoolValue.h"
-#include "GEN_Map.h"
-#include "GEN_HashedPtr.h"
+#include "CTR_Map.h"
+#include "CTR_HashedPtr.h"
 
 class NG_NetworkScene;
 class SCA_IScene;
@@ -70,7 +70,7 @@ public:
        SCA_IObject*    GetParent() { return m_gameobj; }
 
        virtual void    ReParent(SCA_IObject* parent);
-       virtual void    Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map);
+       virtual void    Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map);
        virtual void Delete() { Release(); }
 
        // act as a BoolValue (with value IsPositiveTrigger)
index 44dc12a8fd45f290eeac151034011fe8009a99ba..c4735d1c146cc49678cd9a72fb62a655afba8cc9 100644 (file)
 #endif 
 
 #include <vector>
-//#include "GEN_Map.h"
+//#include "CTR_Map.h"
 #include <set>
 #include <map>
 #include <list>
 
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "STR_HashedString.h"
 #include "Value.h"
 #include "SG_QList.h"
@@ -85,12 +85,12 @@ class SCA_LogicManager
 
        // need to find better way for this
        // also known as FactoryManager...
-       GEN_Map<STR_HashedString,CValue*>       m_mapStringToGameObjects;
-       GEN_Map<STR_HashedString,void*>         m_mapStringToMeshes;
-       GEN_Map<STR_HashedString,void*>         m_mapStringToActions;
+       CTR_Map<STR_HashedString,CValue*>       m_mapStringToGameObjects;
+       CTR_Map<STR_HashedString,void*>         m_mapStringToMeshes;
+       CTR_Map<STR_HashedString,void*>         m_mapStringToActions;
 
-       GEN_Map<STR_HashedString,void*>         m_map_gamemeshname_to_blendobj;
-       GEN_Map<CHashedPtr,void*>                       m_map_blendobj_to_gameobj;
+       CTR_Map<STR_HashedString,void*>         m_map_gamemeshname_to_blendobj;
+       CTR_Map<CHashedPtr,void*>                       m_map_blendobj_to_gameobj;
 public:
        SCA_LogicManager();
        virtual ~SCA_LogicManager();
@@ -129,8 +129,8 @@ public:
        // for the scripting... needs a FactoryManager later (if we would have time... ;)
        void    RegisterMeshName(const STR_String& meshname,void* mesh);
        void    UnregisterMeshName(const STR_String& meshname,void* mesh);
-       GEN_Map<STR_HashedString,void*>&        GetMeshMap() { return m_mapStringToMeshes; };
-       GEN_Map<STR_HashedString,void*>&        GetActionMap() { return m_mapStringToActions; };
+       CTR_Map<STR_HashedString,void*>&        GetMeshMap() { return m_mapStringToMeshes; };
+       CTR_Map<STR_HashedString,void*>&        GetActionMap() { return m_mapStringToActions; };
        
        void    RegisterActionName(const STR_String& actname,void* action);
 
index 008e109384c9382b2a2b2277c433641c56892546..a4af1c3565214f6ad362f3124921bd47e93e780c 100644 (file)
@@ -213,7 +213,7 @@ bool SCA_PropertyActuator::UnlinkObject(SCA_IObject* clientobj)
        return false;
 }
 
-void SCA_PropertyActuator::Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map)
+void SCA_PropertyActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map)
 {
        void **h_obj = (*obj_map)[m_sourceObj];
        if (h_obj) {
index 1ca7b1c4e1e03a87ab50f32d73d2f11c56e9181f..35660710679c95ef1200a2cf98a3f6bad67219fd 100644 (file)
@@ -77,7 +77,7 @@ public:
 
        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();
index a8d3ee65f4c9df409838009240cd0e955dff706d..d63238822679f5bd709fa72d27f5a8469f538734 100644 (file)
@@ -3,7 +3,7 @@ Import ('env')
 
 sources = env.Glob('*.cpp') + env.Glob('Joystick/*.cpp')
 
-incs = '. #/source/kernel/gen_system #/intern/string'
+incs = '. #/intern/string #intern/container'
 incs += ' #/source/gameengine/Expressions #/intern/moto/include'
 incs += ' #/source/gameengine/Rasterizer #/source/gameengine/SceneGraph'
 
index 604dd9296a142a2cf1141c941337e8f3fad13631..afbc49ea38d9b0010c9d4128f72d3ada1c6d7a6f 100644 (file)
@@ -29,11 +29,11 @@ set(INC
        ../../../../intern/string
        ../../../../intern/ghost
        ../../../../intern/guardedalloc
+       ../../../../intern/container
        ../../../../intern/moto/include
        ../../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
-       ../../../../source/kernel/gen_system
-       ../../../../source/kernel/gen_messaging
        ../../../../source/gameengine/Converter
+       ../../../../source/gameengine/BlenderRoutines
        ../../../../source/blender/imbuf
        ../../../../source/gameengine/Ketsji
        ../../../../source/blender/blenlib
index 48ebfcaadf221d7c5496cd45820f6edd35eecac3..fc007d8d29583d7fd13804f691cf99dfa6ca2dfb 100644 (file)
@@ -50,7 +50,7 @@
 
 // include files needed by "KX_BlenderSceneConverter.h"
 
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "SCA_IActuator.h"
 #include "RAS_MeshObject.h"
 
index f7a423f4588dafb2babb0d94a6b92fef01f10876..d5e1f081d21dc82c3e0f02bd4abd1728bca454db 100644 (file)
@@ -19,10 +19,10 @@ incs = ['.',
         '#intern/ghost',
         '#intern/guardedalloc',
         '#intern/moto/include',
+        '#intern/container',
         '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
-        '#source/kernel/gen_system',
-        '#source/kernel/gen_messaging',
         '#source/gameengine/Converter',
+        '#source/gameengine/BlenderRoutines',
         '#source/blender/imbuf',
         '#source/gameengine/Ketsji',
         '#source/blender/blenlib',
index a88de69b272913b81a320f62c17e54de951e4151..edf0839f74786ef36b9792d56b3d53c7a2c0d197 100644 (file)
@@ -29,10 +29,10 @@ set(INC
        ../../../../intern/string
        ../../../../intern/ghost
        ../../../../intern/guardedalloc
+       ../../../../intern/container
        ../../../../intern/moto/include
        ../../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
-       ../../../../source/kernel/gen_system
-       ../../../../source/kernel/gen_messaging
+       ../../../../source/gameengine/BlenderRoutines
        ../../../../source/gameengine/Converter
        ../../../../source/blender/imbuf
        ../../../../source/gameengine/Ketsji
index 6ea98e0e8cc114ae4980229c29fa8e26fd8a98f5..6487d0298c7518e7add7df295851e04b12c6e7e9 100644 (file)
@@ -69,11 +69,11 @@ extern "C"
  **********************************/
 
 
-#include "SYS_System.h"
+#include "BL_System.h"
 #include "KX_KetsjiEngine.h"
 
 // include files needed by "KX_BlenderSceneConverter.h"
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "SCA_IActuator.h"
 #include "RAS_MeshObject.h"
 #include "RAS_OpenGLRasterizer.h"
index 0ab6da240ce43f2d91b49e8745f9c13abeeff6a3..a4f1391b1b0bae61d8648d36ec100eb901c7ffec 100644 (file)
@@ -47,7 +47,6 @@
 //#include <Carbon/Carbon.h>
 //#include <CFBundle.h>
 #endif // __APPLE__
-#include "GEN_messaging.h"
 #include "KX_KetsjiEngine.h"
 #include "KX_PythonInit.h"
 
@@ -92,7 +91,7 @@ extern char datatoc_bfont_ttf[];
 * End Blender include block
 **********************************/
 
-#include "SYS_System.h"
+#include "BL_System.h"
 #include "GPG_Application.h"
 
 #include "GHOST_ISystem.h"
@@ -403,8 +402,6 @@ int main(int argc, char** argv)
        
        initglobals();
 
-       GEN_init_messaging_system();
-
        IMB_init();
 
        // Setup builtin font for BLF (mostly copied from creator.c, wm_init_exit.c and interface_style.c)
index 7c8f1c6f4f0763be6010facd02d63fb383c002be..65bd55f95d7ddf2152ce443bfceb31fadd311880 100644 (file)
@@ -13,9 +13,9 @@ incs = ['.',
         '#intern/ghost',
         '#intern/guardedalloc',
         '#intern/moto/include',
+        '#intern/container',
         '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
-        '#source/kernel/gen_system',
-        '#source/kernel/gen_messaging',
+        '#source/gameengine/BlenderRoutines',
         '#source/gameengine/Converter',
         '#source/blender/imbuf',
         '#source/gameengine/Ketsji',
index d5ea39f5b35f414c5dd1a62612de5f8a043b2cc5..0bfe1fd0266c7e1d1f41e256df9be53afb7ff0bb 100644 (file)
 
 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 
index 5f251c832eefbd8352e829ddb2896bf66481bb71..17a5929420db292a8751ce5de9063c53c3f4570a 100644 (file)
@@ -26,8 +26,8 @@
 
 set(INC
        .
-       ../../../../source/kernel/gen_system
        ../../../../intern/string
+       ../../../../intern/container
        ../../../../intern/moto/include
        ../../../../source/gameengine/Ketsji
        ../../../../source/gameengine/GameLogic
index 78cdc8df9afda37ee38fa092d006921d2466f818..3d6965012038f77b3d38b7e78f79dfda83f3ec2c 100644 (file)
@@ -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'
 
index 17dfe9474a8f26dad191b11431711822367e54d8..d68cb453fe8427f2613dfb9332f9e5aa1f5377dd 100644 (file)
@@ -101,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) {
index 135a9cad9d8e9d2bac71009b90ae684362feb478..d59fcff9370075347815d50e19550a2ddddc70c5 100644 (file)
@@ -116,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
 
index b7cc98bd53979a065d3734615eb8109cf9d205c9..7bd8c44584926f6834bc0bf34c640623ab97caea 100644 (file)
 #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"
index d8bc7510c7b647552a0716407d8fc7aaf924e705..47d83c16659b255bf291c9f116366b201ddff83b 100644 (file)
@@ -1224,7 +1224,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
index b54fb6b068e39cdca8de0d54d2c27fc1711a3105..50fbebe1341d86b66d215ae330bbebe98b0b9c5b 100644 (file)
@@ -47,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 */
@@ -142,7 +142,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
        );
 
        /**
index 8c3e25cf3e28f1af69684f2487037be612ef1b88..7289ffc6e29206fbde0792d9c447d00017cb1023 100644 (file)
@@ -299,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) {
index e45ce899bfc8fd4940126fe306bd9faf6d55fa3c..0737535b84cc1b37756e5efea548319ee104cb29 100644 (file)
@@ -144,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()
index 6ff1c05b99419c3d95653d59d93d10ad19d64b78..a73f4c3862795b118eec5ce0bae33ad1564c6b4f 100644 (file)
@@ -99,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) {
index 8723f83920e6b47174e0e07c000b500d63ad9c75..a850cc72eb91f902f0b236717c30f443dc9e86d2 100644 (file)
@@ -76,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
index 521c0038f270d0a9f726efcdf2fd9dbcc53fe8ae..62a51fb4efccdc116c1bf2c27f5baa3a39cfae32 100644 (file)
@@ -151,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) {
index 11f210ad7b5b8a4e12dab07ce67e93c7339ad865..a8304667b6647b41e0c8d20896511b454f3d4778 100644 (file)
@@ -108,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();
index 080765c78468779ba41d9c812f3edc59a2405a75..28dc660037c5046cc04ba5a5399d18d56393035f 100644 (file)
@@ -67,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"
index af6a31e786cc4af9f7bbe2326d82076dd9850d4a..367bf0b82da21e0a08a8b8390fd782a25d48d04c 100644 (file)
@@ -41,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"
@@ -61,7 +61,7 @@ struct SM_MaterialProps;
 struct SM_ShapeProps;
 struct Scene;
 
-class GEN_HashedPtr;
+class CTR_HashedPtr;
 class CListValue;
 class CValue;
 class SCA_LogicManager;
@@ -207,7 +207,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
index 8312a14ebfb1ef4367f06b0325e1300ab7c2de62..f572f8eb36d65f3d5ebf940343d0cc9059da4592 100644 (file)
@@ -97,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) {
index 563255d1560a53b112b9e677e2ad479008930d7f..288f4acc280b5d1ee60507291de875a73663e2f7 100644 (file)
@@ -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();
        
index 5530fa286cff017f747d2b9eee84fc160bfd81b8..edcba969811561a589b35dcc0382755ec58117f0 100644 (file)
@@ -219,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) {
index 33780bf53e4aae51be014f839a4c1c7568bf66a8..c5e96bd74542da43cf54f6c0e2cae06028843dd8 100644 (file)
@@ -67,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
index 56e0db0cc203e1f26971999b49ca85866439e350..086422627247e1c6735bf20aeea98339f8810169 100644 (file)
@@ -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'
index 6a2b5fe841e319a2fd1acc1e2ee2d4659465e226..7f4c7c357da478491150588c7127130ff8542ec4 100644 (file)
@@ -26,8 +26,8 @@
 
 set(INC
        .
-       ../../../source/kernel/gen_system
        ../../../intern/string
+       ../../../intern/container
        ../../../intern/moto/include
 )
 
index 4cf43a1fc936260348e78a755054f0147f977330..d7b88304474b4c561e4c1a1efb4fb78c3078eb93 100644 (file)
@@ -26,8 +26,8 @@
 
 set(INC
        .
-       ../../../../source/kernel/gen_system
        ../../../../intern/string
+       ../../../../intern/container
        ../../../../source/gameengine/Network
 )
 
index af76065cc945c0c3d348c40386ef1a7d0c13fa23..7ca0a64f7743ad428c05d5e0dd75ca8132774b16 100644 (file)
@@ -3,6 +3,6 @@ Import ('env')
 
 sources = 'NG_LoopBackNetworkDeviceInterface.cpp'
 
-incs = '. #source/kernel/gen_system #intern/string #source/gameengine/Network'
+incs = '. #intern/string #intern/container #source/gameengine/Network'
 
 env.BlenderLib ( 'ge_logic_loopbacknetwork', Split(sources), Split(incs), defines=[],libtype=['core','player'], priority=[400,135] )
index d390eabc46546709d9c1ed589374ceffa6dded50..ebe50d36b462878333aae9249965498697aaad03 100644 (file)
@@ -34,7 +34,7 @@
 #ifndef __NG_NETWORKSCENE_H
 #define __NG_NETWORKSCENE_H
 
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "STR_HashedString.h"
 #include <vector>
 
@@ -52,10 +52,10 @@ class NG_NetworkDeviceInterface;
 class NG_NetworkScene
 {
        class NG_NetworkDeviceInterface *m_networkdevice;       
-       GEN_Map<STR_HashedString, class NG_NetworkObject *> m_networkObjects;
+       CTR_Map<STR_HashedString, class NG_NetworkObject *> m_networkObjects;
 
-       // GEN_Maps used as a 'Bloom' filter
-       typedef GEN_Map<STR_HashedString, std::vector<class NG_NetworkMessage*>* > TMessageMap;
+       // CTR_Maps used as a 'Bloom' filter
+       typedef CTR_Map<STR_HashedString, std::vector<class NG_NetworkMessage*>* > TMessageMap;
        TMessageMap m_messagesByDestinationName;
        TMessageMap m_messagesBySenderName;
        TMessageMap m_messagesBySubject;
index 1b63592d0a43bd5553a77f71c76ccd92d7e9aabf..bbf714383b7a4736c6a61bc6bda10ae74a5e0a24 100644 (file)
@@ -3,7 +3,7 @@ Import ('env')
 
 sources = env.Glob('*.cpp') #'NG_NetworkMessage.cpp NG_NetworkObject.cpp NG_NetworkScene.cpp'
 
-incs = '. #source/kernel/gen_system #intern/string #intern/moto/include'
+incs = '. #intern/string #intern/moto/include #intern/container'
 
 defs = []
 
index cc469c3772a51aa8a20b0a1a48ec1390b626783f..a984d0436f0deb73d4f7d12cb96bca0d33801fb1 100644 (file)
@@ -33,7 +33,7 @@ set(INC
        ../../../../extern/bullet2/src
        ../../../../intern/moto/include
        ../../../../intern/guardedalloc
-       ../../../kernel/gen_system
+       ../../../../intern/container
        ../../../../intern/string
        ../../Rasterizer
        ../../Ketsji
index f8f0f8afaea9fef8adb80879034af7e2f4e4dfb8..ba4db0015330fd213c507c9bb13eadd6270a7b95 100644 (file)
@@ -4,7 +4,6 @@ Import ('env')
 sources = 'CcdPhysicsEnvironment.cpp CcdPhysicsController.cpp CcdGraphicController.cpp'
 
 incs = '. ../common'
-incs += ' #source/kernel/gen_system'
 incs += ' #intern/string'
 incs += ' #intern/moto/include'
 incs += ' #extern/glew/include'
@@ -17,6 +16,7 @@ incs += ' #source/blender/makesdna'
 incs += ' #source/blender/blenkernel'
 incs += ' #source/blender/blenlib'
 incs += ' #intern/guardedalloc'
+incs += ' #intern/container'
 
 incs += ' ' + env['BF_BULLET_INC']
 
index 7e2fda177d759c2cba70f81763e5ac8350a7f22f..2bfb3f8f328628e926b4e5cac850ef9821961630 100644 (file)
 
 set(INC
        .
-       ../../../source/kernel/gen_system
        ../../../source/blender/makesdna
        ../../../source/gameengine/SceneGraph
        ../../../source/gameengine/Ketsji
        ../../../intern/string
+       ../../../intern/container
        ../../../intern/moto/include
        ../../../intern/guardedalloc
        ../Expressions
index 8c9f5e9786b0932abbc67a60910ed3017fc347a1..6316b1195889ac380579d54c3c1330f06d94b3ae 100644 (file)
@@ -36,7 +36,7 @@
 #pragma warning (disable:4786)
 #endif
 
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "RAS_MaterialBucket.h"
 #include "STR_HashedString.h"
 #include "RAS_MeshObject.h"
index 297782bd4feba2d8fc3bdd9a8e2589a45e7ee96f..8a9f21d5db7289bb9dc72294e7fd501343d61d6c 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "MT_Transform.h"
 #include "RAS_MaterialBucket.h"
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 
 #include <vector>
 
index 8678830f6a24150a4bcf3f196e36ef8a066df977..c7a32b38e0472c1b1bd0b89ad3462b011ec4f3ad 100644 (file)
@@ -39,7 +39,7 @@
 #endif //WIN32
 
 #include <stdlib.h>
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 
 #ifdef WITH_CXX_GUARDEDALLOC
 #include "MEM_guardedalloc.h"
@@ -53,7 +53,7 @@ class RAS_Deformer
 public:
        RAS_Deformer() : m_pMesh(NULL), m_bDynamic(false) {};
        virtual ~RAS_Deformer(){};
-       virtual void Relink(GEN_Map<class GEN_HashedPtr, void*>*map)=0;
+       virtual void Relink(CTR_Map<class CTR_HashedPtr, void*>*map)=0;
        virtual bool Apply(class RAS_IPolyMaterial *polymat)=0;
        virtual bool Update(void)=0;
        virtual bool UpdateBuckets(void)=0;
index c46a36768ee27c936466d6ccd1f25fe882853955..51c430dd57b42029c19c7639a22ce6c8166e0e4c 100644 (file)
@@ -35,7 +35,7 @@
 #define __RAS_MATERIALBUCKET
 
 #include "RAS_TexVert.h"
-#include "GEN_Map.h"
+#include "CTR_Map.h"
 #include "STR_HashedString.h"
 #include "SG_QList.h"
 
@@ -193,7 +193,7 @@ class RAS_MeshMaterial
 public:
        RAS_MeshSlot *m_baseslot;
        class RAS_MaterialBucket *m_bucket;
-       GEN_Map<GEN_HashedPtr,RAS_MeshSlot*> m_slots;
+       CTR_Map<CTR_HashedPtr,RAS_MeshSlot*> m_slots;
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
index 0b35b212e1daf72ea41f1b1ed5b0a17e750ea265..555a290ba6f250b1ec4ec181f4a8dd6352a914ac 100644 (file)
@@ -47,7 +47,7 @@
 #include "RAS_MaterialBucket.h"
 #include "MT_Transform.h"
 
-#include "GEN_HashedPtr.h"
+#include "CTR_HashedPtr.h"
 
 struct Mesh;
 class RAS_Deformer;
index 7c1dd8a2de8566cce35b2996b994563c3cf0db4f..99068aa1bb8936784fbf3c9e5b513efad1118b99 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(INC
-       ../../../../source/kernel/gen_system
        ../../../../intern/string
+       ../../../../intern/container
        ../../../../intern/moto/include
        ../../../../source/gameengine/Rasterizer
        ../../../../source/gameengine/Ketsji
        ../../../../source/gameengine/SceneGraph
+       ../../../../source/gameengine/BlenderRoutines
        ../../../../source/blender/gpu
        ../../../../source/blender/makesdna
        ../../../../source/blender/blenkernel
index 890d1efb85090e6e960d77de46a06b7f9f66b368..5f3af7360ff41f66aefba58c263c1d8d342052ad 100644 (file)
@@ -5,10 +5,10 @@ sources = env.Glob('*.cpp')
 
 defs = [ 'GLEW_STATIC' ]
 
-incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/Rasterizer #source/gameengine/BlenderRoutines '
-incs += ' #source/blender/gpu #extern/glew/include ' + env['BF_OPENGL_INC']
+incs = '. #intern/string #intern/moto/include #source/gameengine/Rasterizer #source/gameengine/BlenderRoutines '
+incs += ' #intern/container #source/blender/gpu #extern/glew/include ' + env['BF_OPENGL_INC']
 incs += ' #source/blender/gameengine/Ketsji #source/gameengine/SceneGraph #source/blender/makesdna #source/blender/blenkernel'
-incs += ' #intern/guardedalloc #source/blender/blenlib'
+incs += ' #intern/guardedalloc #source/blender/blenlib #source/gameengine/BlenderRoutines'
 
 if env['WITH_BF_CXX_GUARDEDALLOC']:
     defs.append('WITH_CXX_GUARDEDALLOC')
index bff2a7e2084fe95296d319be3551418801b75865..4164271ba9b87c2dcadf2fd33df0d7cfda156d1e 100644 (file)
@@ -4,7 +4,7 @@ Import ('env')
 sources = env.Glob('*.cpp')
 
 
-incs = '. #intern/guardedalloc #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines #extern/glew/include #source/gameengine/Expressions #source/gameengine/SceneGraph #source/blender/blenkernel #source/blender/makesdna'
+incs = '. #intern/guardedalloc #intern/string #intern/moto/include #intern/container #source/gameengine/BlenderRoutines #extern/glew/include #source/gameengine/Expressions #source/gameengine/SceneGraph #source/blender/blenkernel #source/blender/makesdna'
 
 defs = [ 'GLEW_STATIC' ]
 
index aae57fce679019a91463280023769c0037badb41..fb10b619f178e2a412fbfc5ecab03db0c7634cdc 100644 (file)
@@ -41,7 +41,7 @@ set(INC
        ../../../source/blender/python
        ../../../source/blender/python/generic
        ../../../source/blender/gpu
-       ../../../source/kernel/gen_system
+       ../../../intern/container
        ../../../intern/string
        ../../../intern/moto/include
        ../../../intern/guardedalloc
index 2cd143d2deb1630cbbf61cddcd68393573db543b..5091082e87a988947bbf2a0881a640e33df972b9 100644 (file)
@@ -11,8 +11,8 @@ incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer'
 incs += ' #source/gameengine/BlenderRoutines'
 incs += ' #source/blender/editors/include #source/blender/blenlib #source/blender/blenkernel'
 incs += ' #source/blender/makesdna #source/blender/imbuf #source/blender/python #source/blender/python/generic'
-incs += ' #source/blender/gpu #source/kernel/gen_system #intern/string #intern/moto/include'
-incs += ' #intern/guardedalloc #extern/glew/include'
+incs += ' #source/blender/gpu #intern/string #intern/moto/include'
+incs += ' #intern/guardedalloc #intern/container #extern/glew/include'
 
 defs = [] 
 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc','win32-mingw'):
diff --git a/source/kernel/CMakeLists.txt b/source/kernel/CMakeLists.txt
deleted file mode 100644 (file)
index bcf967c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# $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) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-set(INC
-       gen_messaging
-       gen_system
-       ../../intern/string
-       ../../intern/moto/include
-       ../../source/blender/blenloader
-)
-
-set(SRC
-       gen_messaging/intern/messaging.c
-       gen_system/GEN_HashedPtr.cpp
-       gen_system/SYS_SingletonSystem.cpp
-       gen_system/SYS_System.cpp
-
-       gen_messaging/GEN_messaging.h
-       gen_system/GEN_HashedPtr.h
-       gen_system/GEN_Map.h
-       gen_system/SYS_SingletonSystem.h
-       gen_system/SYS_System.h
-)
-
-blender_add_lib(bf_gen_system "${SRC}" "${INC}")
diff --git a/source/kernel/SConscript b/source/kernel/SConscript
deleted file mode 100644 (file)
index 8dd0fd3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = 'gen_messaging/intern/messaging.c gen_system/GEN_HashedPtr.cpp'
-sources += ' gen_system/SYS_SingletonSystem.cpp'
-sources += ' gen_system/SYS_System.cpp'
-
-incs = 'gen_messaging gen_system #/intern/string #/intern/moto/include #/source/blender/blenloader '
-
-env.BlenderLib ( 'bf_gen_system', Split(sources), Split(incs), [], libtype = ['core','player'], priority = [400,100] )
diff --git a/source/kernel/gen_messaging/GEN_messaging.h b/source/kernel/gen_messaging/GEN_messaging.h
deleted file mode 100644 (file)
index 866716f..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * $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) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file kernel/gen_messaging/GEN_messaging.h
- *  \ingroup genmess
- */
-
-#ifndef GEN_MESSAGING_H
-#define GEN_MESSAGING_H
-
-#include <stdio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-       /**
-        * Stream for error messages.
-        */
-       extern FILE* GEN_errorstream;
-
-       /**
-        * Stream for notices to the user.
-        */
-       extern FILE* GEN_userstream;
-
-       /**
-        * Initialise the messaging system. If the system is not
-        * initialised, the streams cannot be used. */
-       void GEN_init_messaging_system(void);
-       
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* GEN_MESSAGING_H */
-
diff --git a/source/kernel/gen_messaging/intern/messaging.c b/source/kernel/gen_messaging/intern/messaging.c
deleted file mode 100644 (file)
index 93e6dea..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $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) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * A message and error sink for c and c++
- */
-
-/** \file kernel/gen_messaging/intern/messaging.c
- *  \ingroup genmess
- */
-
-
-
-#include "GEN_messaging.h"
-
-FILE* GEN_errorstream = NULL;
-FILE* GEN_userstream  = NULL;
-
-void GEN_init_messaging_system(void)
-{
-       GEN_errorstream = stderr;
-       GEN_userstream  = stdout;
-}
diff --git a/source/kernel/gen_system/GEN_HashedPtr.cpp b/source/kernel/gen_system/GEN_HashedPtr.cpp
deleted file mode 100644 (file)
index f065d27..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * $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) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- *
- */
-
-/** \file kernel/gen_system/GEN_HashedPtr.cpp
- *  \ingroup gensys
- */
-
-#include "GEN_HashedPtr.h"
-
-#include "BLO_sys_types.h" // for intptr_t support
-
-//
-// Build hash index from pointer.  Even though the final result
-// is a 32-bit integer, use all the bits of the pointer as long
-// as possible.
-//
-#if 1
-unsigned int GEN_Hash(void * inDWord)
-{
-       uintptr_t key = (uintptr_t)inDWord;
-#if 0
-       // this is way too complicated
-       key += ~(key << 16);
-       key ^=  (key >>  5);
-       key +=  (key <<  3);
-       key ^=  (key >> 13);
-       key += ~(key <<  9);
-       key ^=  (key >> 17);
-
-       return (unsigned int)(key & 0xffffffff);
-#else
-       return (unsigned int)(key ^ (key>>4));
-#endif
-}
-#endif
diff --git a/source/kernel/gen_system/GEN_Map.h b/source/kernel/gen_system/GEN_Map.h
deleted file mode 100644 (file)
index 4ac5a10..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * $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) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file kernel/gen_system/GEN_Map.h
- *  \ingroup gensys
- */
-
-#ifndef GEN_MAP_H
-#define GEN_MAP_H
-
-template <class Key, class Value>
-class GEN_Map {
-private:
-    struct Entry {
-        Entry (Entry *next, Key key, Value value) :
-            m_next(next),
-            m_key(key),
-            m_value(value) {}
-
-        Entry *m_next;
-        Key    m_key;
-        Value  m_value;
-    };
-public:
-    GEN_Map(int num_buckets = 100) : m_num_buckets(num_buckets) {
-        m_buckets = new Entry *[num_buckets];
-        for (int i = 0; i < num_buckets; ++i) {
-            m_buckets[i] = 0;
-        }
-    }
-
-       GEN_Map(const GEN_Map& map)
-       {
-               m_num_buckets = map.m_num_buckets;
-               m_buckets = new Entry *[m_num_buckets];
-
-               for (int i = 0; i < m_num_buckets; ++i) {
-                       m_buckets[i] = 0;
-
-                       for(Entry *entry = map.m_buckets[i]; entry; entry=entry->m_next)
-                               insert(entry->m_key, entry->m_value);
-               }
-       }
-    
-    int size() { 
-        int count=0;
-        for (int i=0;i<m_num_buckets;i++)
-        {
-            Entry* bucket = m_buckets[i];
-            while(bucket)
-            {
-                bucket = bucket->m_next;
-                count++;
-            }
-        }
-        return count;
-    }
-    
-    Value* at(int index) {
-        int count=0;
-        for (int i=0;i<m_num_buckets;i++)
-        {
-            Entry* bucket = m_buckets[i];
-            while(bucket)
-            {
-                if (count==index)
-                {
-                    return &bucket->m_value;
-                }
-                bucket = bucket->m_next;
-                count++;
-            }
-        }
-        return 0;
-    }
-
-    Key* getKey(int index) {
-        int count=0;
-        for (int i=0;i<m_num_buckets;i++)
-        {
-            Entry* bucket = m_buckets[i];
-            while(bucket)
-            {
-                if (count==index)
-                {
-                    return &bucket->m_key;
-                }
-                bucket = bucket->m_next;
-                count++;
-            }
-        }
-        return 0;
-    }
-    
-    void clear() {
-        for (int i = 0; i < m_num_buckets; ++i) {
-            Entry *entry_ptr = m_buckets[i];
-            
-            while (entry_ptr != 0) {
-                Entry *tmp_ptr = entry_ptr->m_next;
-                delete entry_ptr;
-                entry_ptr = tmp_ptr;
-            }
-            m_buckets[i] = 0;
-        }
-    }
-    
-    ~GEN_Map() {
-        clear();
-        delete [] m_buckets;
-    }
-    
-    void insert(const Key& key, const Value& value) {
-        Entry *entry_ptr = m_buckets[key.hash() % m_num_buckets];
-        while ((entry_ptr != 0) && !(key == entry_ptr->m_key)) {
-            entry_ptr = entry_ptr->m_next;
-        }
-        
-        if (entry_ptr != 0) {
-            entry_ptr->m_value = value;
-        }
-        else {
-            Entry **bucket = &m_buckets[key.hash() % m_num_buckets];
-            *bucket = new Entry(*bucket, key, value);
-        }
-    }
-
-    void remove(const Key& key) {
-        Entry **entry_ptr = &m_buckets[key.hash() % m_num_buckets];
-        while ((*entry_ptr != 0) && !(key == (*entry_ptr)->m_key)) {
-            entry_ptr = &(*entry_ptr)->m_next;
-        }
-        
-        if (*entry_ptr != 0) {
-            Entry *tmp_ptr = (*entry_ptr)->m_next;
-            delete *entry_ptr;
-            *entry_ptr = tmp_ptr;
-        }
-    }
-
-    Value *operator[](Key key) {
-        Entry *bucket = m_buckets[key.hash() % m_num_buckets];
-        while ((bucket != 0) && !(key == bucket->m_key)) {
-            bucket = bucket->m_next;
-        }
-        return bucket != 0 ? &bucket->m_value : 0;
-    }
-    
-private:
-    int     m_num_buckets;
-    Entry **m_buckets;
-};
-
-#endif
-
-
diff --git a/source/kernel/gen_system/SYS_SingletonSystem.cpp b/source/kernel/gen_system/SYS_SingletonSystem.cpp
deleted file mode 100644 (file)
index 08ee186..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * $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) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * Unique instance of system class for system specific information / access
- * Used by SYS_System
- */
-
-/** \file kernel/gen_system/SYS_SingletonSystem.cpp
- *  \ingroup gensys
- */
-
-#include "SYS_SingletonSystem.h"
-// #include "GEN_DataCache.h"
-
-SYS_SingletonSystem*   SYS_SingletonSystem::_instance = 0;
-
-void SYS_SingletonSystem::Destruct()
-{
-       if (_instance) {
-               delete _instance;
-               _instance = NULL;
-       }
-}
-
-SYS_SingletonSystem *SYS_SingletonSystem::Instance()
-{
-       if (!_instance) {
-               _instance = new SYS_SingletonSystem();
-       }
-       return _instance;
-}
-
-int SYS_SingletonSystem::SYS_GetCommandLineInt(const char *paramname, int defaultvalue)
-{
-       int *result = m_int_commandlineparms[paramname];
-       if (result)
-               return *result;
-
-       return defaultvalue;
-}
-
-float SYS_SingletonSystem::SYS_GetCommandLineFloat(const char *paramname, float defaultvalue)
-{
-       float *result = m_float_commandlineparms[paramname];
-       if (result)
-               return *result;
-
-       return defaultvalue;
-}
-
-const char *SYS_SingletonSystem::SYS_GetCommandLineString(const char *paramname, const char *defaultvalue)
-{
-       STR_String *result = m_string_commandlineparms[paramname];
-       if (result)
-               return *result;
-
-       return defaultvalue;
-}
-
-void SYS_SingletonSystem::SYS_WriteCommandLineInt(const char *paramname, int value)
-{
-       m_int_commandlineparms.insert(paramname, value);
-}
-
-void SYS_SingletonSystem::SYS_WriteCommandLineFloat(const char *paramname, float value)
-{
-       m_float_commandlineparms.insert(paramname, value);
-}
-
-void SYS_SingletonSystem::SYS_WriteCommandLineString(const char *paramname, const char *value)
-{
-       m_string_commandlineparms.insert(paramname, value);
-}
-
-SYS_SingletonSystem::SYS_SingletonSystem()
-{
-}
diff --git a/source/kernel/gen_system/SYS_SingletonSystem.h b/source/kernel/gen_system/SYS_SingletonSystem.h
deleted file mode 100644 (file)
index d862855..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * $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) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * Unique instance of system class for system specific information / access
- * Used by SYS_System
- */
-
-/** \file kernel/gen_system/SYS_SingletonSystem.h
- *  \ingroup gensys
- */
-
-#ifndef __SINGLETONSYSTEM_H
-#define __SINGLETONSYSTEM_H
-
-#include "GEN_Map.h"
-#include "STR_HashedString.h"
-
-class SYS_SingletonSystem
-{
-public:
-       static          SYS_SingletonSystem*    Instance();
-       static          void    Destruct();
-
-       int             SYS_GetCommandLineInt(const char* paramname,int defaultvalue);
-       float           SYS_GetCommandLineFloat(const char* paramname,float defaultvalue);
-       const char*     SYS_GetCommandLineString(const char* paramname,const char* defaultvalue);
-
-       void            SYS_WriteCommandLineInt(const char* paramname,int value);
-       void            SYS_WriteCommandLineFloat(const char* paramname,float value);
-       void            SYS_WriteCommandLineString(const char* paramname,const char* value);
-
-       SYS_SingletonSystem();
-
-private:
-       static SYS_SingletonSystem*     _instance;
-       GEN_Map<STR_HashedString,int>   m_int_commandlineparms;
-       GEN_Map<STR_HashedString,float> m_float_commandlineparms;
-       GEN_Map<STR_HashedString,STR_String>    m_string_commandlineparms;
-};
-
-#endif //__SINGLETONSYSTEM_H
-