From c78e44cdc563853c250da78ee78ba622c39126b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Luc=20Peuri=C3=A8re?= Date: Wed, 9 Mar 2005 19:45:59 +0000 Subject: big warning hunt commit lot of casts, added prototypes, missing includes and some true errors --- source/blender/avi/intern/mjpeg.c | 8 ++-- source/blender/blenkernel/BKE_text.h | 3 +- source/blender/blenkernel/intern/constraint.c | 5 +- source/blender/blenkernel/intern/exotic.c | 2 +- source/blender/blenkernel/intern/image.c | 4 +- source/blender/blenkernel/intern/ipo.c | 2 +- source/blender/blenkernel/intern/mball.c | 4 +- source/blender/blenkernel/intern/screen.c | 2 + source/blender/blenkernel/intern/softbody.c | 11 +++-- source/blender/blenkernel/intern/writeavi.c | 2 + source/blender/blenlib/BLI_gsqueue.h | 2 +- source/blender/blenlib/intern/BLI_ghash.c | 2 +- source/blender/blenlib/intern/arithb.c | 1 + source/blender/blenlib/intern/dynlib.c | 8 +++- source/blender/blenlib/intern/fileops.c | 1 + source/blender/blenlib/intern/noise.c | 54 +++++++++++----------- source/blender/blenlib/intern/psfont.c | 2 +- source/blender/blenlib/intern/storage.c | 2 +- source/blender/blenlib/intern/winstuff.c | 2 +- source/blender/blenloader/intern/readblenentry.c | 6 ++- source/blender/blenloader/intern/readfile.c | 8 +++- source/blender/blenloader/intern/undofile.c | 2 +- source/blender/blenloader/intern/writefile.c | 2 +- source/blender/blenpluginapi/intern/Makefile | 5 +- source/blender/blenpluginapi/intern/pluginapi.c | 4 +- source/blender/ftfont/intern/FTF_TTFont.cpp | 2 + source/blender/imbuf/intern/allocimbuf.c | 8 ++-- source/blender/imbuf/intern/amiga.c | 2 +- source/blender/imbuf/intern/anim5.c | 5 +- source/blender/imbuf/intern/bmp.c | 4 +- source/blender/imbuf/intern/cspace.c | 2 + source/blender/imbuf/intern/divers.c | 8 ++-- source/blender/imbuf/intern/hamx.c | 2 +- source/blender/imbuf/intern/iris.c | 4 +- source/blender/imbuf/intern/util.c | 2 +- source/blender/include/BDR_drawmesh.h | 2 +- source/blender/include/BDR_unwrapper.h | 6 +-- source/blender/include/BIF_editfont.h | 1 + source/blender/include/BIF_editview.h | 2 +- source/blender/include/BIF_fsmenu.h | 2 +- source/blender/include/BIF_mywindow.h | 1 + source/blender/include/BIF_oops.h | 2 + source/blender/include/BIF_transform.h | 6 +-- source/blender/include/BSE_drawview.h | 3 ++ source/blender/include/BSE_headerbuttons.h | 4 +- source/blender/python/BPY_interface.c | 8 +++- source/blender/python/api2_2x/Blender.c | 3 ++ source/blender/python/api2_2x/Bone.c | 8 ++-- source/blender/python/api2_2x/Build.c | 3 ++ source/blender/python/api2_2x/Camera.c | 3 ++ source/blender/python/api2_2x/Ipo.c | 22 ++++----- source/blender/python/api2_2x/Library.c | 4 ++ source/blender/python/api2_2x/Material.c | 4 ++ source/blender/python/api2_2x/NMesh.c | 4 +- source/blender/python/api2_2x/NMesh.h | 6 +-- source/blender/python/api2_2x/Noise.c | 4 +- source/blender/python/api2_2x/Object.c | 12 +++-- source/blender/python/api2_2x/Particle.c | 3 ++ source/blender/python/api2_2x/Sound.c | 9 ++-- source/blender/python/api2_2x/Sys.c | 1 + source/blender/python/api2_2x/Text3d.c | 11 ++++- source/blender/python/api2_2x/Wave.c | 2 + source/blender/python/api2_2x/Window.c | 2 + source/blender/python/api2_2x/logic.c | 2 +- source/blender/python/api2_2x/matrix.c | 24 +++++----- source/blender/python/api2_2x/quat.c | 7 +++ source/blender/python/api2_2x/sceneRender.c | 2 +- source/blender/python/api2_2x/vector.c | 8 ++++ source/blender/quicktime/apple/quicktime_export.c | 8 ++-- source/blender/quicktime/apple/quicktime_import.c | 22 +++++---- source/blender/radiosity/intern/source/radrender.c | 6 ++- source/blender/render/intern/source/envmap.c | 2 +- source/blender/render/intern/source/initrender.c | 2 +- source/blender/render/intern/source/ray.c | 10 +++- source/blender/render/intern/source/rendercore.c | 2 +- source/blender/render/intern/source/texture.c | 2 + .../render/intern/source/vanillaRenderPipe.c | 9 ++-- source/blender/render/intern/source/zbuf.c | 12 ++--- source/blender/renderconverter/SConscript | 2 + source/blender/renderconverter/intern/Makefile | 2 + .../renderconverter/intern/convertBlenderScene.c | 41 ++++++++-------- source/blender/src/butspace.c | 3 ++ source/blender/src/buttons_editing.c | 4 ++ source/blender/src/buttons_logic.c | 5 ++ source/blender/src/buttons_object.c | 9 ++++ source/blender/src/buttons_script.c | 2 + source/blender/src/buttons_shading.c | 8 ++++ source/blender/src/cursors.c | 4 +- source/blender/src/drawaction.c | 7 ++- source/blender/src/drawimasel.c | 2 + source/blender/src/drawipo.c | 3 +- source/blender/src/drawmesh.c | 4 ++ source/blender/src/drawobject.c | 4 +- source/blender/src/drawseq.c | 2 +- source/blender/src/drawtext.c | 6 +++ source/blender/src/edit.c | 6 ++- source/blender/src/editaction.c | 13 ++++-- source/blender/src/editarmature.c | 28 +++++++---- source/blender/src/editdeform.c | 5 ++ source/blender/src/editface.c | 10 ++-- source/blender/src/editfont.c | 3 ++ source/blender/src/editimasel.c | 2 + source/blender/src/editipo.c | 24 +++++----- source/blender/src/editkey.c | 4 ++ source/blender/src/editmesh_lib.c | 4 +- source/blender/src/editmesh_loop.c | 6 +-- source/blender/src/editmesh_mods.c | 2 +- source/blender/src/editmesh_tools.c | 22 +++++---- source/blender/src/editmode_undo.c | 9 ++++ source/blender/src/editobject.c | 33 ++++++++----- source/blender/src/editscreen.c | 8 +++- source/blender/src/editsima.c | 6 +++ source/blender/src/editsound.c | 4 +- source/blender/src/editview.c | 11 +++-- source/blender/src/eventdebug.c | 2 + source/blender/src/filesel.c | 3 ++ source/blender/src/ghostwinlay.c | 6 ++- source/blender/src/header_image.c | 8 ++-- source/blender/src/header_info.c | 10 +++- source/blender/src/header_view3d.c | 8 ++-- source/blender/src/headerbuttons.c | 20 ++++---- source/blender/src/interface.c | 8 +++- source/blender/src/interface_draw.c | 6 ++- source/blender/src/interface_panel.c | 2 +- source/blender/src/language.c | 8 ++-- source/blender/src/meshtools.c | 3 ++ source/blender/src/mywindow.c | 4 ++ source/blender/src/outliner.c | 2 +- source/blender/src/previewrender.c | 2 + source/blender/src/renderwin.c | 3 ++ source/blender/src/resources.c | 2 + source/blender/src/seqaudio.c | 10 ++-- source/blender/src/space.c | 12 +++-- source/blender/src/spacetypes.c | 6 ++- source/blender/src/toets.c | 2 +- source/blender/src/toolbox.c | 4 ++ source/blender/src/transform.c | 2 +- source/blender/src/transform_constraints.c | 18 ++++---- source/blender/src/transform_generics.h | 2 +- source/blender/src/view.c | 6 ++- source/creator/creator.c | 2 +- source/darwin/Makefile | 2 + .../BlenderRoutines/KX_BlenderRenderTools.cpp | 2 +- .../Converter/BL_BlenderDataConversion.cpp | 6 +-- .../Converter/KX_BlenderSceneConverter.cpp | 5 +- source/gameengine/Expressions/Value.cpp | 2 +- source/gameengine/GameLogic/SCA_LogicManager.cpp | 4 +- .../gameengine/GameLogic/SCA_PropertyActuator.cpp | 2 +- .../gameengine/GameLogic/SCA_PythonController.cpp | 1 - source/gameengine/GameLogic/SCA_RandomActuator.cpp | 2 +- .../GameLogic/SCA_RandomNumberGenerator.cpp | 2 +- source/gameengine/Ketsji/KX_CameraActuator.cpp | 14 +++--- source/gameengine/Ketsji/KX_GameActuator.cpp | 2 +- source/gameengine/Ketsji/KX_GameObject.cpp | 2 +- source/gameengine/Ketsji/KX_MouseFocusSensor.cpp | 2 +- source/gameengine/Ketsji/KX_NearSensor.cpp | 4 +- source/gameengine/Ketsji/KX_PyMath.cpp | 2 +- source/gameengine/Ketsji/KX_PyMath.h | 10 ++-- .../gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp | 2 +- .../gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp | 2 +- .../Ketsji/KX_SCA_ReplaceMeshActuator.cpp | 2 +- .../gameengine/Ketsji/KX_SG_NodeRelationships.cpp | 4 +- source/gameengine/Ketsji/KX_Scene.cpp | 2 +- source/gameengine/Ketsji/KX_SceneActuator.cpp | 2 +- source/gameengine/Ketsji/KX_SoundActuator.cpp | 2 +- source/gameengine/Ketsji/KX_TouchSensor.cpp | 4 +- source/gameengine/Ketsji/KX_WorldIpoController.cpp | 2 +- .../gameengine/Rasterizer/RAS_MaterialBucket.cpp | 6 ++- source/gameengine/Rasterizer/RAS_MeshObject.cpp | 4 +- .../RAS_GLExtensionManager.cpp | 1 + source/gameengine/SceneGraph/SG_Tree.cpp | 4 +- source/nan_warn.mk | 2 +- 172 files changed, 657 insertions(+), 354 deletions(-) (limited to 'source') diff --git a/source/blender/avi/intern/mjpeg.c b/source/blender/avi/intern/mjpeg.c index ff31b04908a..d51c04a1834 100644 --- a/source/blender/avi/intern/mjpeg.c +++ b/source/blender/avi/intern/mjpeg.c @@ -146,8 +146,9 @@ static void std_huff_tables (j_decompress_ptr dinfo) { bits_ac_chrominance, val_ac_chrominance); } -static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, int width, int height, int bufsize) { - int rowstride, y; +static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsigned int width, unsigned int height, int bufsize) { + int rowstride; + unsigned int y; struct jpeg_decompress_struct dinfo; struct jpeg_error_mgr jerr; @@ -196,7 +197,8 @@ static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, int wi } static void Compress_JPEG(int quality, unsigned char *outbuffer, unsigned char *inBuffer, int width, int height, int bufsize) { - int i, y, rowstride; + int i, rowstride; + unsigned int y; struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; unsigned char marker[60]; diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index d15939ce174..71b8f1a4cc3 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -88,6 +88,7 @@ void txt_find_panel (struct SpaceText *st, int again); void run_python_script (struct SpaceText *st); int jumptoline_interactive (struct SpaceText *st); void txt_export_to_object (struct Text *text); +void txt_export_to_objects(struct Text *text); void indent_paste (struct Text *text); void unindent (struct Text *text); void comment (struct Text *text); @@ -98,7 +99,7 @@ void comment_paste (struct Text *text, char *in_buffer); void uncomment_paste (struct Text *text, char *in_buffer); void uncomment (struct Text *text); - //void set_tabs (struct Text *text); +void set_tabs (struct Text *text); /* Undo opcodes */ diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 505bfdd92f5..0f94b4c3678 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -67,8 +67,11 @@ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif + +/* used by object.c */ +void Mat4BlendMat4(float [][4], float [][4], float [][4], float ); + /* Local function prototypes */ -static void constraint_target_to_mat4 (Object *ob, const char *substring, float mat[][4], float size[3], float ctime); /* Functions */ diff --git a/source/blender/blenkernel/intern/exotic.c b/source/blender/blenkernel/intern/exotic.c index eb889c966be..5b6ee6fed9c 100644 --- a/source/blender/blenkernel/intern/exotic.c +++ b/source/blender/blenkernel/intern/exotic.c @@ -967,7 +967,7 @@ static void read_videoscape_nurbs(char *str) Mat3ToEul(omat, ob->rot); EulToMat3(ob->rot, mat); Mat3Inv(imat, mat); - Mat3MulMat3(tmat, imat, omat); + Mat3MulMat3((float ( * )[3])tmat, imat, omat); while(tot--) { nu= (Nurb*)MEM_callocN(sizeof(Nurb),"nu from exotic"); diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 50119cdf3a7..d8c455c9c48 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -297,7 +297,7 @@ void load_image(Image * ima, int flags, char *relabase, int framenum) } -void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */ +static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */ { struct ImBuf * tbuf1, * tbuf2; @@ -325,7 +325,7 @@ void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */ ibuf->y /= 2; } -void de_interlace_st(struct ImBuf *ibuf) /* standard fields */ +static void de_interlace_st(struct ImBuf *ibuf) /* standard fields */ { struct ImBuf * tbuf1, * tbuf2; diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 06197bc99c5..8c10a5c008e 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -878,7 +878,7 @@ float read_ipo_poin(void *poin, int type) return val; } -void *give_tex_poin(Tex *tex, int adrcode, int *type ) +static void *give_tex_poin(Tex *tex, int adrcode, int *type ) { void *poin=0; diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index b2ed5f22c29..4d3782e3a85 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -395,7 +395,7 @@ Object *find_basis_mball(Object *basis) void calc_mballco(MetaElem *ml, float *vec) { if(ml->mat) { - Mat4MulVecfl(ml->mat, vec); + Mat4MulVecfl((float ( * )[4])ml->mat, vec); } } @@ -407,7 +407,7 @@ float densfunc(MetaElem *ball, float x, float y, float z) vec[0]= x; vec[1]= y; vec[2]= z; - Mat4MulVecfl(ball->imat, vec); + Mat4MulVecfl((float ( * )[4])ball->imat, vec); dx= vec[0]; dy= vec[1]; dz= vec[2]; diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index e20ec017729..06b7d171308 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -40,6 +40,8 @@ #include "BKE_bad_level_calls.h" #include "BLI_blenlib.h" +#include "BKE_screen.h" + #ifdef HAVE_CONFIG_H #include #endif diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index ed870b19c39..bfc58070974 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -95,6 +95,9 @@ float rescale_friction_to_framerate = 1.0f; // since unit of drag is [kg/sec] we short SB_ENABLE = 0; // quick hack to switch sb integration in 3d header +/* local prototypes */ +void softbody_scale_time(float steptime); +int get_scalar_from_named_vertexgroup(Object *ob, char *name, int vertID, float *target); void softbody_scale_time(float steptime) { @@ -243,7 +246,7 @@ void free_softbody(SoftBody *sb) /* ************ dynamics ********** */ /* aye this belongs to arith.c */ -void Vec3PlusStVec(float *v, float s, float *v1) +static void Vec3PlusStVec(float *v, float s, float *v1) { v[0] += s*v1[0]; v[1] += s*v1[1]; @@ -494,6 +497,7 @@ static void softbody_restore_prev_step(Object *ob) /* unused */ +#if 0 static void softbody_apply_goal(Object *ob, float dtime) { @@ -518,6 +522,7 @@ static void softbody_apply_goal(Object *ob, float dtime) } } +#endif static void softbody_apply_goalsnap(Object *ob) { @@ -588,7 +593,7 @@ static void mesh_update_softbody(Object *ob) { Mesh *me= ob->data; MVert *mvert= me->mvert; - MEdge *medge= me->medge; +/* MEdge *medge= me->medge; */ /*unused*/ BodyPoint *bp; int a; if(ob->soft) { @@ -652,7 +657,7 @@ static void mesh_to_softbody(Object *ob) Mesh *me= ob->data; MVert *mvert= me->mvert; MEdge *medge= me->medge; - MFace *mface= me->mface; +/* MFace *mface= me->mface; */ /*unused*/ BodyPoint *bp; BodySpring *bs; int a; diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index 5980d2b5fc4..c6e39fcd8f2 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -58,6 +58,8 @@ #include "DNA_scene_types.h" /* RPW - End */ +#include "BKE_writeavi.h" + static AviMovie *avi=NULL; static int sframe; diff --git a/source/blender/blenlib/BLI_gsqueue.h b/source/blender/blenlib/BLI_gsqueue.h index 3079c5e1f56..5180d3d8bbc 100644 --- a/source/blender/blenlib/BLI_gsqueue.h +++ b/source/blender/blenlib/BLI_gsqueue.h @@ -85,7 +85,7 @@ void BLI_gsqueue_push (GSQueue *gq, void *item); * @param item A pointer to an appropriatly * sized structure (the size passed to BLI_gsqueue_new). */ -void BLI_qsueue_pushback (GSQueue *gq, void *item); +void BLI_gsqueue_pushback (GSQueue *gq, void *item); /** * Free the queue diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index e523cdcdea9..23e21d4fb45 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -228,7 +228,7 @@ unsigned int BLI_ghashutil_strhash(void *ptr) { unsigned int i= 0; unsigned char c; - while (c= *s++) + while ( (c= *s++) ) i= i*37 + c; return i; diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 95e07dda0c8..38a6cf2df6c 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -1399,6 +1399,7 @@ void VecUpMat3(float *vec, float mat[][3], short axis) } /* A & M Watt, Advanced animation and rendering techniques, 1992 ACM press */ +void QuatInterpolW(float *, float *, float *, float ); void QuatInterpolW(float *result, float *quat1, float *quat2, float t) { diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c index d2e8f80757b..4368f5d1cee 100644 --- a/source/blender/blenlib/intern/dynlib.c +++ b/source/blender/blenlib/intern/dynlib.c @@ -31,7 +31,11 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ + #include +#include +#include + #include "../PIL_dynlib.h" #ifdef HAVE_CONFIG_H @@ -117,7 +121,7 @@ struct PILdynlib { void *handle; }; -char *osxerror(int setget, const char *str, ...) +static char *osxerror(int setget, const char *str, ...) { static char errstr[ERR_STR_LEN]; static int err_filled = 0; @@ -154,7 +158,7 @@ char *osxerror(int setget, const char *str, ...) return retval; } -void *osxdlopen(const char *path, int mode) +static void *osxdlopen(const char *path, int mode) { void *module = 0; NSObjectFileImage ofi = 0; diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index a743e552407..69e8790c894 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -38,6 +38,7 @@ #include #include +#include #ifdef HAVE_CONFIG_H #include diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index ef651e0c374..1eaff59bf7b 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -210,7 +210,7 @@ float hashvectf[768]= { #define lerp(t, a, b) ((a)+(t)*((b)-(a))) #define npfade(t) ((t)*(t)*(t)*((t)*((t)*6-15)+10)) -float grad(int hash, float x, float y, float z) +static float grad(int hash, float x, float y, float z) { int h = hash & 15; // CONVERT LO 4 BITS OF HASH CODE float u = h<8 ? x : y, // INTO 12 GRADIENT DIRECTIONS. @@ -219,7 +219,7 @@ float grad(int hash, float x, float y, float z) } /* instead of adding another permutation array, just use hash table defined above */ -float newPerlin(float x, float y, float z) +static float newPerlin(float x, float y, float z) { int A, AA, AB, B, BA, BB; float u=floor(x), v=floor(y), w=floor(z); @@ -243,7 +243,7 @@ float newPerlin(float x, float y, float z) } /* for use with BLI_gNoise()/BLI_gTurbulence(), returns unsigned improved perlin noise */ -float newPerlinU(float x, float y, float z) +static float newPerlinU(float x, float y, float z) { return (0.5+0.5*newPerlin(x, y, z)); } @@ -254,7 +254,7 @@ float newPerlinU(float x, float y, float z) /**************************/ /* Was BLI_hnoise(), removed noisesize, so other functions can call it without scaling. */ -float orgBlenderNoise(float x, float y, float z) +static float orgBlenderNoise(float x, float y, float z) { register float cn1, cn2, cn3, cn4, cn5, cn6, i, *h; float ox, oy, oz, jx, jy, jz; @@ -324,7 +324,7 @@ float orgBlenderNoise(float x, float y, float z) } /* as orgBlenderNoise(), returning signed noise */ -float orgBlenderNoiseS(float x, float y, float z) +static float orgBlenderNoiseS(float x, float y, float z) { return (2.0*orgBlenderNoise(x, y, z)-1.0); } @@ -532,7 +532,7 @@ float turbulence_perlin(float *point, float lofreq, float hifreq) } /* for use with BLI_gNoise/gTurbulence, returns signed noise */ -float orgPerlinNoise(float x, float y, float z) +static float orgPerlinNoise(float x, float y, float z) { float v[3]; @@ -543,7 +543,7 @@ float orgPerlinNoise(float x, float y, float z) } /* for use with BLI_gNoise/gTurbulence, returns unsigned noise */ -float orgPerlinNoiseU(float x, float y, float z) +static float orgPerlinNoiseU(float x, float y, float z) { float v[3]; @@ -585,13 +585,13 @@ float turbulencep(float noisesize, float x, float y, float z, int nr) /* Camberra omitted, didn't seem useful */ /* distance squared */ -float dist_Squared(float x, float y, float z, float e) { return (x*x + y*y + z*z); } +static float dist_Squared(float x, float y, float z, float e) { return (x*x + y*y + z*z); } /* real distance */ -float dist_Real(float x, float y, float z, float e) { return sqrt(x*x + y*y + z*z); } +static float dist_Real(float x, float y, float z, float e) { return sqrt(x*x + y*y + z*z); } /* manhattan/taxicab/cityblock distance */ -float dist_Manhattan(float x, float y, float z, float e) { return (fabs(x) + fabs(y) + fabs(z)); } +static float dist_Manhattan(float x, float y, float z, float e) { return (fabs(x) + fabs(y) + fabs(z)); } /* Chebychev */ -float dist_Chebychev(float x, float y, float z, float e) +static float dist_Chebychev(float x, float y, float z, float e) { float t; x = fabs(x); @@ -602,14 +602,14 @@ float dist_Chebychev(float x, float y, float z, float e) } /* minkovsky preset exponent 0.5 */ -float dist_MinkovskyH(float x, float y, float z, float e) +static float dist_MinkovskyH(float x, float y, float z, float e) { float d = sqrt(fabs(x)) + sqrt(fabs(y)) + sqrt(fabs(z)); return (d*d); } /* minkovsky preset exponent 4 */ -float dist_Minkovsky4(float x, float y, float z, float e) +static float dist_Minkovsky4(float x, float y, float z, float e) { x *= x; y *= y; @@ -618,7 +618,7 @@ float dist_Minkovsky4(float x, float y, float z, float e) } /* Minkovsky, general case, slow, maybe too slow to be useful */ -float dist_Minkovsky(float x, float y, float z, float e) +static float dist_Minkovsky(float x, float y, float z, float e) { return pow(pow(fabs(x), e) + pow(fabs(y), e) + pow(fabs(z), e), 1.0/e); } @@ -696,35 +696,35 @@ void voronoi(float x, float y, float z, float* da, float* pa, float me, int dtyp } /* returns different feature points for use in BLI_gNoise() */ -float voronoi_F1(float x, float y, float z) +static float voronoi_F1(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); return da[0]; } -float voronoi_F2(float x, float y, float z) +static float voronoi_F2(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); return da[1]; } -float voronoi_F3(float x, float y, float z) +static float voronoi_F3(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); return da[2]; } -float voronoi_F4(float x, float y, float z) +static float voronoi_F4(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); return da[3]; } -float voronoi_F1F2(float x, float y, float z) +static float voronoi_F1F2(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); @@ -732,7 +732,7 @@ float voronoi_F1F2(float x, float y, float z) } /* Crackle type pattern, just a scale/clamp of F2-F1 */ -float voronoi_Cr(float x, float y, float z) +static float voronoi_Cr(float x, float y, float z) { float t = 10*voronoi_F1F2(x, y, z); if (t>1.f) return 1.f; @@ -742,35 +742,35 @@ float voronoi_Cr(float x, float y, float z) /* Signed version of all 6 of the above, just 2x-1, not really correct though (range is potentially (0, sqrt(6)). Used in the musgrave functions */ -float voronoi_F1S(float x, float y, float z) +static float voronoi_F1S(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); return (2.0*da[0]-1.0); } -float voronoi_F2S(float x, float y, float z) +static float voronoi_F2S(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); return (2.0*da[1]-1.0); } -float voronoi_F3S(float x, float y, float z) +static float voronoi_F3S(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); return (2.0*da[2]-1.0); } -float voronoi_F4S(float x, float y, float z) +static float voronoi_F4S(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); return (2.0*da[3]-1.0); } -float voronoi_F1F2S(float x, float y, float z) +static float voronoi_F1F2S(float x, float y, float z) { float da[4], pa[12]; voronoi(x, y, z, da, pa, 1, 0); @@ -778,7 +778,7 @@ float voronoi_F1F2S(float x, float y, float z) } /* Crackle type pattern, just a scale/clamp of F2-F1 */ -float voronoi_CrS(float x, float y, float z) +static float voronoi_CrS(float x, float y, float z) { float t = 10*voronoi_F1F2(x, y, z); if (t>1.f) return 1.f; @@ -795,7 +795,7 @@ float voronoi_CrS(float x, float y, float z) /*************/ /* returns unsigned cellnoise */ -float cellNoiseU(float x, float y, float z) +static float cellNoiseU(float x, float y, float z) { int xi = (int)(floor(x)); int yi = (int)(floor(y)); diff --git a/source/blender/blenlib/intern/psfont.c b/source/blender/blenlib/intern/psfont.c index cd602eeb431..8b0f566ec2a 100644 --- a/source/blender/blenlib/intern/psfont.c +++ b/source/blender/blenlib/intern/psfont.c @@ -871,7 +871,7 @@ static int decodetype1(PackedFile * pf, char *outname) datbytes = pf->size - pf->seek; memcpy(bindat, ((char *) pf->data) + pf->seek, datbytes); - if ((bindat[2] << 8 + bindat[3]) == 0x800){ + if ((bindat[2] << (8 + bindat[3])) == 0x800){ /* order data (remove 6 bytes headers) */ i = datbytes; hptr = bptr = bindat + 4; diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 07f245982f7..bed2383d751 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -236,7 +236,7 @@ void BLI_builddir(char *dirname, char *relname) return; } - if (dir = (DIR *)opendir(".")){ + if ( (dir = (DIR *)opendir(".")) ){ while ((fname = (struct dirent*) readdir(dir)) != NULL) { if(hide_dot && fname->d_name[0]=='.' && fname->d_name[1]!='.' && fname->d_name[1]!=0); diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index 64a56b9a306..22c0e2c71ca 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -208,7 +208,7 @@ int closedir (DIR *dp) { #else -void BLI_WINSTUFF_C_IS_EMPTY_FOR_UNIX(void) +static void BLI_WINSTUFF_C_IS_EMPTY_FOR_UNIX(void) { /*intentionally empty*/ } diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index fe39effdc01..5c31217a31f 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -115,6 +115,10 @@ static IDType idtypes[]= { }; static int nidtypes= sizeof(idtypes)/sizeof(idtypes[0]); +/* local prototypes --------------------- */ +void BLO_blendhandle_print_sizes(BlendHandle *, void *); + + static IDType *idtype_from_name(char *str) { int i= nidtypes; @@ -191,7 +195,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp) buf[2]= buf[2]?buf[2]:' '; buf[3]= buf[3]?buf[3]:' '; - fprintf(fp, "['%.4s', '%s', %d, %d], \n", buf, name, bhead->nr, bhead->len+sizeof(BHead)); + fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, bhead->len+sizeof(BHead)); } } fprintf(fp, "]\n"); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index af04a701ccc..68bd3946e55 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -227,6 +227,12 @@ typedef struct OldNewMap { int lasthit; } OldNewMap; + +/* local prototypes */ +void lib_link_screen_restore(Main *, char , Scene *); +extern short freeN(void *vmemh); /* defined in util.h */ + + static OldNewMap *oldnewmap_new(void) { OldNewMap *onm= MEM_mallocN(sizeof(*onm), "OldNewMap"); onm->lasthit= 0; @@ -2544,7 +2550,7 @@ static void direct_link_scene(FileData *fd, Scene *sce) Sequence temp; char *poin; long offset; - int seted=0; + /*int seted=0;*/ /*unused*/ offset= ((long)&(temp.seqbase)) - ((long)&temp); diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c index af278c89133..f16fb5e7b17 100644 --- a/source/blender/blenloader/intern/undofile.c +++ b/source/blender/blenloader/intern/undofile.c @@ -66,7 +66,7 @@ void BLO_free_memfile(MemFile *memfile) { MemFileChunk *chunk; - while(chunk = (memfile->chunks.first) ) { + while( (chunk = (memfile->chunks.first) ) ) { if(chunk->ident==0) MEM_freeN(chunk->buf); BLI_remlink(&memfile->chunks, chunk); MEM_freeN(chunk); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index e5b6177aea4..a2a2debad83 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1514,7 +1514,7 @@ static int write_file_handle(int handle, MemFile *compare, MemFile *current, int ListBase mainlist; char buf[13]; WriteData *wd; - int data; +/* int data; */ /*unused*/ mainlist.first= mainlist.last= G.main; G.main->next= NULL; diff --git a/source/blender/blenpluginapi/intern/Makefile b/source/blender/blenpluginapi/intern/Makefile index 1a638d848c8..732c419d626 100644 --- a/source/blender/blenpluginapi/intern/Makefile +++ b/source/blender/blenpluginapi/intern/Makefile @@ -49,9 +49,8 @@ CPPFLAGS += $(LEVEL_2_CPP_WARNINGS) # path to our own external headerfiles. On win2k this needs to be # longer, to avoid the util.h include problem CPPFLAGS += -I.. -ifeq ($(OS),windows) - CPPFLAGS += -I../.. -endif +CPPFLAGS += -I../.. + # also do dna CPPFLAGS += -I../../makesdna # path to blenlib diff --git a/source/blender/blenpluginapi/intern/pluginapi.c b/source/blender/blenpluginapi/intern/pluginapi.c index c9cbc72ca60..aefd8d3f458 100644 --- a/source/blender/blenpluginapi/intern/pluginapi.c +++ b/source/blender/blenpluginapi/intern/pluginapi.c @@ -48,7 +48,7 @@ #ifdef WIN32 #include "blenpluginapi\util.h" #else -#include "util.h" +#include "blenpluginapi/util.h" #endif #include "iff.h" #include "plugin.h" @@ -316,6 +316,8 @@ float turbulence1(float noisesize, * Otherwise they will not be imported from the archive * library on Unix. -zr */ +int pluginapi_force_ref(void); + int pluginapi_force_ref(void) { return (int) mallocN + diff --git a/source/blender/ftfont/intern/FTF_TTFont.cpp b/source/blender/ftfont/intern/FTF_TTFont.cpp index 0c979ea5a94..627cd6f270b 100644 --- a/source/blender/ftfont/intern/FTF_TTFont.cpp +++ b/source/blender/ftfont/intern/FTF_TTFont.cpp @@ -240,6 +240,7 @@ int FTF_TTFont::SetFont(const unsigned char* str, int datasize, int fontsize) return 1; } } + return 0; } void FTF_TTFont::SetLanguage(char* str) @@ -372,6 +373,7 @@ float FTF_TTFont::GetStringWidth(char* str, unsigned int flag) } else if(mode == FTF_TEXTUREFONT) { return font->Advance(wstr);// * fsize; } + return 0.0; } diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index 4e6407c8d6e..3178e15ffee 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -125,7 +125,7 @@ short addzbufImBuf(struct ImBuf * ibuf) IMB_freezbufImBuf(ibuf); size = ibuf->x * ibuf->y * sizeof(unsigned int); - if (ibuf->zbuf = MEM_mallocN(size, "addzbufImBuf")){ + if ( (ibuf->zbuf = MEM_mallocN(size, "addzbufImBuf")) ){ ibuf->mall |= IB_zbuf; return (TRUE); } @@ -145,7 +145,7 @@ short imb_addencodedbufferImBuf(struct ImBuf * ibuf) ibuf->encodedsize = 0; - if (ibuf->encodedbuffer = MEM_mallocN(ibuf->encodedbuffersize, "addencodedbufferImBuf")){ + if ( (ibuf->encodedbuffer = MEM_mallocN(ibuf->encodedbuffersize, "addencodedbufferImBuf") )){ ibuf->mall |= IB_mem; return (TRUE); } @@ -199,7 +199,7 @@ short imb_addrectImBuf(struct ImBuf * ibuf) imb_freerectImBuf(ibuf); size = ibuf->x * ibuf->y * sizeof(unsigned int); - if (ibuf->rect = MEM_mallocN(size, "imb_addrectImBuf")){ + if ( (ibuf->rect = MEM_mallocN(size, "imb_addrectImBuf")) ){ ibuf->mall |= IB_rect; if (ibuf->depth > 32) return (addzbufImBuf(ibuf)); else return (TRUE); @@ -219,7 +219,7 @@ short imb_addcmapImBuf(struct ImBuf *ibuf) imb_checkncols(ibuf); if (ibuf->maxcol == 0) return (TRUE); - if (ibuf->cmap = MEM_callocN(sizeof(unsigned int) * ibuf->maxcol, "imb_addcmapImBuf")){ + if ( (ibuf->cmap = MEM_callocN(sizeof(unsigned int) * ibuf->maxcol, "imb_addcmapImBuf") ) ){ min = ibuf->maxcol * sizeof(unsigned int); if (min > sizeof(dfltcmap)) min = sizeof(dfltcmap); memcpy(ibuf->cmap, dfltcmap, min); diff --git a/source/blender/imbuf/intern/amiga.c b/source/blender/imbuf/intern/amiga.c index a75df327e23..200fe004ff9 100644 --- a/source/blender/imbuf/intern/amiga.c +++ b/source/blender/imbuf/intern/amiga.c @@ -388,7 +388,7 @@ static uchar *readbody(struct ImBuf *ibuf, uchar *body) struct ImBuf *imb_loadamiga(int *iffmem,int flags) { - int chunk,totlen,len,*cmap=0,cmaplen,*mem,ftype=0; + int chunk,totlen,len,*cmap=0,cmaplen =0,*mem,ftype=0; uchar *body=0; struct BitMapHeader bmhd; struct ImBuf *ibuf=0; diff --git a/source/blender/imbuf/intern/anim5.c b/source/blender/imbuf/intern/anim5.c index aa2a5cf6469..9f87ba09f5f 100644 --- a/source/blender/imbuf/intern/anim5.c +++ b/source/blender/imbuf/intern/anim5.c @@ -47,6 +47,7 @@ #include "IMB_anim.h" +#include "IMB_anim5.h" typedef struct Anhd{ unsigned char type, mask; @@ -235,7 +236,7 @@ static void anim5decode(struct ImBuf * ibuf, uchar * dlta) { do{ uchar noop; - if (noop = *(point++)){ + if ( (noop = *(point++)) ){ uchar *plane; uchar code; @@ -308,7 +309,7 @@ static void anim5xordecode(struct ImBuf * ibuf, uchar * dlta) { do{ uchar noop; - if (noop = *(point++)){ + if ( (noop = *(point++)) ){ uchar *plane; uchar code; diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index 31f2b66cd83..55e02d521d5 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -182,14 +182,14 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, int size, int flags) } /* Couple of helper functions for writing our data */ -int putIntLSB(unsigned int ui,FILE *ofile) { +static int putIntLSB(unsigned int ui,FILE *ofile) { putc((ui>>0)&0xFF,ofile); putc((ui>>8)&0xFF,ofile); putc((ui>>16)&0xFF,ofile); return putc((ui>>24)&0xFF,ofile); } -int putShortLSB(unsigned short us,FILE *ofile) { +static int putShortLSB(unsigned short us,FILE *ofile) { putc((us>>0)&0xFF,ofile); return putc((us>>8)&0xFF,ofile); } diff --git a/source/blender/imbuf/intern/cspace.c b/source/blender/imbuf/intern/cspace.c index f994755c823..ef2f78644d5 100644 --- a/source/blender/imbuf/intern/cspace.c +++ b/source/blender/imbuf/intern/cspace.c @@ -37,6 +37,8 @@ #include "imbuf_patch.h" #include "IMB_imbuf_types.h" +void IMB_cspace(struct ImBuf *ibuf, float mat[][4]); + /************************************************************************/ /* COLORSPACE */ /************************************************************************/ diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 3603128ce44..6b46af30f8b 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -157,8 +157,10 @@ void IMB_gamwarp(struct ImBuf *ibuf, double gamma) rect = (uchar *) ibuf->rect; for (i = ibuf->x * ibuf->y ; i>0 ; i--){ rect ++; - *rect ++ = gam[*rect]; - *rect ++ = gam[*rect]; - *rect ++ = gam[*rect]; + /* put a warning in gcc : operation may be undefined : */ + /* it is true it's rather convoluted even by C standards ;) */ + *rect ++ = gam[*rect]; /*FIXME*/ + *rect ++ = gam[*rect]; /*FIXME*/ + *rect ++ = gam[*rect]; /*FIXME*/ } } diff --git a/source/blender/imbuf/intern/hamx.c b/source/blender/imbuf/intern/hamx.c index 4d75b0d86d6..c72e313c865 100644 --- a/source/blender/imbuf/intern/hamx.c +++ b/source/blender/imbuf/intern/hamx.c @@ -332,7 +332,7 @@ static short dec_hamx(struct ImBuf * ibuf, unsigned char *body, int cmap[]) struct ImBuf *imb_loadanim(int *iffmem, int flags) { int chunk, totlen, len, *mem, cmaplen = 0; - unsigned int *cmap; + unsigned int *cmap = NULL; uchar *body = 0; struct Adat adat; struct ImBuf *ibuf=0; diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 37f695e34a9..78263daa2f5 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -235,11 +235,11 @@ static void test_endian_zbuf(struct ImBuf *ibuf) struct ImBuf *imb_loadiris(unsigned char *mem, int flags) { - unsigned int *base, *lptr; + unsigned int *base, *lptr = NULL; unsigned int *zbase, *zptr; unsigned char *rledat; int *starttab, *lengthtab; - FILE *inf; + FILE *inf = NULL; IMAGE image; int x, y, z, tablen; int xsize, ysize, zsize; diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 729e95612f0..ddd81d55b68 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -67,7 +67,7 @@ /* this one is only def-ed once, strangely... */ #define GSS(x) (((uchar *)(x))[1] << 8 | ((uchar *)(x))[0]) -int IMB_ispic_name(char *name) +static int IMB_ispic_name(char *name) { struct stat st; int fp, buf[10]; diff --git a/source/blender/include/BDR_drawmesh.h b/source/blender/include/BDR_drawmesh.h index 6bb1dea3396..a6727198b23 100644 --- a/source/blender/include/BDR_drawmesh.h +++ b/source/blender/include/BDR_drawmesh.h @@ -67,7 +67,7 @@ int get_linear_mipmap(void); /** * Resets the realtime image cache variables. */ -void clear_realtime_image_cache(); +void clear_realtime_image_cache(void); void free_realtime_image(struct Image *ima); void free_all_realtime_images(void); diff --git a/source/blender/include/BDR_unwrapper.h b/source/blender/include/BDR_unwrapper.h index a75c85ac1ce..ffb1c6b7c5c 100644 --- a/source/blender/include/BDR_unwrapper.h +++ b/source/blender/include/BDR_unwrapper.h @@ -33,9 +33,9 @@ #ifndef BDR_UNWRAPPER_H #define BDR_UNWRAPPER_H -void set_seamtface(); /* set TF_SEAM flags in tfaces */ -void unwrap_lscm(); /* unwrap selected tfaces */ -void select_linked_tfaces_with_seams(); +void set_seamtface(void); /* set TF_SEAM flags in tfaces */ +void unwrap_lscm(void); /* unwrap selected tfaces */ +void select_linked_tfaces_with_seams(void); #endif /* BDR_UNWRAPPER_H */ diff --git a/source/blender/include/BIF_editfont.h b/source/blender/include/BIF_editfont.h index 4614403f52c..fe3604493f5 100644 --- a/source/blender/include/BIF_editfont.h +++ b/source/blender/include/BIF_editfont.h @@ -42,6 +42,7 @@ void remake_editText(void); void free_editText(void); void paste_editText(void); void txt_export_to_object(struct Text *text); +void txt_export_to_objects(struct Text *text); void undo_push_font(char *); /** diff --git a/source/blender/include/BIF_editview.h b/source/blender/include/BIF_editview.h index f1f918b83fd..1cbee01f99b 100644 --- a/source/blender/include/BIF_editview.h +++ b/source/blender/include/BIF_editview.h @@ -41,7 +41,7 @@ void borderselect(void); void circle_select(void); void deselectall(void); void selectall_type(short obtype); -void selectall_layer(int layernum); +void selectall_layer(unsigned int layernum); void draw_sel_circle(short *mval, short *mvalo, float rad, float rado, int selecting); void fly(void); int gesture(void); diff --git a/source/blender/include/BIF_fsmenu.h b/source/blender/include/BIF_fsmenu.h index 50b671c6f3d..b32dee01854 100644 --- a/source/blender/include/BIF_fsmenu.h +++ b/source/blender/include/BIF_fsmenu.h @@ -40,7 +40,7 @@ int fsmenu_get_nentries (void); /** Returns true if the fsmenu entry at @a index exists and * is a seperator. */ -char* fsmenu_is_entry_a_seperator (int index); +int fsmenu_is_entry_a_seperator (int index); /** Returns the fsmenu entry at @a index (or NULL if a bad index) * or a seperator. diff --git a/source/blender/include/BIF_mywindow.h b/source/blender/include/BIF_mywindow.h index 40896eec8ff..e365b6a9b6e 100644 --- a/source/blender/include/BIF_mywindow.h +++ b/source/blender/include/BIF_mywindow.h @@ -85,6 +85,7 @@ void bwin_load_winmatrix(int winid, float mat[][4]); void bwin_get_viewmatrix(int winid, float mat[][4]); void bwin_get_winmatrix(int winid, float mat[][4]); +void bwin_multmatrix(int winid, float mat[][4]); void bwin_scalematrix(int winid, float x, float y, float z); void bwin_ortho(int winid, float x1, float x2, float y1, float y2, float n, float f); diff --git a/source/blender/include/BIF_oops.h b/source/blender/include/BIF_oops.h index bf08e9f1380..5da088a5ea7 100644 --- a/source/blender/include/BIF_oops.h +++ b/source/blender/include/BIF_oops.h @@ -41,12 +41,14 @@ struct Material; struct Mesh; struct MetaBall; struct Object; +struct Lamp; void add_curve_oopslinks(struct Curve *cu, struct Oops *oops, short flag); void add_from_link(struct Oops *from, struct Oops *oops); void add_material_oopslinks(struct Material *ma, struct Oops *oops, short flag); void add_mball_oopslinks(struct MetaBall *mb, struct Oops *oops, short flag); void add_mesh_oopslinks(struct Mesh *me, struct Oops *oops, short flag); void add_object_oopslinks(struct Object *ob, struct Oops *oops, short flag); +void add_lamp_oopslinks(struct Lamp *la, struct Oops *oops, short flag); struct Oops *add_oops(void *id); struct OopsLink *add_oopslink(char *name, struct Oops *oops, short type, void *from, float xof, float yof); struct Oops *add_test_oops(void *id); /* incl links */ diff --git a/source/blender/include/BIF_transform.h b/source/blender/include/BIF_transform.h index d79753a71f8..5b4ef3e113e 100755 --- a/source/blender/include/BIF_transform.h +++ b/source/blender/include/BIF_transform.h @@ -65,10 +65,10 @@ void Transform(int mode); struct TransInfo; -struct TransInfo * BIF_GetTransInfo(); +struct TransInfo * BIF_GetTransInfo(void); void BIF_setSingleAxisConstraint(float vec[3]); -void BIF_drawConstraint(); -void BIF_drawPropCircle(); +void BIF_drawConstraint(void); +void BIF_drawPropCircle(void); #endif diff --git a/source/blender/include/BSE_drawview.h b/source/blender/include/BSE_drawview.h index c98f75e9a43..e7c2e1c9320 100644 --- a/source/blender/include/BSE_drawview.h +++ b/source/blender/include/BSE_drawview.h @@ -65,5 +65,8 @@ void end_anim_sumo(void); void inner_play_anim_loop(int init, int mode); int play_anim(int mode); + +void make_axis_color(char *col, char *col2, char axis); + #endif /* BSE_DRAWVIEW_H */ diff --git a/source/blender/include/BSE_headerbuttons.h b/source/blender/include/BSE_headerbuttons.h index 8642f2b7635..562f17609ae 100644 --- a/source/blender/include/BSE_headerbuttons.h +++ b/source/blender/include/BSE_headerbuttons.h @@ -66,8 +66,8 @@ struct Scene *copy_scene(struct Scene *sce, int level); void buttons_active_id(struct ID **id, struct ID **idfrom); -int start_progress_bar(); -void end_progress_bar(); +int start_progress_bar(void); +void end_progress_bar(void); int progress_bar(float done, char *busy_info); void update_for_newframe(void); diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index e6f71ac8bb4..e1028d75475 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -113,6 +113,10 @@ PyObject *importText( char *name ); void init_ourImport( void ); PyObject *blender_import( PyObject * self, PyObject * args ); +int BPY_txt_do_python_Text( struct Text *text ); +void BPY_Err_Handle( char *script_name ); +PyObject *traceback_getFilename( PyObject * tb ); + /**************************************************************************** * Description: This function will initialise Python and all the implemented * api variations. @@ -848,7 +852,7 @@ void BPY_free_finished_script( Script * script ) return; } -void unlink_script( Script * script ) +static void unlink_script( Script * script ) { /* copied from unlink_text in drawtext.c */ bScreen *scr; ScrArea *area; @@ -1095,7 +1099,7 @@ void BPY_free_scriptlink( struct ScriptLink *slink ) return; } -int CheckAllScriptsFromList( ListBase * list, Text * text ) +static int CheckAllScriptsFromList( ListBase * list, Text * text ) { ID *id; ScriptLink *scriptlink; diff --git a/source/blender/python/api2_2x/Blender.c b/source/blender/python/api2_2x/Blender.c index b677f09413e..7c93d540ceb 100644 --- a/source/blender/python/api2_2x/Blender.c +++ b/source/blender/python/api2_2x/Blender.c @@ -79,6 +79,9 @@ static PyObject *Blender_Load( PyObject * self, PyObject * args ); static PyObject *Blender_Save( PyObject * self, PyObject * args ); static PyObject *Blender_UpdateMenus( PyObject * self); +extern PyObject *Text3d_Init( void ); /* missing in some include */ + + /*****************************************************************************/ /* The following string definitions are used for documentation strings. */ /* In Python these will be written to the console when doing a */ diff --git a/source/blender/python/api2_2x/Bone.c b/source/blender/python/api2_2x/Bone.c index 5a3a2d014e1..686b791a846 100644 --- a/source/blender/python/api2_2x/Bone.c +++ b/source/blender/python/api2_2x/Bone.c @@ -233,7 +233,7 @@ PyObject *Bone_Init( void ) //--------------- Bone module internal callbacks----------------- //--------------- updatePyBone------------------------------------ -int updatePyBone( BPy_Bone * self ) +static int updatePyBone( BPy_Bone * self ) { int x, y; char *parent_str = ""; @@ -1691,7 +1691,7 @@ static PyObject *Bone_getRestMatrix( BPy_Bone * self, PyObject * args ) //use python vars if( BLI_streq( local, worldspace ) ) { VecSubf( delta, self->tail->vec, self->head->vec ); - make_boneMatrixvr( *( ( MatrixObject * ) matrix )-> + make_boneMatrixvr( (float ( * )[4]) *( ( MatrixObject * ) matrix )-> matrix, delta, self->roll ); } else if( BLI_streq( local, bonespace ) ) { return ( EXPP_ReturnPyObjError( PyExc_AttributeError, @@ -1701,12 +1701,12 @@ static PyObject *Bone_getRestMatrix( BPy_Bone * self, PyObject * args ) //use bone datastruct if( BLI_streq( local, worldspace ) ) { get_objectspace_bone_matrix( self->bone, - *( ( MatrixObject * ) + ( float ( * )[4] ) *( ( MatrixObject * ) matrix )->matrix, 1, 1 ); } else if( BLI_streq( local, bonespace ) ) { VecSubf( delta, self->bone->tail, self->bone->head ); - make_boneMatrixvr( *( ( MatrixObject * ) matrix )-> + make_boneMatrixvr( (float ( * )[4]) *( ( MatrixObject * ) matrix )-> matrix, delta, self->bone->roll ); if( self->bone->parent ) { get_bone_root_pos( self->bone, root, 1 ); diff --git a/source/blender/python/api2_2x/Build.c b/source/blender/python/api2_2x/Build.c index a5c4c34219b..9cd9502cdeb 100644 --- a/source/blender/python/api2_2x/Build.c +++ b/source/blender/python/api2_2x/Build.c @@ -43,6 +43,9 @@ #include +/* prototypes */ +PyObject *Build_Init( void ); + /*****************************************************************************/ /* Python BPy_Build methods table: */ /*****************************************************************************/ diff --git a/source/blender/python/api2_2x/Camera.c b/source/blender/python/api2_2x/Camera.c index ae9b07e9b45..5db45ad16e9 100644 --- a/source/blender/python/api2_2x/Camera.c +++ b/source/blender/python/api2_2x/Camera.c @@ -120,6 +120,9 @@ static PyObject *Camera_getScriptLinks( BPy_Camera * self, PyObject * args ); static PyObject *Camera_addScriptLink( BPy_Camera * self, PyObject * args ); static PyObject *Camera_clearScriptLinks( BPy_Camera * self ); +Camera *GetCameraByName( char *name ); + + /*****************************************************************************/ /* Python BPy_Camera methods table: */ /*****************************************************************************/ diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c index 3ff60b65886..80a0a39ef5f 100644 --- a/source/blender/python/api2_2x/Ipo.c +++ b/source/blender/python/api2_2x/Ipo.c @@ -456,7 +456,7 @@ static PyObject *Ipo_getNcurves( BPy_Ipo * self ) stiv 6-jan-2004 */ -int Ipo_laIcuName( char *s, int *param ) +static int Ipo_laIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "Energy" ) ) { @@ -502,7 +502,7 @@ int Ipo_laIcuName( char *s, int *param ) return ok; } -int Ipo_woIcuName( char *s, int *param ) +static int Ipo_woIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "HorR" ) ) { @@ -572,7 +572,7 @@ int Ipo_woIcuName( char *s, int *param ) return ok; } -int Ipo_maIcuName( char *s, int *param ) +static int Ipo_maIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "R" ) ) { @@ -682,7 +682,7 @@ int Ipo_maIcuName( char *s, int *param ) return ok; } -int Ipo_keIcuName( char *s, int *param ) +static int Ipo_keIcuName( char *s, int *param ) { char key[10]; int ok = 0; @@ -703,7 +703,7 @@ int Ipo_keIcuName( char *s, int *param ) return ok; } -int Ipo_seqIcuName( char *s, int *param ) +static int Ipo_seqIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "Fac" ) ) { @@ -714,7 +714,7 @@ int Ipo_seqIcuName( char *s, int *param ) return ok; } -int Ipo_cuIcuName( char *s, int *param ) +static int Ipo_cuIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "Speed" ) ) { @@ -725,7 +725,7 @@ int Ipo_cuIcuName( char *s, int *param ) return ok; } -int Ipo_coIcuName( char *s, int *param ) +static int Ipo_coIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "Inf" ) ) { @@ -736,7 +736,7 @@ int Ipo_coIcuName( char *s, int *param ) return ok; } -int Ipo_acIcuName( char *s, int *param ) +static int Ipo_acIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "LocX" ) ) { @@ -782,7 +782,7 @@ int Ipo_acIcuName( char *s, int *param ) return ok; } -int Ipo_caIcuName( char *s, int *param ) +static int Ipo_caIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "Lens" ) ) { @@ -800,7 +800,7 @@ int Ipo_caIcuName( char *s, int *param ) return ok; } -int Ipo_texIcuName( char *s, int *param ) +static int Ipo_texIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "NSize" ) ) { @@ -891,7 +891,7 @@ int Ipo_texIcuName( char *s, int *param ) return ok; } -int Ipo_obIcuName( char *s, int *param ) +static int Ipo_obIcuName( char *s, int *param ) { int ok = 0; if( !strcmp( s, "LocX" ) ) { diff --git a/source/blender/python/api2_2x/Library.c b/source/blender/python/api2_2x/Library.c index a8edd6c147b..0b72b732d25 100644 --- a/source/blender/python/api2_2x/Library.c +++ b/source/blender/python/api2_2x/Library.c @@ -65,6 +65,10 @@ static PyObject *M_Library_Datablocks( PyObject * self, PyObject * args ); static PyObject *M_Library_Load( PyObject * self, PyObject * args ); static PyObject *M_Library_LinkableGroups( PyObject * self ); +PyObject *Library_Init( void ); +void EXPP_Library_Close( void ); + + /** * Module doc strings. */ diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c index 90a78a5f60a..b633066401e 100644 --- a/source/blender/python/api2_2x/Material.c +++ b/source/blender/python/api2_2x/Material.c @@ -161,6 +161,10 @@ static PyObject *M_Material_New( PyObject * self, PyObject * args, PyObject * keywords ); static PyObject *M_Material_Get( PyObject * self, PyObject * args ); +/* Not exposed nor used */ +Material *GetMaterialByName( char *name ); + + /*****************************************************************************/ /* The following string definitions are used for documentation strings. */ /* In Python these will be written to the console when doing a */ diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c index ba7729267fa..b1173799aa8 100644 --- a/source/blender/python/api2_2x/NMesh.c +++ b/source/blender/python/api2_2x/NMesh.c @@ -377,7 +377,7 @@ static int NMCol_setattr( PyObject * self, char *name, PyObject * v ) return 0; } -PyObject *NMCol_repr( BPy_NMCol * self ) +static PyObject *NMCol_repr( BPy_NMCol * self ) { static char s[256]; sprintf( s, "[NMCol - <%d, %d, %d, %d>]", self->r, self->g, self->b, @@ -2362,7 +2362,7 @@ static int check_validFaceUV( BPy_NMesh * nmesh ) } /* this is a copy of unlink_mesh in mesh.c, because ... */ -void EXPP_unlink_mesh( Mesh * me ) +static void EXPP_unlink_mesh( Mesh * me ) { int a; diff --git a/source/blender/python/api2_2x/NMesh.h b/source/blender/python/api2_2x/NMesh.h index 3041f9f0447..19b02cf6249 100644 --- a/source/blender/python/api2_2x/NMesh.h +++ b/source/blender/python/api2_2x/NMesh.h @@ -64,10 +64,10 @@ struct BPy_Object; /* These are from blender/src/editdeform.c, should be declared elsewhere, * maybe in BIF_editdeform.h, after proper testing of vgrouping methods XXX */ -void create_dverts( Mesh * me ); -void add_vert_defnr( Object * ob, int def_nr, int vertnum, float weight, +extern void create_dverts( Mesh * me ); +extern void add_vert_defnr( Object * ob, int def_nr, int vertnum, float weight, int assignmode ); -void remove_vert_def_nr( Object * ob, int def_nr, int vertnum ); +extern void remove_vert_def_nr( Object * ob, int def_nr, int vertnum ); diff --git a/source/blender/python/api2_2x/Noise.c b/source/blender/python/api2_2x/Noise.c index 15e830ae580..8182201d076 100644 --- a/source/blender/python/api2_2x/Noise.c +++ b/source/blender/python/api2_2x/Noise.c @@ -59,6 +59,8 @@ static int left = 1; static int initf = 0; static unsigned long *next; +PyObject *Noise_Init(void); + /* initializes state[N] with a seed */ static void init_genrand( unsigned long s ) { @@ -603,7 +605,7 @@ static PyMethodDef NoiseMethods[] = { /*----------------------------------------------------------------------*/ -PyObject *Noise_Init( ) +PyObject *Noise_Init(void) { PyObject *NoiseTypes, *DistanceMetrics, *md = diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 649b545ae57..638afb49eae 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -63,6 +63,10 @@ static PyObject *M_Object_New( PyObject * self, PyObject * args ); PyObject *M_Object_Get( PyObject * self, PyObject * args ); static PyObject *M_Object_GetSelected( PyObject * self, PyObject * args ); +extern int Text3d_CheckPyObject( PyObject * py_obj ); +extern struct Text3d *Text3d_FromPyObject( PyObject * py_obj ); + + /*****************************************************************************/ /* The following string definitions are used for documentation strings. */ /* In Python these will be written to the console when doing a */ @@ -908,7 +912,7 @@ static PyObject *Object_getInverseMatrix( BPy_Object * self ) { MatrixObject *inverse = ( MatrixObject * ) newMatrixObject( NULL, 4, 4 ); - Mat4Invert( *inverse->matrix, self->object->obmat ); + Mat4Invert( (float ( * )[4])*inverse->matrix, self->object->obmat ); return ( ( PyObject * ) inverse ); } @@ -968,14 +972,14 @@ static PyObject *Object_getMatrix( BPy_Object * self, PyObject * args ) disable_where_script( 1 ); where_is_object( self->object ); disable_where_script( 0 ); - Mat4CpyMat4( *( ( MatrixObject * ) matrix )->matrix, + Mat4CpyMat4((float ( * )[4]) *( ( MatrixObject * ) matrix )->matrix, self->object->obmat ); } else if( BLI_streq( space, "localspace" ) ) { /* Localspace matrix */ object_to_mat4( self->object, - *( ( MatrixObject * ) matrix )->matrix ); + ( float ( * )[4] ) *( ( MatrixObject * ) matrix )->matrix ); /* old behavior, prior to 2.34, check this method's doc string: */ } else if( BLI_streq( space, "old_worldspace" ) ) { - Mat4CpyMat4( *( ( MatrixObject * ) matrix )->matrix, + Mat4CpyMat4( (float ( * )[4]) *( ( MatrixObject * ) matrix )->matrix, self->object->obmat ); } else { return ( EXPP_ReturnPyObjError( PyExc_RuntimeError, diff --git a/source/blender/python/api2_2x/Particle.c b/source/blender/python/api2_2x/Particle.c index c080bc5df93..6d8c0edc8f5 100644 --- a/source/blender/python/api2_2x/Particle.c +++ b/source/blender/python/api2_2x/Particle.c @@ -124,6 +124,9 @@ static PyMethodDef BPy_Particle_methods[] = { {NULL, NULL, 0, NULL} }; +/**************** prototypes ********************/ +PyObject *Particle_Init( void ); + /*****************************************************************************/ /* Python Particle_Type structure definition: */ diff --git a/source/blender/python/api2_2x/Sound.c b/source/blender/python/api2_2x/Sound.c index eb8b5094b58..86857ee453b 100644 --- a/source/blender/python/api2_2x/Sound.c +++ b/source/blender/python/api2_2x/Sound.c @@ -153,9 +153,12 @@ static PyMethodDef BPy_Sound_methods[] = { "() - play this sound"}, {"setCurrent", ( PyCFunction ) Sound_setCurrent, METH_NOARGS, "() - make this the active sound in the sound buttons win (also redraws)"}, - //{"reload", ( PyCFunction ) Sound_setCurrent, METH_NOARGS, - //"() - reload this Sound object's sample.\n\ -//This is only useful if the original sound file has changed."}, + +/* + {"reload", ( PyCFunction ) Sound_setCurrent, METH_NOARGS, + "() - reload this Sound object's sample.\n\ + This is only useful if the original sound file has changed."}, +*/ SOUND_FLOAT_METHOD_FUNCS( Volume ) SOUND_FLOAT_METHOD_FUNCS( Attenuation ) SOUND_FLOAT_METHOD_FUNCS( Pitch ) diff --git a/source/blender/python/api2_2x/Sys.c b/source/blender/python/api2_2x/Sys.c index 2d8ae8febfc..5af539ac881 100644 --- a/source/blender/python/api2_2x/Sys.c +++ b/source/blender/python/api2_2x/Sys.c @@ -37,6 +37,7 @@ #include #include "gen_utils.h" +#include "Sys.h" /*****************************************************************************/ /* Python API function prototypes for the sys module. */ diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c index aee86f20f63..59e62c644b7 100644 --- a/source/blender/python/api2_2x/Text3d.c +++ b/source/blender/python/api2_2x/Text3d.c @@ -34,6 +34,8 @@ #include "DNA_view3d_types.h" #include "DNA_vfont_types.h" +#include "MEM_guardedalloc.h" + #include "BKE_object.h" #include "BDR_editobject.h" #include "BKE_displist.h" @@ -140,8 +142,13 @@ struct PyMethodDef M_Text3d_methods[] = { /*****************************************************************************/ /* Python BPy_Text3d methods declarations: */ +/* extern prototypes */ /*****************************************************************************/ -static PyObject *Text2Text3d( BPy_Text3d * self, PyObject * args ); +/*static PyObject *Text2Text3d( BPy_Text3d * self, PyObject * args );*/ /*unused nor defined*/ +extern void freedisplist(struct ListBase *lb); +extern VFont *get_builtin_font(void); +int Text3d_CheckPyObject( PyObject * py_obj ); +struct Text3d *Text3d_FromPyObject( PyObject * py_obj ); /* @@ -326,7 +333,7 @@ struct Text3d *Text3d_FromPyObject( PyObject * py_obj ) BPy_Text3d *blen_obj; blen_obj = ( BPy_Text3d * ) py_obj; - return ((Text3d*) blen_obj->curve ); + return ((struct Text3d*) blen_obj->curve ); } static PyObject *Text3d_getName( BPy_Text3d * self ) diff --git a/source/blender/python/api2_2x/Wave.c b/source/blender/python/api2_2x/Wave.c index 2b73c025251..fecc3d0d4a4 100644 --- a/source/blender/python/api2_2x/Wave.c +++ b/source/blender/python/api2_2x/Wave.c @@ -33,6 +33,8 @@ #include "Wave.h" #include "Effect.h" +/******* prototypes **********/ +PyObject *Wave_Init( void ); /*****************************************************************************/ /* Python BPy_Wave methods table: */ diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c index b8be06e4db2..9543bdd2034 100644 --- a/source/blender/python/api2_2x/Window.c +++ b/source/blender/python/api2_2x/Window.c @@ -108,6 +108,8 @@ static PyObject *M_Window_GetScreens( PyObject * self ); static PyObject *M_Window_SetScreen( PyObject * self, PyObject * args ); static PyObject *M_Window_GetScreenInfo( PyObject * self, PyObject * args, PyObject * kwords ); +PyObject *Window_Init( void ); + /*****************************************************************************/ /* The following string definitions are used for documentation strings. */ diff --git a/source/blender/python/api2_2x/logic.c b/source/blender/python/api2_2x/logic.c index c48039aab4b..3ab543c2750 100644 --- a/source/blender/python/api2_2x/logic.c +++ b/source/blender/python/api2_2x/logic.c @@ -150,7 +150,7 @@ int updateProperyData( BPy_Property * self ) } //--------------- checkValidData_ptr-------------------------------- -int checkValidData_ptr( BPy_Property * self ) +static int checkValidData_ptr( BPy_Property * self ) { int length; //test pointer to see if data was removed (oops) diff --git a/source/blender/python/api2_2x/matrix.c b/source/blender/python/api2_2x/matrix.c index 33dc4da49b6..82391c0c9e5 100644 --- a/source/blender/python/api2_2x/matrix.c +++ b/source/blender/python/api2_2x/matrix.c @@ -341,7 +341,7 @@ PyObject *Matrix_Invert( MatrixObject * self ) self->matrix[2][0], self->matrix[2][1], self->matrix[2][2] ); } else if( self->rowSize == 4 ) { - det = Det4x4( *self->matrix ); + det = Det4x4( (float ( * )[4]) *self->matrix ); } else { return EXPP_ReturnPyObjError( PyExc_StandardError, "error calculating determinant for inverse()\n" ); @@ -370,7 +370,7 @@ PyObject *Matrix_Invert( MatrixObject * self ) ( PyExc_MemoryError, "problem allocating mat\n\n" ) ); } - Mat3Adj( ( float ( * )[3] ) mat, *self->matrix ); + Mat3Adj( ( float ( * )[3] ) mat,( float ( * )[3] ) *self->matrix ); } else if( self->rowSize == 4 ) { mat = PyMem_Malloc( self->rowSize * self->colSize * sizeof( float ) ); @@ -379,7 +379,7 @@ PyObject *Matrix_Invert( MatrixObject * self ) ( PyExc_MemoryError, "problem allocating mat\n\n" ) ); } - Mat4Adj( ( float ( * )[4] ) mat, *self->matrix ); + Mat4Adj( ( float ( * )[4] ) mat, ( float ( * )[4] ) *self->matrix ); } //divide by determinate for( x = 0; x < ( self->rowSize * self->colSize ); x++ ) { @@ -437,7 +437,7 @@ PyObject *Matrix_Determinant( MatrixObject * self ) self->matrix[2][0], self->matrix[2][1], self->matrix[2][2] ); } else if( self->rowSize == 4 ) { - det = Det4x4( *self->matrix ); + det = Det4x4( (float ( * )[4]) *self->matrix ); } else { return EXPP_ReturnPyObjError( PyExc_StandardError, "error in determinant()\n" ); @@ -458,9 +458,9 @@ PyObject *Matrix_Transpose( MatrixObject * self ) self->matrix[1][0] = self->matrix[0][1]; self->matrix[0][1] = t; } else if( self->rowSize == 3 ) { - Mat3Transp( *self->matrix ); + Mat3Transp( (float ( * )[3])*self->matrix ); } else if( self->rowSize == 4 ) { - Mat4Transp( *self->matrix ); + Mat4Transp( (float ( * )[4])*self->matrix ); } else return ( EXPP_ReturnPyObjError( PyExc_TypeError, "unable to transpose matrix\n" ) ); @@ -492,9 +492,9 @@ PyObject *Matrix_Identity( MatrixObject * self ) self->matrix[1][0] = 0.0f; self->matrix[1][1] = 1.0f; } else if( self->rowSize == 3 ) { - Mat3One( *self->matrix ); + Mat3One( ( float ( * )[3] ) *self->matrix ); } else if( self->rowSize == 4 ) { - Mat4One( *self->matrix ); + Mat4One( ( float ( * )[4] ) *self->matrix ); } else return ( EXPP_ReturnPyObjError( PyExc_TypeError, "unable to create identity matrix\n" ) ); @@ -668,7 +668,7 @@ static int Matrix_len( MatrixObject * self ) return ( self->colSize * self->rowSize ); } -PyObject *Matrix_add( PyObject * m1, PyObject * m2 ) +static PyObject *Matrix_add( PyObject * m1, PyObject * m2 ) { float *mat; int matSize, rowSize, colSize, x, y; @@ -710,7 +710,7 @@ PyObject *Matrix_add( PyObject * m1, PyObject * m2 ) return newMatrixObject( mat, rowSize, colSize ); } -PyObject *Matrix_sub( PyObject * m1, PyObject * m2 ) +static PyObject *Matrix_sub( PyObject * m1, PyObject * m2 ) { float *mat; int matSize, rowSize, colSize, x, y; @@ -752,7 +752,7 @@ PyObject *Matrix_sub( PyObject * m1, PyObject * m2 ) return newMatrixObject( mat, rowSize, colSize ); } -PyObject *Matrix_mul( PyObject * m1, PyObject * m2 ) +static PyObject *Matrix_mul( PyObject * m1, PyObject * m2 ) { PyObject *retval; int matSizeV, rowSizeV, colSizeV, rowSizeW, colSizeW, matSizeW, x, y,z; @@ -830,7 +830,7 @@ PyObject *Matrix_mul( PyObject * m1, PyObject * m2 ) } //coercion of unknown types to type MatrixObject for numeric protocols -int Matrix_coerce( PyObject ** m1, PyObject ** m2 ) +static int Matrix_coerce( PyObject ** m1, PyObject ** m2 ) { long *tempI; double *tempF; diff --git a/source/blender/python/api2_2x/quat.c b/source/blender/python/api2_2x/quat.c index e87050b29ea..35ef90aca2d 100644 --- a/source/blender/python/api2_2x/quat.c +++ b/source/blender/python/api2_2x/quat.c @@ -64,6 +64,13 @@ struct PyMethodDef Quaternion_methods[] = { {NULL, NULL, 0, NULL} }; +/* ****** prototypes ********** */ +PyObject *Quaternion_add( PyObject * q1, PyObject * q2 ); +PyObject *Quaternion_sub( PyObject * q1, PyObject * q2 ); +PyObject *Quaternion_mul( PyObject * q1, PyObject * q2 ); +int Quaternion_coerce( PyObject ** q1, PyObject ** q2 ); + + /*****************************/ // Quaternion Python Object /*****************************/ diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c index bcfb495b238..70d0c676dcd 100644 --- a/source/blender/python/api2_2x/sceneRender.c +++ b/source/blender/python/api2_2x/sceneRender.c @@ -893,7 +893,7 @@ PyObject *RenderData_Play( BPy_RenderData * self ) if( self->renderContext->imtype == R_QUICKTIME ) { strcpy( file, self->renderContext->pic ); - BLI_convertstringcode( file, self->scene, + BLI_convertstringcode( file, (char *) self->scene, self->renderContext->cfra ); RE_make_existing_file( file ); if( strcasecmp( file + strlen( file ) - 4, ".mov" ) ) { diff --git a/source/blender/python/api2_2x/vector.c b/source/blender/python/api2_2x/vector.c index d7b2f8c8f74..9e65de3c46d 100644 --- a/source/blender/python/api2_2x/vector.c +++ b/source/blender/python/api2_2x/vector.c @@ -55,6 +55,14 @@ struct PyMethodDef Vector_methods[] = { {NULL, NULL, 0, NULL} }; +/******prototypes*************/ +PyObject *Vector_add( PyObject * v1, PyObject * v2 ); +PyObject *Vector_sub( PyObject * v1, PyObject * v2 ); +PyObject *Vector_mul( PyObject * v1, PyObject * v2 ); +PyObject *Vector_div( PyObject * v1, PyObject * v2 ); +int Vector_coerce( PyObject ** v1, PyObject ** v2 ); + + /*****************************/ // Vector Python Object /*****************************/ diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index 2b455277122..dd97cec736b 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -112,13 +112,13 @@ static struct QuicktimeComponentData *qtdata; static int sframe; -void CheckError(OSErr err, char *msg) +static void CheckError(OSErr err, char *msg) { if(err != noErr) printf("%s: %d\n", msg, err); } -OSErr QT_SaveCodecSettingsToScene(void) +static OSErr QT_SaveCodecSettingsToScene(void) { QTAtomContainer myContainer = NULL; ComponentResult myErr = noErr; @@ -179,7 +179,7 @@ bail: } -OSErr QT_GetCodecSettingsFromScene(void) +static OSErr QT_GetCodecSettingsFromScene(void) { Handle myHandle = NULL; ComponentResult myErr = noErr; @@ -221,7 +221,7 @@ bail: } -OSErr QT_AddUserDataTextToMovie (Movie theMovie, char *theText, OSType theType) +static OSErr QT_AddUserDataTextToMovie (Movie theMovie, char *theText, OSType theType) { UserData myUserData = NULL; Handle myHandle = NULL; diff --git a/source/blender/quicktime/apple/quicktime_import.c b/source/blender/quicktime/apple/quicktime_import.c index 1636d9429a4..99618bc3583 100644 --- a/source/blender/quicktime/apple/quicktime_import.c +++ b/source/blender/quicktime/apple/quicktime_import.c @@ -236,7 +236,7 @@ void free_anim_quicktime (struct anim *anim) { } -OSErr QT_get_frameIndexes(struct anim *anim) +static OSErr QT_get_frameIndexes(struct anim *anim) { int i; OSErr anErr = noErr; @@ -348,7 +348,7 @@ ImBuf * qtime_fetchibuf (struct anim *anim, int position) // following two functions only here to get movie pixeldepth -int GetFirstVideoMedia(struct anim *anim) +static int GetFirstVideoMedia(struct anim *anim) { long numTracks; OSType mediaType; @@ -370,10 +370,10 @@ int GetFirstVideoMedia(struct anim *anim) return 0; // went through all tracks and no video } -short GetFirstVideoTrackPixelDepth(struct anim *anim) +static short GetFirstVideoTrackPixelDepth(struct anim *anim) { SampleDescriptionHandle imageDescH = (SampleDescriptionHandle)NewHandle(sizeof(Handle)); - long trackIndex = 0; +// long trackIndex = 0; /*unused*/ if(!GetFirstVideoMedia(anim)) return -1; @@ -507,14 +507,16 @@ int imb_is_a_quicktime (char *name) GraphicsImportComponent theImporter = NULL; FSSpec theFSSpec; - Str255 dst; +#ifdef _WIN32 + Str255 dst; /*unused*/ +#endif char theFullPath[255]; - Boolean isMovieFile = false; - AliasHandle myAlias = NULL; - Component myImporter = NULL; +// Boolean isMovieFile = false; /*unused*/ +// AliasHandle myAlias = NULL; /*unused*/ +// Component myImporter = NULL; /*unused*/ #ifdef __APPLE__ - FInfo myFinderInfo; +// FInfo myFinderInfo; /*unused*/ FSRef myRef; #endif OSErr err = noErr; @@ -564,7 +566,7 @@ ImBuf *imb_quicktime_decode(unsigned char *mem, int size, int flags) int x, y, depth; int have_gw = FALSE; ImBuf *ibuf = NULL; - ImBuf *imbuf = NULL; +// ImBuf *imbuf = NULL; /*unused*/ GWorldPtr offGWorld; PixMapHandle myPixMap = NULL; diff --git a/source/blender/radiosity/intern/source/radrender.c b/source/blender/radiosity/intern/source/radrender.c index 6c94d3f8da9..50b9569c09f 100644 --- a/source/blender/radiosity/intern/source/radrender.c +++ b/source/blender/radiosity/intern/source/radrender.c @@ -308,7 +308,7 @@ static void progressiverad_rr() static RadFace *radfaces=NULL; -void initradfaces() +static void initradfaces(void) { VlakRen *vlr= NULL; RadFace *rf; @@ -399,8 +399,9 @@ static void vecaddfac(float *vec, float *v1, float *v2, float fac) } +#if 0 /* unused now, doesnt work... */ -void filter_rad_values() +static void filter_rad_values(void) { VlakRen *vlr=NULL; VertRen *v1=NULL; @@ -485,6 +486,7 @@ void filter_rad_values() } } +#endif static void make_vertex_rad_values() { diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index 64b48a4cee0..133775cd402 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -366,7 +366,7 @@ static void env_layerflags(unsigned int notlay) } } -void env_hideobject(Object *ob) +static void env_hideobject(Object *ob) { VlakRen *vlr = NULL; int a; diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c index 7dc80ca862d..8c0a022b036 100644 --- a/source/blender/render/intern/source/initrender.c +++ b/source/blender/render/intern/source/initrender.c @@ -831,7 +831,7 @@ static void add_to_blurbuf(int blur) /* yafray: main yafray render/export call */ -void yafrayRender() +static void yafrayRender(void) { R.flag |= R_RENDERING; /* !!! */ diff --git a/source/blender/render/intern/source/ray.c b/source/blender/render/intern/source/ray.c index a80e3a5f088..8a856883752 100644 --- a/source/blender/render/intern/source/ray.c +++ b/source/blender/render/intern/source/ray.c @@ -116,6 +116,12 @@ static Octree g_oc; /* can be scene pointer or so later... */ static int raycount, branchcount, nodecount; static int accepted, rejected, coherent_ray; +/* prototypes ------------------------ */ +void freeoctree(void); +void makeoctree(void); +float *test_jitter(int resol, int iter, float xsize, float ysize); +int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr); + /* **************** ocval method ******************* */ /* within one octree node, a set of 3x15 bits defines a 'boundbox' to OR with */ @@ -447,7 +453,7 @@ void freeoctree(void) nodecount= 0; } -void makeoctree() +void makeoctree(void) { VlakRen *vlr=NULL; VertRen *v1, *v2, *v3, *v4; @@ -1848,7 +1854,7 @@ int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr) } /* aolight: function to create random unit sphere vectors for total random sampling */ -void RandomSpherical(float *v) +static void RandomSpherical(float *v) { float r; v[2] = 2.f*BLI_frand()-1.f; diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index b6dd50cef92..75f106be7ab 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -841,7 +841,7 @@ float Toon_Diff( float *n, float *l, float *v, float size, float smooth ) /* 'nl' is either dot product, or return value of area light */ /* in latter case, only last multiplication uses 'nl' */ -float OrenNayar_Diff_i(float nl, float *n, float *l, float *v, float rough ) +static float OrenNayar_Diff_i(float nl, float *n, float *l, float *v, float rough ) { float i, nh, nv, vh, realnl, h[3]; float a, b, t, A, B; diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index d8d2c86575d..ffba9ccbea3 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -79,6 +79,8 @@ #include "envmap.h" #include "texture.h" +/* prototypes */ +static int calcimanr(int cfra, Tex *tex); /* ------------------------------------------------------------------------- */ diff --git a/source/blender/render/intern/source/vanillaRenderPipe.c b/source/blender/render/intern/source/vanillaRenderPipe.c index e06abb0ef37..500da84dedb 100644 --- a/source/blender/render/intern/source/vanillaRenderPipe.c +++ b/source/blender/render/intern/source/vanillaRenderPipe.c @@ -1092,7 +1092,8 @@ static void renderZBufLine(int y, RE_COLBUFTYPE *colbuf1, RE_COLBUFTYPE *colbuf2 static int zBufferAllFaces(void) { VlakRen *vlr=NULL; - unsigned int zvlnr, faceCounter; + unsigned int zvlnr; + int faceCounter; int keepLooping = 1; float vec[3], hoco[4], mul, zval, fval; Material *ma=0; @@ -1163,7 +1164,7 @@ static int zBufferAllFaces(void) static int zBufferAllHalos(void) { HaloRen *har = NULL; - unsigned int haloCounter = 0; + int haloCounter = 0; int dist = 0; int keepLooping = 1; short miny = 0, maxy = 0, minx = 0, maxx = 0; @@ -1238,7 +1239,7 @@ static int fillZBufDistances() - +#if 0 /* ------------------------------------------------------------------------- */ /** * One more filler: fill in halo data in z buffer. @@ -1248,7 +1249,7 @@ void zBufferFillHalo(void) { /* so far, intentionally empty */ } - +#endif /* ------------------------------------------------------------------------- */ /* Colour buffer related: */ diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index 1049428b228..8d9b35b6527 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -169,7 +169,7 @@ int RE_testclip(float *v) /*-APixstr---------------------(antialised pixel struct)------------------------------*/ -APixstr *addpsmainA() +static APixstr *addpsmainA() { APixstrMain *psm; @@ -189,7 +189,7 @@ APixstr *addpsmainA() return psm->ps; } -void freepsA() +static void freepsA() { APixstrMain *psm, *next; @@ -210,7 +210,7 @@ void freepsA() apsmteller= 0; } -APixstr *addpsA(void) +static APixstr *addpsA(void) { static APixstr *prev; @@ -232,7 +232,7 @@ APixstr *addpsA(void) * @param v2 [4 floats, world coordinates] second vertex * @param v3 [4 floats, world coordinates] third vertex */ -void zbufinvulAc(int zvlnr, float *v1, float *v2, float *v3) +static void zbufinvulAc(int zvlnr, float *v1, float *v2, float *v3) { APixstr *ap, *apofs, *apn; double x0,y0,z0,x1,y1,z1,x2,y2,z2,xx1; @@ -478,7 +478,7 @@ void zbufinvulAc(int zvlnr, float *v1, float *v2, float *v3) } } -void zbuflineAc(int zvlnr, float *vec1, float *vec2) +static void zbuflineAc(int zvlnr, float *vec1, float *vec2) { APixstr *ap, *apn; int *rectz; @@ -650,7 +650,7 @@ static void hoco_to_zco(float *zco, float *hoco) zco[2]= 0x7FFFFFFF *(hoco[2]/deler); } -void zbufline(int zvlnr, float *vec1, float *vec2) +static void zbufline(int zvlnr, float *vec1, float *vec2) { int *rectz, *rectp; int start, end, x, y, oldx, oldy, ofs; diff --git a/source/blender/renderconverter/SConscript b/source/blender/renderconverter/SConscript index ac3212eb9ec..f0da2bd5f1f 100644 --- a/source/blender/renderconverter/SConscript +++ b/source/blender/renderconverter/SConscript @@ -8,6 +8,8 @@ source_files = ['intern/convertBlenderScene.c'] renderconv_env.Append (CPPPATH = ['.', '../blenlib', + '../yafray', + '../radiosity/extern/include', '#/intern/guardedalloc', '../makesdna', '../blenkernel', diff --git a/source/blender/renderconverter/intern/Makefile b/source/blender/renderconverter/intern/Makefile index 7c99fbfc430..33a462d6e63 100644 --- a/source/blender/renderconverter/intern/Makefile +++ b/source/blender/renderconverter/intern/Makefile @@ -47,6 +47,8 @@ CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I.. # not very neat: the dirs for external modules CPPFLAGS += -I../../render/extern/include +CPPFLAGS += -I../../yafray +CPPFLAGS += -I../../radiosity/extern/include CPPFLAGS += -I../../python CPPFLAGS += -I../../blenkernel CPPFLAGS += -I../../blenlib diff --git a/source/blender/renderconverter/intern/convertBlenderScene.c b/source/blender/renderconverter/intern/convertBlenderScene.c index 0a582a079cd..5d97d968880 100644 --- a/source/blender/renderconverter/intern/convertBlenderScene.c +++ b/source/blender/renderconverter/intern/convertBlenderScene.c @@ -107,9 +107,10 @@ #include "butspace.h" -#ifdef HAVE_CONFIG_H -#include -#endif +#include "radio.h" +#include "YafRay_Api.h" + +extern void error (char *fmt, ...); /* defined in BIF_toolbox.h, but we dont need to include the rest */ /* yafray: Identity transform 'hack' removed, exporter now transforms vertices back to world. * Same is true for lamp coords & vec. @@ -126,7 +127,7 @@ static Material *give_render_material(Object *ob, int nr); /* blenderWorldManipulation.c */ -static void split_u_renderfaces(int startvlak, int startvert, int usize, int plek, int cyclu); +/*static void split_u_renderfaces(int startvlak, int startvert, int usize, int plek, int cyclu);*/ static void split_v_renderfaces(int startvlak, int startvert, int usize, int vsize, int plek, int cyclu, int cyclv); static int contrpuntnormr(float *n, float *puno); static void as_addvert(VertRen *v1, VlakRen *vlr); @@ -350,6 +351,7 @@ static HaloRen *initstar(float *vec, float hasize) /* ------------------------------------------------------------------------- */ +#if 0 static void split_u_renderfaces(int startvlak, int startvert, int usize, int plek, int cyclu) { VlakRen *vlr; @@ -376,6 +378,7 @@ static void split_u_renderfaces(int startvlak, int startvert, int usize, int ple } } +#endif /* ------------------------------------------------------------------------- */ @@ -1034,7 +1037,7 @@ static void render_static_particle_system(Object *ob, PartEff *paf) VECCOPY(v1->co, vec); } else { - float cvec[3]={-1.0, 0.0, 0.0}; +// float cvec[3]={-1.0, 0.0, 0.0}; vlr= RE_findOrAddVlak(R.totvlak++); vlr->ob= vlr_set_ob(ob); @@ -1287,21 +1290,21 @@ static void init_render_mball(Object *ob) static void init_render_mesh(Object *ob) { Mesh *me; - MVert *mvert; + MVert *mvert = NULL; MFace *mface; - VlakRen *vlr, *vlr1; + VlakRen *vlr; //, *vlr1; VertRen *ver; Material *ma; - MSticky *ms; + MSticky *ms = NULL; PartEff *paf; DispList *dl; - TFace *tface; +// TFace *tface; unsigned int *vertcol; - float xn, yn, zn, nor[3], imat[3][3], mat[4][4]; + float xn, yn, zn, imat[3][3], mat[4][4]; //nor[3], float *extverts=0, *orco; int a, a1, ok, do_puno, need_orco=0, totvlako, totverto, vertofs; - int start, end, do_autosmooth=0, totvert; - DispListMesh *dlm; + int start, end, do_autosmooth=0, totvert = 0; + DispListMesh *dlm = NULL; me= ob->data; @@ -1846,7 +1849,7 @@ static void init_render_surf(Object *ob) int u, v; int sizeu, sizev; VlakRen *vlr1, *vlr2, *vlr3; - float n2[3], vn[3]; + float vn[3]; // n2[3], #endif cu= ob->data; @@ -2587,7 +2590,7 @@ static void init_render_curve(Object *ob) /* prevent phong interpolation for giving ray shadow errors (terminator problem) */ static void set_phong_threshold(Object *ob, int startface, int numface, int startvert, int numvert ) { - VertRen *ver; +// VertRen *ver; VlakRen *vlr; float thresh= 0.0, dot; int tot=0, i; @@ -3233,9 +3236,9 @@ static void do_displacement(Object *ob, int startface, int numface, int startver { VertRen *vr; VlakRen *vlr; - float min[3]={1e30, 1e30, 1e30}, max[3]={-1e30, -1e30, -1e30}; - float scale[3]={1.0f, 1.0f, 1.0f}, temp[3], xn; - int i, texflag=0; +// float min[3]={1e30, 1e30, 1e30}, max[3]={-1e30, -1e30, -1e30}; + float scale[3]={1.0f, 1.0f, 1.0f}, temp[3];//, xn + int i; //, texflag=0; Object *obt; /* Object Size with parenting */ @@ -3264,8 +3267,8 @@ static void do_displacement(Object *ob, int startface, int numface, int startver static void displace_render_face(VlakRen *vlr, float *scale) { ShadeInput shi; - VertRen vr; - float samp1,samp2, samp3, samp4, xn; +// VertRen vr; +// float samp1,samp2, samp3, samp4, xn; short hasuv=0; /* set up shadeinput struct for multitex() */ diff --git a/source/blender/src/butspace.c b/source/blender/src/butspace.c index c91a3438f6d..de22bddc426 100644 --- a/source/blender/src/butspace.c +++ b/source/blender/src/butspace.c @@ -78,6 +78,9 @@ #include "mydevice.h" #include "butspace.h" // own module +/************************ function prototypes ***************************/ +void drawbutspace(ScrArea *, void *); + /* Local vars ---------------------------------------------------------- */ short bgpicmode=0, near=1000, far=1000; diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 40e3ff37e4a..c6f095c7a6d 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -165,6 +165,10 @@ short uv_calc_mapdir= 1, uv_calc_mapalign= 1, facesel_draw_edges= 0; extern ListBase editNurb; + +/* *************************** static functions prototypes ****************** */ +void validate_editbonebutton(EditBone *); + /* *************************** MESH DECIMATE ******************************** */ /* should be removed from this c file (ton) */ diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 61c57ea8596..58285ffd775 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -82,6 +82,9 @@ #include "BIF_keyval.h" #include "BIF_editsound.h" +#include "BIF_editsca.h" + + #include "BDR_editcurve.h" #include "BSE_buttons.h" #include "BSE_headerbuttons.h" @@ -93,6 +96,8 @@ #include "butspace.h" // own module /* internals */ +void buttons_enji(uiBlock *, Object *); +void buttons_ketsji(uiBlock *, Object *); /****/ diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 716a3f448bc..3813001e5e3 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -71,6 +71,8 @@ #include "BDR_editcurve.h" #include "BDR_drawobject.h" +//#include "BIF_editsca.h" + #include "BIF_butspace.h" #include "mydevice.h" @@ -133,14 +135,21 @@ static float prspeed=0.0; float prlen=0.0; +/* ********************* function prototypes ******************** */ +void object_panel_draw(Object *); +void object_panel_hooks(Object *); +void object_panel_effects(Object *); /* ********************* CONSTRAINT ***************************** */ +#if 0 static void add_influence_key_to_constraint_func (void *arg1v, void *unused) { bConstraint *con = arg1v; add_influence_key_to_constraint(con); } +#endif + static void activate_constraint_ipo_func (void *arg1v, void *unused) { diff --git a/source/blender/src/buttons_script.c b/source/blender/src/buttons_script.c index 94013132f78..78eba064faa 100644 --- a/source/blender/src/buttons_script.c +++ b/source/blender/src/buttons_script.c @@ -112,6 +112,8 @@ #include "blendef.h" #include "butspace.h" +/* ************************ function prototypes ********************** */ +void draw_scriptlink(uiBlock *, ScriptLink *, int , int , int ) ; diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 4fb27b01328..335d60c3c91 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -106,6 +106,14 @@ #include "butspace.h" // own module +/* ---------function prototypes ------------- */ +void load_tex_image(char *); +void load_plugin_tex(char *); +int vergcband(const void *, const void *); +void save_env(char *); +void drawcolorband(ColorBand *, float , float , float , float ); + + static MTex mtexcopybuf; static MTex emptytex; static int packdummy = 0; diff --git a/source/blender/src/cursors.c b/source/blender/src/cursors.c index f254156c307..47751348a33 100644 --- a/source/blender/src/cursors.c +++ b/source/blender/src/cursors.c @@ -115,11 +115,11 @@ void SetBlenderCursor(short curs){ } } - +/* unused no prototypes short GetCurrentCursor(void){ return(CurrentCursor); } - +*/ void InitCursorData(void){ diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index 664fd63ce86..b331c3c3bca 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -102,6 +102,10 @@ static void draw_keylist(gla2DDrawInfo *di, int totvert, BezTriple **blist, floa void draw_icu_channel(gla2DDrawInfo *di, IpoCurve *icu, int flags, float ypos); static void draw_action_mesh_names(Key *key); +/* missing local prototypes -------------------------------------------- */ +void meshactionbuts(SpaceAction *saction, Key *key); +void do_actionbuts(unsigned short event); + /* implementation ------------------------------------------------------ */ extern void make_rvk_slider(uiBlock *block, Key *key, int i, @@ -696,10 +700,11 @@ void drawactionspace(ScrArea *sa, void *spacedata) curarea->win_swap= WIN_BACK_OK; } - +/* unused and blank void draw_channel_name(const char* name, short type, float ypos, int selected) { } +*/ static void draw_keylist(gla2DDrawInfo *di, int totvert, BezTriple **blist, float ypos) { diff --git a/source/blender/src/drawimasel.c b/source/blender/src/drawimasel.c index 03ec40a3638..fe0f6e461f1 100644 --- a/source/blender/src/drawimasel.c +++ b/source/blender/src/drawimasel.c @@ -78,6 +78,8 @@ /* GLOBALS */ extern char *fsmenu; +void rectwrite_imasel(int , int , int , int , int , int , int , int , float , float , unsigned int *); + void rectwrite_imasel(int winxmin, int winymin, int winxmax, int winymax, int x1, int y1, int xim, int yim, float zoomx, float zoomy, unsigned int *rect) { int cx, cy, oldxim, x2, y2; diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index cadd6ed20b1..77b7f21bdda 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -2070,7 +2070,8 @@ EditIpo *select_proj_ipo(rctf *rectf, int event) /* this was IGLuint, but it's a useless typedef... */ GLuint buffer[MAXPICKBUF]; int a, b; - int code, hits; + int hits; + unsigned int code; short mval[2]; G.f |= G_PICKSEL; diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c index cc6c3ae7558..feb1e50d94e 100644 --- a/source/blender/src/drawmesh.c +++ b/source/blender/src/drawmesh.c @@ -117,6 +117,10 @@ static short fTexwindx, fTexwindy, fTexwinsx, fTexwinsy; static int fDoMipMap = 1; static int fLinearMipMap = 0; +/* local prototypes --------------- */ +void update_realtime_textures(void); + + /* static int source, dest; also not used */ /** diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index c300e90982f..65dd72c0348 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -3505,7 +3505,7 @@ static void tekentextcurs(void) glEnd(); } -void drawspiral(float *cent, float rad, float tmat[][4], int start) +static void drawspiral(float *cent, float rad, float tmat[][4], int start) { float vec[3], vx[3], vy[3]; int a, tot=32; @@ -4499,7 +4499,9 @@ void draw_object(Base *base) /* Drawing the constraint lines */ list = &ob->constraints; if (list){ + /* extern void make_axis_color(char *col, char *col2, char axis); // drawview.c + */ bConstraint *curcon; float size[3], tmat[4][4]; char col[4], col2[4]; diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c index 66dc405daca..b2659941397 100644 --- a/source/blender/src/drawseq.c +++ b/source/blender/src/drawseq.c @@ -203,7 +203,7 @@ static void drawmeta_contents(Sequence *seqm, float x1, float y1, float x2, floa END_SEQ } -void drawseqwave(Sequence *seq, float x1, float y1, float x2, float y2) +static void drawseqwave(Sequence *seq, float x1, float y1, float x2, float y2) { float f, height, midy; int offset, sofs, eofs; diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index e6e9ea598e1..2acd68a66f3 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -89,6 +89,12 @@ void drawtextspace(ScrArea *sa, void *spacedata); void winqreadtextspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt); +/* missing locals */ +void txt_copy_selectbuffer (Text *text); +void txt_paste_clipboard(Text *text); /* blank on non Win32 */ +void txt_copy_clipboard(Text *text); /* blank on non Win32 */ + + static void *last_txt_find_string= NULL; static BMF_Font *spacetext_get_font(SpaceText *st) { diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c index 7328eb5b4db..f647ebb66e0 100644 --- a/source/blender/src/edit.c +++ b/source/blender/src/edit.c @@ -121,6 +121,10 @@ extern void uvedit_selectionCB(short selecting, Object *editobj, void circle_selectCB(select_CBfunc func); +/* local protos ---------------*/ +void snap_curs_to_firstsel(void); + + int get_border(rcti *rect, short col) { float dvec[4], fac1, fac2; @@ -931,7 +935,7 @@ void snap_curs_to_sel() #ifdef __NLA if ELEM6(G.obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL) make_trans_verts(bmat[0], bmat[1], 0); #else - if ELEM5(G.obedit->type, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MABLL) make_trans_verts(bmat[0], bmat[1], 0); + if ELEM5(G.obedit->type, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL) make_trans_verts(bmat[0], bmat[1], 0); #endif if(tottrans==0) return; diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index 32110fa88e5..6c77ea2e976 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -104,7 +104,7 @@ extern int count_action_levels (bAction *act); #define BEZSELECTED(bezt) (((bezt)->f1 & 1) || ((bezt)->f2 & 1) || ((bezt)->f3 & 1)) -/* Local Function prototypes */ +/* Local Function prototypes, some are forward needed */ static void insertactionkey(bAction *act, bActionChannel *achan, bPoseChannel *chan, int adrcode, short makecurve, float time); static void flip_name (char *name); @@ -117,6 +117,11 @@ static void delete_actionchannels(void); static void select_poseelement_by_name (char *name, int select); static void hilight_channel (bAction *act, bActionChannel *chan, short hilight); static void set_action_key_time (bAction *act, bPoseChannel *chan, int adrcode, short makecurve, float time); + +static void remake_meshaction_ipos(Ipo *ipo); +static void select_all_keys_frames(bAction *act, short *mval, short *mvalo, int selectmode); +static void select_all_keys_channels(bAction *act, short *mval, short *mvalo, int selectmode); + /* Implementation */ short showsliders = 0; @@ -291,7 +296,7 @@ void remake_action_ipos(bAction *act) } } -void remake_meshaction_ipos(Ipo *ipo) +static void remake_meshaction_ipos(Ipo *ipo) { /* this puts the bezier triples in proper * order and makes sure the bezier handles @@ -1944,7 +1949,7 @@ void set_ipotype_actionchannels(int ipotype) { allqueue(REDRAWNLA, 0); } -void select_all_keys_frames(bAction *act, short *mval, +static void select_all_keys_frames(bAction *act, short *mval, short *mvalo, int selectmode) { /* This function tries to select all action keys in @@ -2020,7 +2025,7 @@ void select_all_keys_frames(bAction *act, short *mval, } -void select_all_keys_channels(bAction *act, short *mval, +static void select_all_keys_channels(bAction *act, short *mval, short *mvalo, int selectmode) { bActionChannel *chan; float click, x,y; diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index b4406044c56..c7c10489cc1 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -69,6 +69,7 @@ #include "BKE_global.h" #include "BKE_object.h" #include "BKE_subsurf.h" +#include "BKE_deform.h" #include "BIF_gl.h" #include "BIF_graphics.h" @@ -141,6 +142,15 @@ static EditBone * get_nearest_editbonepoint (int findunsel, int *selmask); static Bone *get_first_selected_bonechildren (Bone *bone); +static EditBone *get_named_editbone(char *name); +static void update_dup_subtarget(EditBone *dupBone); +static int bone_skinnable(Object *ob, Bone *bone, void *data); +static int add_defgroup_unique_bone(Object *ob, Bone *bone, void *data); +static int dgroup_skinnable(Object *ob, Bone *bone, void *data); +static void add_verts_to_closest_dgroup(Object *ob, Object *par); +static int hide_selected_pose_bone(Object *ob, Bone *bone, void *ptr); +static int hide_unselected_pose_bone(Object *ob, Bone *bone, void *ptr); +static int show_pose_bone(Object *ob, Bone *bone, void *ptr); /* Functions */ @@ -2005,7 +2015,7 @@ void addvert_armature(void) } -EditBone *get_named_editbone(char *name) +static EditBone *get_named_editbone(char *name) { EditBone *eBone; @@ -2018,7 +2028,7 @@ EditBone *get_named_editbone(char *name) return NULL; } -void update_dup_subtarget(EditBone *dupBone) +static void update_dup_subtarget(EditBone *dupBone) { /* If an edit bone has been duplicated, lets * update it's constraints if the subtarget @@ -2588,7 +2598,7 @@ int ik_chain_looper(Object *ob, Bone *bone, void *data, return count; } -int bone_skinnable(Object *ob, Bone *bone, void *data) +static int bone_skinnable(Object *ob, Bone *bone, void *data) { /* Bones that are not of boneclass BONE_UNSKINNABLE * are regarded to be "skinnable" and are eligible for @@ -2625,7 +2635,7 @@ int bone_skinnable(Object *ob, Bone *bone, void *data) return 0; } -int add_defgroup_unique_bone(Object *ob, Bone *bone, void *data) { +static int add_defgroup_unique_bone(Object *ob, Bone *bone, void *data) { /* This group creates a vertex group to ob that has the * same name as bone (provided the bone is skinnable). * If such a vertex group aleady exist the routine exits. @@ -2639,7 +2649,7 @@ int add_defgroup_unique_bone(Object *ob, Bone *bone, void *data) { return 0; } -int dgroup_skinnable(Object *ob, Bone *bone, void *data) { +static int dgroup_skinnable(Object *ob, Bone *bone, void *data) { /* Bones that are not of boneclass BONE_UNSKINNABLE * are regarded to be "skinnable" and are eligible for * auto-skinning. @@ -2680,7 +2690,7 @@ int dgroup_skinnable(Object *ob, Bone *bone, void *data) { return 0; } -void add_verts_to_closest_dgroup(Object *ob, Object *par) +static void add_verts_to_closest_dgroup(Object *ob, Object *par) { /* This function implements a crude form of * auto-skinning: vertices are assigned to the @@ -2886,7 +2896,7 @@ void create_vgroups_from_armature(Object *ob, Object *par) } } -int hide_selected_pose_bone(Object *ob, Bone *bone, void *ptr) { +static int hide_selected_pose_bone(Object *ob, Bone *bone, void *ptr) { if (bone->flag & BONE_SELECTED) { bone->flag |= BONE_HIDDEN; bone->flag &= ~BONE_SELECTED; @@ -2908,7 +2918,7 @@ void hide_selected_pose_bones(void) { force_draw(1); } -int hide_unselected_pose_bone(Object *ob, Bone *bone, void *ptr) { +static int hide_unselected_pose_bone(Object *ob, Bone *bone, void *ptr) { if (~bone->flag & BONE_SELECTED) { bone->flag |= BONE_HIDDEN; } @@ -2929,7 +2939,7 @@ void hide_unselected_pose_bones(void) { force_draw(1); } -int show_pose_bone(Object *ob, Bone *bone, void *ptr) { +static int show_pose_bone(Object *ob, Bone *bone, void *ptr) { if (bone->flag & BONE_HIDDEN) { bone->flag &= ~BONE_HIDDEN; bone->flag |= BONE_SELECTED; diff --git a/source/blender/src/editdeform.c b/source/blender/src/editdeform.c index 5ac3681743c..61761ad544a 100644 --- a/source/blender/src/editdeform.c +++ b/source/blender/src/editdeform.c @@ -59,6 +59,11 @@ #include #endif +/* ----------------- function prototypes ---------------- */ +void remove_vert_def_nr (Object *, int , int ); +void add_vert_defnr (Object *, int , int vertnum, float , int ); + + void sel_verts_defgroup (int select) { EditMesh *em = G.editMesh; diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index efd5c30729e..ab17187df38 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -1154,7 +1154,7 @@ void set_faceselect() /* toggle */ * @param org origin of the view ray. * @param dir direction of the view ray. */ -void get_pick_ray(short x, short y, float org[3], float dir[3]) +static void get_pick_ray(short x, short y, float org[3], float dir[3]) { double mvmatrix[16]; double projmatrix[16]; @@ -1190,7 +1190,7 @@ void get_pick_ray(short x, short y, float org[3], float dir[3]) } -int triangle_ray_intersect(float tv0[3], float tv1[3], float tv2[3], float org[3], float dir[3], float uv[2]) +static int triangle_ray_intersect(float tv0[3], float tv1[3], float tv2[3], float org[3], float dir[3], float uv[2]) { float v1v0[3]; float v2v0[3]; @@ -1283,7 +1283,7 @@ int triangle_ray_intersect(float tv0[3], float tv1[3], float tv2[3], float org[3 * @param v4 vertex 4 coordinates. * @return number of vertices of this face */ -int face_get_vertex_coordinates(Mesh* mesh, TFace* face, float v1[3], float v2[3], float v3[3], float v4[3]) +static int face_get_vertex_coordinates(Mesh* mesh, TFace* face, float v1[3], float v2[3], float v3[3], float v4[3]) { int num_vertices; MVert *mv; @@ -1316,7 +1316,7 @@ int face_get_vertex_coordinates(Mesh* mesh, TFace* face, float v1[3], float v2[3 * @param u (u,v) coordinate. * @param v (u,v) coordinate. */ -void face_get_uv(TFace* face, int v1, int v2, int v3, float a, float b, float* u, float* v) +static void face_get_uv(TFace* face, int v1, int v2, int v3, float a, float b, float* u, float* v) { float uv01[2], uv21[2]; @@ -1359,7 +1359,7 @@ void face_get_uv(TFace* face, int v1, int v2, int v3, float a, float b, float* u * 0 == no intersection, (u,v) invalid * 1 == intersection, (u,v) valid */ -int face_pick_uv(Object* object, Mesh* mesh, TFace* face, short x, short y, float* u, float* v) +static int face_pick_uv(Object* object, Mesh* mesh, TFace* face, short x, short y, float* u, float* v) { float org[3], dir[3]; float ab[2]; diff --git a/source/blender/src/editfont.c b/source/blender/src/editfont.c index 0a058c9c902..ee71ff37d9a 100644 --- a/source/blender/src/editfont.c +++ b/source/blender/src/editfont.c @@ -78,6 +78,9 @@ #define MAXTEXT 1000 +/* -- prototypes --------*/ +VFont *get_builtin_font(void); + int textediting=0; static char findaccent(char char1, char code) diff --git a/source/blender/src/editimasel.c b/source/blender/src/editimasel.c index 3fc97bb5d23..800e5418f48 100644 --- a/source/blender/src/editimasel.c +++ b/source/blender/src/editimasel.c @@ -77,6 +77,8 @@ /* GLOBALS */ extern char *fsmenu; +void winqreadimaselspace(ScrArea *, void *, BWinEvent *); + void winqreadimaselspace(ScrArea *sa, void *spacedata, BWinEvent *evt) { unsigned short event= evt->event; diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c index 6aac31360f2..574df40c6bb 100644 --- a/source/blender/src/editipo.c +++ b/source/blender/src/editipo.c @@ -2630,7 +2630,7 @@ void mouse_select_ipo() } } -int icu_keys_bezier_loop(IpoCurve *icu, +static int icu_keys_bezier_loop(IpoCurve *icu, int (*bezier_function)(BezTriple *), void (ipocurve_function)(struct IpoCurve *icu)) { @@ -2673,7 +2673,7 @@ int icu_keys_bezier_loop(IpoCurve *icu, } -int ipo_keys_bezier_loop(Ipo *ipo, +static int ipo_keys_bezier_loop(Ipo *ipo, int (*bezier_function)(BezTriple *), void (ipocurve_function)(struct IpoCurve *icu)) { @@ -2696,7 +2696,7 @@ int ipo_keys_bezier_loop(Ipo *ipo, return 0; } -int selected_bezier_loop(int (*looptest)(EditIpo *), +static int selected_bezier_loop(int (*looptest)(EditIpo *), int (*bezier_function)(BezTriple *), void (ipocurve_function)(struct IpoCurve *icu)) { @@ -2788,7 +2788,7 @@ int select_bezier_invert(BezTriple *bezt) { return 0; } -int set_bezier_auto(BezTriple *bezt) +static int set_bezier_auto(BezTriple *bezt) { /* Sets the selected bezier handles to type 'auto' */ @@ -2811,7 +2811,7 @@ int set_bezier_auto(BezTriple *bezt) return 0; } -int set_bezier_vector(BezTriple *bezt) +static int set_bezier_vector(BezTriple *bezt) { /* Sets the selected bezier handles to type 'vector' */ @@ -2834,7 +2834,7 @@ int set_bezier_vector(BezTriple *bezt) return 0; } -int bezier_isfree(BezTriple *bezt) +static int bezier_isfree(BezTriple *bezt) { /* queries whether the handle should be set * to type 'free' (I think) @@ -2844,7 +2844,7 @@ int bezier_isfree(BezTriple *bezt) return 0; } -int set_bezier_free(BezTriple *bezt) +static int set_bezier_free(BezTriple *bezt) { /* Sets selected bezier handles to type 'free' */ @@ -2853,7 +2853,7 @@ int set_bezier_free(BezTriple *bezt) return 0; } -int set_bezier_align(BezTriple *bezt) +static int set_bezier_align(BezTriple *bezt) { /* Sets selected bezier handles to type 'align' */ @@ -2862,7 +2862,7 @@ int set_bezier_align(BezTriple *bezt) return 0; } -int vis_edit_icu_bez(EditIpo *ei) { +static int vis_edit_icu_bez(EditIpo *ei) { /* A 4 part test for an EditIpo : * is it a) visible * b) in edit mode @@ -2976,19 +2976,19 @@ void sethandles_ipo(int code) } -void set_ipocurve_constant(struct IpoCurve *icu) { +static void set_ipocurve_constant(struct IpoCurve *icu) { /* Sets the type of the IPO curve to constant */ icu->ipo= IPO_CONST; } -void set_ipocurve_linear(struct IpoCurve *icu) { +static void set_ipocurve_linear(struct IpoCurve *icu) { /* Sets the type of the IPO curve to linear */ icu->ipo= IPO_LIN; } -void set_ipocurve_bezier(struct IpoCurve *icu) { +static void set_ipocurve_bezier(struct IpoCurve *icu) { /* Sets the type of the IPO curve to bezier */ icu->ipo= IPO_BEZ; diff --git a/source/blender/src/editkey.c b/source/blender/src/editkey.c index 03e1496c25c..d2cdb1cf8e3 100644 --- a/source/blender/src/editkey.c +++ b/source/blender/src/editkey.c @@ -89,6 +89,10 @@ extern ListBase editNurb; /* in editcurve.c */ + +/* local prototypes ------------------ */ +void make_rvk_slider(uiBlock *, Key *, int , int , int , int , int ); /* used in drawaction.c too */ + /* temporary storage for slider values */ float meshslidervals[64] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, diff --git a/source/blender/src/editmesh_lib.c b/source/blender/src/editmesh_lib.c index 11370232e3d..6c96baada5a 100644 --- a/source/blender/src/editmesh_lib.c +++ b/source/blender/src/editmesh_lib.c @@ -178,7 +178,8 @@ int EM_nfaces_selected(void) return count; } -int EM_nedges(void) +#if 0 +static int EM_nedges(void) { EditMesh *em = G.editMesh; EditEdge *eed; @@ -187,6 +188,7 @@ int EM_nedges(void) for (eed= em->edges.first; eed; eed= eed->next) count++; return count; } +#endif int EM_nvertices_selected(void) { diff --git a/source/blender/src/editmesh_loop.c b/source/blender/src/editmesh_loop.c index e5961981ff6..48a92f7d7ed 100644 --- a/source/blender/src/editmesh_loop.c +++ b/source/blender/src/editmesh_loop.c @@ -94,7 +94,7 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv /* *************** LOOP SELECT ************* */ -short edgeFaces(EditEdge *e){ +static short edgeFaces(EditEdge *e){ EditMesh *em = G.editMesh; EditFace *search=NULL; short count = 0; @@ -112,7 +112,7 @@ short edgeFaces(EditEdge *e){ returns 1 if they do returns 0 if they do not, or if the function is passed the same edge 2 times */ -short sharesFace(EditEdge* e1, EditEdge* e2) +static short sharesFace(EditEdge* e1, EditEdge* e2) { EditMesh *em = G.editMesh; EditFace *search=NULL; @@ -400,7 +400,7 @@ typedef struct CutCurve { short y; } CutCurve; -CutCurve *get_mouse_trail(int *len, char mode){ +static CutCurve *get_mouse_trail(int *len, char mode){ CutCurve *curve,*temp; short event, val, ldown=0, restart=0, rubberband=0; diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index 9d1c3cb84e6..7ac3fc7a03e 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -431,7 +431,7 @@ static EditVert *findnearestvert_f(short *dist, short sel) } /* backbuffer version */ -EditVert *findnearestvert(short *dist, short sel) +static EditVert *findnearestvert(short *dist, short sel) { if(G.vd->drawtype>OB_WIRE && (G.vd->flag & V3D_ZBUF_SELECT)) { EditVert *eve=NULL; diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index 5003f16d599..1a4d7b64d9c 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -93,6 +93,10 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise #include "editmesh.h" +/* local prototypes ---------------*/ +void bevel_menu(void); + + /********* qsort routines *********/ @@ -2836,7 +2840,7 @@ void edge_rotate_selected(int dir) /******************* BEVEL CODE STARTS HERE ********************/ -void bevel_displace_vec(float *midvec, float *v1, float *v2, float *v3, float d, float no[3]) +static void bevel_displace_vec(float *midvec, float *v1, float *v2, float *v3, float d, float no[3]) { float a[3], c[3], n_a[3], n_c[3], mid[3], ac, ac2, fac; @@ -2869,7 +2873,7 @@ void bevel_displace_vec(float *midvec, float *v1, float *v2, float *v3, float d, Lots of sqrts which would not be good for a real time algo Using the mid point of the extrapolation of both sides Useless for coplanar quads, but that doesn't happen too often */ -void fix_bevel_wrap(float *midvec, float *v1, float *v2, float *v3, float *v4, float d, float no[3]) +static void fix_bevel_wrap(float *midvec, float *v1, float *v2, float *v3, float *v4, float d, float no[3]) { float a[3], b[3], c[3], l_a, l_b, l_c, s_a, s_b, s_c, Pos1[3], Pos2[3], Dir[3]; @@ -2905,7 +2909,7 @@ void fix_bevel_wrap(float *midvec, float *v1, float *v2, float *v3, float *v4, f } -char detect_wrap(float *o_v1, float *o_v2, float *v1, float *v2, float *no) +static char detect_wrap(float *o_v1, float *o_v2, float *v1, float *v2, float *no) { float o_a[3], a[3], o_c[3], c[3]; @@ -2923,7 +2927,7 @@ char detect_wrap(float *o_v1, float *o_v2, float *v1, float *v2, float *no) // Detects and fix a quad wrapping after the resize // Arguments are the orginal verts followed by the final verts and then the bevel size and the normal -void fix_bevel_quad_wrap(float *o_v1, float *o_v2, float *o_v3, float *o_v4, float *v1, float *v2, float *v3, float *v4, float d, float *no) +static void fix_bevel_quad_wrap(float *o_v1, float *o_v2, float *o_v3, float *o_v4, float *v1, float *v2, float *v3, float *v4, float d, float *no) { float vec[3]; char wrap[4]; @@ -2997,7 +3001,7 @@ void fix_bevel_quad_wrap(float *o_v1, float *o_v2, float *o_v3, float *o_v4, flo // Detects and fix a tri wrapping after the resize // Arguments are the orginal verts followed by the final verts and the normal // Triangles cannot wrap partially (not in this situation -void fix_bevel_tri_wrap(float *o_v1, float *o_v2, float *o_v3, float *v1, float *v2, float *v3, float *no) +static void fix_bevel_tri_wrap(float *o_v1, float *o_v2, float *o_v3, float *v1, float *v2, float *v3, float *no) { if (detect_wrap(o_v1, o_v2, v1, v2, no)) { float vec[3]; @@ -3010,7 +3014,7 @@ void fix_bevel_tri_wrap(float *o_v1, float *o_v2, float *o_v3, float *v1, float } } -void bevel_shrink_faces(float d, int flag) +static void bevel_shrink_faces(float d, int flag) { EditMesh *em = G.editMesh; EditFace *efa; @@ -3051,7 +3055,7 @@ void bevel_shrink_faces(float d, int flag) } } -void bevel_shrink_draw(float d, int flag) +static void bevel_shrink_draw(float d, int flag) { EditMesh *em = G.editMesh; EditFace *efa; @@ -3120,7 +3124,7 @@ void bevel_shrink_draw(float d, int flag) } } -void bevel_mesh(float bsize, int allfaces) +static void bevel_mesh(float bsize, int allfaces) { EditMesh *em = G.editMesh; //#define BEV_DEBUG @@ -3526,7 +3530,7 @@ void bevel_mesh(float bsize, int allfaces) #undef BEV_DEBUG } -void bevel_mesh_recurs(float bsize, short recurs, int allfaces) +static void bevel_mesh_recurs(float bsize, short recurs, int allfaces) { float d; short nr; diff --git a/source/blender/src/editmode_undo.c b/source/blender/src/editmode_undo.c index 89737c9aff3..615cce62511 100644 --- a/source/blender/src/editmode_undo.c +++ b/source/blender/src/editmode_undo.c @@ -94,6 +94,15 @@ void undo_editmode_menu(void) // history menu */ /* ********************************************************************* */ +/* local prototypes --------------- */ + void undo_editmode_step(int step); // undo and redo + void undo_editmode_clear(void); // free & clear all data + void undo_editmode_menu(void); // history menu + void undo_editmode_push(char *name, void (*freedata)(void *), + void (*to_editmode)(void *), void *(*from_editmode)(void)); + struct uiBlock *editmode_undohistorymenu(void *arg_unused); + + #define MAXUNDONAME 64 typedef struct UndoElem { diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 1e41e5f9683..1d2267db4fb 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -144,6 +144,7 @@ #include "BSE_editipo.h" #include "BSE_filesel.h" /* For activate_databrowse() */ #include "BSE_view.h" +#include "BSE_drawview.h" #include "BSE_trans_types.h" #include "BSE_editipo_types.h" @@ -189,6 +190,13 @@ float centre[3], centroid[3]; void mirrormenu(void); +/* local prototypes -------------*/ +int pose_flags_reset_done(Object *); /* used in transform_generic.c */ +void figure_bone_nocalc(Object *); /* used in transform.c */ +void figure_pose_updating(void); /* used in transform.c */ +void constline_callback(void); /* used in drawview.c */ +/* --------------------------------- */ + void add_object_draw(int type) /* for toolbox or menus, only non-editmode stuff */ { Object *ob; @@ -292,7 +300,7 @@ void delete_obj(int ok) BIF_undo_push("Delete object(s)"); } -int return_editmesh_indexar(int **indexar, float *cent) +static int return_editmesh_indexar(int **indexar, float *cent) { EditMesh *em = G.editMesh; EditVert *eve; @@ -335,7 +343,7 @@ static void select_editmesh_hook(ObHook *hook) EM_select_flush(); } -int return_editlattice_indexar(int **indexar, float *cent) +static int return_editlattice_indexar(int **indexar, float *cent) { BPoint *bp; int *index, nr, totvert=0, a; @@ -392,7 +400,7 @@ static void select_editlattice_hook(ObHook *hook) } } -int return_editcurve_indexar(int **indexar, float *cent) +static int return_editcurve_indexar(int **indexar, float *cent) { extern ListBase editNurb; Nurb *nu; @@ -3142,7 +3150,7 @@ static int is_ob_constraint_target(Object *ob, ListBase *conlist) { } -int clear_bone_nocalc(Object *ob, Bone *bone, void *ptr) { +static int clear_bone_nocalc(Object *ob, Bone *bone, void *ptr) { /* When we aren't transform()-ing, we'll want to turn off * the no calc flag for bone bone in case the frame changes, * or something @@ -3165,7 +3173,7 @@ static void clear_bone_nocalc_ob(Object *ob) { } -int set_bone_nocalc(Object *ob, Bone *bone, void *ptr) { +static int set_bone_nocalc(Object *ob, Bone *bone, void *ptr) { /* Calculating bone transformation makes thins slow ... * lets set the no calc flag for a bone by default */ @@ -3174,7 +3182,7 @@ int set_bone_nocalc(Object *ob, Bone *bone, void *ptr) { return 0; } -int selected_bone_docalc(Object *ob, Bone *bone, void *ptr) { +static int selected_bone_docalc(Object *ob, Bone *bone, void *ptr) { /* Let's clear the no calc flag for selected bones. * This function always returns 1 for non-no calc bones * (a.k.a., the 'do calc' bones) so that the bone_looper @@ -3346,7 +3354,7 @@ void figure_bone_nocalc(Object *ob) { figure_bone_nocalc_core(ob, arm); } -int bone_nocalc2chan_trans_update(Object *ob, Bone *bone, void *ptr) { +static int bone_nocalc2chan_trans_update(Object *ob, Bone *bone, void *ptr) { /* Set PCHAN_TRANS_UPDATE for channels with bones that don't have * the no calc flag set ... I hate this. */ @@ -3364,7 +3372,7 @@ int bone_nocalc2chan_trans_update(Object *ob, Bone *bone, void *ptr) { return 0; } -void clear_gonna_move(void) { +static void clear_gonna_move(void) { Base *base; /* clear the gonna move flag */ @@ -3373,7 +3381,7 @@ void clear_gonna_move(void) { } } -int is_parent_gonna_move(Object *ob) { +static int is_parent_gonna_move(Object *ob) { if ( (ob->parent) && (ob->parent->flag & OB_GONNA_MOVE) ) { return 1; @@ -3381,7 +3389,7 @@ int is_parent_gonna_move(Object *ob) { return 0; } -int is_constraint_target_gonna_move(Object *ob) { +static int is_constraint_target_gonna_move(Object *ob) { Object *tarOb; bConstraint *con; bPoseChannel *chan; @@ -3407,7 +3415,7 @@ int is_constraint_target_gonna_move(Object *ob) { return 0; } -void flag_moving_objects(void) { +static void flag_moving_objects(void) { Base *base; int numgonnamove = 0, oldnumgonnamove = -1; @@ -4862,7 +4870,8 @@ static void view_editmove(unsigned char event) static void constline(float *center, float *dir, char axis, float axismat[][3]) { - extern void make_axis_color(char *col, char *col2, char axis); // drawview.c +/* extern void make_axis_color(char *col, char *col2, char axis); // drawview.c +*/ float v1[3], v2[3], v3[3]; char col[3], col2[3]; diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c index 3725024440c..5c311b594ce 100644 --- a/source/blender/src/editscreen.c +++ b/source/blender/src/editscreen.c @@ -128,6 +128,12 @@ static ScrArea *g_activearea= NULL; short winqueue_break= 0; ScrArea *curarea= 0; +/* prototypes -------------------*/ +int afterqtest(short win, unsigned short evt); +unsigned short screen_qread(short *val, char *ascii); +void add_to_mainqueue(Window *win, void *user_data, short evt, short val, char ascii); +static void drawscredge_area(ScrArea *sa); + /**********************************************************************/ static void screen_set_cursor(bScreen *sc) @@ -738,7 +744,7 @@ static void screen_edge_edit_event(ScrArea *actarea, ScrEdge *actedge, short evt /***/ -void mywindow_init_mainwin(Window *win, int orx, int ory, int sizex, int sizey); +extern void mywindow_init_mainwin(Window *win, int orx, int ory, int sizex, int sizey); void test_scale_screen(bScreen *); static void resize_screens(int x, int y, int w, int h) { diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c index 9c3b8f30033..971e0395aa7 100644 --- a/source/blender/src/editsima.c +++ b/source/blender/src/editsima.c @@ -92,6 +92,12 @@ struct uvvertsort { TFace *tface; }; +/* local prototypes */ +void clever_numbuts_sima(void); +void sel_uvco_inside_radius(short , TFace *, int , float *, float *, short); +void uvedit_selectionCB(short , Object *, short *, float ); /* used in edit.c*/ + + static int compuvvert(const void *u1, const void *u2) { const struct uvvertsort *v1=u1, *v2=u2; diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c index fc2ff3c3fb4..5eec31adb12 100644 --- a/source/blender/src/editsound.c +++ b/source/blender/src/editsound.c @@ -452,7 +452,7 @@ void sound_read_wav_data(bSound* sound, PackedFile* pf) /* ugly, but it works (for now) */ -int sound_get_filetype_from_header(bSound* sound, PackedFile* pf) +static int sound_get_filetype_from_header(bSound* sound, PackedFile* pf) { int filetype = SAMPLE_INVALID; int i; @@ -534,7 +534,7 @@ int sound_get_filetype_from_header(bSound* sound, PackedFile* pf) -int check_filetype(bSound* sound, PackedFile* pf) +static int check_filetype(bSound* sound, PackedFile* pf) { // char* pdest; sound->sample->type = SAMPLE_INVALID; diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c index cbbe43a2f32..c717c695d52 100644 --- a/source/blender/src/editview.c +++ b/source/blender/src/editview.c @@ -105,7 +105,8 @@ extern ListBase editNurb; /* originally from exports.h, memory from editcurve.c* /* editmball.c */ extern ListBase editelems; - +/* local prototypes */ +void obedit_selectionCB(short , Object *, short *, float ); /* called in edit.c */ void arrows_move_cursor(unsigned short event) { @@ -835,7 +836,7 @@ void selectall_type(short obtype) BIF_undo_push("Select all per type"); } /* selects all objects on a particular layer */ -void selectall_layer(int layernum) +void selectall_layer(unsigned int layernum) { Base *base; @@ -1534,7 +1535,7 @@ void borderselect(void) XXX These callback functions are still dirty, because they call globals... */ -void mesh_selectionCB(int selecting, Object *editobj, short *mval, float rad) +static void mesh_selectionCB(int selecting, Object *editobj, short *mval, float rad) { extern int em_solidoffs, em_wireoffs; // let linker solve it... from editmesh_mods.c EditMesh *em = G.editMesh; @@ -1615,7 +1616,7 @@ void mesh_selectionCB(int selecting, Object *editobj, short *mval, float rad) } -void nurbscurve_selectionCB(int selecting, Object *editobj, short *mval, float rad) +static void nurbscurve_selectionCB(int selecting, Object *editobj, short *mval, float rad) { Nurb *nu; BPoint *bp; @@ -1681,7 +1682,7 @@ void nurbscurve_selectionCB(int selecting, Object *editobj, short *mval, float r } -void lattice_selectionCB(int selecting, Object *editobj, short *mval, float rad) +static void lattice_selectionCB(int selecting, Object *editobj, short *mval, float rad) { BPoint *bp; float x, y, r; diff --git a/source/blender/src/eventdebug.c b/source/blender/src/eventdebug.c index a4aeabcd406..6c6a137a789 100644 --- a/source/blender/src/eventdebug.c +++ b/source/blender/src/eventdebug.c @@ -36,6 +36,8 @@ #include #endif +char *event_to_string(short); + char *event_to_string(short evt) { #define smap(evt) case evt: return #evt switch (evt) { diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index c673fb934bb..5f145b71a47 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -104,6 +104,7 @@ #include "blendef.h" #include "nla.h" +#include "BIF_fsmenu.h" /* include ourselves */ #if defined WIN32 || defined __BeOS int fnmatch(){return 0;} @@ -134,6 +135,8 @@ static void filesel_select_objects(struct SpaceFile *sfile); static void active_file_object(struct SpaceFile *sfile); static int groupname_to_code(char *group); +extern void countall(void); + /* local globals */ static rcti scrollrct, textrct, bar; diff --git a/source/blender/src/ghostwinlay.c b/source/blender/src/ghostwinlay.c index f08085afa06..5effb1fc461 100644 --- a/source/blender/src/ghostwinlay.c +++ b/source/blender/src/ghostwinlay.c @@ -69,7 +69,9 @@ #include /*declarations*/ -int checkAppleVideoCard(); +int checkAppleVideoCard(void); +void getMacAvailableBounds(short *, short *, short *, short *); + #endif /// @@ -114,7 +116,7 @@ struct _Window { static int macPrefState = 0; -int checkAppleVideoCard() { +int checkAppleVideoCard(void) { long theErr; unsigned long display_mask; CGLRendererInfoObj rend; diff --git a/source/blender/src/header_image.c b/source/blender/src/header_image.c index 80f8ea4121f..ae05ec4c263 100644 --- a/source/blender/src/header_image.c +++ b/source/blender/src/header_image.c @@ -88,7 +88,7 @@ #include "TPT_DependKludge.h" -void load_space_image(char *str) /* called from fileselect */ +static void load_space_image(char *str) /* called from fileselect */ { Image *ima=0; @@ -111,7 +111,7 @@ void load_space_image(char *str) /* called from fileselect */ allqueue(REDRAWIMAGE, 0); } -void image_replace(Image *old, Image *new) +static void image_replace(Image *old, Image *new) { TFace *tface; Mesh *me; @@ -146,7 +146,7 @@ void image_replace(Image *old, Image *new) else error("Nothing replaced"); } -void replace_space_image(char *str) /* called from fileselect */ +static void replace_space_image(char *str) /* called from fileselect */ { Image *ima=0; @@ -174,7 +174,7 @@ void replace_space_image(char *str) /* called from fileselect */ allqueue(REDRAWIMAGE, 0); } -void save_paint(char *name) +static void save_paint(char *name) { char str[FILE_MAXDIR+FILE_MAXFILE]; Image *ima = G.sima->image; diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c index 6c98fa0b5be..d21dc8a1bff 100644 --- a/source/blender/src/header_info.c +++ b/source/blender/src/header_info.c @@ -524,7 +524,7 @@ static void check_packAll() } } -int write_runtime(char *str, char *exename) +static int write_runtime(char *str, char *exename) { char *freestr= NULL; char *ext = 0; @@ -578,14 +578,18 @@ static void write_runtime_check(char *str) /************************** MAIN MENU *****************************/ /************************** FILE *****************************/ -void do_info_file_optionsmenu(void *arg, int event) +#if 0 +static void do_info_file_optionsmenu(void *arg, int event) { G.fileflags ^= (1 << event); // allqueue(REDRAWINFO, 0); } +#endif #if GAMEBLENDER == 1 + +#if 0 static uiBlock *info_file_optionsmenu(void *arg_unused) { uiBlock *block; @@ -662,6 +666,8 @@ static uiBlock *info_runtime_optionsmenu(void *arg_unused) } #endif +#endif + static void do_info_file_importmenu(void *arg, int event) { ScrArea *sa; diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 462c1208da7..8e255092518 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -534,7 +534,7 @@ static uiBlock *view3d_select_object_typemenu(void *arg_unused) void do_view3d_select_object_layermenu(void *arg, int event) { - extern void selectall_layer(int layernum); + extern void selectall_layer(unsigned int layernum); switch(event) { case 0: @@ -1268,7 +1268,7 @@ static uiBlock *view3d_transform_scaleaxismenu(void *arg_unused) return block; } -void do_view3d_transformmenu(void *arg, int event) +static void do_view3d_transformmenu(void *arg, int event) { switch(event) { case 1: @@ -2528,7 +2528,7 @@ static uiBlock *view3d_edit_curvemenu(void *arg_unused) return block; } -void do_view3d_edit_mball_showhidemenu(void *arg, int event) +static void do_view3d_edit_mball_showhidemenu(void *arg, int event) { switch(event) { case 10: /* show hidden control points */ @@ -3422,7 +3422,7 @@ static char *around_pup(void) return (string); } -char *propfalloff_pup(void) +static char *propfalloff_pup(void) { static char string[512]; diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c index 5a38b29f250..510619e0a8a 100644 --- a/source/blender/src/headerbuttons.c +++ b/source/blender/src/headerbuttons.c @@ -491,7 +491,7 @@ int std_libbuttons(uiBlock *block, short xco, short yco, return xco; } -void do_update_for_newframe(int mute) +static void do_update_for_newframe(int mute) { extern void audiostream_scrub(unsigned int frame); /* seqaudio.c */ @@ -559,7 +559,7 @@ static void show_splash(void) /* Functions for user preferences fileselect windows */ /* yafray: export dir select */ -void filesel_u_yfexportdir(char *name) +static void filesel_u_yfexportdir(char *name) { char dir[FILE_MAXDIR], file[FILE_MAXFILE]; BLI_split_dirfile(name, dir, file); @@ -568,7 +568,7 @@ void filesel_u_yfexportdir(char *name) allqueue(REDRAWALL, 0); } -void filesel_u_fontdir(char *name) +static void filesel_u_fontdir(char *name) { char dir[FILE_MAXDIR], file[FILE_MAXFILE]; BLI_split_dirfile(name, dir, file); @@ -577,7 +577,7 @@ void filesel_u_fontdir(char *name) allqueue(REDRAWALL, 0); } -void filesel_u_textudir(char *name) +static void filesel_u_textudir(char *name) { char dir[FILE_MAXDIR], file[FILE_MAXFILE]; BLI_split_dirfile(name, dir, file); @@ -586,7 +586,7 @@ void filesel_u_textudir(char *name) allqueue(REDRAWALL, 0); } -void filesel_u_plugtexdir(char *name) +static void filesel_u_plugtexdir(char *name) { char dir[FILE_MAXDIR], file[FILE_MAXFILE]; BLI_split_dirfile(name, dir, file); @@ -595,7 +595,7 @@ void filesel_u_plugtexdir(char *name) allqueue(REDRAWALL, 0); } -void filesel_u_plugseqdir(char *name) +static void filesel_u_plugseqdir(char *name) { char dir[FILE_MAXDIR], file[FILE_MAXFILE]; BLI_split_dirfile(name, dir, file); @@ -604,7 +604,7 @@ void filesel_u_plugseqdir(char *name) allqueue(REDRAWALL, 0); } -void filesel_u_renderdir(char *name) +static void filesel_u_renderdir(char *name) { char dir[FILE_MAXDIR], file[FILE_MAXFILE]; BLI_split_dirfile(name, dir, file); @@ -613,7 +613,7 @@ void filesel_u_renderdir(char *name) allqueue(REDRAWALL, 0); } -void filesel_u_pythondir(char *name) +static void filesel_u_pythondir(char *name) { char dir[FILE_MAXDIR], file[FILE_MAXFILE]; BLI_split_dirfile(name, dir, file); @@ -622,7 +622,7 @@ void filesel_u_pythondir(char *name) allqueue(REDRAWALL, 0); } -void filesel_u_sounddir(char *name) +static void filesel_u_sounddir(char *name) { char dir[FILE_MAXDIR], file[FILE_MAXFILE]; BLI_split_dirfile(name, dir, file); @@ -631,7 +631,7 @@ void filesel_u_sounddir(char *name) allqueue(REDRAWALL, 0); } -void filesel_u_tempdir(char *name) +static void filesel_u_tempdir(char *name) { char dir[FILE_MAXDIR], file[FILE_MAXFILE]; BLI_split_dirfile(name, dir, file); diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index df60ea61a38..6c650489016 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -3994,8 +3994,9 @@ uiBlock *uiGetBlock(char *name, ScrArea *sa) return NULL; } +#if 0 /* used for making screenshots for menus, called in screendump.c */ -int uiIsMenu(int *x, int *y, int *sizex, int *sizey) +static int uiIsMenu(int *x, int *y, int *sizex, int *sizey) { uiBlock *block= curarea->uiblocks.first; int minx, miny, maxx, maxy; @@ -4025,6 +4026,7 @@ printf("%d %d %d %d\n", minx, miny, maxx, maxy); return 0; } +#endif void ui_check_but(uiBut *but) { @@ -4382,7 +4384,8 @@ void uiBlockEndAlign(uiBlock *block) block->flag &= ~UI_BUT_ALIGN; // all 4 flags } -void uiBlockEndAligno(uiBlock *block) +#if 0 +static void uiBlockEndAligno(uiBlock *block) { uiBut *but; @@ -4401,6 +4404,7 @@ void uiBlockEndAligno(uiBlock *block) } block->flag &= ~UI_BUT_ALIGN; // all 4 flags } +#endif static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, char *tip) { diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c index f420a903de0..f3afdb6e44f 100644 --- a/source/blender/src/interface_draw.c +++ b/source/blender/src/interface_draw.c @@ -91,6 +91,10 @@ // globals extern float UIwinmat[4][4]; +// local prototypes +void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, float maxy); + + /* ************** safe rasterpos for pixmap alignment with pixels ************* */ void ui_rasterpos_safe(float x, float y, float aspect) @@ -147,7 +151,7 @@ void uiEmboss(float x1, float y1, float x2, float y2, int sel) static void ui_draw_icon(uiBut *but, BIFIconID icon) { - void BIF_icon_pos(float xs, float ys); + // void BIF_icon_pos(float xs, float ys); int blend= 0; float xs=0, ys=0; diff --git a/source/blender/src/interface_panel.c b/source/blender/src/interface_panel.c index 3c9a61af0e7..78bffb222b7 100644 --- a/source/blender/src/interface_panel.c +++ b/source/blender/src/interface_panel.c @@ -1517,7 +1517,7 @@ static void test_add_new_tabs(ScrArea *sa) /* ------------ panel drag ---------------- */ -void ui_drag_panel(uiBlock *block) +static void ui_drag_panel(uiBlock *block) { Panel *panel= block->panel; short align=0, first=1, ofsx, ofsy, dx=0, dy=0, dxo=0, dyo=0, mval[2], mvalo[2]; diff --git a/source/blender/src/language.c b/source/blender/src/language.c index 564f10fd20b..8e059da799b 100644 --- a/source/blender/src/language.c +++ b/source/blender/src/language.c @@ -195,7 +195,7 @@ char *language_pup(void) } -LANGMenuEntry *find_language(short langid) +static LANGMenuEntry *find_language(short langid) { LANGMenuEntry *lme = langmenu; @@ -276,7 +276,7 @@ void start_interface_font(void) } -char *first_dpointchar(char *string) +static char *first_dpointchar(char *string) { char *dpointchar; @@ -286,7 +286,7 @@ char *first_dpointchar(char *string) } -void splitlangline(char *line, LANGMenuEntry *lme) +static void splitlangline(char *line, LANGMenuEntry *lme) { char *dpointchar= first_dpointchar(line); @@ -300,7 +300,7 @@ void splitlangline(char *line, LANGMenuEntry *lme) } -void puplang_insert_entry(char *line) +static void puplang_insert_entry(char *line) { LANGMenuEntry *lme, *prev; int sorted = 0; diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index 6279dba6c89..70f806adb8d 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -90,6 +90,9 @@ void sort_faces(void); #include "mydevice.h" #include "blendef.h" +#include "BIF_meshtools.h" /* include ourself for prototypes */ + + /* * ********************** no editmode!!! *********** */ diff --git a/source/blender/src/mywindow.c b/source/blender/src/mywindow.c index b7d904af727..2da9dff1375 100644 --- a/source/blender/src/mywindow.c +++ b/source/blender/src/mywindow.c @@ -81,6 +81,10 @@ static bWindow *swinarray[MAXWIN]= {0}; static bWindow mainwindow, renderwindow; static int mainwin_color_depth; +/* prototypes --------------- */ +void mywindow_init_mainwin(Window *, int , int , int , int ); +void mywindow_build_and_set_renderwin( int , int , int , int); + void mywindow_init_mainwin(Window *win, int orx, int ory, int sizex, int sizey) { GLint r, g, b; diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c index d2a2fd94428..1f460efc8ea 100644 --- a/source/blender/src/outliner.c +++ b/source/blender/src/outliner.c @@ -2186,7 +2186,7 @@ static void namebutton_cb(void *voidp, void *arg2_unused) } } -void outliner_buttons(uiBlock *block, SpaceOops *soops, ListBase *lb) +static void outliner_buttons(uiBlock *block, SpaceOops *soops, ListBase *lb) { uiBut *bt; TreeElement *te; diff --git a/source/blender/src/previewrender.c b/source/blender/src/previewrender.c index d2f4f9abcae..87d79a46cc0 100644 --- a/source/blender/src/previewrender.c +++ b/source/blender/src/previewrender.c @@ -85,6 +85,8 @@ #include "BIF_interface.h" #include "BIF_glutil.h" +#include "BIF_previewrender.h" /* include ourself for prototypes */ + #include "PIL_time.h" #include "RE_renderconverter.h" diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c index 58a3bfba3de..c06d4384514 100644 --- a/source/blender/src/renderwin.c +++ b/source/blender/src/renderwin.c @@ -1118,6 +1118,8 @@ static void scalefastrect(unsigned int *recto, unsigned int *rectn, int oldx, in /* -------------- API: externally called --------------- */ +/* not used anywhere ??? */ +#if 0 void BIF_renderwin_make_active(void) { if(render_win) { @@ -1125,6 +1127,7 @@ void BIF_renderwin_make_active(void) mywinset(2); } } +#endif /* set up display, render an image or scene */ void BIF_do_render(int anim) diff --git a/source/blender/src/resources.c b/source/blender/src/resources.c index ead7577b0d0..b1db1f755f6 100644 --- a/source/blender/src/resources.c +++ b/source/blender/src/resources.c @@ -98,6 +98,7 @@ static Icon *icon_from_data(unsigned char *rect, GLuint texid, int xofs, int yof return icon; } +#if 0 static float icon_x=0.0, icon_y=0.0; void BIF_icon_pos(float xs, float ys) { @@ -142,6 +143,7 @@ static void icon_draw_tex(Icon *icon) glEnd(); glDisable(GL_TEXTURE_2D); } +#endif static void icon_draw(Icon *icon) diff --git a/source/blender/src/seqaudio.c b/source/blender/src/seqaudio.c index 6f7eede12e2..6e645a8867f 100644 --- a/source/blender/src/seqaudio.c +++ b/source/blender/src/seqaudio.c @@ -79,6 +79,7 @@ #include "BSE_view.h" #include "BSE_seqaudio.h" +#include "BIF_editsound.h" #include "mydevice.h" #include "blendef.h" @@ -94,9 +95,10 @@ int audio_scrub=0; int audio_playing=0; ///// // +/* local protos ------------------- */ +void audio_mixdown(void); - -void makewavstring (char *string) +static void makewavstring (char *string) { char txt[64]; @@ -199,7 +201,7 @@ void audio_mixdown() return; } -void audio_levels(Uint8 *buf, int len, float db, float facf, float pan) +static void audio_levels(Uint8 *buf, int len, float db, float facf, float pan) { int i; float facl, facr, fac; @@ -311,7 +313,7 @@ void audio_fill(void *mixdown, Uint8 *sstream, int len) } } -int audio_init(SDL_AudioSpec *desired) +static int audio_init(SDL_AudioSpec *desired) { SDL_AudioSpec *obtained, *hardware_spec; diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 67fa0819240..95232d15c3d 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -530,7 +530,7 @@ static void align_view_to_selected(View3D *v3d) } } -void select_children(Object *ob, int recursive) +static void select_children(Object *ob, int recursive) { Base *base; @@ -542,7 +542,7 @@ void select_children(Object *ob, int recursive) } } -void select_parent(void) /* Makes parent active and de-selected OBACT */ +static void select_parent(void) /* Makes parent active and de-selected OBACT */ { Base *base, *startbase, *basact=NULL, *oldbasact; @@ -2036,7 +2036,8 @@ void space_mipmap_button_function(int event) { allqueue(REDRAWVIEW3D, 0); } -void space_sound_button_function(int event) +#if 0 +static void space_sound_button_function(int event) { int a; SYS_SystemHandle syshandle; @@ -2047,6 +2048,7 @@ void space_sound_button_function(int event) SYS_WriteCommandLineInt(syshandle, "noaudio", a); } } +#endif #define B_ADD_THEME 3301 #define B_DEL_THEME 3302 @@ -2064,7 +2066,7 @@ static short th_curcol= TH_BACK; static char *th_curcol_ptr= NULL; static char th_curcol_arr[4]={0, 0, 0, 255}; -void info_user_themebuts(uiBlock *block, short y1, short y2, short y3) +static void info_user_themebuts(uiBlock *block, short y1, short y2, short y3) { bTheme *btheme, *bt; int spacetype= 0; @@ -3462,7 +3464,7 @@ static void init_actionspace(ScrArea *sa) } -void free_actionspace(SpaceAction *saction) +static void free_actionspace(SpaceAction *saction) { /* don't free saction itself */ diff --git a/source/blender/src/spacetypes.c b/source/blender/src/spacetypes.c index 1b1f87f6d1b..6c7b083f25f 100644 --- a/source/blender/src/spacetypes.c +++ b/source/blender/src/spacetypes.c @@ -59,6 +59,10 @@ struct _SpaceType { SpaceHandleFP winhandle; }; +/* local prototypes ----------------------- */ +void scrarea_do_windraw(ScrArea *area); +void scrarea_do_winchange(ScrArea *area); +void scrarea_do_winhandle(ScrArea *area, BWinEvent *evt); SpaceType *spacetype_new(char *name) { @@ -77,7 +81,7 @@ void spacetype_set_winfuncs(SpaceType *st, SpaceDrawFP draw, SpaceChangeFP chang /***/ -SpaceType *spacetype_from_code(int spacecode) +static SpaceType *spacetype_from_code(int spacecode) { switch (spacecode) { case SPACE_ACTION: return spaceaction_get_type(); diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index fd9a35df17a..9118a35e53b 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -112,7 +112,7 @@ void schrijfplaatje(char *name); -void write_imag(char *name) +static void write_imag(char *name) { /* from file select */ char str[256]; diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index 8dd2804a2fa..f9af3e80973 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -121,6 +121,10 @@ static char *tbstr, *tbstr1, *keystr; static void (*tbfunc)(int); static int tbval; +/* prototypes ----------------------- */ +TBcallback *callback_dummy(int level, int entry); + + /* *********** PC PATCH ************* */ void ColorFunc(int i) diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 4b91608deef..ecaf23daa52 100755 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -196,7 +196,7 @@ static void set_prop_dist(TransInfo *t) /* ************************** CONVERSIONS ************************* */ -void createTransTexspace(void) +static void createTransTexspace(void) { TransData *td; Object *ob; diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index 985bb431a13..0627183e72b 100755 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -114,7 +114,7 @@ void recalcData(); /* ************************** CONSTRAINTS ************************* */ void getConstraintMatrix(TransInfo *t); -void postConstraintChecks(TransInfo *t, float vec[3], float pvec[3]) { +static void postConstraintChecks(TransInfo *t, float vec[3], float pvec[3]) { int i = 0; Mat3MulVecfl(t->con.imtx, vec); @@ -146,7 +146,7 @@ void postConstraintChecks(TransInfo *t, float vec[3], float pvec[3]) { Mat3MulVecfl(t->con.mtx, vec); } -void getViewVector(TransInfo *t, float coord[3], float vec[3]) { +static void getViewVector(TransInfo *t, float coord[3], float vec[3]) { if (G.vd->persp) { float p1[4], p2[4]; @@ -171,7 +171,7 @@ void getViewVector(TransInfo *t, float coord[3], float vec[3]) { } } -void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3]) { +static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3]) { float norm[3], n[3], vec[3], factor; getViewVector(t, in, norm); @@ -196,7 +196,7 @@ void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3]) { } } -void planeProjection(TransInfo *t, float in[3], float out[3]) { +static void planeProjection(TransInfo *t, float in[3], float out[3]) { float vec[3], factor, angle, norm[3]; getViewVector(t, in, norm); @@ -224,7 +224,7 @@ void planeProjection(TransInfo *t, float in[3], float out[3]) { * */ -void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], float out[3], float pvec[3]) +static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], float out[3], float pvec[3]) { VECCOPY(out, in); if (!td && t->con.mode & CON_APPLY) { @@ -259,7 +259,7 @@ void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], float out[ * */ -void applyAxisConstraintSize(TransInfo *t, TransData *td, float smat[3][3]) +static void applyAxisConstraintSize(TransInfo *t, TransData *td, float smat[3][3]) { if (!td && t->con.mode & CON_APPLY) { float tmat[3][3]; @@ -318,7 +318,7 @@ void applyObjectConstraintSize(TransInfo *t, TransData *td, float smat[3][3]) * (ie: not doing counterclockwise rotations when the mouse moves clockwise). */ -void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3]) +static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3]) { if (!td && t->con.mode & CON_APPLY) { int mode = t->con.mode & (CON_AXIS0|CON_AXIS1|CON_AXIS2); @@ -527,9 +527,9 @@ void BIF_setSingleAxisConstraint(float vec[3]) { t->redraw = 1; } -void BIF_drawConstraint() +void BIF_drawConstraint(void) { - int i = -1; + //int i = -1; TransInfo *t = BIF_GetTransInfo(); TransCon *tc = &(t->con); diff --git a/source/blender/src/transform_generics.h b/source/blender/src/transform_generics.h index d4e720850d8..a957bc3b059 100755 --- a/source/blender/src/transform_generics.h +++ b/source/blender/src/transform_generics.h @@ -60,7 +60,7 @@ void calculatePropRatio(TransInfo *t); void snapGrid(TransInfo *t, float *val); -TransInfo * BIF_GetTransInfo(); +TransInfo * BIF_GetTransInfo(void); #endif diff --git a/source/blender/src/view.c b/source/blender/src/view.c index c3ca9391a4c..ae068363a15 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -86,6 +86,10 @@ #define TRACKBALLSIZE (1.1) #define BL_NEAR_CLIP 0.001 + +/* local prototypes ----------*/ +void setcameratoview3d(void); /* windows.c & toets.c */ + void persp_general(int a) { /* for all window types, not 3D */ @@ -753,7 +757,7 @@ void setviewmatrixview3d() } } -void setcameratoview3d() +void setcameratoview3d(void) { Object *ob; float dvec[3]; diff --git a/source/creator/creator.c b/source/creator/creator.c index 1b6ceb8f6dd..377e91400ad 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -110,7 +110,7 @@ static void print_version(); /* defined in ghostwinlay and winlay, we can't include carbon here, conflict with DNA */ #ifdef __APPLE__ -extern int checkAppleVideoCard(); +extern int checkAppleVideoCard(void); extern void getMacAvailableBounds(short *top, short *left, short *bottom, short *right); extern void winlay_get_screensize(int *width_r, int *height_r); extern void winlay_process_events(int wait_for_event); diff --git a/source/darwin/Makefile b/source/darwin/Makefile index b87e290011f..52381081d67 100644 --- a/source/darwin/Makefile +++ b/source/darwin/Makefile @@ -51,6 +51,8 @@ ifeq ($(APPLICATION), blender) @cp $(NANBLENDERHOME)/bin/.blender/.Blanguages $(DIR)/bin/$(APPLICATION).app/Contents/Resources @echo "---> copying .blender/ scripts" @cp -R $(NANBLENDERHOME)/bin/.blender $(DIR)/bin/$(APPLICATION).app/Contents/MacOS + @cp -R $(NANBLENDERHOME)/release/scripts $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/scripts + @cp -R $(NANBLENDERHOME)/release/bpydata $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/bpydata endif @echo "---> removing CVS directories and Mac hidden files from distribution" @find $(DIR)/bin/$(APPLICATION).app -name CVS -prune -exec rm -rf {} \; diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp index ddf6dc3bef7..d8a89461031 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp @@ -336,7 +336,7 @@ int KX_BlenderRenderTools::applyLights(int objectlayer) { // taken from blender source, incompatibility between Blender Object / GameObject - int count; + unsigned int count; float vec[4]; vec[3]= 1.0; diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 645977108ac..d3b994eda91 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -300,7 +300,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* } Material* ma = give_current_material(blenderobj, 1 /* mface->mat_nr */); - const char* matnameptr = (ma ? ma->id.name : ""); + //const char* matnameptr = (ma ? ma->id.name : ""); /*unused*/ bool polyvisible = true; if (mesh->tface && tface) @@ -410,7 +410,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* int vtxarray = meshobj->FindVertexArray(nverts,polymat); RAS_Polygon* poly = new RAS_Polygon(bucket,polyvisible,nverts,vtxarray); if (skinMesh) { - int d1, d2, d3, d4; + int d1, d2, d3, d4=0; bool flat; /* If the face is set to solid, all fnors are the same */ @@ -715,7 +715,7 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj, ) { - SYS_SystemHandle syshandle = SYS_GetSystem(); + //SYS_SystemHandle syshandle = SYS_GetSystem(); /*unused*/ //int userigidbody = SYS_GetCommandLineInt(syshandle,"norigidbody",0); //bool bRigidBody = (userigidbody == 0); diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index f7eb25a70a6..e8f0c2997e7 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -156,6 +156,7 @@ bool KX_BlenderSceneConverter::TryAndLoadNewFile() * Find the specified scene by name, or the first * scene if nothing matches (shouldn't happen). */ +#if 0 static struct Scene *GetSceneForName2(struct Main *maggie, const STR_String& scenename) { Scene *sce; @@ -165,7 +166,7 @@ static struct Scene *GetSceneForName2(struct Main *maggie, const STR_String& sce return (Scene*) maggie->scene.first; } - +#endif void KX_BlenderSceneConverter::ConvertScene(const STR_String& scenename, class KX_Scene* destinationscene, @@ -175,7 +176,7 @@ void KX_BlenderSceneConverter::ConvertScene(const STR_String& scenename, class RAS_ICanvas* canvas) { //find out which physics engine - Scene *blenderscene = GetSceneForName2(m_maggie, scenename); + // Scene *blenderscene = GetSceneForName2(m_maggie, scenename); /*unused*/ e_PhysicsEngine physics_engine = UseSumo; diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp index 9233a10b784..fbb1e9a8c99 100644 --- a/source/gameengine/Expressions/Value.cpp +++ b/source/gameengine/Expressions/Value.cpp @@ -83,7 +83,7 @@ int cvalue_coerce(PyObject** pv,PyObject** pw) { if (PyInt_Check(*pw)) { double db = (double)PyInt_AsLong(*pw); - *pw = new CIntValue(db); + *pw = new CIntValue((int) db); Py_INCREF(*pv); return 0; } diff --git a/source/gameengine/GameLogic/SCA_LogicManager.cpp b/source/gameengine/GameLogic/SCA_LogicManager.cpp index 0829fb0657b..483a3c59a26 100644 --- a/source/gameengine/GameLogic/SCA_LogicManager.cpp +++ b/source/gameengine/GameLogic/SCA_LogicManager.cpp @@ -182,7 +182,7 @@ void SCA_LogicManager::BeginFrame(double curtime, double fixedtime) (*ie)->NextFrame(curtime, fixedtime); // for this frame, look up for activated sensors, and build the collection of triggered controllers - int numsensors = this->m_activatedsensors.size(); + // int numsensors = this->m_activatedsensors.size(); /*unused*/ set triggeredControllerSet; @@ -201,7 +201,7 @@ void SCA_LogicManager::BeginFrame(double curtime, double fixedtime) } - int numtriggered = triggeredControllerSet.size(); + // int numtriggered = triggeredControllerSet.size(); /*unused*/ for (set::iterator tit=triggeredControllerSet.begin(); !(tit==triggeredControllerSet.end());tit++) { diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp index a39e59fe451..c3e2066fc65 100644 --- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp +++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp @@ -103,7 +103,7 @@ bool SCA_PropertyActuator::Update() CValue* oldprop = propowner->GetProperty(m_propname); if (oldprop) { - int waarde = (int)oldprop->GetNumber(); + // int waarde = (int)oldprop->GetNumber(); /*unused*/ CExpression* expr = new COperator2Expr(VALUE_ADD_OPERATOR,new CConstExpr(oldprop->AddRef()), userexpr->AddRef()); diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp index 26ab3da7c13..3a7932fa51c 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.cpp +++ b/source/gameengine/GameLogic/SCA_PythonController.cpp @@ -128,7 +128,6 @@ void SCA_PythonController::SetDictionary(PyObject* pythondictionary) m_pythondictionary = PyDict_Copy(pythondictionary); /* new reference */ } - static char* sPyGetCurrentController__doc__; diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp index da6fe06a708..474ad08eee3 100644 --- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp +++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp @@ -88,7 +88,7 @@ CValue* SCA_RandomActuator::GetReplica() bool SCA_RandomActuator::Update() { - bool result = false; + //bool result = false; /*unused*/ bool bNegativeEvent = IsNegativeEvent(); RemoveAllEvents(); diff --git a/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp b/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp index a25ac4089f9..06b5cca6ce9 100644 --- a/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp +++ b/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp @@ -57,7 +57,7 @@ #define TEMPERING_SHIFT_L(y) (y >> 18) SCA_RandomNumberGenerator::SCA_RandomNumberGenerator(long seed) { - int mti = N + 1; + // int mti = N + 1; /*unused*/ m_seed = seed; SetStartVector(); } diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index 328352b70a2..dba4792c83c 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -89,7 +89,7 @@ GetReplica( /* three functions copied from blender arith... don't know if there's an equivalent */ -float Normalise(float *n) +static float Kx_Normalise(float *n) { float d; @@ -108,7 +108,7 @@ float Normalise(float *n) return d; } -void Crossf(float *c, float *a, float *b) +static void Kx_Crossf(float *c, float *a, float *b) { c[0] = a[1] * b[2] - a[2] * b[1]; c[1] = a[2] * b[0] - a[0] * b[2]; @@ -116,7 +116,7 @@ void Crossf(float *c, float *a, float *b) } -void VecUpMat3(float *vec, float mat[][3], short axis) +static void Kx_VecUpMat3(float *vec, float mat[][3], short axis) { // Construct a camera matrix s.t. the specified axis @@ -158,16 +158,16 @@ void VecUpMat3(float *vec, float mat[][3], short axis) mat[coz][0]= vec[0]; mat[coz][1]= vec[1]; mat[coz][2]= vec[2]; - Normalise((float *)mat[coz]); + Kx_Normalise((float *)mat[coz]); inp= mat[coz][2]; mat[coy][0]= - inp*mat[coz][0]; mat[coy][1]= - inp*mat[coz][1]; mat[coy][2]= 1.0 - inp*mat[coz][2]; - Normalise((float *)mat[coy]); + Kx_Normalise((float *)mat[coy]); - Crossf(mat[cox], mat[coy], mat[coz]); + Kx_Crossf(mat[cox], mat[coy], mat[coz]); } @@ -293,7 +293,7 @@ bool KX_CameraActuator::Update(double curtime, bool frame) rc[0]= (lookat[0]-from[0]); rc[1]= (lookat[1]-from[1]); rc[2]= (lookat[2]-from[2]); - VecUpMat3(rc, mat, 3); /* y up Track -z */ + Kx_VecUpMat3(rc, mat, 3); /* y up Track -z */ diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp index ada6e3eda0d..1340a9c8497 100644 --- a/source/gameengine/Ketsji/KX_GameActuator.cpp +++ b/source/gameengine/Ketsji/KX_GameActuator.cpp @@ -85,7 +85,7 @@ CValue* KX_GameActuator::GetReplica() bool KX_GameActuator::Update() { - bool result = false; + // bool result = false; /*unused*/ bool bNegativeEvent = IsNegativeEvent(); RemoveAllEvents(); diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index d6f9b62f222..d255fd1d18f 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -957,7 +957,7 @@ PyObject* KX_GameObject::PyGetMesh(PyObject* self, if (PyArg_ParseTuple(args, "|i", &mesh)) { - if (mesh < m_meshes.size() && mesh >= 0) + if (((unsigned int)mesh < m_meshes.size()) && mesh >= 0) { KX_MeshProxy* meshproxy = new KX_MeshProxy(m_meshes[mesh]); return meshproxy; diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index 0e30e324e87..1ffde7e31f8 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -120,7 +120,7 @@ bool KX_MouseFocusSensor::Evaluate(CValue* event) bool KX_MouseFocusSensor::ParentObjectHasFocus(void) { - bool res = false; + // bool res = false; /*unused*/ m_hitPosition = MT_Vector3(0,0,0); m_hitNormal = MT_Vector3(1,0,0); MT_Point3 resultpoint; diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp index bfcf9794d1b..4766d837069 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.cpp +++ b/source/gameengine/Ketsji/KX_NearSensor.cpp @@ -163,7 +163,7 @@ KX_NearSensor::~KX_NearSensor() bool KX_NearSensor::Evaluate(CValue* event) { bool result = false; - KX_GameObject* parent = static_cast(GetParent()); + // KX_GameObject* parent = static_cast(GetParent()); /*unused*/ if (m_bTriggered != m_bLastTriggered) { @@ -192,7 +192,7 @@ bool KX_NearSensor::Evaluate(CValue* event) DT_Bool KX_NearSensor::HandleCollision(void* obj1,void* obj2,const DT_CollData * coll_data) { - KX_TouchEventManager* toucheventmgr = static_cast(m_eventmgr); + // KX_TouchEventManager* toucheventmgr = static_cast(m_eventmgr); /*unused*/ KX_GameObject* parent = static_cast(GetParent()); // need the mapping from SM_Objects to gameobjects now diff --git a/source/gameengine/Ketsji/KX_PyMath.cpp b/source/gameengine/Ketsji/KX_PyMath.cpp index 6eedc13df95..1eee4e7043c 100644 --- a/source/gameengine/Ketsji/KX_PyMath.cpp +++ b/source/gameengine/Ketsji/KX_PyMath.cpp @@ -66,7 +66,7 @@ bool PyObject_IsMT_Matrix(PyObject *pymat, unsigned int rank) PyObject *pyrow = PySequence_GetItem(pymat, y); /* new ref */ if (PySequence_Check(pyrow)) { - if (PySequence_Size(pyrow) != rank) + if (((unsigned int)PySequence_Size(pyrow)) != rank) ismatrix = false; } else ismatrix = false; diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h index a588334f621..96a3431fe07 100644 --- a/source/gameengine/Ketsji/KX_PyMath.h +++ b/source/gameengine/Ketsji/KX_PyMath.h @@ -44,11 +44,11 @@ #include "KX_Python.h" -static unsigned int Size(const MT_Matrix4x4&) { return 4; } -static unsigned int Size(const MT_Matrix3x3&) { return 3; } -static unsigned int Size(const MT_Tuple2&) { return 2; } -static unsigned int Size(const MT_Tuple3&) { return 3; } -static unsigned int Size(const MT_Tuple4&) { return 4; } +inline unsigned int Size(const MT_Matrix4x4&) { return 4; } +inline unsigned int Size(const MT_Matrix3x3&) { return 3; } +inline unsigned int Size(const MT_Tuple2&) { return 2; } +inline unsigned int Size(const MT_Tuple3&) { return 3; } +inline unsigned int Size(const MT_Tuple4&) { return 4; } /** * Converts the given python matrix to an MT class. diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp index 3df0092dfb5..d9517a3a65b 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp @@ -80,7 +80,7 @@ KX_SCA_AddObjectActuator::~KX_SCA_AddObjectActuator() bool KX_SCA_AddObjectActuator::Update() { - bool result = false; + //bool result = false; /*unused*/ bool bNegativeEvent = IsNegativeEvent(); RemoveAllEvents(); diff --git a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp index 11d2a895ce9..1df1ad1f27a 100644 --- a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp @@ -65,7 +65,7 @@ KX_SCA_EndObjectActuator::~KX_SCA_EndObjectActuator() bool KX_SCA_EndObjectActuator::Update() { - bool result = false; + // bool result = false; /*unused*/ bool bNegativeEvent = IsNegativeEvent(); RemoveAllEvents(); diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp index 742bcd43607..452c92a77ec 100644 --- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp @@ -161,7 +161,7 @@ KX_SCA_ReplaceMeshActuator::~KX_SCA_ReplaceMeshActuator() bool KX_SCA_ReplaceMeshActuator::Update() { - bool result = false; + // bool result = false; /*unused*/ bool bNegativeEvent = IsNegativeEvent(); RemoveAllEvents(); diff --git a/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp b/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp index 1b4783d0b8b..8af01c561f2 100644 --- a/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp +++ b/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp @@ -157,9 +157,9 @@ UpdateChildCoordinates( // This is a vertex parent so we do not inherit orientation // information. - const MT_Vector3 & p_world_scale = parent->GetWorldScaling(); + // const MT_Vector3 & p_world_scale = parent->GetWorldScaling(); /*unused*/ const MT_Point3 & p_world_pos = parent->GetWorldPosition(); - const MT_Matrix3x3 & p_world_rotation = parent->GetWorldOrientation(); + // const MT_Matrix3x3 & p_world_rotation = parent->GetWorldOrientation(); /*unused*/ child_w_scale = child_scale; child_w_rotation = child_rotation; diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index a5b5369a826..017de1acaf8 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -402,7 +402,7 @@ KX_GameObject* KX_Scene::AddNodeReplicaObject(class SG_IObject* node, class CVal } SG_IObject* replicanode = newobj->GetSGNode(); - SG_Node* rootnode = (replicanode == m_rootnode ? NULL : m_rootnode); + // SG_Node* rootnode = (replicanode == m_rootnode ? NULL : m_rootnode); /*unused*/ replicanode->SetSGClientObject(newobj); diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp index 60e5195534b..a37fce434be 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.cpp +++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp @@ -86,7 +86,7 @@ CValue* KX_SceneActuator::GetReplica() bool KX_SceneActuator::Update() { - bool result = false; + // bool result = false; /*unused*/ bool bNegativeEvent = IsNegativeEvent(); RemoveAllEvents(); diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index 267bb414c13..793c3b84206 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -276,7 +276,7 @@ PyObject* KX_SoundActuator::_getattr(const STR_String& attr) PyObject* KX_SoundActuator::PySetFilename(PyObject* self, PyObject* args, PyObject* kwds) { char *soundName = NULL; - void *soundPointer = NULL; + // void *soundPointer = NULL; /*unused*/ if (!PyArg_ParseTuple(args, "s", &soundName)) return NULL; diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp index 4a7e9d8646d..64dc175f451 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.cpp +++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp @@ -94,7 +94,7 @@ m_bCollision(false), m_bTriggered(false), m_bLastTriggered(false) { - KX_TouchEventManager* touchmgr = (KX_TouchEventManager*) eventmgr; + // KX_TouchEventManager* touchmgr = (KX_TouchEventManager*) eventmgr; /*unused*/ // m_resptable = touchmgr->GetResponseTable(); // m_solidHandle = m_sumoObj->getObjectHandle(); @@ -161,7 +161,7 @@ void KX_TouchSensor::RegisterSumo(KX_TouchEventManager *touchman) DT_Bool KX_TouchSensor::HandleCollision(void* obj1,void* obj2,const DT_CollData * coll_data) { - KX_TouchEventManager* toucheventmgr = (KX_TouchEventManager*)m_eventmgr; + // KX_TouchEventManager* toucheventmgr = (KX_TouchEventManager*)m_eventmgr; /*unused*/ KX_GameObject* parent = (KX_GameObject*)GetParent(); // need the mapping from SM_Objects to gameobjects now diff --git a/source/gameengine/Ketsji/KX_WorldIpoController.cpp b/source/gameengine/Ketsji/KX_WorldIpoController.cpp index 4d7e6592b6b..c4800dc9d91 100644 --- a/source/gameengine/Ketsji/KX_WorldIpoController.cpp +++ b/source/gameengine/Ketsji/KX_WorldIpoController.cpp @@ -46,7 +46,7 @@ bool KX_WorldIpoController::Update(double currentTime) (*i)->Execute(m_ipotime);//currentTime); } - KX_WorldInfo *world; + KX_WorldInfo *world = NULL; if (m_modify_mist_start) { world->setMistStart(m_mist_start); diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp index a9934df1d02..abc3495d391 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp @@ -181,11 +181,13 @@ bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_I if ((rasty->GetDrawingMode() <= RAS_IRasterizer::KX_SOLID) || !dolights) { - bool bUseLights = rendertools->ProcessLighting(-1); + // bool bUseLights = rendertools->ProcessLighting(-1); /*unused*/ + ; } else { - bool bUseLights = rendertools->ProcessLighting(m_material->GetLightLayer()); + // bool bUseLights = rendertools->ProcessLighting(m_material->GetLightLayer()); /*unused*/ + ; } drawmode = (rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID ? diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index a28cbac2580..6bc3b75fd5a 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -463,7 +463,7 @@ RAS_TexVert* RAS_MeshObject::GetVertex(short array, void RAS_MeshObject::ClearArrayData() { - for (unsigned int i=0;iGetVertex(base.m_vtxarray, base.m_indexarray[0], poly->GetMaterial()->GetPolyMaterial()); m_z = MT_dot(pnorm, vert->getLocalXYZ()) + pval; - for( unsigned int i = 1; i < m_poly->VertexCount(); i++) + for(int i = 1; i < m_poly->VertexCount(); i++) { vert = mesh->GetVertex(base.m_vtxarray, base.m_indexarray[i], poly->GetMaterial()->GetPolyMaterial()); float z = MT_dot(pnorm, vert->getLocalXYZ()) + pval; diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp index 8b232c7d932..cd7fb7f2c45 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp @@ -155,6 +155,7 @@ static void bglDeallocEntryPoints (void) // ------------------------- +/*unused*/ static void * bglGetProcAddress (const GLubyte * pszProc) { if (!gBundleRefOpenGL) diff --git a/source/gameengine/SceneGraph/SG_Tree.cpp b/source/gameengine/SceneGraph/SG_Tree.cpp index fcbf3d924d3..947d771f06c 100644 --- a/source/gameengine/SceneGraph/SG_Tree.cpp +++ b/source/gameengine/SceneGraph/SG_Tree.cpp @@ -366,9 +366,9 @@ SG_Tree* SG_TreeFactory::MakeTreeUp() while (num_objects > 2) { /* Find the pair of bboxes that produce the smallest combined bbox. */ - unsigned int minx, miny; + unsigned int minx = UINT_MAX, miny = UINT_MAX; MT_Scalar min_volume = FLT_MAX; - SG_Tree *min; + SG_Tree *min = NULL; //char temp[16]; for( y = 0; y < num_objects; y++) { diff --git a/source/nan_warn.mk b/source/nan_warn.mk index a80066872ff..ee01f47f549 100644 --- a/source/nan_warn.mk +++ b/source/nan_warn.mk @@ -141,7 +141,7 @@ ifeq ($(CCC),g++) LEVEL_2_CPP_WARNINGS += -Wreorder LEVEL_2_CPP_WARNINGS += -Wctor-dtor-privacy LEVEL_2_CPP_WARNINGS += -Wnon-virtual-dtor - LEVEL_2_CPP_WARNINGS += -Wold-style-cast + #LEVEL_2_CPP_WARNINGS += -Wold-style-cast LEVEL_2_CPP_WARNINGS += -Woverloaded-virtual LEVEL_2_CPP_WARNINGS += -Wsign-promo LEVEL_2_CPP_WARNINGS += -Wsynth -- cgit v1.2.3