From f3692d5e723dbe3d6257469a2a4ff5eb7a27604e Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sat, 28 Nov 2009 01:26:14 +0000 Subject: [PATCH] BPlayer fix (we were still using old scene.r instead of scene.gm here) and more stubs update from Mitchell Stokes (Moguri) (+ a fix in a logic_window.c comment) --- .../editors/space_logic/logic_window.c | 2 +- .../bad_level_call_stubs/stubs.c | 7 ++++++ .../gameengine/GamePlayer/ghost/GPG_ghost.cpp | 22 ++++++++++--------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index bc86d8c37b9..8ba0577e3c7 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -637,7 +637,7 @@ static char *sensor_name(int type) static char *sensor_pup(void) { - /* the number needs to match defines in game.h */ + /* the number needs to match defines in DNA_sensor_types.h */ return "Sensors %t|Always %x0|Delay %x13|Keyboard %x3|Mouse %x5|" "Touch %x1|Collision %x6|Near %x2|Radar %x7|" "Property %x4|Random %x8|Ray %x9|Message %x10|Joystick %x11|Actuator %x12|Armature %x14"; diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index f4885724802..f4d3929b08c 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -70,6 +70,8 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg, int blendtype){} char stipple_quarttone[1]; //GLubyte stipple_quarttone[128] double elbeemEstimateMemreq(int res, float sx, float sy, float sz, int refine, char *retstr) {return 0.0f;} +struct Render *RE_NewRender(const char *name){return (struct Render*) NULL;} +void RE_BlenderFrame(struct Render *re, struct Scene *scene, int frame){} /* rna */ void WM_menutype_free(void){} @@ -82,13 +84,16 @@ void WM_jobs_stop_all(struct wmWindowManager *wm){} void WM_event_add_notifier(const struct bContext *C, unsigned int type, void *reference){} void ED_armature_bone_rename(struct bArmature *arm, char *oldnamep, char *newnamep){} +void ED_armature_edit_bone_remove(struct bArmature *arm, struct EditBone *exBone){} void object_test_constraints (struct Object *owner){} void ED_object_parent(struct Object *ob, struct Object *par, int type, const char *substr){} void ED_object_constraint_set_active(struct Object *ob, struct bConstraint *con){} void ED_node_composit_default(struct Scene *sce){} struct EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, struct EditBone *ebo){return (struct EditBone *) NULL;} +struct EditBone *ED_armature_edit_bone_add(struct bArmature *arm, char *name){return (struct EditBone*) NULL;} struct ListBase *get_active_constraints (struct Object *ob){return (struct ListBase *) NULL;} +struct ListBase *get_constraint_lb(struct Object *ob, struct bConstraint *con, struct bPoseChannel **pchan_r){return (struct ListBase *) NULL;} int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan){return 0;} int ED_space_image_show_uvedit(struct SpaceImage *sima, struct Object *obedit){return 0;} @@ -177,6 +182,7 @@ void uiItemStringO(struct uiLayout *layout, char *name, int icon, char *opname, void uiItemL(struct uiLayout *layout, char *name, int icon){} void uiItemM(struct uiLayout *layout, struct bContext *C, char *name, int icon, char *menuname){} void uiItemS(struct uiLayout *layout){} +void uiItemFullR(struct uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag){} void uiLayoutSetContextPointer(struct uiLayout *layout, char *name, struct PointerRNA *ptr){} /* rna template */ @@ -224,6 +230,7 @@ int WM_operator_poll(struct bContext *C, struct wmOperatorType *ot){return 0;} int WM_operator_props_popup(struct bContext *C, struct wmOperator *op, struct wmEvent *event){return 0;} void WM_operator_properties_free(struct PointerRNA *ptr){} void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring){} +void WM_operator_properties_create_ptr(struct PointerRNA *ptr, struct wmOperatorType *ot){} void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType*, void*), void *userdata){} void WM_operator_bl_idname(char *to, const char *from){} void WM_operator_py_idname(char *to, const char *from){} diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index fb2e1c72a85..8d9a59b1871 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -688,19 +688,19 @@ int main(int argc, char** argv) if ((!fullScreenParFound) && (!windowParFound)) { // Only use file settings when command line did not override - if (scene->r.fullscreen) { + if (scene->gm.fullscreen) { //printf("fullscreen option found in Blender file\n"); fullScreen = true; - fullScreenWidth= scene->r.xplay; - fullScreenHeight= scene->r.yplay; - fullScreenFrequency= scene->r.freqplay; - fullScreenBpp = scene->r.depth; + fullScreenWidth= scene->gm.xplay; + fullScreenHeight= scene->gm.yplay; + fullScreenFrequency= scene->gm.freqplay; + fullScreenBpp = scene->gm.depth; } else { fullScreen = false; - windowWidth = scene->r.xplay; - windowHeight = scene->r.yplay; + windowWidth = scene->gm.xplay; + windowHeight = scene->gm.yplay; } } @@ -708,9 +708,11 @@ int main(int argc, char** argv) // Check whether the game should be displayed in stereo if (!stereoParFound) { - stereomode = (RAS_IRasterizer::StereoMode) scene->r.stereomode; - if (stereomode == RAS_IRasterizer::RAS_STEREO_QUADBUFFERED) - stereoWindow = true; + if(scene->gm.stereoflag == STEREO_ENABLED){ + stereomode = (RAS_IRasterizer::StereoMode) scene->gm.stereomode; + if (stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED) + stereoWindow = true; + } } // GPG_Application app (system, maggie, startscenename); -- 2.28.0