Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-10-20 10:39:08 +0400
committerJoshua Leung <aligorith@gmail.com>2008-10-20 10:39:08 +0400
commit63f6932fa5652fe850d0692e0a8fcafb48f20fb9 (patch)
tree909104802391d3f151c5cedeb4bebd64b1e3b55a /source/blender/src
parent67e3ac0edfd8d3ac0d2e3e87d473a5bd268b0ce3 (diff)
Reduced number of MSVC compiler warnings (mostly just casting issues).
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/drawaction.c20
-rw-r--r--source/blender/src/drawgpencil.c40
-rw-r--r--source/blender/src/editaction.c24
-rw-r--r--source/blender/src/editaction_gpencil.c32
-rw-r--r--source/blender/src/editipo.c14
-rw-r--r--source/blender/src/editnla.c65
-rw-r--r--source/blender/src/gpencil.c64
-rw-r--r--source/blender/src/header_time.c10
-rw-r--r--source/blender/src/keyframing.c2
-rw-r--r--source/blender/src/outliner.c124
-rw-r--r--source/blender/src/poselib.c4
-rw-r--r--source/blender/src/space.c198
-rw-r--r--source/blender/src/transform_conversions.c46
-rw-r--r--source/blender/src/view.c80
14 files changed, 360 insertions, 363 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index c3a8b7c3690..47766cc6377 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -122,7 +122,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
* correctly *grumble*
*/
mywinset(curarea->win);
- myortho2(-0.375, curarea->winx-0.375, G.v2d->cur.ymin, G.v2d->cur.ymax);
+ myortho2(-0.375f, curarea->winx-0.375, G.v2d->cur.ymin, G.v2d->cur.ymax);
sprintf(str, "actionbuttonswin %d", curarea->win);
block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS, UI_HELV, curarea->win);
@@ -161,12 +161,12 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
"Hide action window sliders");
/* no hilite, the winmatrix is not correct later on... */
uiButSetFlag(but, UI_NO_HILITE);
-
+
ACTWIDTH = NAMEWIDTH + SLIDERWIDTH;
-
+
/* sliders are open so draw them */
BIF_ThemeColor(TH_FACE);
-
+
glRects(NAMEWIDTH, 0, NAMEWIDTH+SLIDERWIDTH, curarea->winy);
uiBlockSetEmboss(block, UI_EMBOSS);
for (i=1; i < key->totkey; i++) {
@@ -176,7 +176,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
y-=CHANNELHEIGHT+CHANNELSKIP;
/* see sliderval array in editkey.c */
- if(i >= 255) break;
+ if (i >= 255) break;
}
}
uiDrawBlock(block);
@@ -1335,7 +1335,7 @@ void drawactionspace(ScrArea *sa, void *spacedata)
/* Draw scroll */
mywinset(curarea->win); // reset scissor too
if (curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
- myortho2(-0.375, curarea->winx-0.375, -0.375, curarea->winy-0.375);
+ myortho2(-0.375f, curarea->winx-0.375, -0.375f, curarea->winy-0.375);
if (G.v2d->scroll) drawscroll(0);
}
@@ -1361,7 +1361,7 @@ void drawactionspace(ScrArea *sa, void *spacedata)
}
mywinset(curarea->win); // reset scissor too
- myortho2(-0.375, curarea->winx-0.375, -0.375, curarea->winy-0.375);
+ myortho2(-0.375f, curarea->winx-0.375, -0.375f, curarea->winy-0.375);
draw_area_emboss(sa);
/* it is important to end a view in a transform compatible with buttons */
@@ -1598,8 +1598,8 @@ static void draw_keylist(gla2DDrawInfo *di, ListBase *keys, ListBase *blocks, fl
gla2DDrawTranslatePt(di, ak->cfra, ypos, &sc_x, &sc_y);
/* draw using icons - old way which is slower but more proven */
- if (ak->sel & SELECT) BIF_icon_draw_aspect(sc_x-7, sc_y-6, ICON_SPACE2, 1.0f);
- else BIF_icon_draw_aspect(sc_x-7, sc_y-6, ICON_SPACE3, 1.0f);
+ if (ak->sel & SELECT) BIF_icon_draw_aspect((float)sc_x-7, (float)sc_y-6, ICON_SPACE2, 1.0f);
+ else BIF_icon_draw_aspect((float)sc_x-7, (float)sc_y-6, ICON_SPACE3, 1.0f);
/* draw using OpenGL - slightly uglier but faster */
// NOTE: disabled for now, as some intel cards seem to have problems with this
@@ -1868,7 +1868,7 @@ void gpl_to_keylist(bGPDlayer *gpl, ListBase *keys, ListBase *blocks, ActKeysInc
ak= MEM_callocN(sizeof(ActKeyColumn), "ActKeyColumn");
BLI_addtail(keys, ak);
- ak->cfra= gpf->framenum;
+ ak->cfra= (float)gpf->framenum;
ak->modified = 1;
ak->handle_type= 0;
diff --git a/source/blender/src/drawgpencil.c b/source/blender/src/drawgpencil.c
index 9c12871aa54..28f7c7476aa 100644
--- a/source/blender/src/drawgpencil.c
+++ b/source/blender/src/drawgpencil.c
@@ -187,7 +187,7 @@ static void gp_drawui_layer (uiBlock *block, bGPdata *gpd, bGPDlayer *gpl, short
/* rounded header */
if (active) uiBlockSetCol(block, TH_BUT_ACTION);
rb_col= (active)?-20:20;
- uiDefBut(block, ROUNDBOX, B_REDR, "", *xco-8, *yco-2, width, 24, NULL, 5.0, 0.0, 15 , rb_col-20, "");
+ uiDefBut(block, ROUNDBOX, B_REDR, "", *xco-8, *yco-2, width, 24, NULL, 5.0, 0.0, 15, rb_col-20, "");
if (active) uiBlockSetCol(block, TH_AUTO);
/* lock toggle */
@@ -251,7 +251,7 @@ static void gp_drawui_layer (uiBlock *block, bGPdata *gpd, bGPDlayer *gpl, short
/* color */
uiBlockBeginAlign(block);
uiDefButF(block, COL, B_REDR, "", *xco, *yco-26, 150, 19, gpl->color, 0, 0, 0, 0, "Color to use for all strokes on this Grease Pencil Layer");
- uiDefButF(block, NUMSLI, B_REDR, "Opacity: ", *xco,*yco-45,150,19, &gpl->color[3], 0.3, 1.0, 0, 0, "Visibility of stroke (0.3 to 1.0)");
+ uiDefButF(block, NUMSLI, B_REDR, "Opacity: ", *xco,*yco-45,150,19, &gpl->color[3], 0.3f, 1.0f, 0, 0, "Visibility of stroke (0.3 to 1.0)");
uiBlockEndAlign(block);
/* stroke thickness */
@@ -581,10 +581,10 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness,
/* draw start cap first
* - make points slightly closer to center (about halfway across)
*/
- mt[0]= m2[0] * pthick * 0.5;
- mt[1]= m2[1] * pthick * 0.5;
- sc[0]= s0[0] - (m1[0] * pthick * 0.75);
- sc[1]= s0[1] - (m1[1] * pthick * 0.75);
+ mt[0]= m2[0] * pthick * 0.5f;
+ mt[1]= m2[1] * pthick * 0.5f;
+ sc[0]= s0[0] - (m1[0] * pthick * 0.75f);
+ sc[1]= s0[1] - (m1[1] * pthick * 0.75f);
t0[0]= sc[0] - mt[0];
t0[1]= sc[1] - mt[1];
@@ -670,10 +670,10 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness,
/* draw end cap as last step
* - make points slightly closer to center (about halfway across)
*/
- mt[0]= m2[0] * pthick * 0.5;
- mt[1]= m2[1] * pthick * 0.5;
- sc[0]= s1[0] + (m1[0] * pthick * 0.75);
- sc[1]= s1[1] + (m1[1] * pthick * 0.75);
+ mt[0]= m2[0] * pthick * 0.5f;
+ mt[1]= m2[1] * pthick * 0.5f;
+ sc[0]= s1[0] + (m1[0] * pthick * 0.75f);
+ sc[1]= s1[1] + (m1[1] * pthick * 0.75f);
t0[0]= sc[0] - mt[0];
t0[1]= sc[1] - mt[1];
@@ -702,14 +702,14 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness,
glVertex2f(pt->x, pt->y);
}
else if (sflag & GP_STROKE_2DIMAGE) {
- const float x= (pt->x * winx) + offsx;
- const float y= (pt->y * winy) + offsy;
+ const float x= (float)((pt->x * winx) + offsx);
+ const float y= (float)((pt->y * winy) + offsy);
glVertex2f(x, y);
}
else {
- const float x= (pt->x / 1000 * winx);
- const float y= (pt->y / 1000 * winy);
+ const float x= (float)(pt->x / 1000 * winx);
+ const float y= (float)(pt->y / 1000 * winy);
glVertex2f(x, y);
}
@@ -952,7 +952,7 @@ void draw_gpencil_2dimage (ScrArea *sa, ImBuf *ibuf)
float zoom, zoomx, zoomy;
/* calculate accessory values */
- zoom= SEQ_ZOOM_FAC(sseq->zoom);
+ zoom= (float)SEQ_ZOOM_FAC(sseq->zoom);
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
zoomx = zoom * ((float)G.scene->r.xasp / (float)G.scene->r.yasp);
zoomy = zoom;
@@ -961,10 +961,10 @@ void draw_gpencil_2dimage (ScrArea *sa, ImBuf *ibuf)
zoomx = zoomy = zoom;
/* calculate transforms (Note: we use ibuf here, as we have it) */
- sizex= zoomx * ibuf->x;
- sizey= zoomy * ibuf->y;
- offsx= (sa->winx-sizex)/2 + sseq->xof;
- offsy= (sa->winy-sizey)/2 + sseq->yof;
+ sizex= (int)(zoomx * ibuf->x);
+ sizey= (int)(zoomy * ibuf->y);
+ offsx= (int)( (sa->winx-sizex)/2 + sseq->xof );
+ offsy= (int)( (sa->winy-sizey)/2 + sseq->yof );
dflag |= GP_DRAWDATA_ONLYI2D;
}
@@ -1035,7 +1035,7 @@ void draw_gpencil_oglrender (View3D *v3d, int winx, int winy)
/* pass 2: draw 2d-strokes ------------ > */
/* adjust view matrices */
- myortho2(-0.375, (float)(winx)-0.375, -0.375, (float)(winy)-0.375);
+ myortho2(-0.375f, (float)(winx)-0.375f, -0.375f, (float)(winy)-0.375f);
glLoadIdentity();
/* draw it! */
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index f976244bf91..e230c97f010 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -935,8 +935,8 @@ void action_previewrange_set (bAction *act)
}
/* set preview range */
- G.scene->r.psfra= start;
- G.scene->r.pefra= end;
+ G.scene->r.psfra= (int)start;
+ G.scene->r.pefra= (int)end;
BIF_undo_push("Set anim-preview range");
allqueue(REDRAWTIME, 0);
@@ -1830,7 +1830,7 @@ void clean_action (void)
/* don't proceed any further if nothing to work on or user refuses */
data= get_action_context(&datatype);
ok= fbutton(&G.scene->toolsettings->clean_thresh,
- 0.0000001f, 1.0, 0.001, 0.1,
+ 0.0000001f, 1.0f, 0.001f, 0.1f,
"Clean Threshold");
if (!ok) return;
if (datatype == ACTCONT_GPENCIL) return;
@@ -3204,8 +3204,8 @@ void selectall_action_keys (short mval[], short mode, short select_mode)
rectf.xmax= rectf.xmin;
rectf.ymax= rectf.ymin;
- rectf.xmin = rectf.xmin - 0.5;
- rectf.xmax = rectf.xmax + 0.5;
+ rectf.xmin = rectf.xmin - 0.5f;
+ rectf.xmax = rectf.xmax + 0.5f;
/* filter data */
if (datatype == ACTCONT_GPENCIL)
@@ -3388,11 +3388,11 @@ void nextprev_action_keyframe (short dir)
short changed= 0;
if ((dir > 0) && (nearest->next)) {
- CFRA= nearest->next->cfra;
+ CFRA= (int)nearest->next->cfra;
changed= 1;
}
else if ((dir < 0) && (nearest->prev)) {
- CFRA= nearest->prev->cfra;
+ CFRA= (int)nearest->prev->cfra;
changed= 1;
}
@@ -3482,9 +3482,9 @@ void column_select_action_keys (int mode)
/* apply scaled action correction if needed */
if (NLA_ACTION_SCALED && datatype==ACTCONT_ACTION)
- ce->cfra= get_action_frame(OBACT, CFRA);
+ ce->cfra= (float)get_action_frame(OBACT, (float)CFRA);
else
- ce->cfra= CFRA;
+ ce->cfra= (float)CFRA;
}
/* loop through all of the keys and select additional keyframes
@@ -3961,7 +3961,7 @@ static void mouse_action (int selectmode)
}
}
else if (gpl)
- select_gpencil_frame(gpl, selx, selectmode);
+ select_gpencil_frame(gpl, (int)selx, selectmode);
std_rmouse_transform(transform_action_keys);
@@ -5211,7 +5211,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
openclose_level_action(1);
}
else {
- view2d_zoom(G.v2d, 0.1154, sa->winx, sa->winy);
+ view2d_zoom(G.v2d, 0.1154f, sa->winx, sa->winy);
test_view2d(G.v2d, sa->winx, sa->winy);
view2d_do_locks(curarea, V2D_LOCK_COPY);
@@ -5224,7 +5224,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
openclose_level_action(-1);
}
else {
- view2d_zoom(G.v2d, -0.15, sa->winx, sa->winy);
+ view2d_zoom(G.v2d, -0.15f, sa->winx, sa->winy);
test_view2d(G.v2d, sa->winx, sa->winy);
view2d_do_locks(curarea, V2D_LOCK_COPY);
diff --git a/source/blender/src/editaction_gpencil.c b/source/blender/src/editaction_gpencil.c
index 5d1e73a7b28..fb070624e8f 100644
--- a/source/blender/src/editaction_gpencil.c
+++ b/source/blender/src/editaction_gpencil.c
@@ -133,7 +133,7 @@ void gplayer_make_cfra_list (bGPDlayer *gpl, ListBase *elems, short onlysel)
if ((onlysel == 0) || (gpf->flag & GP_FRAME_SELECT)) {
ce= MEM_callocN(sizeof(CfraElem), "CfraElem");
- ce->cfra= gpf->framenum;
+ ce->cfra= (float)gpf->framenum;
ce->sel= (gpf->flag & GP_FRAME_SELECT) ? 1 : 0;
BLI_addtail(elems, ce);
@@ -390,7 +390,7 @@ void duplicate_gplayer_frames (bGPDlayer *gpl)
/* globals for copy/paste data (like for other copy/paste buffers) */
ListBase gpcopybuf = {NULL, NULL};
-static float gpcopy_firstframe= 999999999.0f;
+static int gpcopy_firstframe= 999999999;
/* This function frees any MEM_calloc'ed copy/paste buffer data */
void free_gpcopybuf ()
@@ -398,7 +398,7 @@ void free_gpcopybuf ()
free_gpencil_layers(&gpcopybuf);
gpcopybuf.first= gpcopybuf.last= NULL;
- gpcopy_firstframe= 999999999.0f;
+ gpcopy_firstframe= 999999999;
}
/* This function adds data to the copy/paste buffer, freeing existing data first
@@ -469,8 +469,8 @@ void paste_gpdata ()
void *data;
short datatype;
+ const int offset = (CFRA - gpcopy_firstframe);
short no_name= 0;
- float offset = CFRA - gpcopy_firstframe;
/* check if buffer is empty */
if (ELEM(NULL, gpcopybuf.first, gpcopybuf.last)) {
@@ -600,7 +600,7 @@ static short snap_gpf_nearest (bGPDframe *gpf)
static short snap_gpf_nearestsec (bGPDframe *gpf)
{
- float secf = FPS;
+ float secf = (float)FPS;
if (gpf->flag & GP_FRAME_SELECT)
gpf->framenum= (int)(floor(gpf->framenum/secf + 0.5f) * secf);
return 0;
@@ -616,7 +616,7 @@ static short snap_gpf_cframe (bGPDframe *gpf)
static short snap_gpf_nearmarker (bGPDframe *gpf)
{
if (gpf->flag & GP_FRAME_SELECT)
- gpf->framenum= (int)find_nearest_marker_time(gpf->framenum);
+ gpf->framenum= (int)find_nearest_marker_time((float)gpf->framenum);
return 0;
}
@@ -648,11 +648,11 @@ void snap_gplayer_frames (bGPDlayer *gpl, short mode)
static short mirror_gpf_cframe (bGPDframe *gpf)
{
- float diff;
+ int diff;
if (gpf->flag & GP_FRAME_SELECT) {
- diff= ((float)CFRA - gpf->framenum);
- gpf->framenum= ((float)CFRA + diff);
+ diff= CFRA - gpf->framenum;
+ gpf->framenum= CFRA;
}
return 0;
@@ -660,11 +660,11 @@ static short mirror_gpf_cframe (bGPDframe *gpf)
static short mirror_gpf_yaxis (bGPDframe *gpf)
{
- float diff;
+ int diff;
if (gpf->flag & GP_FRAME_SELECT) {
- diff= (0.0f - gpf->framenum);
- gpf->framenum= (0.0f + diff);
+ diff= -gpf->framenum;
+ gpf->framenum= diff;
}
return 0;
@@ -672,11 +672,11 @@ static short mirror_gpf_yaxis (bGPDframe *gpf)
static short mirror_gpf_xaxis (bGPDframe *gpf)
{
- float diff;
+ int diff;
if (gpf->flag & GP_FRAME_SELECT) {
- diff= (0.0f - gpf->framenum);
- gpf->framenum= (0.0f + diff);
+ diff= -gpf->framenum;
+ gpf->framenum= diff;
}
return 0;
@@ -686,7 +686,7 @@ static short mirror_gpf_marker (bGPDframe *gpf)
{
static TimeMarker *marker;
static short initialised = 0;
- float diff;
+ int diff;
/* In order for this mirror function to work without
* any extra arguments being added, we use the case
diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c
index 617683a6ab4..6293e669aa1 100644
--- a/source/blender/src/editipo.c
+++ b/source/blender/src/editipo.c
@@ -285,14 +285,14 @@ void editipo_changed(SpaceIpo *si, int doredraw)
/* is there no curve? */
if(first) {
- v2d->tot.xmin= 0.0;
- v2d->tot.xmax= EFRA;
+ v2d->tot.xmin= (float)0.0;
+ v2d->tot.xmax= (float)EFRA;
v2d->tot.ymin= (float)-0.1;
v2d->tot.ymax= (float)1.1;
if(si->blocktype==ID_SEQ) {
- v2d->tot.xmin= -5.0;
- v2d->tot.xmax= 105.0;
+ v2d->tot.xmin= (float)-5.0;
+ v2d->tot.xmax= (float)105.0;
v2d->tot.ymin= (float)-0.1;
v2d->tot.ymax= (float)1.1;
}
@@ -2408,7 +2408,7 @@ void clean_ipo(void)
int b;
ok= fbutton(&G.scene->toolsettings->clean_thresh,
- 0.0000001f, 1.0, 0.001, 0.1,
+ 0.0000001f, 1.0f, 0.001f, 0.1f,
"Threshold");
if (!ok) return;
@@ -3767,7 +3767,7 @@ void movekey_obipo(int dir) /* only call external from view3d queue */
ListBase elems;
IpoKey *ik;
int a;
- float toframe= CFRA;
+ float toframe= (float)CFRA;
if (!G.vd)
return;
@@ -3793,7 +3793,7 @@ void movekey_obipo(int dir) /* only call external from view3d queue */
}
if (ik) toframe= ik->val;
}
-
+
free_ipokey(&elems);
}
}
diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c
index 2c17b20735b..179ea41d5ad 100644
--- a/source/blender/src/editnla.c
+++ b/source/blender/src/editnla.c
@@ -442,8 +442,8 @@ void snap_action_strips(int snap_mode)
if (strip->flag & ACTSTRIP_SELECT) {
if (snap_mode==1) {
/* nearest frame */
- strip->start= floor(strip->start+0.5);
- strip->end= floor(strip->end+0.5);
+ strip->start= (float)floor(strip->start+0.5);
+ strip->end= (float)floor(strip->end+0.5);
}
else if (snap_mode==2) {
/* current frame */
@@ -461,7 +461,7 @@ void snap_action_strips(int snap_mode)
}
else if (snap_mode==3) {
/* nearest second */
- float secf = FPS;
+ float secf = (float)FPS;
strip->start= (float)(floor(strip->start/secf + 0.5f) * secf);
strip->end= (float)(floor(strip->end/secf + 0.5f) * secf);
}
@@ -602,8 +602,8 @@ static void add_nla_block(short event)
strip->act = act;
id_us_plus(&act->id);
calc_action_range(strip->act, &strip->actstart, &strip->actend, 1);
- strip->start = G.scene->r.cfra; /* could be mval[0] another time... */
- strip->end = strip->start + (strip->actend-strip->actstart);
+ strip->start = (float)G.scene->r.cfra; /* could be mval[0] another time... */
+ strip->end = (float)strip->start + (strip->actend-strip->actstart);
/* simple prevention of zero strips */
if(strip->start>strip->end-2)
strip->end= strip->start+100;
@@ -653,8 +653,8 @@ static void add_nla_block_by_name(char name[32], Object *ob, short hold, short a
/* Link the action to the strip */
strip->act = act;
calc_action_range(strip->act, &strip->actstart, &strip->actend, 1);
- strip->start = G.scene->r.cfra; /* could be mval[0] another time... */
- strip->end = strip->start + (strip->actend-strip->actstart);
+ strip->start = (float)G.scene->r.cfra; /* could be mval[0] another time... */
+ strip->end = (float)strip->start + (strip->actend-strip->actstart);
/* simple prevention of zero strips */
if(strip->start>strip->end-2)
strip->end= strip->start+100;
@@ -751,20 +751,20 @@ void add_empty_nlablock(void)
if ((EFRA-CFRA) < 100) {
strip->flag |= ACTSTRIP_AUTO_BLENDS;
strip->flag &= ~ACTSTRIP_LOCK_ACTION;
- strip->actstart = CFRA;
- strip->actend = CFRA + 100;
+ strip->actstart = (float)CFRA;
+ strip->actend = (float)(CFRA + 100);
- strip->start = CFRA;
- strip->end = CFRA + 100;
+ strip->start = (float)CFRA;
+ strip->end = (float)(CFRA + 100);
}
else {
strip->flag |= ACTSTRIP_AUTO_BLENDS;
strip->flag &= ~ACTSTRIP_LOCK_ACTION;
- strip->actstart = CFRA;
- strip->actend = EFRA;
+ strip->actstart = (float)CFRA;
+ strip->actend = (float)EFRA;
- strip->start = CFRA;
- strip->end = EFRA;
+ strip->start = (float)CFRA;
+ strip->end = (float)EFRA;
}
BIF_undo_push("Add NLA strip");
@@ -1196,9 +1196,9 @@ void borderselect_nla(void)
mval[1]= rect.ymax-2;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
- ymax = count_nla_levels();
- ymax*= (NLACHANNELHEIGHT+NLACHANNELSKIP);
- ymax+= (NLACHANNELHEIGHT+NLACHANNELSKIP)/2;
+ ymax = (float)count_nla_levels();
+ ymax *= (float)(NLACHANNELHEIGHT+NLACHANNELSKIP);
+ ymax += (float)(NLACHANNELHEIGHT+NLACHANNELSKIP)/2;
for (base=G.scene->base.first; base; base=base->next){
if (nla_filter(base)) {
@@ -1392,9 +1392,9 @@ static Base *get_nearest_nlastrip (bActionStrip **rstrip, short *sel)
mval[0]+=14;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
- ymax = count_nla_levels();
- ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP);
- ymax+= NLACHANNELHEIGHT/2;
+ ymax = (float)count_nla_levels();
+ ymax *= (float)(NLACHANNELHEIGHT + NLACHANNELSKIP);
+ ymax += (float)(NLACHANNELHEIGHT / 2);
for (base = G.scene->base.first; base; base=base->next){
if (nla_filter(base)) {
@@ -1467,17 +1467,15 @@ static Base *get_nearest_nlachannel_ob_key (float *index, short *sel)
mval[0]+=14;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
- ymax = count_nla_levels();
-
- ymax*= (NLACHANNELHEIGHT + NLACHANNELSKIP);
- ymax+= NLACHANNELHEIGHT/2;
+ ymax = (float)count_nla_levels();
+ ymax *= (float)(NLACHANNELHEIGHT + NLACHANNELSKIP);
+ ymax += (float)(NLACHANNELHEIGHT / 2);
*sel=0;
- for (base=G.scene->base.first; base; base=base->next){
+ for (base=G.scene->base.first; base; base=base->next) {
if (nla_filter(base)) {
-
- ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP);
+ ymin= ymax - (NLACHANNELHEIGHT + NLACHANNELSKIP);
/* Handle object ipo selection */
if (base->object->ipo){
@@ -1579,10 +1577,9 @@ static bAction *get_nearest_nlachannel_ac_key (float *index, short *sel)
mval[0]+=14;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
- ymax = count_nla_levels();
-
- ymax*= (NLACHANNELHEIGHT + NLACHANNELSKIP);
- ymax+= NLACHANNELHEIGHT/2;
+ ymax = (float)count_nla_levels();
+ ymax *= (float)(NLACHANNELHEIGHT + NLACHANNELSKIP);
+ ymax += (float)(NLACHANNELHEIGHT / 2);
*sel=0;
@@ -1995,13 +1992,13 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case PADPLUSKEY:
- view2d_zoom(G.v2d, 0.1154, sa->winx, sa->winy);
+ view2d_zoom(G.v2d, 0.1154f, sa->winx, sa->winy);
test_view2d(G.v2d, sa->winx, sa->winy);
view2d_do_locks(curarea, V2D_LOCK_COPY);
doredraw= 1;
break;
case PADMINUS:
- view2d_zoom(G.v2d, -0.15, sa->winx, sa->winy);
+ view2d_zoom(G.v2d, -0.15f, sa->winx, sa->winy);
test_view2d(G.v2d, sa->winx, sa->winy);
view2d_do_locks(curarea, V2D_LOCK_COPY);
doredraw= 1;
diff --git a/source/blender/src/gpencil.c b/source/blender/src/gpencil.c
index 3d54fdc4439..3c611d00140 100644
--- a/source/blender/src/gpencil.c
+++ b/source/blender/src/gpencil.c
@@ -769,8 +769,8 @@ static void gp_strokepoint_convertcoords (bGPDstroke *gps, bGPDspoint *pt, float
ipoco_to_areaco_noclip(v2d, &pt->x, mval);
}
else {
- mval[0]= (pt->x / 1000 * curarea->winx);
- mval[1]= (pt->y / 1000 * curarea->winy);
+ mval[0]= (short)(pt->x / 1000 * curarea->winx);
+ mval[1]= (short)(pt->y / 1000 * curarea->winy);
}
mx= mval[0];
my= mval[1];
@@ -854,7 +854,7 @@ static void gp_stroke_to_bezier (bGPDlayer *gpl, bGPDstroke *gps, Curve *cu)
/* set settings */
bezt->h1= bezt->h2= HD_FREE;
bezt->f1= bezt->f2= bezt->f3= SELECT;
- bezt->radius = bezt->weight = pt->pressure * gpl->thickness * 0.1;
+ bezt->radius = bezt->weight = pt->pressure * gpl->thickness * 0.1f;
}
/* must calculate handles or else we crash */
@@ -941,14 +941,14 @@ static void gp_stroke_to_bonechain (bGPDlayer *gpl, bGPDstroke *gps, bArmature *
{
ebo->flag |= BONE_CONNECTED;
}
- ebo->weight= 1.0F;
- ebo->dist= 0.25F;
- ebo->xwidth= 0.1;
- ebo->zwidth= 0.1;
- ebo->ease1= 1.0;
- ebo->ease2= 1.0;
- ebo->rad_head= pt->pressure * gpl->thickness * 0.1;
- ebo->rad_tail= ptn->pressure * gpl->thickness * 0.1;
+ ebo->weight= 1.0f;
+ ebo->dist= 0.25f;
+ ebo->xwidth= 0.1f;
+ ebo->zwidth= 0.1f;
+ ebo->ease1= 1.0f;
+ ebo->ease2= 1.0f;
+ ebo->rad_head= pt->pressure * gpl->thickness * 0.1f;
+ ebo->rad_tail= ptn->pressure * gpl->thickness * 0.1f;
ebo->segments= 1;
ebo->layer= arm->layer;
}
@@ -1347,10 +1347,10 @@ static void gp_stroke_simplify (tGPsdata *p)
pressure = 0;
/* using macro, calculate new point */
- GP_SIMPLIFY_AVPOINT(j, -0.25);
- GP_SIMPLIFY_AVPOINT(j+1, 0.75);
- GP_SIMPLIFY_AVPOINT(j+2, 0.75);
- GP_SIMPLIFY_AVPOINT(j+3, -0.25);
+ GP_SIMPLIFY_AVPOINT(j, -0.25f);
+ GP_SIMPLIFY_AVPOINT(j+1, 0.75f);
+ GP_SIMPLIFY_AVPOINT(j+2, 0.75f);
+ GP_SIMPLIFY_AVPOINT(j+3, -0.25f);
/* set values for adding */
mco[0]= (short)co[0];
@@ -1557,7 +1557,7 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, short mval[], short mvalo[],
}
else if (gps->flag & GP_STROKE_2DIMAGE) {
int offsx, offsy, sizex, sizey;
-
+
/* get stored settings */
sizex= p->im2d_settings.sizex;
sizey= p->im2d_settings.sizey;
@@ -1565,12 +1565,12 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, short mval[], short mvalo[],
offsy= p->im2d_settings.offsy;
/* calculate new points */
- x0= (gps->points->x * sizex) + offsx;
- y0= (gps->points->y * sizey) + offsy;
+ x0= (short)((gps->points->x * sizex) + offsx);
+ y0= (short)((gps->points->y * sizey) + offsy);
}
else {
- x0= (gps->points->x / 1000 * p->sa->winx);
- y0= (gps->points->y / 1000 * p->sa->winy);
+ x0= (short)(gps->points->x / 1000 * p->sa->winx);
+ y0= (short)(gps->points->y / 1000 * p->sa->winy);
}
/* do boundbox check first */
@@ -1621,17 +1621,17 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, short mval[], short mvalo[],
offsy= p->im2d_settings.offsy;
/* calculate new points */
- x0= (pt1->x * sizex) + offsx;
- y0= (pt1->y * sizey) + offsy;
+ x0= (short)((pt1->x * sizex) + offsx);
+ y0= (short)((pt1->y * sizey) + offsy);
- x1= (pt2->x * sizex) + offsx;
- y1= (pt2->y * sizey) + offsy;
+ x1= (short)((pt2->x * sizex) + offsx);
+ y1= (short)((pt2->y * sizey) + offsy);
}
else {
- x0= (pt1->x / 1000 * p->sa->winx);
- y0= (pt1->y / 1000 * p->sa->winy);
- x1= (pt2->x / 1000 * p->sa->winx);
- y1= (pt2->y / 1000 * p->sa->winy);
+ x0= (short)(pt1->x / 1000 * p->sa->winx);
+ y0= (short)(pt1->y / 1000 * p->sa->winy);
+ x1= (short)(pt2->x / 1000 * p->sa->winx);
+ y1= (short)(pt2->y / 1000 * p->sa->winy);
}
/* check that point segment of the boundbox of the eraser stroke */
@@ -1896,10 +1896,10 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
recty= (G.scene->r.size * G.scene->r.ysch) / 100;
/* set offset and scale values for opertations to use */
- p->im2d_settings.sizex= zoomx * rectx;
- p->im2d_settings.sizey= zoomy * recty;
- p->im2d_settings.offsx= (p->sa->winx-p->im2d_settings.sizex)/2 + sseq->xof;
- p->im2d_settings.offsy= (p->sa->winy-p->im2d_settings.sizey)/2 + sseq->yof;
+ p->im2d_settings.sizex= (int)(zoomx * rectx);
+ p->im2d_settings.sizey= (int)(zoomy * recty);
+ p->im2d_settings.offsx= (int)((p->sa->winx-p->im2d_settings.sizex)/2 + sseq->xof);
+ p->im2d_settings.offsy= (int)((p->sa->winy-p->im2d_settings.sizey)/2 + sseq->yof);
}
break;
case SPACE_IMAGE:
diff --git a/source/blender/src/header_time.c b/source/blender/src/header_time.c
index 51f71e5bdab..574e0b3a9f1 100644
--- a/source/blender/src/header_time.c
+++ b/source/blender/src/header_time.c
@@ -500,7 +500,7 @@ void time_buttons(ScrArea *sa)
&G.scene->r.psfra,MINFRAMEF, MAXFRAMEF, 0, 0,
"The start frame of the animation preview (inclusive)");
- xco += 4.5*XIC;
+ xco += (short)(4.5*XIC);
uiDefButI(block, NUM, REDRAWALL,"End:",
xco,0,4.5*XIC,YIC,
@@ -513,23 +513,23 @@ void time_buttons(ScrArea *sa)
&G.scene->r.sfra,MINFRAMEF, MAXFRAMEF, 0, 0,
"The start frame of the animation (inclusive)");
- xco += 4.5*XIC;
+ xco += (short)(4.5*XIC);
uiDefButI(block, NUM, REDRAWALL,"End:",
xco,0,4.5*XIC,YIC,
- &G.scene->r.efra,SFRA,MAXFRAMEF, 0, 0,
+ &G.scene->r.efra,(float)SFRA,MAXFRAMEF, 0, 0,
"The end frame of the animation (inclusive)");
}
uiBlockEndAlign(block);
- xco += 4.5*XIC+16;
+ xco += (short)(4.5 * XIC + 16);
uiDefButI(block, NUM, B_NEWFRAME, "",
xco,0,3.5*XIC,YIC,
&(G.scene->r.cfra), MINFRAMEF, MAXFRAMEF, 0, 0,
"Displays Current Frame of animation");
- xco += 3.5*XIC+16;
+ xco += (short)(3.5 * XIC + 16);
uiDefIconBut(block, BUT, B_TL_REW, ICON_REW,
xco, 0, XIC, YIC, 0, 0, 0, 0, 0, "Skip to Start frame (Shift DownArrow)");
diff --git a/source/blender/src/keyframing.c b/source/blender/src/keyframing.c
index e61d8140183..79f62e38709 100644
--- a/source/blender/src/keyframing.c
+++ b/source/blender/src/keyframing.c
@@ -664,7 +664,7 @@ static float visualkey_get_value (ID *id, int blocktype, char *actname, char *co
index= adrcode - OB_ROT_X;
Mat4ToEul(ob->obmat, eul);
- return eul[index]*(5.72958);
+ return eul[index]*(5.72958f);
}
}
}
diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c
index 04506d7d3c3..8e3e44c06de 100644
--- a/source/blender/src/outliner.c
+++ b/source/blender/src/outliner.c
@@ -1688,7 +1688,7 @@ static int tree_element_active_texture(SpaceOops *soops, TreeElement *te, int se
sbuts->texfrom= 0;
}
extern_set_butspace(F6KEY, 0); // force shading buttons texture
- ma->texact= te->index;
+ ma->texact= (char)te->index;
/* also set active material */
ob->actcol= tep->index+1;
@@ -2329,8 +2329,8 @@ static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te,
TreeStoreElem *tselem= TREESTORE(te);
/* store coord and continue, we need coordinates for elements outside view too */
- te->xs= startx;
- te->ys= *starty;
+ te->xs= (float)startx;
+ te->ys= (float)(*starty);
*starty-= OL_H;
if((tselem->flag & TSE_CLOSED)==0) {
@@ -2346,7 +2346,7 @@ static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te,
static void outliner_set_coordinates(SpaceOops *soops)
{
TreeElement *te;
- int starty= soops->v2d.tot.ymax-OL_H;
+ int starty= (int)(soops->v2d.tot.ymax)-OL_H;
int startx= 0;
for(te= soops->tree.first; te; te= te->next) {
@@ -2384,13 +2384,13 @@ void outliner_show_active(struct ScrArea *sa)
te= outliner_find_id(so, &so->tree, (ID *)OBACT);
if(te) {
/* make te->ys center of view */
- ytop= te->ys + (so->v2d.mask.ymax-so->v2d.mask.ymin)/2;
+ ytop= (int)(te->ys + (so->v2d.mask.ymax-so->v2d.mask.ymin)/2);
if(ytop>0) ytop= 0;
- so->v2d.cur.ymax= ytop;
- so->v2d.cur.ymin= ytop-(so->v2d.mask.ymax-so->v2d.mask.ymin);
+ so->v2d.cur.ymax= (float)ytop;
+ so->v2d.cur.ymin= (float)(ytop-(so->v2d.mask.ymax-so->v2d.mask.ymin));
/* make te->xs ==> te->xend center of view */
- xdelta = te->xs - so->v2d.cur.xmin;
+ xdelta = (int)(te->xs - so->v2d.cur.xmin);
so->v2d.cur.xmin += xdelta;
so->v2d.cur.xmax += xdelta;
@@ -2408,13 +2408,13 @@ void outliner_show_selected(struct ScrArea *sa)
te= outliner_find_id(so, &so->tree, (ID *)OBACT);
if(te) {
/* make te->ys center of view */
- ytop= te->ys + (so->v2d.mask.ymax-so->v2d.mask.ymin)/2;
+ ytop= (int)(te->ys + (so->v2d.mask.ymax-so->v2d.mask.ymin)/2);
if(ytop>0) ytop= 0;
- so->v2d.cur.ymax= ytop;
- so->v2d.cur.ymin= ytop-(so->v2d.mask.ymax-so->v2d.mask.ymin);
+ so->v2d.cur.ymax= (float)ytop;
+ so->v2d.cur.ymin= (float)(ytop-(so->v2d.mask.ymax-so->v2d.mask.ymin));
/* make te->xs ==> te->xend center of view */
- xdelta = te->xs - so->v2d.cur.xmin;
+ xdelta = (int)(te->xs - so->v2d.cur.xmin);
so->v2d.cur.xmin += xdelta;
so->v2d.cur.xmax += xdelta;
@@ -2538,13 +2538,13 @@ void outliner_find_panel(struct ScrArea *sa, int again, int flags)
tselem->flag |= TSE_SELECTED;
/* make te->ys center of view */
- ytop= te->ys + (soops->v2d.mask.ymax-soops->v2d.mask.ymin)/2;
+ ytop= (int)(te->ys + (soops->v2d.mask.ymax-soops->v2d.mask.ymin)/2);
if(ytop>0) ytop= 0;
- soops->v2d.cur.ymax= ytop;
- soops->v2d.cur.ymin= ytop-(soops->v2d.mask.ymax-soops->v2d.mask.ymin);
+ soops->v2d.cur.ymax= (float)ytop;
+ soops->v2d.cur.ymin= (float)(ytop-(soops->v2d.mask.ymax-soops->v2d.mask.ymin));
/* make te->xs ==> te->xend center of view */
- xdelta = te->xs - soops->v2d.cur.xmin;
+ xdelta = (int)(te->xs - soops->v2d.cur.xmin);
soops->v2d.cur.xmin += xdelta;
soops->v2d.cur.xmax += xdelta;
@@ -3357,14 +3357,14 @@ static void outliner_draw_iconrow(SpaceOops *soops, ListBase *lb, int level, int
if(active) {
uiSetRoundBox(15);
glColor4ub(255, 255, 255, 100);
- uiRoundBox( (float)*offsx-0.5, (float)ys-1.0, (float)*offsx+OL_H-3.0, (float)ys+OL_H-3.0, OL_H/2.0-2.0);
+ uiRoundBox( (float)*offsx-0.5f, (float)ys-1.0f, (float)*offsx+OL_H-3.0f, (float)ys+OL_H-3.0f, OL_H/2.0f-2.0f);
glEnable(GL_BLEND);
}
- tselem_draw_icon(*offsx, ys, tselem, te);
- te->xs= *offsx;
- te->ys= ys;
- te->xend= *offsx+OL_X;
+ tselem_draw_icon((float)*offsx, (float)ys, tselem, te);
+ te->xs= (float)*offsx;
+ te->ys= (float)ys;
+ te->xend= (short)*offsx+OL_X;
te->flag |= TE_ICONROW; // for click
(*offsx) += OL_X;
@@ -3478,7 +3478,7 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
/* active circle */
if(active) {
uiSetRoundBox(15);
- uiRoundBox( (float)startx+OL_H-1.5, (float)*starty+2.0, (float)startx+2*OL_H-4.0, (float)*starty+OL_H-1.0, OL_H/2.0-2.0);
+ uiRoundBox( (float)startx+OL_H-1.5f, (float)*starty+2.0f, (float)startx+2.0f*OL_H-4.0f, (float)*starty+OL_H-1.0f, OL_H/2.0f-2.0f);
glEnable(GL_BLEND); /* roundbox disables it */
te->flag |= TE_ACTIVE; // for lookup in display hierarchies
@@ -3494,25 +3494,25 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
// icons a bit higher
if(tselem->flag & TSE_CLOSED)
- BIF_icon_draw(icon_x, *starty+2, ICON_TRIA_RIGHT);
+ BIF_icon_draw((float)icon_x, (float)*starty+2, ICON_TRIA_RIGHT);
else
- BIF_icon_draw(icon_x, *starty+2, ICON_TRIA_DOWN);
+ BIF_icon_draw((float)icon_x, (float)*starty+2, ICON_TRIA_DOWN);
}
offsx+= OL_X;
/* datatype icon */
// icons a bit higher
- tselem_draw_icon(startx+offsx, *starty+2, tselem, te);
+ tselem_draw_icon((float)startx+offsx, (float)*starty+2, tselem, te);
offsx+= OL_X;
if(tselem->type==0 && tselem->id->lib) {
- glPixelTransferf(GL_ALPHA_SCALE, 0.5);
+ glPixelTransferf(GL_ALPHA_SCALE, 0.5f);
if(tselem->id->flag & LIB_INDIRECT)
- BIF_icon_draw(startx+offsx, *starty+2, ICON_DATALIB);
+ BIF_icon_draw((float)startx+offsx, (float)*starty+2, ICON_DATALIB);
else
- BIF_icon_draw(startx+offsx, *starty+2, ICON_PARLIB);
- glPixelTransferf(GL_ALPHA_SCALE, 1.0);
+ BIF_icon_draw((float)startx+offsx, (float)*starty+2, ICON_PARLIB);
+ glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
offsx+= OL_X;
}
glDisable(GL_BLEND);
@@ -3521,12 +3521,12 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
if(active==1) BIF_ThemeColor(TH_TEXT_HI);
else BIF_ThemeColor(TH_TEXT);
glRasterPos2i(startx+offsx, *starty+5);
- BIF_RasterPos(startx+offsx, *starty+5);
+ BIF_RasterPos((float)startx+offsx, (float)*starty+5);
#ifdef WITH_VERSE
if(te->name) {
#endif
BIF_DrawString(G.font, te->name, 0);
- offsx+= OL_X + BIF_GetStringWidth(G.font, te->name, 0);
+ offsx+= (int)(OL_X + BIF_GetStringWidth(G.font, te->name, 0));
#ifdef WITH_VERSE
}
#endif
@@ -3569,8 +3569,8 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
}
}
/* store coord and continue, we need coordinates for elements outside view too */
- te->xs= startx;
- te->ys= *starty;
+ te->xs= (float)startx;
+ te->ys= (float)*starty;
te->xend= startx+offsx;
*starty-= OL_H;
@@ -3650,17 +3650,17 @@ static void outliner_draw_tree(SpaceOops *soops)
// selection first
BIF_GetThemeColor3fv(TH_BACK, col);
glColor3f(col[0]+0.06f, col[1]+0.08f, col[2]+0.10f);
- starty= soops->v2d.tot.ymax-OL_H;
+ starty= (int)soops->v2d.tot.ymax-OL_H;
outliner_draw_selection(soops, &soops->tree, &starty);
// grey hierarchy lines
- BIF_ThemeColorBlend(TH_BACK, TH_TEXT, 0.2);
- starty= soops->v2d.tot.ymax-OL_H/2;
+ BIF_ThemeColorBlend(TH_BACK, TH_TEXT, 0.2f);
+ starty= (int)soops->v2d.tot.ymax-OL_H/2;
startx= 6;
outliner_draw_hierarchy(soops, &soops->tree, startx, &starty);
// items themselves
- starty= soops->v2d.tot.ymax-OL_H;
+ starty= (int)soops->v2d.tot.ymax-OL_H;
startx= 0;
for(te= soops->tree.first; te; te= te->next) {
outliner_draw_tree_element(soops, te, startx, &starty);
@@ -3673,7 +3673,7 @@ static void outliner_back(SpaceOops *soops)
int ystart;
BIF_ThemeColorShade(TH_BACK, 6);
- ystart= soops->v2d.tot.ymax;
+ ystart= (int)soops->v2d.tot.ymax;
ystart= OL_H*(ystart/(OL_H));
while(ystart > soops->v2d.cur.ymin) {
@@ -3688,10 +3688,10 @@ static void outliner_draw_restrictcols(SpaceOops *soops)
/* background underneath */
BIF_ThemeColor(TH_BACK);
- glRecti((int)soops->v2d.cur.xmax-OL_TOGW, soops->v2d.cur.ymin, (int)soops->v2d.cur.xmax, soops->v2d.cur.ymax);
+ glRecti((int)soops->v2d.cur.xmax-OL_TOGW, (int)soops->v2d.cur.ymin, (int)soops->v2d.cur.xmax, (int)soops->v2d.cur.ymax);
BIF_ThemeColorShade(TH_BACK, 6);
- ystart= soops->v2d.tot.ymax;
+ ystart= (int)soops->v2d.tot.ymax;
ystart= OL_H*(ystart/(OL_H));
while(ystart > soops->v2d.cur.ymin) {
@@ -3917,17 +3917,17 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_VIEW, REDRAWALL, ICON_RESTRICT_VIEW_OFF,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_view_cb, ob, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_SELECT, REDRAWALL, ICON_RESTRICT_SELECT_OFF,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
uiButSetFunc(bt, restrictbutton_sel_cb, ob, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_RENDER, REDRAWALL, ICON_RESTRICT_RENDER_OFF,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow renderability");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow renderability");
uiButSetFunc(bt, restrictbutton_rend_cb, NULL, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
@@ -3938,7 +3938,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOGN, SCE_LAY_DISABLE, REDRAWBUTSSCENE, ICON_CHECKBOX_HLT-1,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, te->directdata, 0, 0, 0, 0, "Render this RenderLayer");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, te->directdata, 0, 0, 0, 0, "Render this RenderLayer");
uiButSetFunc(bt, restrictbutton_r_lay_cb, NULL, NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
@@ -3949,13 +3949,13 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
/* NOTE: tselem->nr is short! */
bt= uiDefIconButBitI(block, ICONTOG, tselem->nr, REDRAWBUTSSCENE, ICON_CHECKBOX_HLT-1,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Render this Pass");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Render this Pass");
uiButSetFunc(bt, restrictbutton_r_lay_cb, NULL, NULL);
layflag++; /* is lay_xor */
if(ELEM6(tselem->nr, SCE_PASS_SPEC, SCE_PASS_SHADOW, SCE_PASS_AO, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_RADIO))
bt= uiDefIconButBitI(block, TOG, tselem->nr, REDRAWBUTSSCENE, (*layflag & tselem->nr)?ICON_DOT:ICON_BLANK1,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined");
uiButSetFunc(bt, restrictbutton_r_lay_cb, NULL, NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
@@ -3966,12 +3966,12 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Realtime, REDRAWALL, ICON_RESTRICT_VIEW_OFF,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_modifier_cb, ob, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Render, REDRAWALL, ICON_RESTRICT_RENDER_OFF,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability");
uiButSetFunc(bt, restrictbutton_modifier_cb, ob, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
}
@@ -3981,7 +3981,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, REDRAWALL, ICON_RESTRICT_VIEW_OFF,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
}
@@ -3990,7 +3990,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, REDRAWALL, ICON_RESTRICT_VIEW_OFF,
- (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+ (int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
}
@@ -4022,10 +4022,10 @@ static void outliner_buttons(uiBlock *block, SpaceOops *soops, ListBase *lb)
else if(tselem->id && GS(tselem->id->name)==ID_LI) len = sizeof(((Library*) 0)->name);
else len= sizeof(((ID*) 0)->name)-2;
- dx= BIF_GetStringWidth(G.font, te->name, 0);
+ dx= (int)BIF_GetStringWidth(G.font, te->name, 0);
if(dx<50) dx= 50;
- bt= uiDefBut(block, TEX, OL_NAMEBUTTON, "", te->xs+2*OL_X-4, te->ys, dx+10, OL_H-1, te->name, 1.0, (float)len-1, 0, 0, "");
+ bt= uiDefBut(block, TEX, OL_NAMEBUTTON, "", (short)te->xs+2*OL_X-4, (short)te->ys, dx+10, OL_H-1, te->name, 1.0, (float)len-1, 0, 0, "");
uiButSetFunc(bt, namebutton_cb, te, NULL);
// signal for button to open
@@ -4070,27 +4070,27 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops)
outliner_width(soops, &soops->tree, &sizex);
/* we init all tot rect vars, only really needed on window size change though */
- G.v2d->tot.xmin= 0.0;
- G.v2d->tot.xmax= (G.v2d->mask.xmax-G.v2d->mask.xmin);
+ G.v2d->tot.xmin= 0.0f;
+ G.v2d->tot.xmax= (float)(G.v2d->mask.xmax-G.v2d->mask.xmin);
if(soops->flag & SO_HIDE_RESTRICTCOLS) {
if(G.v2d->tot.xmax <= sizex)
- G.v2d->tot.xmax= 2*sizex;
+ G.v2d->tot.xmax= (float)2*sizex;
}
else {
if(G.v2d->tot.xmax-OL_TOGW <= sizex)
- G.v2d->tot.xmax= 2*sizex;
+ G.v2d->tot.xmax= (float)2*sizex;
}
- G.v2d->tot.ymax= 0.0;
- G.v2d->tot.ymin= -sizey*OL_H;
+ G.v2d->tot.ymax= 0.0f;
+ G.v2d->tot.ymin= (float)-sizey*OL_H;
test_view2d(G.v2d, sa->winx, sa->winy);
// align on top window if cur bigger than tot
if(G.v2d->cur.ymax-G.v2d->cur.ymin > sizey*OL_H) {
- G.v2d->cur.ymax= 0.0;
- G.v2d->cur.ymin= -(G.v2d->mask.ymax-G.v2d->mask.ymin);
+ G.v2d->cur.ymax= 0.0f;
+ G.v2d->cur.ymin= (float)-(G.v2d->mask.ymax-G.v2d->mask.ymin);
}
- myortho2(G.v2d->cur.xmin-0.375, G.v2d->cur.xmax-0.375, G.v2d->cur.ymin-0.375, G.v2d->cur.ymax-0.375);
+ myortho2(G.v2d->cur.xmin-0.375f, G.v2d->cur.xmax-0.375f, G.v2d->cur.ymin-0.375f, G.v2d->cur.ymax-0.375f);
/* draw outliner stuff (background and hierachy lines) */
outliner_back(soops);
@@ -4100,7 +4100,7 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops)
mywinset(sa->win);
/* ortho corrected - 'pixel space' */
- myortho2(G.v2d->cur.xmin-SCROLLB-0.375, G.v2d->cur.xmax-0.375, G.v2d->cur.ymin-SCROLLH-0.375, G.v2d->cur.ymax-0.375);
+ myortho2(G.v2d->cur.xmin-SCROLLB-0.375f, G.v2d->cur.xmax-0.375f, G.v2d->cur.ymin-SCROLLH-0.375f, G.v2d->cur.ymax-0.375f);
/* draw icons and names */
block= uiNewBlock(&sa->uiblocks, "outliner buttons", UI_EMBOSS, UI_HELV, sa->win);
diff --git a/source/blender/src/poselib.c b/source/blender/src/poselib.c
index ff54ad31e22..b819dd2a865 100644
--- a/source/blender/src/poselib.c
+++ b/source/blender/src/poselib.c
@@ -388,7 +388,7 @@ void poselib_add_current_pose (Object *ob, int val)
/* add missing ipo-curves and insert keys */
#define INSERT_KEY_ICU(adrcode, data) {\
icu= poselib_verify_icu(achan->ipo, adrcode); \
- insert_vert_icu(icu, frame, data, 1); \
+ insert_vert_icu(icu, (float)frame, data, 1); \
}
INSERT_KEY_ICU(AC_LOC_X, pchan->loc[0])
@@ -685,7 +685,7 @@ static void poselib_apply_pose (tPoseLib_PreviewData *pld)
if (ok) {
/* Evaluates and sets the internal ipo values */
- calc_ipo(achan->ipo, frame);
+ calc_ipo(achan->ipo, (float)frame);
/* This call also sets the pchan flags */
execute_action_ipo(achan, pchan);
}
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index 6cd573c580d..c26620ccbf2 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -893,7 +893,7 @@ static short select_same_color(Object *ob)
Base *base = FIRSTBASE;
while(base) {
- if (BASE_SELECTABLE(base) && !(base->flag & SELECT) && (FloatCompare(base->object->col, ob->col, 0.005))) {
+ if (BASE_SELECTABLE(base) && !(base->flag & SELECT) && (FloatCompare(base->object->col, ob->col, 0.005f))) {
base->flag |= SELECT;
base->object->flag |= SELECT;
changed = 1;
@@ -3303,10 +3303,10 @@ void initipo(ScrArea *sa)
sipo->blockscale= 0.7f;
/* sipo space loopt van (0,-?) tot (??,?) */
- sipo->v2d.tot.xmin= 0.0;
- sipo->v2d.tot.ymin= -10.0;
- sipo->v2d.tot.xmax= G.scene->r.efra;
- sipo->v2d.tot.ymax= 10.0;
+ sipo->v2d.tot.xmin= 0.0f;
+ sipo->v2d.tot.ymin= -10.0f;
+ sipo->v2d.tot.xmax= (float)G.scene->r.efra;
+ sipo->v2d.tot.ymax= 10.0f;
sipo->v2d.cur= sipo->v2d.tot;
@@ -5020,12 +5020,12 @@ static void winqreadseqspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
case WHEELUPMOUSE:
if(sseq->mainb) {
if (G.qual == LR_SHIFTKEY) {
- sseq->zoom += 0.10;
+ sseq->zoom += 0.10f;
} else {
sseq->zoom++;
}
if(sseq->zoom >= -1 && sseq->zoom < 1) {
- sseq->zoom += 2;
+ sseq->zoom += 2.0f;
}
if(sseq->zoom>8) sseq->zoom= 8;
} else {
@@ -5048,12 +5048,12 @@ static void winqreadseqspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
case WHEELDOWNMOUSE:
if(sseq->mainb) {
if (G.qual == LR_SHIFTKEY) {
- sseq->zoom -= 0.10;
+ sseq->zoom -= 0.10f;
} else {
sseq->zoom--;
}
if(sseq->zoom >= -1 && sseq->zoom < 1) {
- sseq->zoom -= 2;
+ sseq->zoom -= 2.0f;
}
if(sseq->zoom<-8) sseq->zoom= -8;
} else {
@@ -5264,26 +5264,26 @@ static void init_seqspace(ScrArea *sa)
sseq->spacetype= SPACE_SEQ;
sseq->zoom= 4;
- sseq->blockscale= 0.7;
+ sseq->blockscale= 0.7f;
sseq->chanshown = 0;
/* seq space goes from (0,8) to (250, 0) */
- sseq->v2d.tot.xmin= 0.0;
- sseq->v2d.tot.ymin= 0.0;
- sseq->v2d.tot.xmax= 250.0;
- sseq->v2d.tot.ymax= 8.0;
+ sseq->v2d.tot.xmin= 0.0f;
+ sseq->v2d.tot.ymin= 0.0f;
+ sseq->v2d.tot.xmax= 250.0f;
+ sseq->v2d.tot.ymax= 8.0f;
sseq->v2d.cur= sseq->v2d.tot;
- sseq->v2d.min[0]= 10.0;
- sseq->v2d.min[1]= 4.0;
+ sseq->v2d.min[0]= 10.0f;
+ sseq->v2d.min[1]= 4.0f;
sseq->v2d.max[0]= MAXFRAMEF;
sseq->v2d.max[1]= MAXSEQ;
sseq->v2d.minzoom= 0.01f;
- sseq->v2d.maxzoom= 100.0;
+ sseq->v2d.maxzoom= 100.0f;
sseq->v2d.scroll= L_SCROLL+B_SCROLL;
sseq->v2d.keepaspect= 0;
@@ -5315,25 +5315,25 @@ static void init_actionspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, saction);
saction->spacetype= SPACE_ACTION;
- saction->blockscale= 0.7;
+ saction->blockscale= 0.7f;
- saction->v2d.tot.xmin= 1.0;
- saction->v2d.tot.ymin= -1000.0;
- saction->v2d.tot.xmax= 1000.0;
- saction->v2d.tot.ymax= 0.0;
+ saction->v2d.tot.xmin= 1.0f;
+ saction->v2d.tot.ymin= -1000.0f;
+ saction->v2d.tot.xmax= 1000.0f;
+ saction->v2d.tot.ymax= 0.0f;
- saction->v2d.cur.xmin= -5.0;
- saction->v2d.cur.ymin= -75.0;
- saction->v2d.cur.xmax= 65.0;
- saction->v2d.cur.ymax= 5.0;
+ saction->v2d.cur.xmin= -5.0f;
+ saction->v2d.cur.ymin= -75.0f;
+ saction->v2d.cur.xmax= 65.0f;
+ saction->v2d.cur.ymax= 5.0f;
- saction->v2d.min[0]= 0.0;
- saction->v2d.min[1]= 0.0;
+ saction->v2d.min[0]= 0.0f;
+ saction->v2d.min[1]= 0.0f;
saction->v2d.max[0]= MAXFRAMEF;
- saction->v2d.max[1]= 1000.0;
+ saction->v2d.max[1]= 1000.0f;
- saction->v2d.minzoom= 0.01;
+ saction->v2d.minzoom= 0.01f;
saction->v2d.maxzoom= 50;
saction->v2d.scroll= R_SCROLL+B_SCROLL;
@@ -5368,7 +5368,7 @@ static void init_filespace(ScrArea *sa)
sfile->dir[0]= '/';
sfile->type= FILE_UNIX;
- sfile->blockscale= 0.7;
+ sfile->blockscale= 0.7f;
sfile->spacetype= SPACE_FILE;
}
@@ -5386,27 +5386,27 @@ static void init_soundspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, ssound);
ssound->spacetype= SPACE_SOUND;
- ssound->blockscale= 0.7;
+ ssound->blockscale= 0.7f;
/* sound space goes from (0,8) to (250, 0) */
- ssound->v2d.tot.xmin= -4.0;
- ssound->v2d.tot.ymin= -4.0;
- ssound->v2d.tot.xmax= 250.0;
- ssound->v2d.tot.ymax= 255.0;
+ ssound->v2d.tot.xmin= -4.0f;
+ ssound->v2d.tot.ymin= -4.0f;
+ ssound->v2d.tot.xmax= 250.0f;
+ ssound->v2d.tot.ymax= 255.0f;
- ssound->v2d.cur.xmin= -4.0;
- ssound->v2d.cur.ymin= -4.0;
- ssound->v2d.cur.xmax= 50.0;
- ssound->v2d.cur.ymax= 255.0;
+ ssound->v2d.cur.xmin= -4.0f;
+ ssound->v2d.cur.ymin= -4.0f;
+ ssound->v2d.cur.xmax= 50.0f;
+ ssound->v2d.cur.ymax= 255.0f;
- ssound->v2d.min[0]= 1.0;
- ssound->v2d.min[1]= 259.0;
+ ssound->v2d.min[0]= 1.0f;
+ ssound->v2d.min[1]= 259.0f;
ssound->v2d.max[0]= MAXFRAMEF;
- ssound->v2d.max[1]= 259;
+ ssound->v2d.max[1]= 259.0f;
ssound->v2d.minzoom= 0.1f;
- ssound->v2d.maxzoom= 10.0;
+ ssound->v2d.maxzoom= 10.0f;
ssound->v2d.scroll= B_SCROLL;
ssound->v2d.keepaspect= 0;
@@ -5745,7 +5745,7 @@ static void init_imagespace(ScrArea *sa)
sima->spacetype= SPACE_IMAGE;
sima->zoom= 1;
- sima->blockscale= 0.7;
+ sima->blockscale= 0.7f;
sima->iuser.ok= 1;
sima->iuser.fie_ima= 2;
@@ -5777,18 +5777,18 @@ static void init_imaselspace(ScrArea *sa)
simasel->blockscale= 0.7;
/* 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;
- simasel->v2d.min[1]= 1.0;
+ simasel->v2d.min[0]= 1.0f;
+ simasel->v2d.min[1]= 1.0f;
simasel->v2d.max[0]= 32000.0f;
simasel->v2d.max[1]= 32000.0f;
@@ -5932,8 +5932,8 @@ static void winqreadoopsspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case PADPLUSKEY:
- dx= 0.1154*(v2d->cur.xmax-v2d->cur.xmin);
- dy= 0.1154*(v2d->cur.ymax-v2d->cur.ymin);
+ dx= 0.1154f*(v2d->cur.xmax-v2d->cur.xmin);
+ dy= 0.1154f*(v2d->cur.ymax-v2d->cur.ymin);
v2d->cur.xmin+= dx;
v2d->cur.xmax-= dx;
v2d->cur.ymin+= dy;
@@ -5944,8 +5944,8 @@ static void winqreadoopsspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
case PADMINUS:
- dx= 0.15*(v2d->cur.xmax-v2d->cur.xmin);
- dy= 0.15*(v2d->cur.ymax-v2d->cur.ymin);
+ dx= 0.15f*(v2d->cur.xmax-v2d->cur.xmin);
+ dy= 0.15f*(v2d->cur.ymax-v2d->cur.ymin);
v2d->cur.xmin-= dx;
v2d->cur.xmax+= dx;
v2d->cur.ymin-= dy;
@@ -6045,10 +6045,10 @@ void init_v2d_oops(ScrArea *sa, SpaceOops *soops)
/* outliner space is window size */
calc_scrollrcts(sa, v2d, sa->winx, sa->winy);
- v2d->tot.xmax= (v2d->mask.xmax-v2d->mask.xmin);
- v2d->tot.ymax= (v2d->mask.ymax-v2d->mask.ymin);
- v2d->tot.xmin= 0.0;
- v2d->tot.ymin= 0.0;
+ v2d->tot.xmax= (float)(v2d->mask.xmax-v2d->mask.xmin);
+ v2d->tot.ymax= (float)(v2d->mask.ymax-v2d->mask.ymin);
+ v2d->tot.xmin= 0.0f;
+ v2d->tot.ymin= 0.0f;
v2d->cur= v2d->tot;
@@ -6058,8 +6058,8 @@ void init_v2d_oops(ScrArea *sa, SpaceOops *soops)
v2d->max[0]= v2d->tot.xmax;
v2d->max[1]= v2d->tot.ymax;
- v2d->minzoom= 1.0;
- v2d->maxzoom= 1.0;
+ v2d->minzoom= 1.0f;
+ v2d->maxzoom= 1.0f;
/* B_SCROLLO used here instead of B_SCROLL, to stop old blender's hanging on
* loading a file from a version with horizontal scrolling due to an old bug
@@ -6075,21 +6075,21 @@ void init_v2d_oops(ScrArea *sa, SpaceOops *soops)
v2d->keeptot= 2;
}
else {
- v2d->tot.xmin= -28.0;
- v2d->tot.xmax= 28.0;
- v2d->tot.ymin= -28.0;
- v2d->tot.ymax= 28.0;
+ v2d->tot.xmin= -28.0f;
+ v2d->tot.xmax= 28.0f;
+ v2d->tot.ymin= -28.0f;
+ v2d->tot.ymax= 28.0f;
v2d->cur= v2d->tot;
- v2d->min[0]= 10.0;
- v2d->min[1]= 4.0;
+ v2d->min[0]= 10.0f;
+ v2d->min[1]= 4.0f;
- v2d->max[0]= 320.0;
- v2d->max[1]= 320.0;
+ v2d->max[0]= 320.0f;
+ v2d->max[1]= 320.0f;
v2d->minzoom= 0.01f;
- v2d->maxzoom= 2.0;
+ v2d->maxzoom= 2.0f;
/* v2d->scroll= L_SCROLL+B_SCROLL; */
v2d->scroll= 0;
@@ -6111,7 +6111,7 @@ static void init_oopsspace(ScrArea *sa)
soops->type= SO_OUTLINER;
soops->spacetype= SPACE_OOPS;
- soops->blockscale= 0.7;
+ soops->blockscale= 0.7f;
init_v2d_oops(sa, soops);
}
@@ -6125,26 +6125,26 @@ static void init_nlaspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, snla);
snla->spacetype= SPACE_NLA;
- snla->blockscale= 0.7;
+ snla->blockscale= 0.7f;
- snla->v2d.tot.xmin= 1.0;
- snla->v2d.tot.ymin= 0.0;
- snla->v2d.tot.xmax= 1000.0;
- snla->v2d.tot.ymax= 1000.0;
+ snla->v2d.tot.xmin= 1.0f;
+ snla->v2d.tot.ymin= 0.0f;
+ snla->v2d.tot.xmax= 1000.0f;
+ snla->v2d.tot.ymax= 1000.0f;
- snla->v2d.cur.xmin= -5.0;
- snla->v2d.cur.ymin= 0.0;
- snla->v2d.cur.xmax= 65.0;
- snla->v2d.cur.ymax= 1000.0;
+ snla->v2d.cur.xmin= -5.0f;
+ snla->v2d.cur.ymin= 0.0f;
+ snla->v2d.cur.xmax= 65.0f;
+ snla->v2d.cur.ymax= 1000.0f;
- snla->v2d.min[0]= 0.0;
- snla->v2d.min[1]= 0.0;
+ snla->v2d.min[0]= 0.0f;
+ snla->v2d.min[1]= 0.0f;
snla->v2d.max[0]= MAXFRAMEF;
- snla->v2d.max[1]= 1000.0;
+ snla->v2d.max[1]= 1000.0f;
- snla->v2d.minzoom= 0.1F;
- snla->v2d.maxzoom= 50;
+ snla->v2d.minzoom= 0.1f;
+ snla->v2d.maxzoom= 50.0f;
snla->v2d.scroll= R_SCROLL+B_SCROLL;
snla->v2d.keepaspect= 0;
@@ -6169,7 +6169,7 @@ static void init_textspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, st);
st->spacetype= SPACE_TEXT;
- st->blockscale= 0.7;
+ st->blockscale= 0.7f;
st->text= NULL;
st->flags= 0;
@@ -6200,7 +6200,7 @@ static void init_scriptspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, sc);
sc->spacetype = SPACE_SCRIPT;
- sc->blockscale= 0.7;
+ sc->blockscale= 0.7f;
sc->script = NULL;
sc->flags = 0;
}
@@ -6219,24 +6219,24 @@ static void init_timespace(ScrArea *sa)
BLI_addhead(&sa->spacedata, stime);
stime->spacetype= SPACE_TIME;
- stime->blockscale= 0.7;
+ stime->blockscale= 0.7f;
stime->redraws= TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN;
- stime->v2d.tot.xmin= -4.0;
- stime->v2d.tot.ymin= 0.0;
+ stime->v2d.tot.xmin= -4.0f;
+ stime->v2d.tot.ymin= 0.0f;
stime->v2d.tot.xmax= (float)EFRA + 4.0;
stime->v2d.tot.ymax= (float)sa->winy;
stime->v2d.cur= stime->v2d.tot;
- stime->v2d.min[0]= 1.0;
+ stime->v2d.min[0]= 1.0f;
stime->v2d.min[1]= (float)sa->winy;
stime->v2d.max[0]= MAXFRAMEF;
stime->v2d.max[1]= (float)sa->winy;
stime->v2d.minzoom= 0.1f;
- stime->v2d.maxzoom= 10.0;
+ stime->v2d.maxzoom= 10.0f;
stime->v2d.scroll= 0;
stime->v2d.keepaspect= 0;
@@ -6260,20 +6260,20 @@ static void init_nodespace(ScrArea *sa)
BLI_addhead(&sa->spacedata, snode);
snode->spacetype= SPACE_NODE;
- snode->blockscale= 0.7;
+ snode->blockscale= 0.7f;
- snode->v2d.tot.xmin= -10.0;
- snode->v2d.tot.ymin= -10.0;
+ snode->v2d.tot.xmin= -10.0f;
+ snode->v2d.tot.ymin= -10.0f;
snode->v2d.tot.xmax= (float)sa->winx + 10.0f;
snode->v2d.tot.ymax= (float)sa->winy + 10.0f;
- snode->v2d.cur.xmin= 0.0;
- snode->v2d.cur.ymin= 0.0;
+ snode->v2d.cur.xmin= 0.0f;
+ snode->v2d.cur.ymin= 0.0f;
snode->v2d.cur.xmax= (float)sa->winx;
snode->v2d.cur.ymax= (float)sa->winy;
- snode->v2d.min[0]= 1.0;
- snode->v2d.min[1]= 1.0;
+ snode->v2d.min[0]= 1.0f;
+ snode->v2d.min[1]= 1.0f;
snode->v2d.max[0]= 32000.0f;
snode->v2d.max[1]= 32000.0f;
diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c
index ed12c89f63b..3465983d110 100644
--- a/source/blender/src/transform_conversions.c
+++ b/source/blender/src/transform_conversions.c
@@ -2408,8 +2408,8 @@ void flushTransUVs(TransInfo *t)
td->loc2d[1]= td->loc[1]*invy;
if((G.sima->flag & SI_PIXELSNAP) && (t->state != TRANS_CANCEL)) {
- td->loc2d[0]= floor(width*td->loc2d[0] + 0.5f)/width;
- td->loc2d[1]= floor(height*td->loc2d[1] + 0.5f)/height;
+ td->loc2d[0]= (float)floor(width*td->loc2d[0] + 0.5f)/width;
+ td->loc2d[1]= (float)floor(height*td->loc2d[1] + 0.5f)/height;
}
}
@@ -2719,12 +2719,12 @@ static void posttrans_nla_clean (TransInfo *t)
ob= base->object;
/* Check object ipos */
- i= count_ipo_keys(ob->ipo, side, CFRA);
+ i= count_ipo_keys(ob->ipo, side, (float)CFRA);
if (i) posttrans_ipo_clean(ob->ipo);
/* Check object constraint ipos */
for (conchan=ob->constraintChannels.first; conchan; conchan=conchan->next) {
- i= count_ipo_keys(conchan->ipo, side, CFRA);
+ i= count_ipo_keys(conchan->ipo, side, (float)CFRA);
if (i) posttrans_ipo_clean(conchan->ipo);
}
@@ -2742,7 +2742,7 @@ static void posttrans_nla_clean (TransInfo *t)
}
}
if (strip==NULL) {
- cfra = get_action_frame(ob, CFRA);
+ cfra = get_action_frame(ob, (float)CFRA);
for (achan=ob->action->chanbase.first; achan; achan=achan->next) {
if (EDITABLE_ACHAN(achan)) {
@@ -2828,7 +2828,7 @@ static int count_gplayer_frames(bGPDlayer *gpl, char side, float cfra)
/* only include points that occur on the right side of cfra */
for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
if (gpf->flag & GP_FRAME_SELECT) {
- if (FrameOnMouseSide(side, gpf->framenum, cfra))
+ if (FrameOnMouseSide(side, (float)gpf->framenum, cfra))
count++;
}
}
@@ -2920,7 +2920,7 @@ void flushTransGPactionData (TransInfo *t)
* The 'side' argument is needed for the extend mode. 'B' = both sides, 'R'/'L' mean only data
* on the named side are used.
*/
-static int GPLayerToTransData (TransData *td, tGPFtransdata *tfd, bGPDlayer *gpl, short side, float cfra)
+static int GPLayerToTransData (TransData *td, tGPFtransdata *tfd, bGPDlayer *gpl, char side, float cfra)
{
bGPDframe *gpf;
int count= 0;
@@ -2928,12 +2928,12 @@ static int GPLayerToTransData (TransData *td, tGPFtransdata *tfd, bGPDlayer *gpl
/* check for select frames on right side of current frame */
for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
if (gpf->flag & GP_FRAME_SELECT) {
- if (FrameOnMouseSide(side, gpf->framenum, cfra)) {
+ if (FrameOnMouseSide(side, (float)gpf->framenum, cfra)) {
/* memory is calloc'ed, so that should zero everything nicely for us */
td->val= &tfd->val;
- td->ival= gpf->framenum;
+ td->ival= (float)gpf->framenum;
- tfd->val= gpf->framenum;
+ tfd->val= (float)gpf->framenum;
tfd->sdata= &gpf->framenum;
/* advance td now */
@@ -2995,9 +2995,9 @@ static void createTransActionData(TransInfo *t)
* higher scaling ratios, but is faster than converting all points)
*/
if (ob)
- cfra = get_action_frame(ob, CFRA);
+ cfra = get_action_frame(ob, (float)CFRA);
else
- cfra = CFRA;
+ cfra = (float)CFRA;
/* loop 1: fully select ipo-keys and count how many BezTriples are selected */
for (ale= act_data.first; ale; ale= ale->next) {
@@ -3052,7 +3052,7 @@ static void createTransActionData(TransInfo *t)
/* check if we're supposed to be setting minx/maxx for TimeSlide */
if (t->mode == TFM_TIME_SLIDE) {
- float min=999999999.0f, max=-999999999.0;
+ float min=999999999.0f, max=-999999999.0f;
int i;
td= (t->data + 1);
@@ -3101,13 +3101,13 @@ static void createTransNlaData(TransInfo *t)
/* Ensure that partial selections result in beztriple selections */
for (base=G.scene->base.first; base; base=base->next) {
/* Check object ipos */
- i= count_ipo_keys(base->object->ipo, side, CFRA);
+ i= count_ipo_keys(base->object->ipo, side, (float)CFRA);
if (i) base->flag |= BA_HAS_RECALC_OB;
count += i;
/* Check object constraint ipos */
for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next)
- count += count_ipo_keys(conchan->ipo, side, CFRA);
+ count += count_ipo_keys(conchan->ipo, side, (float)CFRA);
/* skip actions and nlastrips if object is collapsed */
if (base->object->nlaflag & OB_NLA_COLLAPSED)
@@ -3123,7 +3123,7 @@ static void createTransNlaData(TransInfo *t)
}
}
if (strip==NULL) {
- cfra = get_action_frame(base->object, CFRA);
+ cfra = get_action_frame(base->object, (float)CFRA);
for (achan=base->object->action->chanbase.first; achan; achan=achan->next) {
if (EDITABLE_ACHAN(achan)) {
@@ -3148,8 +3148,8 @@ static void createTransNlaData(TransInfo *t)
if (strip->flag & ACTSTRIP_SELECT) {
base->flag |= BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA;
- if (FrameOnMouseSide(side, strip->start, CFRA)) count++;
- if (FrameOnMouseSide(side, strip->end, CFRA)) count++;
+ if (FrameOnMouseSide(side, strip->start, (float)CFRA)) count++;
+ if (FrameOnMouseSide(side, strip->end, (float)CFRA)) count++;
}
}
}
@@ -3167,12 +3167,12 @@ static void createTransNlaData(TransInfo *t)
for (base=G.scene->base.first; base; base=base->next) {
/* Manipulate object ipos */
/* - no scaling of keyframe times is allowed here */
- td= IpoToTransData(td, base->object->ipo, NULL, side, CFRA);
+ td= IpoToTransData(td, base->object->ipo, NULL, side, (float)CFRA);
/* Manipulate object constraint ipos */
/* - no scaling of keyframe times is allowed here */
for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next)
- td= IpoToTransData(td, conchan->ipo, NULL, side, CFRA);
+ td= IpoToTransData(td, conchan->ipo, NULL, side, (float)CFRA);
/* skip actions and nlastrips if object collapsed */
if (base->object->nlaflag & OB_NLA_COLLAPSED)
@@ -3190,7 +3190,7 @@ static void createTransNlaData(TransInfo *t)
/* can include if no strip found */
if (strip==NULL) {
- cfra = get_action_frame(base->object, CFRA);
+ cfra = get_action_frame(base->object, (float)CFRA);
for (achan=base->object->action->chanbase.first; achan; achan=achan->next) {
if (EDITABLE_ACHAN(achan)) {
@@ -3212,12 +3212,12 @@ static void createTransNlaData(TransInfo *t)
for (strip=base->object->nlastrips.first; strip; strip=strip->next) {
if (strip->flag & ACTSTRIP_SELECT) {
/* first TransData is the start, second is the end */
- if (FrameOnMouseSide(side, strip->start, CFRA)) {
+ if (FrameOnMouseSide(side, strip->start, (float)CFRA)) {
td->val = &strip->start;
td->ival = strip->start;
td++;
}
- if (FrameOnMouseSide(side, strip->end, CFRA)) {
+ if (FrameOnMouseSide(side, strip->end, (float)CFRA)) {
td->val = &strip->end;
td->ival = strip->end;
td++;
diff --git a/source/blender/src/view.c b/source/blender/src/view.c
index 66af3539e88..e7b46d83b50 100644
--- a/source/blender/src/view.c
+++ b/source/blender/src/view.c
@@ -111,7 +111,7 @@ void persp_general(int a)
glPushMatrix();
glMatrixMode(GL_MODELVIEW);
- myortho2(-0.375, ((float)(curarea->winx))-0.375, -0.375, ((float)(curarea->winy))-0.375);
+ myortho2(-0.375f, ((float)(curarea->winx))-0.375f, -0.375f, ((float)(curarea->winy))-0.375f);
glLoadIdentity();
}
else if(a== 1) {
@@ -134,7 +134,7 @@ void persp(int a)
mygetmatrix(G.vd->viewmat1);
}
else if(a== PERSP_WIN) { // only set
- myortho2(-0.375, (float)(curarea->winx)-0.375, -0.375, (float)(curarea->winy)-0.375);
+ myortho2(-0.375f, (float)(curarea->winx)-0.375f, -0.375f, (float)(curarea->winy)-0.375f);
glLoadIdentity();
}
else if(a== PERSP_VIEW) {
@@ -242,8 +242,8 @@ void project_short(float *vec, short *adr) /* clips */
fy= (curarea->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>0.0 && fy< (float)curarea->winy) {
- adr[0]= floor(fx);
- adr[1]= floor(fy);
+ adr[0]= (short)floor(fx);
+ adr[1]= (short)floor(fy);
}
}
}
@@ -253,7 +253,7 @@ void project_int(float *vec, int *adr)
{
float fx, fy, vec4[4];
- adr[0]= 2140000000.0f;
+ adr[0]= (int)2140000000.0f;
VECCOPY(vec4, vec);
vec4[3]= 1.0;
@@ -266,8 +266,8 @@ void project_int(float *vec, int *adr)
fy= (curarea->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>-2140000000.0f && fy<2140000000.0f) {
- adr[0]= floor(fx);
- adr[1]= floor(fy);
+ adr[0]= (int)floor(fx);
+ adr[1]= (int)floor(fy);
}
}
}
@@ -286,8 +286,8 @@ void project_int_noclip(float *vec, int *adr)
fx = (curarea->winx/2)*(1 + vec4[0]/vec4[3]);
fy = (curarea->winy/2)*(1 + vec4[1]/vec4[3]);
- adr[0] = floor(fx);
- adr[1] = floor(fy);
+ adr[0] = (int)floor(fx);
+ adr[1] = (int)floor(fy);
}
else
{
@@ -314,8 +314,8 @@ void project_short_noclip(float *vec, short *adr)
fy= (curarea->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>-32700.0 && fy<32700.0) {
- adr[0]= floor(fx);
- adr[1]= floor(fy);
+ adr[0]= (short)floor(fx);
+ adr[1]= (short)floor(fy);
}
}
}
@@ -332,8 +332,8 @@ void project_float(float *vec, float *adr)
Mat4MulVec4fl(G.vd->persmat, vec4);
if( vec4[3]>BL_NEAR_CLIP ) {
- adr[0] = (curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3];
- adr[1] = (curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3];
+ adr[0] = (float)(curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3];
+ adr[1] = (float)(curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3];
}
}
@@ -347,8 +347,8 @@ void project_float_noclip(float *vec, float *adr)
Mat4MulVec4fl(G.vd->persmat, vec4);
if( fabs(vec4[3]) > BL_NEAR_CLIP ) {
- adr[0] = (curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3];
- adr[1] = (curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3];
+ adr[0] = (float)(curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3];
+ adr[1] = (float)(curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3];
}
else
{
@@ -401,8 +401,8 @@ void view3d_project_short_clip(ScrArea *area, float *vec, short *adr, float proj
fy= (area->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>0.0 && fy< (float)area->winy) {
- adr[0]= floor(fx);
- adr[1]= floor(fy);
+ adr[0]= (short)floor(fx);
+ adr[1]= (short)floor(fy);
}
}
}
@@ -427,8 +427,8 @@ void view3d_project_short_noclip(ScrArea *area, float *vec, short *adr, float ma
fy= (area->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>-32700.0 && fy<32700.0) {
- adr[0]= floor(fx);
- adr[1]= floor(fy);
+ adr[0]= (short)floor(fx);
+ adr[1]= (short)floor(fy);
}
}
}
@@ -445,10 +445,10 @@ void view3d_project_float(ScrArea *area, float *vec, float *adr, float mat[4][4]
Mat4MulVec4fl(mat, vec4);
if( vec4[3]>FLT_EPSILON ) {
- adr[0] = (area->winx/2.0)+(area->winx/2.0)*vec4[0]/vec4[3];
- adr[1] = (area->winy/2.0)+(area->winy/2.0)*vec4[1]/vec4[3];
+ adr[0] = (float)(area->winx/2.0f)+(area->winx/2.0f)*vec4[0]/vec4[3];
+ adr[1] = (float)(area->winy/2.0f)+(area->winy/2.0f)*vec4[1]/vec4[3];
} else {
- adr[0] = adr[1] = 0.0;
+ adr[0] = adr[1] = 0.0f;
}
}
@@ -1119,7 +1119,7 @@ void viewmove(int mode)
int i;
float viewmat[3][3];
- static const float thres = 0.93; //cos(20 deg);
+ static const float thres = 0.93f; //cos(20 deg);
static float snapquats[39][6] = {
/*{q0, q1, q3, q4, view, oposite_direction}*/
@@ -2164,20 +2164,20 @@ void centerview() /* like a localview without local! */
afm[0]= (max[0]-min[0]);
afm[1]= (max[1]-min[1]);
afm[2]= (max[2]-min[2]);
- size= 0.7*MAX3(afm[0], afm[1], afm[2]);
+ size= 0.7f*MAX3(afm[0], afm[1], afm[2]);
- if(size <= G.vd->near*1.5) size= G.vd->near*1.5;
+ if(size <= G.vd->near*1.5f) size= G.vd->near*1.5f;
- new_ofs[0]= -(min[0]+max[0])/2.0;
- new_ofs[1]= -(min[1]+max[1])/2.0;
- new_ofs[2]= -(min[2]+max[2])/2.0;
+ new_ofs[0]= -(min[0]+max[0])/2.0f;
+ new_ofs[1]= -(min[1]+max[1])/2.0f;
+ new_ofs[2]= -(min[2]+max[2])/2.0f;
new_dist = size;
/* correction for window aspect ratio */
if(curarea->winy>2 && curarea->winx>2) {
size= (float)curarea->winx/(float)curarea->winy;
- if(size<1.0) size= 1.0/size;
+ if(size<1.0f) size= 1.0f/size;
new_dist*= size;
}
@@ -2189,7 +2189,7 @@ void centerview() /* like a localview without local! */
float orig_lens= G.vd->lens;
G.vd->persp=V3D_PERSP;
- G.vd->dist= 0.0;
+ G.vd->dist= 0.0f;
view_settings_from_ob(G.vd->camera, G.vd->ofs, NULL, NULL, &G.vd->lens);
smooth_view(G.vd, new_ofs, NULL, &new_dist, &orig_lens);
} else {
@@ -2272,8 +2272,8 @@ void view3d_home(int center)
int ok= 1, onedone=0;
if(center) {
- min[0]= min[1]= min[2]= 0.0;
- max[0]= max[1]= max[2]= 0.0;
+ min[0]= min[1]= min[2]= 0.0f;
+ max[0]= max[1]= max[2]= 0.0f;
}
else {
INIT_MINMAX(min, max);
@@ -2290,7 +2290,7 @@ void view3d_home(int center)
afm[0]= (max[0]-min[0]);
afm[1]= (max[1]-min[1]);
afm[2]= (max[2]-min[2]);
- size= 0.7*MAX3(afm[0], afm[1], afm[2]);
+ size= 0.7f*MAX3(afm[0], afm[1], afm[2]);
if(size==0.0) ok= 0;
if(ok) {
@@ -2298,14 +2298,14 @@ void view3d_home(int center)
float new_ofs[3];
new_dist = size;
- new_ofs[0]= -(min[0]+max[0])/2.0;
- new_ofs[1]= -(min[1]+max[1])/2.0;
- new_ofs[2]= -(min[2]+max[2])/2.0;
+ new_ofs[0]= -(min[0]+max[0])/2.0f;
+ new_ofs[1]= -(min[1]+max[1])/2.0f;
+ new_ofs[2]= -(min[2]+max[2])/2.0f;
// correction for window aspect ratio
if(curarea->winy>2 && curarea->winx>2) {
size= (float)curarea->winx/(float)curarea->winy;
- if(size<1.0) size= 1.0/size;
+ if(size<1.0) size= 1.0f/size;
new_dist*= size;
}
@@ -2340,7 +2340,7 @@ void view3d_align_axis_to_vector(View3D *v3d, int axisidx, float vec[3])
VECCOPY(norm, vec);
Normalize(norm);
- angle= acos(Inpf(alignaxis, norm));
+ angle= (float)acos(Inpf(alignaxis, norm));
Crossf(axis, alignaxis, norm);
VecRotToQuat(axis, -angle, new_quat);
@@ -2439,8 +2439,8 @@ void smooth_view(View3D *v3d, float *ofs, float *quat, float *dist, float *lens)
step = (float)((time_current-time_start) / time_allowed);
/* ease in/out */
- if (step < 0.5) step = pow(step*2, 2)/2;
- else step = 1-(pow(2*(1-step) ,2)/2);
+ if (step < 0.5) step = (float)pow(step*2, 2)/2;
+ else step = (float)1-(pow(2*(1-step),2)/2);
step_inv = 1-step;