diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 96c9bbec420..d018c551171 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -185,13 +185,8 @@ blend_constraints( } } - void -blend_poses ( - bPose *dst, - const bPose *src, - float srcweight, - short mode -){ +void blend_poses ( bPose *dst, const bPose *src, float srcweight, short mode) +{ bPoseChannel *dchan; const bPoseChannel *schan; float dquat[4], squat[4], mat[3][3]; @@ -245,10 +240,8 @@ blend_poses ( } } - void -clear_pose_constraint_status ( - Object *ob -){ +void clear_pose_constraint_status ( Object *ob) +{ bPoseChannel *chan; if (!ob) @@ -261,10 +254,8 @@ clear_pose_constraint_status ( } } - float -calc_action_start ( - const bAction *act -){ +float calc_action_start (const bAction *act) +{ const bActionChannel *chan; const IpoCurve *icu; float size=999999999.0f; @@ -298,10 +289,8 @@ calc_action_start ( return size; } - float -calc_action_end ( - const bAction *act -){ +float calc_action_end (const bAction *act) +{ const bActionChannel *chan; const bConstraintChannel *conchan; const IpoCurve *icu; @@ -325,11 +314,8 @@ calc_action_end ( return size; } - void -verify_pose_channel ( - bPose* pose, - const char* name -) { +void verify_pose_channel (bPose* pose, const char* name) +{ bPoseChannel *chan; if (!pose){ @@ -355,11 +341,8 @@ verify_pose_channel ( BLI_addtail (&pose->chanbase, chan); } - void -get_pose_from_pose ( - bPose **pose, - const bPose *src -){ +void get_pose_from_pose (bPose **pose, const bPose *src) +{ const bPoseChannel *pchan; bPoseChannel *newchan; @@ -401,12 +384,8 @@ static void get_constraint_influence_from_pose (bPose *dst, bPose *src) /* If the pose does not exist, a new one is created */ - void -get_pose_from_action ( - bPose **pose, - bAction *act, - float ctime -) { +void get_pose_from_action ( bPose **pose, bAction *act, float ctime) +{ bActionChannel *achan; bPoseChannel *pchan; Ipo *ipo; @@ -469,9 +448,8 @@ get_pose_from_action ( } } - void -do_all_actions( -){ +void do_all_actions() +{ Base *base; bPose *apose=NULL; bPose *tpose=NULL; @@ -671,11 +649,8 @@ static void do_pose_constraint_channels(bPose *pose, bAction *act, float ctime) } } - bActionChannel * -get_named_actionchannel ( - bAction *act, - const char *name -){ +bActionChannel *get_named_actionchannel (bAction *act, const char *name) +{ bActionChannel *chan; if (!act) @@ -689,10 +664,8 @@ get_named_actionchannel ( return NULL; } - void -clear_pose ( - bPose *pose -) { +void clear_pose ( bPose *pose) +{ bPoseChannel *chan; if (pose->chanbase.first){ @@ -703,10 +676,8 @@ clear_pose ( } } - void -make_local_action( - bAction *act -){ +void make_local_action(bAction *act) +{ Object *ob; bAction *actn; int local=0, lib=0; @@ -754,10 +725,8 @@ make_local_action( } - void -free_action( - bAction *act -){ +void free_action(bAction *act) +{ bActionChannel *chan; /* Free channels */ @@ -771,10 +740,8 @@ free_action( BLI_freelistN (&act->chanbase); } - bAction* -copy_action ( - const bAction *src -){ +bAction* copy_action (const bAction *src) +{ bAction *dst = NULL; bActionChannel *dchan, *schan; @@ -792,10 +759,8 @@ copy_action ( return dst; } - bPoseChannel * -copy_pose_channel ( - const bPoseChannel* src -){ +bPoseChannel *copy_pose_channel (const bPoseChannel* src) +{ bPoseChannel *dst; if (!src) @@ -808,12 +773,8 @@ copy_pose_channel ( return dst; } - void -copy_pose( - bPose **dst, - const bPose *src, - int copycon -){ +void copy_pose(bPose **dst, const bPose *src, int copycon) +{ bPose *outPose; const bPose * inPose; bPoseChannel *newChan; @@ -848,7 +809,8 @@ copy_pose( *dst=outPose; } -bPoseChannel *set_pose_channel (bPose *pose, bPoseChannel *chan){ +bPoseChannel *set_pose_channel (bPose *pose, bPoseChannel *chan) +{ /* chan is no longer valid for the calling function. and should not be used by that function after calling this one diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 211cbb2cd56..a37980b041d 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -32,6 +32,7 @@ #include #include +#include #include "MEM_guardedalloc.h" #include "nla.h" diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index eeb64d789ca..78f662ce67c 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -118,7 +118,7 @@ Crossf( void Projf( - float *c, const float *v1, const float *v2 + float *c, float *v1, float *v2 ); /** @@ -628,16 +628,6 @@ QuatToMat4( float m[][4] ); void -QuatToSpher( - float *quat, - float *sph -); - void -Mat3ToSpher( - float *mat, - float *sph -); - void Mat3ToQuat_is_ok( float wmat[][3], float *q diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 715917d047f..70f24219249 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -120,7 +120,7 @@ float Inpf( float *v1, float *v2) } /* Project v1 on v2 */ -void Projf(float *c, const float *v1, const float *v2) +void Projf(float *c, float *v1, float *v2) { float mul; mul = Inpf(v1, v2) / Inpf(v2, v2); @@ -1937,8 +1937,8 @@ void EulToMat4( float *eul,float mat[][4]) } -void Mat3ToEul(float tmat[][3], float *eul -){ +void Mat3ToEul(float tmat[][3], float *eul) +{ float cy, quat[4], mat[3][3]; Mat3ToQuat(tmat, quat); @@ -1994,53 +1994,6 @@ void QuatToEul( float *quat, float *eul) Mat3ToEul(mat, eul); } -void QuatToSpher( float *quat, float *sph) -/* Not working 100% yet I don't think... */ -{ - float tx, ty, tz; - float qw, qx, qy, qz; - float cos_theta; - float sin_theta; - - qx = quat[0]; - qy = quat[1]; - qz = quat[2]; - qw = quat[3]; - - cos_theta = qw; - sin_theta = (float)sqrt(1.0 - cos_theta * cos_theta); - - if (fabs(sin_theta) < 0.0005) - sin_theta = 1.0; - - tx = qx / sin_theta; - ty = qy / sin_theta; - tz = qz / sin_theta; - - /* Lattitude */ - sph[0] = -(float)asin(ty); - - /* Longitude */ - if (tx*tx + tz*tz <0.0005) - sph[1] = 0.0; - else - sph[1] = (float)atan2(tx, tz); - - if (sph[1] < 0.0) - sph[1] +=(float)(M_PI*2); - - /* Roll */ - sph[2] = (float)(acos(cos_theta) * 2.0) ; -} - -void Mat3ToSpher ( float *mat3, float *sph) -{ - float quat[4]; - - Mat3ToQuat(mat3, quat); - QuatToSpher(quat, sph); -} - void EulToQuat( float *eul, float *quat) { diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a8abc0f0798..0d9fdf14bca 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -207,9 +207,6 @@ READ p_i= (char *)&(a); \ s_i=p_i[0]; p_i[0]=p_i[1]; p_i[1]=s_i; } -/***/ - -static char *functionality_check= "\0FUNCTIONALITY_CHECK += blo_readfile\n"; /***/ @@ -3337,7 +3334,6 @@ static void do_versions(Main *main) if(main->versionfile <= 204) { /* patches for new physics */ Object *ob= main->object.first; - Material *ma= main->mat.first; bActuator *act; bObjectActuator *oa; bSound *sound; diff --git a/source/blender/radiosity/intern/source/radrender.c b/source/blender/radiosity/intern/source/radrender.c index bb656e3ea64..d1849e45e5a 100644 --- a/source/blender/radiosity/intern/source/radrender.c +++ b/source/blender/radiosity/intern/source/radrender.c @@ -80,7 +80,7 @@ static float maxenergy; /* find the face with maximum energy to become shooter */ /* nb: _rr means rad-render version of existing radio call */ -VlakRen *findshoot_rr() +static VlakRen *findshoot_rr(void) { RadFace *rf; VlakRen *vlr=NULL, *shoot; @@ -116,7 +116,7 @@ VlakRen *findshoot_rr() return shoot; } -void backface_test_rr(VlakRen *shoot) +static void backface_test_rr(VlakRen *shoot) { VlakRen *vlr=NULL; RadFace *rf; @@ -140,7 +140,7 @@ void backface_test_rr(VlakRen *shoot) } } -void clear_backface_test_rr() +static void clear_backface_test_rr() { VlakRen *vlr=NULL; RadFace *rf; @@ -160,7 +160,7 @@ void clear_backface_test_rr() extern RadView hemitop, hemiside; // radfactors.c /* hemi-zbuffering, delivers formfactors array */ -void makeformfactors_rr(VlakRen *shoot) +static void makeformfactors_rr(VlakRen *shoot) { VlakRen *vlr=NULL; RadFace *rf; @@ -219,7 +219,7 @@ void makeformfactors_rr(VlakRen *shoot) } /* based at RG.formfactors array, distribute shoot energy over other faces */ -void applyformfactors_rr(VlakRen *shoot) +static void applyformfactors_rr(VlakRen *shoot) { VlakRen *vlr=NULL; RadFace *rf; @@ -263,7 +263,7 @@ void applyformfactors_rr(VlakRen *shoot) /* main loop for itterations */ -void progressiverad_rr() +static void progressiverad_rr() { VlakRen *shoot; int it= 0; @@ -469,7 +469,7 @@ void filter_rad_values() } -void make_vertex_rad_values() +static void make_vertex_rad_values() { VertRen *v1=NULL; VlakRen *vlr=NULL; diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 1406cb51380..6d92657321b 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -995,7 +995,7 @@ void scanlinehaloPS(unsigned int *rectz, long *rectdelta, unsigned int *rectt, s unsigned int a, *rz, *rt, zz; long *rd; int accol[4]; - short minx,maxx,x,aantal, aantalm, behind, flarec; + short minx,maxx,x,aantal, aantalm, flarec; char col[4]; for(a=0;aradsq) { ps= (PixStr *) POINTER_FROM_CODE(*rd); - aantal= behind= 0; + aantal= 0; accol[0]=accol[1]=accol[2]=accol[3]= 0; while(ps) { aantalm= count_mask(ps->mask); diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 4a66f064966..fb9a072b34c 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -258,7 +258,7 @@ void do_soundbuts(unsigned short event) } -static void sound_panel_listener() +static void sound_panel_listener(void) { uiBlock *block; int xco= 100, yco=100, mixrate; @@ -288,7 +288,7 @@ static void sound_panel_listener() } -static void sound_panel_sequencer() +static void sound_panel_sequencer(void) { uiBlock *block; short xco, yco; @@ -943,7 +943,7 @@ static char *avicodec_str(void) } #endif -static void render_panel_output() +static void render_panel_output(void) { ID *id; int a,b; @@ -1012,7 +1012,7 @@ static void render_panel_output() } } -static void render_panel_render() +static void render_panel_render(void) { uiBlock *block; @@ -1069,7 +1069,7 @@ static void render_panel_render() } -static void render_panel_anim() +static void render_panel_anim(void) { uiBlock *block; @@ -1096,7 +1096,7 @@ static void render_panel_anim() uiBlockEndAlign(block); } -static void render_panel_format() +static void render_panel_format(void) { uiBlock *block; int yofs; diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 75f19245550..e7bb4ccb3bc 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -1111,10 +1111,8 @@ static void texture_panel_texture(MTex *mtex, Material *ma, World *wrld, Lamp *l /* TYPES */ if(mtex && mtex->tex) { Tex *tex= mtex->tex; - int xco; uiSetButLock(tex->id.lib!=0, "Can't edit library data"); - xco= 275; uiDefButS(block, ROW, B_TEXTYPE, texstr[0], 160, 150, 70, 20, &tex->type, 1.0, 0.0, 0, 0, "Default"); uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_IMAGE], 160, 110, 70, 20, &tex->type, 1.0, (float)TEX_IMAGE, 0, 0, "Selects image texture type"); @@ -1572,7 +1570,6 @@ static void world_panel_world(World *wrld) { uiBlock *block; ID *id, *idfrom; - short xco; block= uiNewBlock(&curarea->uiblocks, "world_panel_world", UI_EMBOSS, UI_HELV, curarea->win); if(uiNewPanel(curarea, block, "World", "World", 320, 0, 318, 204)==0) return; @@ -1581,7 +1578,7 @@ static void world_panel_world(World *wrld) buttons_active_id(&id, &idfrom); uiBlockSetCol(block, TH_BUT_SETTING2); - xco= std_libbuttons(block, 10, 180, 0, NULL, B_WORLDBROWSE, id, idfrom, &(G.buts->menunr), B_WORLDALONE, B_WORLDLOCAL, B_WORLDDELETE, 0, B_KEEPDATA); + std_libbuttons(block, 10, 180, 0, NULL, B_WORLDBROWSE, id, idfrom, &(G.buts->menunr), B_WORLDALONE, B_WORLDLOCAL, B_WORLDDELETE, 0, B_KEEPDATA); if(wrld==NULL) return; @@ -2384,7 +2381,7 @@ static void material_panel_material(Object *ob, Material *ma) ID *id, *idn, *idfrom; uiBut *but; float *colpoin = NULL, min; - int rgbsel = 0, xco= 0; + int rgbsel = 0; char str[30]; block= uiNewBlock(&curarea->uiblocks, "material_panel_material", UI_EMBOSS, UI_HELV, curarea->win); @@ -2394,7 +2391,7 @@ static void material_panel_material(Object *ob, Material *ma) buttons_active_id(&id, &idfrom); uiBlockSetCol(block, TH_BUT_SETTING2); - xco= std_libbuttons(block, 8, 200, 0, NULL, B_MATBROWSE, id, idfrom, &(G.buts->menunr), B_MATALONE, B_MATLOCAL, B_MATDELETE, B_AUTOMATNAME, B_KEEPDATA); + std_libbuttons(block, 8, 200, 0, NULL, B_MATBROWSE, id, idfrom, &(G.buts->menunr), B_MATALONE, B_MATLOCAL, B_MATDELETE, B_AUTOMATNAME, B_KEEPDATA); uiDefIconBut(block, BUT, B_MATCOPY, ICON_COPYUP, 263,200,XIC,YIC, 0, 0, 0, 0, 0, "Copies Material to the buffer"); uiSetButLock(id && id->lib, "Can't edit library data"); diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index b18d78fed2c..c84d6a7da23 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -2906,7 +2906,7 @@ int uiDoBlocks(ListBase *lb, int event) uiBlock *block, *first; uiEvent uevent; - int retval= UI_NOTHING, cont= 1, dopop=0; + int retval= UI_NOTHING, cont= 1; if(lb->first==0) return UI_NOTHING; @@ -2962,7 +2962,6 @@ int uiDoBlocks(ListBase *lb, int event) } /* to make sure the matrix of the panel works for menus too */ - dopop= 1; if(retval==UI_CONT || (retval & UI_RETURN)) break; first= lb->first; if(first->flag & UI_BLOCK_LOOP) break; diff --git a/source/blender/src/interface_panel.c b/source/blender/src/interface_panel.c index ae146975d90..156f9bc89f0 100644 --- a/source/blender/src/interface_panel.c +++ b/source/blender/src/interface_panel.c @@ -771,15 +771,10 @@ static void ui_draw_panel_header(uiBlock *block) void ui_draw_panel(uiBlock *block) { Panel *panel= block->panel; - int align=0, ofsx; + int ofsx; if(panel->paneltab) return; - if(curarea->spacetype==SPACE_BUTS) { - SpaceButs *sbuts= curarea->spacedata.first; - align= sbuts->align; - } - if(panel->flag & PNL_CLOSEDY) { uiSetRoundBox(15); BIF_ThemeColorShade(TH_HEADER, -30); @@ -849,14 +844,6 @@ void ui_draw_panel(uiBlock *block) BIF_ThemeColor4(TH_PANEL); glRectf(block->minx, block->miny, block->maxx, block->maxy); - //if(align) { - // glColor4ub(206, 206, 206, 100); - // if(align==BUT_HORIZONTAL) ui_set_panel_pattern('h'); - // else ui_set_panel_pattern('v'); - - // glRectf(block->minx, block->miny, block->maxx, block->maxy); - // glDisable(GL_POLYGON_STIPPLE); - // } glDisable(GL_BLEND); } else if(panel->control & UI_PNL_TRANSP) {