Revision: 18249
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18249
Author:   aligorith
Date:     2009-01-02 07:03:53 +0100 (Fri, 02 Jan 2009)

Log Message:
-----------
2.5 - Silencing more MSVC warnings

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
    branches/blender2.5/blender/source/blender/editors/animation/anim_draw.c
    
branches/blender2.5/blender/source/blender/editors/animation/keyframes_edit.c
    branches/blender2.5/blender/source/blender/editors/interface/view2d_ops.c
    
branches/blender2.5/blender/source/blender/editors/space_action/action_draw.c
    
branches/blender2.5/blender/source/blender/editors/space_action/action_edit.c
    
branches/blender2.5/blender/source/blender/editors/space_action/action_header.c
    
branches/blender2.5/blender/source/blender/editors/space_action/action_select.c
    branches/blender2.5/blender/source/blender/editors/space_ipo/space_ipo.c

Modified: 
branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c     
2009-01-02 05:20:44 UTC (rev 18248)
+++ branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c     
2009-01-02 06:03:53 UTC (rev 18249)
@@ -846,7 +846,7 @@
        return (readsize);
 }
 
-static int fd_read_from_memfile(FileData *filedata, void *buffer, int size)
+static int fd_read_from_memfile(FileData *filedata, void *buffer, unsigned int 
size)
 {
        static unsigned int seek= 1<<30;        /* the current position */
        static unsigned int offset= 0;          /* size of previous chunks */
@@ -2889,7 +2889,7 @@
        
        if((fd->flags & FD_FLAGS_SWITCH_ENDIAN) && mesh->tface) {
                TFace *tf= mesh->tface;
-               int i;
+               unsigned int i;
 
                for (i=0; i< (mesh->pv ? mesh->pv->totface : mesh->totface); 
i++, tf++) {
                        SWITCH_INT(tf->col[0]);
@@ -7372,7 +7372,7 @@
                Material *ma;
                
                for(; cam; cam= cam->id.next) {
-                       cam->angle= 360.0f * atan(16.0f/cam->lens) / M_PI;
+                       cam->angle= 360.0f * (float)atan(16.0f/cam->lens) / 
(float)M_PI;
                }
 
                for(ma=main->mat.first; ma; ma= ma->id.next) {
@@ -7497,7 +7497,7 @@
                                else
                                        la->ray_samp_method = LA_SAMP_HALTON;
                                
-                               la->adapt_thresh = 0.001;
+                               la->adapt_thresh = 0.001f;
                        }
                }
        }
@@ -7604,14 +7604,14 @@
                                        for (sl= sa->spacedata.first; sl; sl= 
sl->next) {
                                                if(sl->spacetype==SPACE_IMASEL) 
{
                                                        SpaceImaSel *simasel= 
(SpaceImaSel*) sl;
-                                                       simasel->blockscale= 
0.7;
+                                                       simasel->blockscale= 
0.7f;
                                                        /* view 2D */
-                                                       simasel->v2d.tot.xmin=  
-10.0;
-                                                       simasel->v2d.tot.ymin=  
-10.0;
+                                                       simasel->v2d.tot.xmin=  
-10.0f;
+                                                       simasel->v2d.tot.ymin=  
-10.0f;
                                                        simasel->v2d.tot.xmax= 
(float)sa->winx + 10.0f;
                                                        simasel->v2d.tot.ymax= 
(float)sa->winy + 10.0f;                                         
-                                                       simasel->v2d.cur.xmin=  
0.0;
-                                                       simasel->v2d.cur.ymin=  
0.0;
+                                                       simasel->v2d.cur.xmin=  
0.0f;
+                                                       simasel->v2d.cur.ymin=  
0.0f;
                                                        simasel->v2d.cur.xmax= 
(float)sa->winx;
                                                        simasel->v2d.cur.ymax= 
(float)sa->winy;                                         
                                                        simasel->v2d.min[0]= 
1.0;
@@ -7690,11 +7690,11 @@
                
                for(ma=main->mat.first; ma; ma= ma->id.next) {
                        if(ma->samp_gloss_mir == 0) {
-                               ma->gloss_mir = ma->gloss_tra= 1.0;
-                               ma->aniso_gloss_mir = 1.0;
+                               ma->gloss_mir = ma->gloss_tra= 1.0f;
+                               ma->aniso_gloss_mir = 1.0f;
                                ma->samp_gloss_mir = ma->samp_gloss_tra= 18;
-                               ma->adapt_thresh_mir = ma->adapt_thresh_tra = 
0.005;
-                               ma->dist_mir = 0.0;
+                               ma->adapt_thresh_mir = ma->adapt_thresh_tra = 
0.005f;
+                               ma->dist_mir = 0.0f;
                                ma->fadeto_mir = MA_RAYMIR_FADETOSKY;
                        }
 
@@ -7833,9 +7833,9 @@
                /* foreground color needs to be somthing other then black */
                Scene *sce;
                for(sce= main->scene.first; sce; sce=sce->id.next) {
-                       sce->r.fg_stamp[0] = sce->r.fg_stamp[1] = 
sce->r.fg_stamp[2] = 0.8;
-                       sce->r.fg_stamp[3] = 1.0; /* dont use text alpha yet */
-                       sce->r.bg_stamp[3] = 0.25; /* make sure the background 
has full alpha */
+                       sce->r.fg_stamp[0] = sce->r.fg_stamp[1] = 
sce->r.fg_stamp[2] = 0.8f;
+                       sce->r.fg_stamp[3] = 1.0f; /* dont use text alpha yet */
+                       sce->r.bg_stamp[3] = 0.25f; /* make sure the background 
has full alpha */
                }
        }
 
@@ -8150,7 +8150,7 @@
                for(sce=main->scene.first; sce; sce=sce->id.next) {
                        SEQ_BEGIN(sce->ed, seq) {
                                if (seq->blend_mode == 0)
-                                       seq->blend_opacity = 100.0;
+                                       seq->blend_opacity = 100.0f;
                        }
                        SEQ_END
                }
@@ -8240,7 +8240,7 @@
                Object *ob;
                for(ob = main->object.first; ob; ob= ob->id.next) {
                        if(ob->pd && (ob->pd->forcefield == PFIELD_WIND))
-                               ob->pd->f_noise = 0.0;
+                               ob->pd->f_noise = 0.0f;
                }
        }
 
@@ -8248,7 +8248,7 @@
                Object *ob;
                for(ob = main->object.first; ob; ob= ob->id.next) {
                        ob->gameflag |= OB_COLLISION;
-                       ob->margin = 0.06;
+                       ob->margin = 0.06f;
                }
        }
 
@@ -8361,16 +8361,16 @@
                for(la=main->lamp.first; la; la= la->id.next) {
                        if(la->atm_turbidity == 0.0) {
                                la->sun_effect_type = 0;
-                               la->horizon_brightness = 1.0;
-                               la->spread = 1.0;
-                               la->sun_brightness = 1.0;
-                               la->sun_size = 1.0;
-                               la->backscattered_light = 1.0;
-                               la->atm_turbidity = 2.0;
-                               la->atm_inscattering_factor = 1.0;
-                               la->atm_extinction_factor = 1.0;
-                               la->atm_distance_factor = 1.0;
-                               la->sun_intensity = 1.0;
+                               la->horizon_brightness = 1.0f;
+                               la->spread = 1.0f;
+                               la->sun_brightness = 1.0f;
+                               la->sun_size = 1.0f;
+                               la->backscattered_light = 1.0f;
+                               la->atm_turbidity = 2.0f;
+                               la->atm_inscattering_factor = 1.0f;
+                               la->atm_extinction_factor = 1.0f;
+                               la->atm_distance_factor = 1.0f;
+                               la->sun_intensity = 1.0f;
                        }
                }
        }

Modified: 
branches/blender2.5/blender/source/blender/editors/animation/anim_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_draw.c    
2009-01-02 05:20:44 UTC (rev 18248)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_draw.c    
2009-01-02 06:03:53 UTC (rev 18249)
@@ -85,7 +85,7 @@
                sprintf(str, "   %.2f", FRA2TIME(CFRA));
        else 
                sprintf(str, "   %d", CFRA);
-       slen= UI_GetStringWidth(G.font, str, 0) - 1;
+       slen= (short)UI_GetStringWidth(G.font, str, 0) - 1;
        
        /* get starting coordinates for drawing */
        x= cfra * xscale;

Modified: 
branches/blender2.5/blender/source/blender/editors/animation/keyframes_edit.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/animation/keyframes_edit.c   
    2009-01-02 05:20:44 UTC (rev 18248)
+++ 
branches/blender2.5/blender/source/blender/editors/animation/keyframes_edit.c   
    2009-01-02 06:03:53 UTC (rev 18249)
@@ -247,10 +247,10 @@
 static short snap_bezier_nearestsec(BeztEditData *bed, BezTriple *bezt)
 {
        const Scene *scene= bed->scene;
-       const float secf = FPS;
+       const float secf = (float)FPS;
        
        if (bezt->f2 & SELECT)
-               bezt->vec[1][0]= (float)(floor(bezt->vec[1][0]/secf + 0.5f) * 
secf);
+               bezt->vec[1][0]= ((float)floor(bezt->vec[1][0]/secf + 0.5f) * 
secf);
        return 0;
 }
 
@@ -398,7 +398,7 @@
                for (icu= ipo->curve.first; icu; icu= icu->next) {
                        for (a=0, bezt=icu->bezt; a < icu->totvert; a++, 
bezt++) {
                                if (BEZSELECTED(bezt)) {
-                                       cfra += bezt->vec[1][0];
+                                       cfra += (int)floor(bezt->vec[1][0] + 
0.5f);
                                        tot++;
                                }
                        }

Modified: 
branches/blender2.5/blender/source/blender/editors/interface/view2d_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/view2d_ops.c   
2009-01-02 05:20:44 UTC (rev 18248)
+++ branches/blender2.5/blender/source/blender/editors/interface/view2d_ops.c   
2009-01-02 06:03:53 UTC (rev 18249)
@@ -728,7 +728,7 @@
                                
                                /* y-axis transform */
                                dist = (v2d->mask.ymax - v2d->mask.ymin) / 2.0f;
-                               dy= 1.0f - ((float)fabs(vzd->lasty - dist) + 
2.0) / ((float)fabs(event->y - dist) + 2.0f);
+                               dy= 1.0f - ((float)fabs(vzd->lasty - dist) + 
2.0f) / ((float)fabs(event->y - dist) + 2.0f);
                                dy*= 0.5f * (v2d->cur.ymax - v2d->cur.ymin);
                        }
                        else {

Modified: 
branches/blender2.5/blender/source/blender/editors/space_action/action_draw.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/space_action/action_draw.c   
    2009-01-02 05:20:44 UTC (rev 18248)
+++ 
branches/blender2.5/blender/source/blender/editors/space_action/action_draw.c   
    2009-01-02 06:03:53 UTC (rev 18249)
@@ -422,7 +422,7 @@
                /* don't use totrect set, as the width stays the same 
                 * (NOTE: this is ok here, the configuration is pretty 
straightforward) 
                 */
-               v2d->tot.ymin= -height;
+               v2d->tot.ymin= (float)(-height);
        }
        
        /* loop through channels, and set up drawing depending on their type  
*/        
@@ -1152,7 +1152,7 @@
                /* don't use totrect set, as the width stays the same 
                 * (NOTE: this is ok here, the configuration is pretty 
straightforward) 
                 */
-               v2d->tot.ymin= -height;
+               v2d->tot.ymin= (float)(-height);
        }
        
        /* first backdrop strips */

Modified: 
branches/blender2.5/blender/source/blender/editors/space_action/action_edit.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/space_action/action_edit.c   
    2009-01-02 05:20:44 UTC (rev 18248)
+++ 
branches/blender2.5/blender/source/blender/editors/space_action/action_edit.c   
    2009-01-02 06:03:53 UTC (rev 18249)
@@ -205,7 +205,7 @@
        
        /* set vertical range */
        v2d->cur.ymax= 0.0f;
-       v2d->cur.ymin= -(v2d->mask.ymax - v2d->mask.ymin);
+       v2d->cur.ymin= (float)-(v2d->mask.ymax - v2d->mask.ymin);
        
        /* do View2D syncing */
        UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
@@ -1307,7 +1307,7 @@
                
                /* store marker's time (if available) */
                if (marker)
-                       bed.f1= marker->frame;
+                       bed.f1= (float)marker->frame;
                else
                        return;
        }

Modified: 
branches/blender2.5/blender/source/blender/editors/space_action/action_header.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/space_action/action_header.c 
    2009-01-02 05:20:44 UTC (rev 18248)
+++ 
branches/blender2.5/blender/source/blender/editors/space_action/action_header.c 
    2009-01-02 06:03:53 UTC (rev 18249)
@@ -626,7 +626,7 @@
        }
 
        /* always as last  */
-       UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, 
ar->v2d.tot.ymax-ar->v2d.tot.ymin);
+       UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, 
(int)(ar->v2d.tot.ymax-ar->v2d.tot.ymin));
        
        uiEndBlock(C, block);
        uiDrawBlock(C, block);

Modified: 
branches/blender2.5/blender/source/blender/editors/space_action/action_select.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/space_action/action_select.c 
    2009-01-02 05:20:44 UTC (rev 18248)
+++ 
branches/blender2.5/blender/source/blender/editors/space_action/action_select.c 
    2009-01-02 06:03:53 UTC (rev 18249)
@@ -549,8 +549,8 @@
        
        /* get extreme markers */
        //get_minmax_markers(1, &min, &max); // FIXME... add back markers api!
-       min= ac->scene->r.sfra; // xxx temp code
-       max= ac->scene->r.efra; // xxx temp code
+       min= (float)ac->scene->r.sfra; // xxx temp code
+       max= (float)ac->scene->r.efra; // xxx temp code
        
        if (min==max) return;
        min -= 0.5f;


@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to