diff options
115 files changed, 264 insertions, 804 deletions
diff --git a/SConstruct b/SConstruct index 954422e0b3d..e928970f6b8 100644 --- a/SConstruct +++ b/SConstruct @@ -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 = [] diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py index 0c51476a6d0..a3ee937f703 100644 --- a/build_files/scons/config/darwin-config.py +++ b/build_files/scons/config/darwin-config.py @@ -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' diff --git a/doc/doxygen/doxygen.source b/doc/doxygen/doxygen.source index 9cd86e23e59..ccdf3448f18 100644 --- a/doc/doxygen/doxygen.source +++ b/doc/doxygen/doxygen.source @@ -342,17 +342,5 @@ /* ================================ */ -/** \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. */ diff --git a/intern/container/CMakeLists.txt b/intern/container/CMakeLists.txt index 7f15854e538..7e83acf68ce 100644 --- a/intern/container/CMakeLists.txt +++ b/intern/container/CMakeLists.txt @@ -26,11 +26,13 @@ set(INC . + ../guardedalloc ) set(SRC intern/CTR_List.cpp + CTR_HashedPtr.h CTR_List.h CTR_Map.h CTR_TaggedIndex.h diff --git a/source/kernel/gen_system/GEN_HashedPtr.h b/intern/container/CTR_HashedPtr.h index 86a7ceb9ae7..0291535d718 100644 --- a/source/kernel/gen_system/GEN_HashedPtr.h +++ b/intern/container/CTR_HashedPtr.h @@ -28,24 +28,30 @@ * */ -/** \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 diff --git a/intern/container/CTR_Map.h b/intern/container/CTR_Map.h index cbd67fdeaca..1991ec19e3a 100644 --- a/intern/container/CTR_Map.h +++ b/intern/container/CTR_Map.h @@ -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) { diff --git a/intern/container/SConscript b/intern/container/SConscript index 2d93e90b555..8edf86d7d4a 100644 --- a/intern/container/SConscript +++ b/intern/container/SConscript @@ -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 ) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 1929f19f38f..5d0354ccd72 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -27,7 +27,6 @@ add_subdirectory(blender) if(WITH_GAMEENGINE) - add_subdirectory(kernel) add_subdirectory(gameengine) endif() diff --git a/source/SConscript b/source/SConscript index 8d08d9cca08..0002cb4cf0b 100644 --- a/source/SConscript +++ b/source/SConscript @@ -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']) diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt index 9744887ed9f..f923c578769 100644 --- a/source/blender/editors/space_view3d/CMakeLists.txt +++ b/source/blender/editors/space_view3d/CMakeLists.txt @@ -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() diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript index 3df59d485d5..84ba8d1fe86 100644 --- a/source/blender/editors/space_view3d/SConscript +++ b/source/blender/editors/space_view3d/SConscript @@ -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') diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 8a975eec40f..b46c7236170 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -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) diff --git a/source/blender/readblenfile/CMakeLists.txt b/source/blender/readblenfile/CMakeLists.txt index 8d3633b4918..9b869d39697 100644 --- a/source/blender/readblenfile/CMakeLists.txt +++ b/source/blender/readblenfile/CMakeLists.txt @@ -31,7 +31,6 @@ set(INC ../blenkernel ../blenlib ../makesdna - ../../kernel/gen_messaging ) set(SRC diff --git a/source/blender/readblenfile/SConscript b/source/blender/readblenfile/SConscript index 6d8749df1e2..07f84eb52d5 100644 --- a/source/blender/readblenfile/SConscript +++ b/source/blender/readblenfile/SConscript @@ -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] ) diff --git a/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c b/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c index 4900f0c3338..0f3541b510d 100644 --- a/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c +++ b/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c @@ -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; diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt index f00e54c1796..bcb427abd6c 100644 --- a/source/blender/render/CMakeLists.txt +++ b/source/blender/render/CMakeLists.txt @@ -36,7 +36,6 @@ set(INC ../makesrna ../blenkernel ../imbuf - ../../kernel/gen_messaging ../../../intern/smoke/extern ../../../intern/mikktspace ../../../intern/guardedalloc diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt index 251f6605f5e..6f03928e1fc 100644 --- a/source/blender/windowmanager/CMakeLists.txt +++ b/source/blender/windowmanager/CMakeLists.txt @@ -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} diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript index 38266717369..f52ac8ba3cb 100644 --- a/source/blender/windowmanager/SConscript +++ b/source/blender/windowmanager/SConscript @@ -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'] diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 620d3314d43..b09e264bd1d 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -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" diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt index 83dfd15f2dd..b88c0fd04c1 100644 --- a/source/blenderplayer/CMakeLists.txt +++ b/source/blenderplayer/CMakeLists.txt @@ -110,7 +110,6 @@ endif() bf_intern_smoke bf_modifiers bf_intern_moto - bf_gen_system bf_nodes bf_gpu bf_imbuf diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index a039dca208e..b39393bc8b7 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -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 diff --git a/source/creator/SConscript b/source/creator/SConscript index 8577872c48a..79e03c8dddc 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -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 = [] diff --git a/source/creator/creator.c b/source/creator/creator.c index ab94131966f..2b146822194 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -108,8 +108,7 @@ /* 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 diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index b94d15d2fbf..571cc9087b3 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -64,7 +64,7 @@ #include "NG_LoopBackNetworkDeviceInterface.h" -#include "SYS_System.h" +#include "BL_System.h" #include "GPU_extensions.h" #include "Value.h" diff --git a/source/kernel/gen_system/SYS_System.cpp b/source/gameengine/BlenderRoutines/BL_System.cpp index b2de797fc8d..30b8beef156 100644 --- a/source/kernel/gen_system/SYS_System.cpp +++ b/source/gameengine/BlenderRoutines/BL_System.cpp @@ -25,55 +25,80 @@ * 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); } + diff --git a/source/kernel/gen_system/SYS_System.h b/source/gameengine/BlenderRoutines/BL_System.h index 34fed4a81a2..d743ef5532a 100644 --- a/source/kernel/gen_system/SYS_System.h +++ b/source/gameengine/BlenderRoutines/BL_System.h @@ -29,31 +29,21 @@ * 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 */ diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt index f5103034316..6a17017f261 100644 --- a/source/gameengine/BlenderRoutines/CMakeLists.txt +++ b/source/gameengine/BlenderRoutines/CMakeLists.txt @@ -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 diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript index ff70ad3bf7b..8f59ec0bf04 100644 --- a/source/gameengine/BlenderRoutines/SConscript +++ b/source/gameengine/BlenderRoutines/SConscript @@ -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' diff --git a/source/gameengine/Converter/BL_ActionActuator.h b/source/gameengine/Converter/BL_ActionActuator.h index c6e661f1549..ff4ca785a96 100644 --- a/source/gameengine/Converter/BL_ActionActuator.h +++ b/source/gameengine/Converter/BL_ActionActuator.h @@ -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" diff --git a/source/gameengine/Converter/BL_ArmatureActuator.cpp b/source/gameengine/Converter/BL_ArmatureActuator.cpp index efd1a73a448..a56fab31a26 100644 --- a/source/gameengine/Converter/BL_ArmatureActuator.cpp +++ b/source/gameengine/Converter/BL_ArmatureActuator.cpp @@ -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) { diff --git a/source/gameengine/Converter/BL_ArmatureActuator.h b/source/gameengine/Converter/BL_ArmatureActuator.h index 4615fb06714..70aa526d4d3 100644 --- a/source/gameengine/Converter/BL_ArmatureActuator.h +++ b/source/gameengine/Converter/BL_ArmatureActuator.h @@ -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); diff --git a/source/gameengine/Converter/BL_ArmatureChannel.h b/source/gameengine/Converter/BL_ArmatureChannel.h index 0c2c27a7fab..0a66d0038a2 100644 --- a/source/gameengine/Converter/BL_ArmatureChannel.h +++ b/source/gameengine/Converter/BL_ArmatureChannel.h @@ -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; diff --git a/source/gameengine/Converter/BL_ArmatureConstraint.cpp b/source/gameengine/Converter/BL_ArmatureConstraint.cpp index c07fe6b3b41..3f1a111517c 100644 --- a/source/gameengine/Converter/BL_ArmatureConstraint.cpp +++ b/source/gameengine/Converter/BL_ArmatureConstraint.cpp @@ -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) { diff --git a/source/gameengine/Converter/BL_ArmatureConstraint.h b/source/gameengine/Converter/BL_ArmatureConstraint.h index 1dd685b8cba..8e6ba1bc2d3 100644 --- a/source/gameengine/Converter/BL_ArmatureConstraint.h +++ b/source/gameengine/Converter/BL_ArmatureConstraint.h @@ -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(); diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index 952af4db8bb..c6c20a96482 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -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) { diff --git a/source/gameengine/Converter/BL_ArmatureObject.h b/source/gameengine/Converter/BL_ArmatureObject.h index 8490bfadac2..2c3ca7404b3 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.h +++ b/source/gameengine/Converter/BL_ArmatureObject.h @@ -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(); diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 34b417238ae..51ab4e4c399 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -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" diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.h b/source/gameengine/Converter/BL_BlenderDataConversion.h index cea9f7f2a8b..0e8ea17fc38 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.h +++ b/source/gameengine/Converter/BL_BlenderDataConversion.h @@ -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" diff --git a/source/gameengine/Converter/BL_DeformableGameObject.h b/source/gameengine/Converter/BL_DeformableGameObject.h index 6bcdaff10e3..615bb84ac2b 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.h +++ b/source/gameengine/Converter/BL_DeformableGameObject.h @@ -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); diff --git a/source/gameengine/Converter/BL_MeshDeformer.cpp b/source/gameengine/Converter/BL_MeshDeformer.cpp index 2a54ea7d9ae..63db9167273 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.cpp +++ b/source/gameengine/Converter/BL_MeshDeformer.cpp @@ -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]; diff --git a/source/gameengine/Converter/BL_MeshDeformer.h b/source/gameengine/Converter/BL_MeshDeformer.h index b62958c7fd1..90466e930fb 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.h +++ b/source/gameengine/Converter/BL_MeshDeformer.h @@ -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 ): diff --git a/source/gameengine/Converter/BL_ModifierDeformer.cpp b/source/gameengine/Converter/BL_ModifierDeformer.cpp index 95f362a2879..e504fa7e49d 100644 --- a/source/gameengine/Converter/BL_ModifierDeformer.cpp +++ b/source/gameengine/Converter/BL_ModifierDeformer.cpp @@ -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" diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.h b/source/gameengine/Converter/BL_ShapeActionActuator.h index 229c59a34a4..7a4523d4554 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.h +++ b/source/gameengine/Converter/BL_ShapeActionActuator.h @@ -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" diff --git a/source/gameengine/Converter/BL_ShapeDeformer.cpp b/source/gameengine/Converter/BL_ShapeDeformer.cpp index 40e7c6e1bde..8d8f149bb6c 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.cpp +++ b/source/gameengine/Converter/BL_ShapeDeformer.cpp @@ -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" diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp index 4916ce53fc5..34f9cb56c27 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.cpp +++ b/source/gameengine/Converter/BL_SkinDeformer.cpp @@ -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]; diff --git a/source/gameengine/Converter/BL_SkinDeformer.h b/source/gameengine/Converter/BL_SkinDeformer.h index 69b8783ce22..e53e21e946f 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.h +++ b/source/gameengine/Converter/BL_SkinDeformer.h @@ -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, diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt index 147c8b791ee..bdd0769e0a3 100644 --- a/source/gameengine/Converter/CMakeLists.txt +++ b/source/gameengine/Converter/CMakeLists.txt @@ -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 diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index a0d58ece396..684ed0b06f9 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -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++) { diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.h b/source/gameengine/Converter/KX_BlenderSceneConverter.h index 741b3ea8757..2340e44d288 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.h +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.h @@ -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; diff --git a/source/gameengine/Converter/KX_SoftBodyDeformer.cpp b/source/gameengine/Converter/KX_SoftBodyDeformer.cpp index d3d17bbe433..02c259d793b 100644 --- a/source/gameengine/Converter/KX_SoftBodyDeformer.cpp +++ b/source/gameengine/Converter/KX_SoftBodyDeformer.cpp @@ -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]; diff --git a/source/gameengine/Converter/KX_SoftBodyDeformer.h b/source/gameengine/Converter/KX_SoftBodyDeformer.h index aa4ff9d5e54..67eb9d7b285 100644 --- a/source/gameengine/Converter/KX_SoftBodyDeformer.h +++ b/source/gameengine/Converter/KX_SoftBodyDeformer.h @@ -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) { diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript index 9d88018d805..9cfc3410748 100644 --- a/source/gameengine/Converter/SConscript +++ b/source/gameengine/Converter/SConscript @@ -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' diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt index c593c690614..8cda0e2dc77 100644 --- a/source/gameengine/Expressions/CMakeLists.txt +++ b/source/gameengine/Expressions/CMakeLists.txt @@ -26,7 +26,6 @@ set(INC . - ../../../source/kernel/gen_system ../../../intern/string ../../../intern/guardedalloc ../../../intern/moto/include diff --git a/source/gameengine/Expressions/SConscript b/source/gameengine/Expressions/SConscript index b1e34aa358b..4dc165a7696 100644 --- a/source/gameengine/Expressions/SConscript +++ b/source/gameengine/Expressions/SConscript @@ -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 = [] diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt index 793b8e7eed8..2acf07584b1 100644 --- a/source/gameengine/GameLogic/CMakeLists.txt +++ b/source/gameengine/GameLogic/CMakeLists.txt @@ -26,8 +26,8 @@ set(INC . - ../../../source/kernel/gen_system ../../../intern/string + ../../../intern/container ../../../source/gameengine/Expressions ../../../source/gameengine/SceneGraph ../../../intern/moto/include diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp index 2d0cb16b63c..596118855d2 100644 --- a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp +++ b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp @@ -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 } diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h index e74cd601b6b..4de0562339e 100644 --- a/source/gameengine/GameLogic/SCA_ILogicBrick.h +++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h @@ -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) diff --git a/source/gameengine/GameLogic/SCA_LogicManager.h b/source/gameengine/GameLogic/SCA_LogicManager.h index 44dc12a8fd4..c4735d1c146 100644 --- a/source/gameengine/GameLogic/SCA_LogicManager.h +++ b/source/gameengine/GameLogic/SCA_LogicManager.h @@ -38,12 +38,12 @@ #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); diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp index 008e109384c..a4af1c35652 100644 --- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp +++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp @@ -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) { diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.h b/source/gameengine/GameLogic/SCA_PropertyActuator.h index 1ca7b1c4e1e..35660710679 100644 --- a/source/gameengine/GameLogic/SCA_PropertyActuator.h +++ b/source/gameengine/GameLogic/SCA_PropertyActuator.h @@ -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(); diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript index a8d3ee65f4c..d6323882267 100644 --- a/source/gameengine/GameLogic/SConscript +++ b/source/gameengine/GameLogic/SConscript @@ -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' diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt index 604dd9296a1..afbc49ea38d 100644 --- a/source/gameengine/GamePlayer/common/CMakeLists.txt +++ b/source/gameengine/GamePlayer/common/CMakeLists.txt @@ -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 diff --git a/source/gameengine/GamePlayer/common/GPC_Engine.cpp b/source/gameengine/GamePlayer/common/GPC_Engine.cpp index 48ebfcaadf2..fc007d8d295 100644 --- a/source/gameengine/GamePlayer/common/GPC_Engine.cpp +++ b/source/gameengine/GamePlayer/common/GPC_Engine.cpp @@ -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" diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript index f7a423f4588..d5e1f081d21 100644 --- a/source/gameengine/GamePlayer/common/SConscript +++ b/source/gameengine/GamePlayer/common/SConscript @@ -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', diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt index a88de69b272..edf0839f747 100644 --- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt +++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt @@ -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 diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index 6ea98e0e8cc..6487d0298c7 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -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" diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 0ab6da240ce..a4f1391b1b0 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -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) diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript index 7c8f1c6f4f0..65bd55f95d7 100644 --- a/source/gameengine/GamePlayer/ghost/SConscript +++ b/source/gameengine/GamePlayer/ghost/SConscript @@ -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', diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt index d5ea39f5b35..0bfe1fd0266 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 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/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_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index 17dfe9474a8..d68cb453fe8 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_CameraActuator.h b/source/gameengine/Ketsji/KX_CameraActuator.h index 135a9cad9d8..d59fcff9370 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.h +++ b/source/gameengine/Ketsji/KX_CameraActuator.h @@ -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 diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index b7cc98bd539..7bd8c445849 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -42,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_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index d8bc7510c7b..47d83c16659 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -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 diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index b54fb6b068e..50fbebe1341 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -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 ); /** diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index 8c3e25cf3e2..7289ffc6e29 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h index e45ce899bfc..0737535b84c 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.h +++ b/source/gameengine/Ketsji/KX_ObjectActuator.h @@ -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() diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp index 6ff1c05b994..a73f4c38627 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.cpp +++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_ParentActuator.h b/source/gameengine/Ketsji/KX_ParentActuator.h index 8723f83920e..a850cc72eb9 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.h +++ b/source/gameengine/Ketsji/KX_ParentActuator.h @@ -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 diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp index 521c0038f27..62a51fb4efc 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h index 11f210ad7b5..a8304667b66 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h @@ -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(); diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 080765c7846..28dc660037c 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -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" diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index af6a31e786c..367bf0b82da 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -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 diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp index 8312a14ebfb..f572f8eb36d 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.cpp +++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_SceneActuator.h b/source/gameengine/Ketsji/KX_SceneActuator.h index 563255d1560..288f4acc280 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.h +++ b/source/gameengine/Ketsji/KX_SceneActuator.h @@ -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_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index 5530fa286cf..edcba969811 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.h b/source/gameengine/Ketsji/KX_TrackToActuator.h index 33780bf53e4..c5e96bd7454 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.h +++ b/source/gameengine/Ketsji/KX_TrackToActuator.h @@ -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 diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index 56e0db0cc20..08642262724 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' diff --git a/source/gameengine/Network/CMakeLists.txt b/source/gameengine/Network/CMakeLists.txt index 6a2b5fe841e..7f4c7c357da 100644 --- a/source/gameengine/Network/CMakeLists.txt +++ b/source/gameengine/Network/CMakeLists.txt @@ -26,8 +26,8 @@ set(INC . - ../../../source/kernel/gen_system ../../../intern/string + ../../../intern/container ../../../intern/moto/include ) diff --git a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt index 4cf43a1fc93..d7b88304474 100644 --- a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt +++ b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt @@ -26,8 +26,8 @@ set(INC . - ../../../../source/kernel/gen_system ../../../../intern/string + ../../../../intern/container ../../../../source/gameengine/Network ) diff --git a/source/gameengine/Network/LoopBackNetwork/SConscript b/source/gameengine/Network/LoopBackNetwork/SConscript index af76065cc94..7ca0a64f774 100644 --- a/source/gameengine/Network/LoopBackNetwork/SConscript +++ b/source/gameengine/Network/LoopBackNetwork/SConscript @@ -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] ) diff --git a/source/gameengine/Network/NG_NetworkScene.h b/source/gameengine/Network/NG_NetworkScene.h index d390eabc465..ebe50d36b46 100644 --- a/source/gameengine/Network/NG_NetworkScene.h +++ b/source/gameengine/Network/NG_NetworkScene.h @@ -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; diff --git a/source/gameengine/Network/SConscript b/source/gameengine/Network/SConscript index 1b63592d0a4..bbf714383b7 100644 --- a/source/gameengine/Network/SConscript +++ b/source/gameengine/Network/SConscript @@ -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 = [] diff --git a/source/gameengine/Physics/Bullet/CMakeLists.txt b/source/gameengine/Physics/Bullet/CMakeLists.txt index cc469c3772a..a984d0436f0 100644 --- a/source/gameengine/Physics/Bullet/CMakeLists.txt +++ b/source/gameengine/Physics/Bullet/CMakeLists.txt @@ -33,7 +33,7 @@ set(INC ../../../../extern/bullet2/src ../../../../intern/moto/include ../../../../intern/guardedalloc - ../../../kernel/gen_system + ../../../../intern/container ../../../../intern/string ../../Rasterizer ../../Ketsji diff --git a/source/gameengine/Physics/Bullet/SConscript b/source/gameengine/Physics/Bullet/SConscript index f8f0f8afaea..ba4db001533 100644 --- a/source/gameengine/Physics/Bullet/SConscript +++ b/source/gameengine/Physics/Bullet/SConscript @@ -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'] diff --git a/source/gameengine/Rasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/CMakeLists.txt index 7e2fda177d7..2bfb3f8f328 100644 --- a/source/gameengine/Rasterizer/CMakeLists.txt +++ b/source/gameengine/Rasterizer/CMakeLists.txt @@ -26,11 +26,11 @@ 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 diff --git a/source/gameengine/Rasterizer/RAS_BucketManager.cpp b/source/gameengine/Rasterizer/RAS_BucketManager.cpp index 8c9f5e9786b..6316b119588 100644 --- a/source/gameengine/Rasterizer/RAS_BucketManager.cpp +++ b/source/gameengine/Rasterizer/RAS_BucketManager.cpp @@ -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" diff --git a/source/gameengine/Rasterizer/RAS_BucketManager.h b/source/gameengine/Rasterizer/RAS_BucketManager.h index 297782bd4fe..8a9f21d5db7 100644 --- a/source/gameengine/Rasterizer/RAS_BucketManager.h +++ b/source/gameengine/Rasterizer/RAS_BucketManager.h @@ -36,7 +36,7 @@ #include "MT_Transform.h" #include "RAS_MaterialBucket.h" -#include "GEN_Map.h" +#include "CTR_Map.h" #include <vector> diff --git a/source/gameengine/Rasterizer/RAS_Deformer.h b/source/gameengine/Rasterizer/RAS_Deformer.h index 8678830f6a2..c7a32b38e04 100644 --- a/source/gameengine/Rasterizer/RAS_Deformer.h +++ b/source/gameengine/Rasterizer/RAS_Deformer.h @@ -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; diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h index c46a36768ee..51c430dd57b 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h @@ -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 diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.h b/source/gameengine/Rasterizer/RAS_MeshObject.h index 0b35b212e1d..555a290ba6f 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.h +++ b/source/gameengine/Rasterizer/RAS_MeshObject.h @@ -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; diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt index 7c1dd8a2de8..99068aa1bb8 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt @@ -25,12 +25,13 @@ # ***** 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 diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript index 890d1efb850..5f3af7360ff 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript @@ -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') diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript index bff2a7e2084..4164271ba9b 100644 --- a/source/gameengine/Rasterizer/SConscript +++ b/source/gameengine/Rasterizer/SConscript @@ -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' ] diff --git a/source/gameengine/VideoTexture/CMakeLists.txt b/source/gameengine/VideoTexture/CMakeLists.txt index aae57fce679..fb10b619f17 100644 --- a/source/gameengine/VideoTexture/CMakeLists.txt +++ b/source/gameengine/VideoTexture/CMakeLists.txt @@ -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 diff --git a/source/gameengine/VideoTexture/SConscript b/source/gameengine/VideoTexture/SConscript index 2cd143d2deb..5091082e87a 100644 --- a/source/gameengine/VideoTexture/SConscript +++ b/source/gameengine/VideoTexture/SConscript @@ -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 index bcf967cff12..00000000000 --- a/source/kernel/CMakeLists.txt +++ /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 index 8dd0fd36e8a..00000000000 --- a/source/kernel/SConscript +++ /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 index 866716f3914..00000000000 --- a/source/kernel/gen_messaging/GEN_messaging.h +++ /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 index 93e6deac089..00000000000 --- a/source/kernel/gen_messaging/intern/messaging.c +++ /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 index f065d27bee2..00000000000 --- a/source/kernel/gen_system/GEN_HashedPtr.cpp +++ /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 index 4ac5a10c4c6..00000000000 --- a/source/kernel/gen_system/GEN_Map.h +++ /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 index 08ee186c723..00000000000 --- a/source/kernel/gen_system/SYS_SingletonSystem.cpp +++ /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 index d8628558618..00000000000 --- a/source/kernel/gen_system/SYS_SingletonSystem.h +++ /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 - |