[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22962] branches/blender2.5/blender: BlenderPlayer linking again for cmake - 148 errors gone.

Dalai Felinto dfelinto at gmail.com
Thu Sep 3 04:55:24 CEST 2009


Revision: 22962
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22962
Author:   dfelinto
Date:     2009-09-03 04:55:23 +0200 (Thu, 03 Sep 2009)

Log Message:
-----------
BlenderPlayer linking again for cmake - 148 errors gone.

After talking with Ton and Campbell we agreed that it wouldn't hurt to have blenderplayer again (specially now since BGE is almost 100% working in 2.5).
However in order to make it link, I needed to bring back stubs, a lot of so-called bad calls.

I'm not sure how we should proceed from here, but it looks like people could start to take a look at source/blenderplayer/bad_level_calls_stubs/stubs.c and fix their own modules/functions

** NOTE: I removed the sound calls from BlenderPlayer. In order to fix it look at //XXX ADD SOUND in GPG_Application.cpp and GPC_Engine

*** tested in CMake+MSVC.
- Scons is not building !!! (why does the building systems have to be so different?)
And someone may like to fix make. (take a look at /trunk/source/blender/blenkernel/bad_level_call_stubs/Makefile )

**** it may work better inside /source/gameengine/GamePlayer

Modified Paths:
--------------
    branches/blender2.5/blender/blenderplayer/CMakeLists.txt
    branches/blender2.5/blender/source/gameengine/GamePlayer/common/GPC_Engine.cpp
    branches/blender2.5/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp

Added Paths:
-----------
    branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/
    branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/CMakeLists.txt
    branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/Makefile
    branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/SConscript
    branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/stubs.c

Modified: branches/blender2.5/blender/blenderplayer/CMakeLists.txt
===================================================================
--- branches/blender2.5/blender/blenderplayer/CMakeLists.txt	2009-09-03 01:52:10 UTC (rev 22961)
+++ branches/blender2.5/blender/blenderplayer/CMakeLists.txt	2009-09-03 02:55:23 UTC (rev 22962)
@@ -130,4 +130,8 @@
   TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
 ENDIF(UNIX)
 
+IF(WITH_PLAYER)
+  ADD_SUBDIRECTORY(bad_level_call_stubs)
+ENDIF(WITH_PLAYER)
+
 SETUP_LIBLINKS(blenderplayer)

Added: branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/CMakeLists.txt
===================================================================
--- branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/CMakeLists.txt	                        (rev 0)
+++ branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/CMakeLists.txt	2009-09-03 02:55:23 UTC (rev 22962)
@@ -0,0 +1,40 @@
+# $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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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 *****
+
+FILE(GLOB SRC stubs.c)
+
+SET(INC 
+  .
+  .. 
+  ../../source/blender/makesdna
+  ../../source/blender/makesrna  
+)
+
+IF(WITH_INTERNATIONAL)
+  ADD_DEFINITIONS(-DWITH_FREETYPE2)
+ENDIF(WITH_INTERNATIONAL)
+
+BLENDERLIB_NOLIST(blenkernel_blc "${SRC}" "${INC}")


Property changes on: branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/CMakeLists.txt
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/Makefile
===================================================================
--- branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/Makefile	                        (rev 0)
+++ branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/Makefile	2009-09-03 02:55:23 UTC (rev 22962)
@@ -0,0 +1,45 @@
+#
+# $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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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 *****
+#
+#
+
+LIBNAME = blenkernel_blc
+DIR = $(OCGDIR)/blenderplayer/$(LIBNAME)
+
+include nan_compile.mk
+
+CFLAGS += $(LEVEL_2_C_WARNINGS)
+CFLAGS += $(FIX_STUBS_WARNINGS)
+
+CPPFLAGS += $(OGL_CPPFLAGS)
+CPPFLAGS += -I../../source/blender/makesdna
+CPPFLAGS += -I../../source/blender/makesrna
+
+# path to our own external headerfiles
+CPPFLAGS += -I..
+


Property changes on: branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/Makefile
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/SConscript
===================================================================
--- branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/SConscript	                        (rev 0)
+++ branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/SConscript	2009-09-03 02:55:23 UTC (rev 22962)
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+Import ('env')
+
+sources = 'stubs.c'
+
+incs = '. ..'
+incs += '../../source/blender/makesdna'
+incs += '../../source/blender/makesrna'
+
+defs = ''
+if env['WITH_BF_INTERNATIONAL']:
+    defs += 'WITH_FREETYPE2'
+
+env.BlenderLib ('blenkernel_blc', sources = Split(sources), includes=Split(incs), defines=Split(defs), libtype='player',priority=225 )


Property changes on: branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/SConscript
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/stubs.c
===================================================================
--- branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/stubs.c	                        (rev 0)
+++ branches/blender2.5/blender/blenderplayer/bad_level_call_stubs/stubs.c	2009-09-03 02:55:23 UTC (rev 22962)
@@ -0,0 +1,179 @@
+/**
+ * $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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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 *****
+ * BKE_bad_level_calls function stubs
+ */
+
+#include <stdlib.h>
+#include "dna_listbase.h"
+#include "RNA_types.h"
+
+/*new render funcs */
+float *RE_RenderLayerGetPass(struct RenderLayer *rl, int passtype) {return NULL;}
+float RE_filter_value(int type, float x) {return 0.0f;}
+struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char *name) {return (struct RenderLayer *)NULL;}
+
+/* zbuf.c stub */
+void antialias_tagbuf(int xsize, int ysize, char *rectmove) {}
+void RE_zbuf_accumulate_vecblur(struct NodeBlurData *nbd, int xsize, int ysize, float *newrect, float *imgrect, float *vecbufrect, float *zbufrect) {}
+
+/* imagetexture.c stub */
+void ibuf_sample(struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float *result) {}
+
+/* texture.c */
+int multitex_thread(struct Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, struct TexResult *texres, short thread, short which_output) {return 0;}
+int multitex_ext(struct Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, struct TexResult *texres){return 0;}
+
+/* nodes */
+struct RenderResult *RE_GetResult(struct Render *re){return (struct RenderResult *) NULL;}
+struct Render *RE_GetRender(const char *name){return (struct Render *) NULL;}
+
+/* blenkernel */
+char* btempdir(){return NULL;}
+void RE_FreeRenderResult(struct RenderResult *res){}
+char* datatoc_bmonofont_ttf(){return NULL;}
+int datatoc_bmonofont_ttf_size(){return 0;}
+struct RenderResult *RE_MultilayerConvert(void *exrhandle, int rectx, int recty){return (struct RenderResult *) NULL;}
+void RE_GetResultImage(struct Render *re, struct RenderResult *rr){}
+int RE_RenderInProgress(struct Render *re){return 0;}
+struct Scene *RE_GetScene(struct Render *re){return (struct Scene *) NULL;}
+void RE_Database_Free(struct Render *re){}
+void RE_FreeRender(struct Render *re){}
+void RE_shade_external(struct Render *re, struct ShadeInput *shi, struct ShadeResult *shr){}
+void RE_DataBase_GetView(struct Render *re, float mat[][4]){}
+int externtex(struct MTex *mtex, float *vec, float *tin, float *tr, float *tg, float *tb, float *ta){return 0;}
+float texture_value_blend(float tex, float out, float fact, float facg, int blendtype, int flip){return 0.0f;}
+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;}
+char bprogname[]="";
+
+/* rna */
+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 object_test_constraints (struct Object *owner){}
+void ED_object_parent(struct Object *ob, struct Object *par, int type, const char *substr){}
+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 ListBase *get_active_constraints (struct Object *ob){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;}
+int ED_space_image_show_render(struct SpaceImage *sima){return 0;}
+int ED_space_image_show_paint(struct SpaceImage *sima){return 0;}
+void ED_space_image_set(struct bContext *C, struct SpaceImage *sima, struct Scene *scene, struct Object *obedit, struct Image *ima){}

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list