diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-04 17:14:06 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-04 17:14:06 +0300 |
commit | f7cb86df3a9ceccc4d649e42735732a608169157 (patch) | |
tree | 558a9ba43708a2213b1afa8f46d79f5daa140bc6 /source/gameengine | |
parent | 74f9e98c828c17910405092785633373d4ae88e8 (diff) |
2.5
Think global, act local!
The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.
Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
meant for permanent, but it can probably stick there until we
cleaned the anim system and depsgraph to cope better with
timing issues.
- Game engine G.scene should become an argument for staring it.
Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
is too tightly wrapped to do it easily.
Diffstat (limited to 'source/gameengine')
5 files changed, 12 insertions, 18 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 01eedc68964..d5eaeb34f1b 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -117,7 +117,7 @@ extern "C" void StartKetsjiShell(struct ScrArea *area, int always_use_expand_framing) { int exitrequested = KX_EXIT_REQUEST_NO_REQUEST; - + Scene *scene= NULL; // XXX give as arg Main* blenderdata = maggie1; char* startscenename = scenename; @@ -207,12 +207,12 @@ extern "C" void StartKetsjiShell(struct ScrArea *area, //lock frame and camera enabled - storing global values - int tmp_lay= G.scene->lay; - Object *tmp_camera = G.scene->camera; + int tmp_lay= scene->lay; + Object *tmp_camera = scene->camera; if (v3d->scenelock==0){ - G.scene->lay= v3d->lay; - G.scene->camera= v3d->camera; + scene->lay= v3d->lay; + scene->camera= v3d->camera; } @@ -478,8 +478,8 @@ extern "C" void StartKetsjiShell(struct ScrArea *area, } //lock frame and camera enabled - restoring global values if (v3d->scenelock==0){ - G.scene->lay= tmp_lay; - G.scene->camera= tmp_camera; + scene->lay= tmp_lay; + scene->camera= tmp_camera; } // set the cursor back to normal diff --git a/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h b/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h index 4294971d225..7d1861a9448 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h +++ b/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h @@ -38,12 +38,6 @@ #include "wm_event_types.h" #include "SCA_IInputDevice.h" -/* timers */ -#define TIMER0 0x006 -#define TIMER1 0x007 -#define TIMER2 0x008 -#define TIMER3 0x009 - /** Base Class for Blender specific inputdevices. Blender specific inputdevices are used when the gameengine is running in embedded mode instead of standalone mode. */ diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index d2001212f7d..a27ce0ad9e0 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -98,7 +98,7 @@ void BL_ArmatureObject::ApplyPose() m_objArma->pose = m_pose; if(m_lastapplyframe != m_lastframe) { - where_is_pose(m_objArma); + where_is_pose(NULL, m_objArma); // XXX m_lastapplyframe = m_lastframe; } } diff --git a/source/gameengine/GamePlayer/common/GPC_Engine.cpp b/source/gameengine/GamePlayer/common/GPC_Engine.cpp index bb84b5939e1..a46f30c1209 100644 --- a/source/gameengine/GamePlayer/common/GPC_Engine.cpp +++ b/source/gameengine/GamePlayer/common/GPC_Engine.cpp @@ -185,7 +185,7 @@ bool GPC_Engine::Start(unsigned char *blenderDataBuffer, bool GPC_Engine::StartKetsji(void) { - STR_String startSceneName = G.scene->id.name + 2; + STR_String startSceneName = ""; // XXX scene->id.name + 2; /* KX_KetsjiEngine* ketsjieng = new KX_KetsjiEngine(m_system); m_portal = new KetsjiPortal(ketsjieng); diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index aa5e5835cdc..e326df57a3d 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -157,7 +157,7 @@ bool GPG_Application::SetGameEngineData(struct Main* maggie, Scene *scene) if (maggie != NULL && scene != NULL) { - G.scene = scene; +// XXX G.scene = scene; m_maggie = maggie; m_startSceneName = scene->id.name+2; m_startScene = scene; @@ -643,7 +643,7 @@ bool GPG_Application::startEngine(void) /* m_canvas->SetBannerDisplayEnabled(true); Camera* cam; - cam = (Camera*)G.scene->camera->data; + cam = (Camera*)scene->camera->data; if (cam) { if (((cam->flag) & 48)==48) { m_canvas->SetBannerDisplayEnabled(false); @@ -712,7 +712,7 @@ bool GPG_Application::startEngine(void) // Set the animation playback rate for ipo's and actions // the framerate below should patch with FPS macro defined in blendef.h // Could be in StartEngine set the framerate, we need the scene to do this - m_ketsjiengine->SetAnimFrameRate( (((double) G.scene->r.frs_sec) / G.scene->r.frs_sec_base) ); +// XXX m_ketsjiengine->SetAnimFrameRate( (((double) scene->r.frs_sec) / scene->r.frs_sec_base) ); } |