Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-11 18:30:53 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-11 18:30:53 +0400
commit4f33d65ba1f02f2cd3f340d0123900ea1beffd2c (patch)
tree05ef40081ce6be190a171e0fee09b12344e16eb6 /source/gameengine
parent1ab9fc59b750b1dc5ebaacd30c6891949895a10d (diff)
parent79f21f88c2be305962f6432bf8b1af94056fd92b (diff)
Cycles: svn merge -r40411:40934 ^/trunk/blender
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp31
-rw-r--r--source/gameengine/Converter/BL_ArmatureChannel.cpp26
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp2
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp4
-rw-r--r--source/gameengine/Converter/BlenderWorldInfo.h20
-rw-r--r--source/gameengine/Converter/KX_IpoConvert.cpp2
-rw-r--r--source/gameengine/Expressions/KX_HashedPtr.cpp2
-rw-r--r--source/gameengine/Expressions/ListValue.cpp14
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h10
-rw-r--r--source/gameengine/GameLogic/SCA_2DFilterActuator.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_2DFilterActuator.h2
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickManager.cpp6
-rw-r--r--source/gameengine/GamePlayer/ghost/CMakeLists.txt2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp2
-rw-r--r--source/gameengine/GamePlayer/ghost/SConscript2
-rw-r--r--source/gameengine/Ketsji/KX_CameraActuator.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp18
-rw-r--r--source/gameengine/Ketsji/KX_Dome.h47
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_IpoActuator.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp10
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.h2
-rw-r--r--source/gameengine/Ketsji/KX_NavMeshObject.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_NearSensor.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_ObjectActuator.h2
-rw-r--r--source/gameengine/Ketsji/KX_ObstacleSimulation.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_OrientationInterpolator.h12
-rw-r--r--source/gameengine/Ketsji/KX_ParentActuator.h6
-rw-r--r--source/gameengine/Ketsji/KX_PythonSeq.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_SCA_DynamicActuator.h8
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.cpp70
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.h4
-rw-r--r--source/gameengine/Ketsji/KX_VertexProxy.cpp4
-rw-r--r--source/gameengine/Network/NG_NetworkMessage.h2
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_IRasterizer.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h4
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp4
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h2
-rw-r--r--source/gameengine/SceneGraph/SG_DList.h6
-rw-r--r--source/gameengine/SceneGraph/SG_Node.cpp4
-rw-r--r--source/gameengine/VideoTexture/ImageRender.h46
-rw-r--r--source/gameengine/VideoTexture/ImageViewport.h6
44 files changed, 194 insertions, 223 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index 895def17e8e..557b4aa7f11 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -226,10 +226,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
break;
}
- // Continue only really makes sense for play stop and flipper. All other modes go until they are complete.
- if (m_flag & ACT_FLAG_CONTINUE &&
- (m_playtype == ACT_ACTION_LOOP_STOP ||
- m_playtype == ACT_ACTION_FLIPPER))
+ if (m_flag & ACT_FLAG_CONTINUE)
bUseContinue = true;
@@ -244,12 +241,6 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
if (m_flag & ACT_FLAG_ATTEMPT_PLAY)
SetLocalTime(curtime);
- if (bUseContinue && (m_flag & ACT_FLAG_ACTIVE))
- {
- m_localtime = obj->GetActionFrame(m_layer);
- ResetStartTime(curtime);
- }
-
// Handle a frame property if it's defined
if ((m_flag & ACT_FLAG_ACTIVE) && m_framepropname[0] != 0)
{
@@ -264,22 +255,25 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
}
// Handle a finished animation
- if ((m_flag & ACT_FLAG_PLAY_END) && obj->IsActionDone(m_layer))
+ if ((m_flag & ACT_FLAG_PLAY_END) && (m_flag & ACT_FLAG_ACTIVE) && obj->IsActionDone(m_layer))
{
m_flag &= ~ACT_FLAG_ACTIVE;
m_flag &= ~ACT_FLAG_ATTEMPT_PLAY;
- obj->StopAction(m_layer);
return false;
}
// If a different action is playing, we've been overruled and are no longer active
- if (obj->GetCurrentAction(m_layer) != m_action)
+ if (obj->GetCurrentAction(m_layer) != m_action && !obj->IsActionDone(m_layer))
m_flag &= ~ACT_FLAG_ACTIVE;
if (bPositiveEvent || (m_flag & ACT_FLAG_ATTEMPT_PLAY && !(m_flag & ACT_FLAG_ACTIVE)))
{
if (bPositiveEvent)
+ {
+ if (obj->IsActionDone(m_layer))
+ m_localtime = start;
ResetStartTime(curtime);
+ }
if (obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, m_blendin, playtype, m_layer_weight, m_ipo_flags))
{
@@ -307,11 +301,6 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
return false;
}
-
- m_localtime = obj->GetActionFrame(m_layer);
- if (m_localtime < min(m_startframe, m_endframe) || m_localtime > max(m_startframe, m_endframe))
- m_localtime = m_startframe;
-
switch(m_playtype)
{
case ACT_ACTION_LOOP_STOP:
@@ -340,6 +329,12 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
break;
}
}
+
+ if (bUseContinue && (m_flag & ACT_FLAG_ACTIVE))
+ {
+ m_localtime = obj->GetActionFrame(m_layer);
+ ResetStartTime(curtime);
+ }
return true;
}
diff --git a/source/gameengine/Converter/BL_ArmatureChannel.cpp b/source/gameengine/Converter/BL_ArmatureChannel.cpp
index df3a575850b..5442878d6c5 100644
--- a/source/gameengine/Converter/BL_ArmatureChannel.cpp
+++ b/source/gameengine/Converter/BL_ArmatureChannel.cpp
@@ -279,19 +279,19 @@ PyObject* BL_ArmatureChannel::py_attr_get_joint_rotation(void *self_v, const str
if (sa > FLT_EPSILON) {
norm = atan2(sa,ca)/sa;
} else {
- if (ca < 0.0) {
- norm = M_PI;
- mul_v3_fl(joints,0.f);
- if (joint_mat[0][0] > 0.f) {
- joints[0] = 1.0f;
- } else if (joint_mat[1][1] > 0.f) {
- joints[1] = 1.0f;
- } else {
- joints[2] = 1.0f;
- }
- } else {
- norm = 0.0;
- }
+ if (ca < 0.0) {
+ norm = M_PI;
+ mul_v3_fl(joints,0.f);
+ if (joint_mat[0][0] > 0.f) {
+ joints[0] = 1.0f;
+ } else if (joint_mat[1][1] > 0.f) {
+ joints[1] = 1.0f;
+ } else {
+ joints[2] = 1.0f;
+ }
+ } else {
+ norm = 0.0;
+ }
}
mul_v3_fl(joints,norm);
break;
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 2c2fd052b5d..8633a14de03 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -642,7 +642,7 @@ bool ConvertMaterial(
if(validmat && (mat->mode & MA_TRANSP) && (mat->mode & MA_ZTRANSP) && (material->alphablend == GEMAT_SOLID))
material->alphablend = GEMAT_ALPHA;
- // always zsort alpha + add
+ // always zsort alpha + add
if((ELEM3(material->alphablend, GEMAT_ALPHA, GEMAT_ALPHA_SORT, GEMAT_ADD) || texalpha) && (material->alphablend != GEMAT_CLIP )) {
material->ras_mode |= ALPHA;
material->ras_mode |= (mat && (mat->game.alpha_blend & GEMAT_ALPHA_SORT))? ZSORT: 0;
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index ac377cdb7ca..c81ff107a98 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -32,11 +32,7 @@
*/
-#if defined (__sgi)
-#include <math.h>
-#else
#include <cmath>
-#endif
#include "SCA_LogicManager.h"
#include "BL_ShapeActionActuator.h"
diff --git a/source/gameengine/Converter/BlenderWorldInfo.h b/source/gameengine/Converter/BlenderWorldInfo.h
index e7b8784a076..45737bd41bc 100644
--- a/source/gameengine/Converter/BlenderWorldInfo.h
+++ b/source/gameengine/Converter/BlenderWorldInfo.h
@@ -54,22 +54,22 @@ public:
~BlenderWorldInfo();
bool hasWorld();
- bool hasMist();
- float getBackColorRed();
- float getBackColorGreen();
- float getBackColorBlue();
+ bool hasMist();
+ float getBackColorRed();
+ float getBackColorGreen();
+ float getBackColorBlue();
float getAmbientColorRed();
float getAmbientColorGreen();
float getAmbientColorBlue();
- float getMistStart();
- float getMistDistance();
- float getMistColorRed();
- float getMistColorGreen();
- float getMistColorBlue();
+ float getMistStart();
+ float getMistDistance();
+ float getMistColorRed();
+ float getMistColorGreen();
+ float getMistColorBlue();
- void
+ void
setBackColor(
float r,
float g,
diff --git a/source/gameengine/Converter/KX_IpoConvert.cpp b/source/gameengine/Converter/KX_IpoConvert.cpp
index b13dbe324f5..4ea77e4349d 100644
--- a/source/gameengine/Converter/KX_IpoConvert.cpp
+++ b/source/gameengine/Converter/KX_IpoConvert.cpp
@@ -102,7 +102,7 @@ SG_Controller *BL_CreateIPO(struct bAction *action, KX_GameObject* gameobj, KX_B
rotmode = "rotation_axis_angle";
drotmode = "delta_rotation_axis_angle";
break;
- case ROT_MODE_QUAT:
+ case ROT_MODE_QUAT: /* XXX, this isnt working, currently only eulers are supported [#28853] */
rotmode = "rotation_quaternion";
drotmode = "delta_rotation_quaternion";
break;
diff --git a/source/gameengine/Expressions/KX_HashedPtr.cpp b/source/gameengine/Expressions/KX_HashedPtr.cpp
index f3233732ee3..f6cd5814e22 100644
--- a/source/gameengine/Expressions/KX_HashedPtr.cpp
+++ b/source/gameengine/Expressions/KX_HashedPtr.cpp
@@ -48,7 +48,7 @@ unsigned int KX_Hash(void * inDWord)
key += ~(key << 9);
key ^= (key >> 17);
- return (unsigned int)(key & 0xffffffff);
+ return (unsigned int)(key & 0xffffffff);
}
diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp
index 934f2a8dd87..ade54f6d924 100644
--- a/source/gameengine/Expressions/ListValue.cpp
+++ b/source/gameengine/Expressions/ListValue.cpp
@@ -487,12 +487,12 @@ static int listvalue_buffer_contains(PyObject *self_v, PyObject *value)
static PySequenceMethods listvalue_as_sequence = {
listvalue_bufferlen,//(inquiry)buffer_length, /*sq_length*/
listvalue_buffer_concat, /*sq_concat*/
- NULL, /*sq_repeat*/
+ NULL, /*sq_repeat*/
listvalue_buffer_item, /*sq_item*/
// TODO, slicing in py3
NULL, // listvalue_buffer_slice, /*sq_slice*/
- NULL, /*sq_ass_item*/
- NULL, /*sq_ass_slice*/
+ NULL, /*sq_ass_item*/
+ NULL, /*sq_ass_slice*/
(objobjproc)listvalue_buffer_contains, /* sq_contains */
(binaryfunc) NULL, /* sq_inplace_concat */
(ssizeargfunc) NULL, /* sq_inplace_repeat */
@@ -515,12 +515,12 @@ PyTypeObject CListValue::Type = {
sizeof(PyObjectPlus_Proxy), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
- py_base_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
+ py_base_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
- 0, /*tp_compare*/
- py_base_repr, /*tp_repr*/
+ 0, /*tp_compare*/
+ py_base_repr, /*tp_repr*/
0, /*tp_as_number*/
&listvalue_as_sequence, /*tp_as_sequence*/
&instance_as_mapping, /*tp_as_mapping*/
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 080e7196d5a..dd4c9a880fd 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -215,7 +215,7 @@ typedef struct PyObjectPlus_Proxy {
if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(...) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args, kwds); \
}; \
- static const char method_name##_doc[]; \
+ static const char method_name##_doc[]; \
#define KX_PYMETHOD_DOC_VARARGS(class_name, method_name) \
PyObject* Py##method_name(PyObject* args); \
@@ -223,7 +223,7 @@ typedef struct PyObjectPlus_Proxy {
if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(...) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args); \
}; \
- static const char method_name##_doc[]; \
+ static const char method_name##_doc[]; \
#define KX_PYMETHOD_DOC_O(class_name, method_name) \
PyObject* Py##method_name(PyObject* value); \
@@ -231,7 +231,7 @@ typedef struct PyObjectPlus_Proxy {
if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(value) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(value); \
}; \
- static const char method_name##_doc[]; \
+ static const char method_name##_doc[]; \
#define KX_PYMETHOD_DOC_NOARGS(class_name, method_name) \
PyObject* Py##method_name(); \
@@ -239,7 +239,7 @@ typedef struct PyObjectPlus_Proxy {
if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(); \
}; \
- static const char method_name##_doc[]; \
+ static const char method_name##_doc[]; \
/* The line above should remain empty */
@@ -563,7 +563,7 @@ public:
/** enable/disable display of deprecation warnings */
static void SetDeprecationWarnings(bool ignoreDeprecationWarnings);
- /** Shows a deprecation warning */
+ /** Shows a deprecation warning */
static void ShowDeprecationWarning_func(const char* method,const char* prop);
static void ClearDeprecationWarning();
diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
index 7c1824cd4eb..33d7ec5b4fc 100644
--- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
@@ -134,7 +134,7 @@ PyTypeObject SCA_2DFilterActuator::Type = {
PyMethodDef SCA_2DFilterActuator::Methods[] = {
/* add python functions to deal with m_msg... */
- {NULL,NULL}
+ {NULL,NULL}
};
PyAttributeDef SCA_2DFilterActuator::Attributes[] = {
diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.h b/source/gameengine/GameLogic/SCA_2DFilterActuator.h
index 82c82ac3be5..01396839291 100644
--- a/source/gameengine/GameLogic/SCA_2DFilterActuator.h
+++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.h
@@ -38,7 +38,7 @@
class SCA_2DFilterActuator : public SCA_IActuator
{
- Py_Header;
+ Py_Header;
private:
vector<STR_String> m_propNames;
diff --git a/source/gameengine/GameLogic/SCA_JoystickManager.cpp b/source/gameengine/GameLogic/SCA_JoystickManager.cpp
index 19633c2e09d..b61e4f4edca 100644
--- a/source/gameengine/GameLogic/SCA_JoystickManager.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickManager.cpp
@@ -83,8 +83,8 @@ void SCA_JoystickManager::NextFrame(double curtime,double deltatime)
SCA_Joystick *SCA_JoystickManager::GetJoystickDevice( short int joyindex)
{
- /*
- *Return the instance of SCA_Joystick for use
- */
+ /*
+ *Return the instance of SCA_Joystick for use
+ */
return m_joystick[joyindex];
}
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
index b452bb97cde..479cf3fd7cc 100644
--- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
@@ -79,7 +79,7 @@ if(WITH_CODEC_FFMPEG)
endif()
if(WITH_INTERNATIONAL)
- add_definitions(-DINTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
endif()
blender_add_lib_nolist(ge_player_ghost "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 726a1d4119a..f5bd3a91c26 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -999,7 +999,7 @@ int main(int argc, char** argv)
RNA_exit();
BLF_exit();
-#ifdef INTERNATIONAL
+#ifdef WITH_INTERNATIONAL
BLF_free_unifont();
#endif
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index 57c1122c2cd..9fb0f053ed8 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -52,6 +52,6 @@ if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
if env['WITH_BF_INTERNATIONAL']:
- defs.append('INTERNATIONAL')
+ defs.append('WITH_INTERNATIONAL')
env.BlenderLib (libname='ge_player_ghost', sources=source_files, includes = incs, defines = defs, libtype=['player'],priority=[0], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp
index ebb291b2284..7df08b83d49 100644
--- a/source/gameengine/Ketsji/KX_CameraActuator.cpp
+++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp
@@ -253,7 +253,7 @@ bool KX_CameraActuator::Update(double curtime, bool frame)
/* ... set up some parameters ... */
/* missing here: the 'floorloc' of the actor's shadow */
- mindistsq= m_minHeight*m_minHeight;
+ mindistsq= m_minHeight*m_minHeight;
maxdistsq= m_maxHeight*m_maxHeight;
/* C1: not checked... is a future option */
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index f0ea6f15ffe..48ad99ae37b 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -231,26 +231,12 @@ void KX_Dome::CalculateImageSize(void)
- reduce the buffer for better performace
- create a power of 2 texture bigger than the buffer
*/
-/*
-Blender handles Canvas size differently when in fullscreen mode.
-We are manually checking for that. Although it's a hack, it works.
-
-Bug reported here: #18655 - Inconsistency of pixels in canvas dimensions when in maximized mode (affecting BGE Dome)
-http://projects.blender.org/tracker/?func=detail&aid=18655&group_id=9&atid=125
-*/
-
canvaswidth = m_canvas->GetWidth();
canvasheight = m_canvas->GetHeight();
- bool fullscreen(false); //XXX HACK
- fullscreen = (canvaswidth != m_viewport.GetWidth());
-
m_buffersize = (canvaswidth > canvasheight?canvasheight:canvaswidth);
m_buffersize = (int)(m_buffersize*m_resbuffer); //reduce buffer size for better performance
- if (fullscreen) //XXX HACK
- m_buffersize --;
-
int i = 0;
while ((1 << i) <= m_buffersize)
i++;
@@ -266,10 +252,6 @@ http://projects.blender.org/tracker/?func=detail&aid=18655&group_id=9&atid=125
warp.bufferwidth = canvaswidth;
warp.bufferheight = canvasheight;
}
-
- //XXX HACK
- canvaswidth = m_viewport.GetWidth();
- canvasheight = m_viewport.GetHeight();
}
bool KX_Dome::CreateDL(){
diff --git a/source/gameengine/Ketsji/KX_Dome.h b/source/gameengine/Ketsji/KX_Dome.h
index 844f40f0578..009fb0b92ea 100644
--- a/source/gameengine/Ketsji/KX_Dome.h
+++ b/source/gameengine/Ketsji/KX_Dome.h
@@ -57,22 +57,21 @@ class KX_Dome
{
public:
/// constructor
- KX_Dome (
- RAS_ICanvas* m_canvas,
- /// rasterizer
- RAS_IRasterizer* m_rasterizer,
- /// render tools
- RAS_IRenderTools* m_rendertools,
- /// engine
- KX_KetsjiEngine* m_engine,
-
- short res,
- short mode,
- short angle,
- float resbuf,
- short tilt,
- struct Text* warptext
- );
+ KX_Dome (RAS_ICanvas* m_canvas,
+ /// rasterizer
+ RAS_IRasterizer* m_rasterizer,
+ /// render tools
+ RAS_IRenderTools* m_rendertools,
+ /// engine
+ KX_KetsjiEngine* m_engine,
+
+ short res,
+ short mode,
+ short angle,
+ float resbuf,
+ short tilt,
+ struct Text* warptext
+ );
/// destructor
virtual ~KX_Dome (void);
@@ -180,14 +179,14 @@ protected:
/// rendered scene
KX_Scene * m_scene;
- /// canvas
- RAS_ICanvas* m_canvas;
- /// rasterizer
- RAS_IRasterizer* m_rasterizer;
- /// render tools
- RAS_IRenderTools* m_rendertools;
- /// engine
- KX_KetsjiEngine* m_engine;
+ /// canvas
+ RAS_ICanvas* m_canvas;
+ /// rasterizer
+ RAS_IRasterizer* m_rasterizer;
+ /// render tools
+ RAS_IRenderTools* m_rendertools;
+ /// engine
+ KX_KetsjiEngine* m_engine;
#ifdef WITH_CXX_GUARDEDALLOC
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 853b36b54f7..e5e9c3330e5 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -110,9 +110,9 @@ KX_GameObject::KX_GameObject(
m_pGraphicController(NULL),
m_xray(false),
m_pHitObject(NULL),
+ m_pObstacleSimulation(NULL),
m_actionManager(NULL),
- m_isDeformable(false),
- m_pObstacleSimulation(NULL)
+ m_isDeformable(false)
#ifdef WITH_PYTHON
, m_attr_dict(NULL)
#endif
diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp
index aed6c666404..cc5a8ecc727 100644
--- a/source/gameengine/Ketsji/KX_IpoActuator.cpp
+++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp
@@ -33,12 +33,7 @@
* \ingroup ketsji
*/
-
-#if defined (__sgi)
-#include <math.h>
-#else
#include <cmath>
-#endif
#include "KX_IpoActuator.h"
#include "KX_GameObject.h"
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index acd25ace04a..8e6126bb173 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -765,12 +765,12 @@ else
m_logger->StartLog(tc_scenegraph, m_kxsystem->GetTimeInSeconds(), true);
SG_SetActiveStage(SG_STAGE_ACTUATOR);
scene->UpdateParents(m_clockTime);
-
- scene->setSuspendedTime(0.0);
+
+ scene->setSuspendedTime(0.0);
} // suspended
- else
- if(scene->getSuspendedTime()==0.0)
- scene->setSuspendedTime(m_clockTime);
+ else
+ if(scene->getSuspendedTime()==0.0)
+ scene->setSuspendedTime(m_clockTime);
m_logger->StartLog(tc_services, m_kxsystem->GetTimeInSeconds(), true);
}
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
index 73c5d94e4a5..07787665b1d 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
@@ -140,7 +140,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
*/
bool m_positive_event;
- /**
+ /**
* Tests whether the object is in mouse focus for this camera
*/
bool ParentObjectHasFocusCamera(KX_Camera *cam);
diff --git a/source/gameengine/Ketsji/KX_NavMeshObject.cpp b/source/gameengine/Ketsji/KX_NavMeshObject.cpp
index 5747d8641d0..0ee1ca20234 100644
--- a/source/gameengine/Ketsji/KX_NavMeshObject.cpp
+++ b/source/gameengine/Ketsji/KX_NavMeshObject.cpp
@@ -518,7 +518,7 @@ void KX_NavMeshObject::DrawNavMesh(NavMeshRenderMode renderMode)
else
v = m_navMesh->getDetailVertex(pd->vbase+(t[k]-p->nv));
float pos[3];
- vcopy(pos, v);
+ rcVcopy(pos, v);
flipAxes(pos);
tri[k].setValue(pos);
}
diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp
index 913a1adac55..eca4d45e9c6 100644
--- a/source/gameengine/Ketsji/KX_NearSensor.cpp
+++ b/source/gameengine/Ketsji/KX_NearSensor.cpp
@@ -49,8 +49,8 @@ KX_NearSensor::KX_NearSensor(SCA_EventManager* eventmgr,
float resetmargin,
bool bFindMaterial,
const STR_String& touchedpropname,
- PHY_IPhysicsController* ctrl)
- :KX_TouchSensor(eventmgr,
+ PHY_IPhysicsController* ctrl)
+ :KX_TouchSensor(eventmgr,
gameobj,
bFindMaterial,
false,
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h
index 0737535b84c..3ba257b4f05 100644
--- a/source/gameengine/Ketsji/KX_ObjectActuator.h
+++ b/source/gameengine/Ketsji/KX_ObjectActuator.h
@@ -100,7 +100,7 @@ class KX_ObjectActuator : public SCA_IActuator
// used in servo control
MT_Vector3 m_previous_error;
MT_Vector3 m_error_accumulator;
- KX_LocalFlags m_bitLocalFlag;
+ KX_LocalFlags m_bitLocalFlag;
KX_GameObject* m_reference;
// A hack bool -- oh no sorry everyone
// This bool is used to check if we have informed
diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
index 5f78d9a3722..c2b53fb71ba 100644
--- a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
+++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
@@ -633,7 +633,7 @@ static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavM
const float ivmax = 1.0f / vmax;
- float adir[2], adist;
+ float adir[2] /*, adist */;
vcpy(adir, activeObst->pvel);
if (vlen(adir) > 0.01f)
vnorm(adir);
@@ -641,7 +641,7 @@ static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavM
vset(adir,0,0);
float activeObstPos[2];
vset(activeObstPos, activeObst->m_pos.x(), activeObst->m_pos.y());
- adist = vdot(adir, activeObstPos);
+ /* adist = vdot(adir, activeObstPos); */
float minPenalty = FLT_MAX;
diff --git a/source/gameengine/Ketsji/KX_OrientationInterpolator.h b/source/gameengine/Ketsji/KX_OrientationInterpolator.h
index 2ae7b00cb86..8bbe888f74f 100644
--- a/source/gameengine/Ketsji/KX_OrientationInterpolator.h
+++ b/source/gameengine/Ketsji/KX_OrientationInterpolator.h
@@ -41,12 +41,12 @@ class KX_IScalarInterpolator;
class KX_OrientationInterpolator : public KX_IInterpolator {
public:
- KX_OrientationInterpolator(MT_Matrix3x3& target,
- KX_IScalarInterpolator **ipos)
- : m_target(target)
- {
- m_ipos[0] = ipos[0];
- m_ipos[1] = ipos[1];
+ KX_OrientationInterpolator(MT_Matrix3x3& target,
+ KX_IScalarInterpolator **ipos)
+ : m_target(target)
+ {
+ m_ipos[0] = ipos[0];
+ m_ipos[1] = ipos[1];
m_ipos[2] = ipos[2];
}
diff --git a/source/gameengine/Ketsji/KX_ParentActuator.h b/source/gameengine/Ketsji/KX_ParentActuator.h
index a850cc72eb9..6984465623d 100644
--- a/source/gameengine/Ketsji/KX_ParentActuator.h
+++ b/source/gameengine/Ketsji/KX_ParentActuator.h
@@ -56,8 +56,8 @@ class KX_ParentActuator : public SCA_IActuator
- public:
- enum KX_PARENTACT_MODE
+public:
+ enum KX_PARENTACT_MODE
{
KX_PARENT_NODEF = 0,
KX_PARENT_SET,
@@ -65,7 +65,7 @@ class KX_ParentActuator : public SCA_IActuator
KX_PARENT_MAX
};
-
+
KX_ParentActuator(class SCA_IObject* gameobj,
int mode,
bool addToCompound,
diff --git a/source/gameengine/Ketsji/KX_PythonSeq.cpp b/source/gameengine/Ketsji/KX_PythonSeq.cpp
index 04a53fbb493..729376f0a24 100644
--- a/source/gameengine/Ketsji/KX_PythonSeq.cpp
+++ b/source/gameengine/Ketsji/KX_PythonSeq.cpp
@@ -375,9 +375,9 @@ static PyObject *KX_PythonSeq_getIter(KX_PythonSeq *self)
return (PyObject *)self;
} else {
return KX_PythonSeq_CreatePyObject(self->base, self->type);
- }
- }
-
+ }
+}
+
/*
* Return next KX_PythonSeq iter.
diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
index 04b2c00f4c1..ecae0eba6cd 100644
--- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
@@ -50,10 +50,10 @@ class KX_SCA_DynamicActuator : public SCA_IActuator
float m_setmass;
public:
KX_SCA_DynamicActuator(
- SCA_IObject* gameobj,
- short dyn_operation,
- float setmass
- );
+ SCA_IObject* gameobj,
+ short dyn_operation,
+ float setmass
+ );
~KX_SCA_DynamicActuator(
);
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.cpp b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
index a0a2e148c1e..f998da18f83 100644
--- a/source/gameengine/Ketsji/KX_SteeringActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
@@ -46,38 +46,38 @@
/* ------------------------------------------------------------------------- */
KX_SteeringActuator::KX_SteeringActuator(SCA_IObject *gameobj,
- int mode,
- KX_GameObject *target,
- KX_GameObject *navmesh,
- float distance,
- float velocity,
- float acceleration,
- float turnspeed,
- bool isSelfTerminated,
- int pathUpdatePeriod,
- KX_ObstacleSimulation* simulation,
- short facingmode,
- bool normalup,
- bool enableVisualization) :
- SCA_IActuator(gameobj, KX_ACT_STEERING),
- m_mode(mode),
- m_target(target),
- m_distance(distance),
- m_velocity(velocity),
- m_acceleration(acceleration),
- m_turnspeed(turnspeed),
- m_isSelfTerminated(isSelfTerminated),
- m_pathUpdatePeriod(pathUpdatePeriod),
- m_updateTime(0),
- m_isActive(false),
- m_simulation(simulation),
- m_enableVisualization(enableVisualization),
- m_facingMode(facingmode),
- m_normalUp(normalup),
- m_obstacle(NULL),
- m_pathLen(0),
- m_wayPointIdx(-1),
- m_steerVec(MT_Vector3(0, 0, 0))
+ int mode,
+ KX_GameObject *target,
+ KX_GameObject *navmesh,
+ float distance,
+ float velocity,
+ float acceleration,
+ float turnspeed,
+ bool isSelfTerminated,
+ int pathUpdatePeriod,
+ KX_ObstacleSimulation* simulation,
+ short facingmode,
+ bool normalup,
+ bool enableVisualization)
+ : SCA_IActuator(gameobj, KX_ACT_STEERING),
+ m_target(target),
+ m_mode(mode),
+ m_distance(distance),
+ m_velocity(velocity),
+ m_acceleration(acceleration),
+ m_turnspeed(turnspeed),
+ m_simulation(simulation),
+ m_updateTime(0),
+ m_obstacle(NULL),
+ m_isActive(false),
+ m_isSelfTerminated(isSelfTerminated),
+ m_enableVisualization(enableVisualization),
+ m_facingMode(facingmode),
+ m_normalUp(normalup),
+ m_pathLen(0),
+ m_pathUpdatePeriod(pathUpdatePeriod),
+ m_wayPointIdx(-1),
+ m_steerVec(MT_Vector3(0, 0, 0))
{
m_navmesh = static_cast<KX_NavMeshObject*>(navmesh);
if (m_navmesh)
@@ -325,9 +325,9 @@ inline float vdot2(const float* a, const float* b)
static bool barDistSqPointToTri(const float* p, const float* a, const float* b, const float* c)
{
float v0[3], v1[3], v2[3];
- vsub(v0, c,a);
- vsub(v1, b,a);
- vsub(v2, p,a);
+ rcVsub(v0, c,a);
+ rcVsub(v1, b,a);
+ rcVsub(v2, p,a);
const float dot00 = vdot2(v0, v0);
const float dot01 = vdot2(v0, v1);
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.h b/source/gameengine/Ketsji/KX_SteeringActuator.h
index 4f8303107f7..d337799976b 100644
--- a/source/gameengine/Ketsji/KX_SteeringActuator.h
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.h
@@ -56,12 +56,12 @@ class KX_SteeringActuator : public SCA_IActuator
int m_mode;
float m_distance;
float m_velocity;
- float m_acceleration;
+ float m_acceleration;
float m_turnspeed;
KX_ObstacleSimulation* m_simulation;
- KX_Obstacle* m_obstacle;
double m_updateTime;
+ KX_Obstacle* m_obstacle;
bool m_isActive;
bool m_isSelfTerminated;
bool m_enableVisualization;
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp
index 5589d35f44a..e92351ad110 100644
--- a/source/gameengine/Ketsji/KX_VertexProxy.cpp
+++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp
@@ -436,10 +436,14 @@ KX_VertexProxy::KX_VertexProxy(KX_MeshProxy*mesh, RAS_TexVert* vertex)
: m_vertex(vertex),
m_mesh(mesh)
{
+ /* see bug [#27071] */
+ Py_INCREF(m_mesh->GetProxy());
}
KX_VertexProxy::~KX_VertexProxy()
{
+ /* see bug [#27071] */
+ Py_DECREF(m_mesh->GetProxy());
}
diff --git a/source/gameengine/Network/NG_NetworkMessage.h b/source/gameengine/Network/NG_NetworkMessage.h
index 0163e18fde7..0b3918773e2 100644
--- a/source/gameengine/Network/NG_NetworkMessage.h
+++ b/source/gameengine/Network/NG_NetworkMessage.h
@@ -72,7 +72,7 @@ public:
{
if (! --m_refcount)
{
- delete this;
+ delete this;
}
}
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
index c34a00513bf..1eed0665564 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
@@ -66,7 +66,7 @@ protected:
btIDebugDraw* m_debugDrawer;
class btDefaultCollisionConfiguration* m_collisionConfiguration;
- class btBroadphaseInterface* m_broadphase; // broadphase for dynamic world
+ class btBroadphaseInterface* m_broadphase; // broadphase for dynamic world
// for culling only
btOverlappingPairCache* m_cullingCache;
struct btDbvtBroadphase* m_cullingTree; // broadphase for culling
diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h
index 2988aa4effb..478aa0ab03c 100644
--- a/source/gameengine/Rasterizer/RAS_IRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h
@@ -207,7 +207,7 @@ public:
* @return true if stereo mode is enabled.
*/
virtual bool Stereo()=0;
- virtual StereoMode GetStereoMode()=0;
+ virtual StereoMode GetStereoMode()=0;
virtual bool InterlacedStereo()=0;
/**
* Sets which eye buffer subsequent primitives will be rendered to.
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h
index 422d6dfa1b3..baf3d9c1166 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h
@@ -39,7 +39,7 @@ void main(void)
{
vec4 texcolor = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st);
float gray = dot(texcolor.rgb, vec3(0.299, 0.587, 0.114));
- gl_FragColor = vec4(gray, gray, gray, texcolor.a);
+ gl_FragColor = vec4(gray, gray, gray, texcolor.a);
}
);
#endif
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h
index 475f3506c2c..7df271c15e4 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h
@@ -37,9 +37,9 @@ uniform sampler2D bgl_RenderedTexture;
void main(void)
{
- vec4 texcolor = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st);
+ vec4 texcolor = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st);
gl_FragColor.rgb = 1.0 - texcolor.rgb;
- gl_FragColor.a = texcolor.a;
+ gl_FragColor.a = texcolor.a;
}
);
#endif
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 28a72f4bc02..24c5b22e20f 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -830,7 +830,7 @@ static int CheckTexfaceDM(void *mcol, int index)
}
*/
-static int CheckTexDM(MTFace *tface, MCol *mcol, int matnr)
+static int CheckTexDM(MTFace *tface, int has_mcol, int matnr)
{
// index is the original face index, retrieve the polygon
@@ -845,7 +845,7 @@ static int CheckTexDM(MTFace *tface, MCol *mcol, int matnr)
// don't use mcol
return 2;
}
- if (!mcol) {
+ if (!has_mcol) {
// we have to set the color from the material
unsigned char rgba[4];
current_polymat->GetMaterialRGBAColor(rgba);
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
index cbfa49510a5..c28db2fd91c 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
@@ -149,7 +149,7 @@ public:
virtual void SetRenderArea();
virtual void SetStereoMode(const StereoMode stereomode);
- virtual RAS_IRasterizer::StereoMode GetStereoMode();
+ virtual RAS_IRasterizer::StereoMode GetStereoMode();
virtual bool Stereo();
virtual bool InterlacedStereo();
virtual void SetEye(const StereoEye eye);
diff --git a/source/gameengine/SceneGraph/SG_DList.h b/source/gameengine/SceneGraph/SG_DList.h
index 9e7e514b27a..3fb4eb7b55b 100644
--- a/source/gameengine/SceneGraph/SG_DList.h
+++ b/source/gameengine/SceneGraph/SG_DList.h
@@ -245,10 +245,10 @@ public:
}
}
virtual ~SG_DListHead() {}
- T* Remove()
- {
+ T* Remove()
+ {
return static_cast<T*>(SG_DList::Remove());
- }
+ }
};
diff --git a/source/gameengine/SceneGraph/SG_Node.cpp b/source/gameengine/SceneGraph/SG_Node.cpp
index 01ada4ea473..c39904bf742 100644
--- a/source/gameengine/SceneGraph/SG_Node.cpp
+++ b/source/gameengine/SceneGraph/SG_Node.cpp
@@ -128,9 +128,9 @@ Destruct()
// We'll delete m_parent_relation now anyway.
delete(m_parent_relation);
- m_parent_relation = NULL;
+ m_parent_relation = NULL;
- if (m_children.begin() != m_children.end())
+ if (m_children.begin() != m_children.end())
{
NodeList::iterator childit;
for (childit = m_children.begin();childit!=m_children.end();++childit)
diff --git a/source/gameengine/VideoTexture/ImageRender.h b/source/gameengine/VideoTexture/ImageRender.h
index 1101fbbc2d4..4dfd701ac3d 100644
--- a/source/gameengine/VideoTexture/ImageRender.h
+++ b/source/gameengine/VideoTexture/ImageRender.h
@@ -52,42 +52,42 @@ public:
virtual ~ImageRender (void);
/// get background color
- int getBackground (int idx) { return (idx < 0 || idx > 3) ? 0 : int(m_background[idx]*255.f); }
+ int getBackground (int idx) { return (idx < 0 || idx > 3) ? 0 : int(m_background[idx]*255.f); }
/// set background color
void setBackground (int red, int green, int blue, int alpha);
/// clipping distance
float getClip (void) { return m_clip; }
/// set whole buffer use
- void setClip (float clip) { m_clip = clip; }
+ void setClip (float clip) { m_clip = clip; }
protected:
- /// true if ready to render
- bool m_render;
+ /// true if ready to render
+ bool m_render;
/// rendered scene
KX_Scene * m_scene;
/// camera for render
KX_Camera * m_camera;
- /// do we own the camera?
- bool m_owncamera;
- /// for mirror operation
- KX_GameObject * m_observer;
- KX_GameObject * m_mirror;
+ /// do we own the camera?
+ bool m_owncamera;
+ /// for mirror operation
+ KX_GameObject * m_observer;
+ KX_GameObject * m_mirror;
float m_clip; // clipping distance
- float m_mirrorHalfWidth; // mirror width in mirror space
- float m_mirrorHalfHeight; // mirror height in mirror space
- MT_Point3 m_mirrorPos; // mirror center position in local space
- MT_Vector3 m_mirrorZ; // mirror Z axis in local space
- MT_Vector3 m_mirrorY; // mirror Y axis in local space
- MT_Vector3 m_mirrorX; // mirror X axis in local space
- /// canvas
- RAS_ICanvas* m_canvas;
- /// rasterizer
- RAS_IRasterizer* m_rasterizer;
- /// render tools
- RAS_IRenderTools* m_rendertools;
- /// engine
- KX_KetsjiEngine* m_engine;
+ float m_mirrorHalfWidth; // mirror width in mirror space
+ float m_mirrorHalfHeight; // mirror height in mirror space
+ MT_Point3 m_mirrorPos; // mirror center position in local space
+ MT_Vector3 m_mirrorZ; // mirror Z axis in local space
+ MT_Vector3 m_mirrorY; // mirror Y axis in local space
+ MT_Vector3 m_mirrorX; // mirror X axis in local space
+ /// canvas
+ RAS_ICanvas* m_canvas;
+ /// rasterizer
+ RAS_IRasterizer* m_rasterizer;
+ /// render tools
+ RAS_IRenderTools* m_rendertools;
+ /// engine
+ KX_KetsjiEngine* m_engine;
/// background color
float m_background[4];
diff --git a/source/gameengine/VideoTexture/ImageViewport.h b/source/gameengine/VideoTexture/ImageViewport.h
index 1b415fc58be..70c52b0781c 100644
--- a/source/gameengine/VideoTexture/ImageViewport.h
+++ b/source/gameengine/VideoTexture/ImageViewport.h
@@ -51,7 +51,7 @@ public:
/// is alpha channel used
bool getAlpha (void) { return m_alpha; }
/// set whole buffer use
- void setAlpha (bool alpha) { m_alpha = alpha; }
+ void setAlpha (bool alpha) { m_alpha = alpha; }
/// get capture size in viewport
short * getCaptureSize (void) { return m_capSize; }
@@ -71,8 +71,8 @@ protected:
short m_capSize[2];
/// use whole viewport
bool m_whole;
- /// use alpha channel
- bool m_alpha;
+ /// use alpha channel
+ bool m_alpha;
/// position of capture rectangle in viewport
GLint m_position[2];