diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-10-20 13:24:25 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-10-20 13:24:25 +0400 |
commit | 81c21128bb598f3b037264b5df1966d22ab24ad3 (patch) | |
tree | 8f96368b9587db2a36556291b22ced09eafc3e58 /source/blender/src/drawaction.c | |
parent | 63f6932fa5652fe850d0692e0a8fcafb48f20fb9 (diff) |
A few warnings missed in previous sweep
Diffstat (limited to 'source/blender/src/drawaction.c')
-rw-r--r-- | source/blender/src/drawaction.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index 47766cc6377..0d7a720dd1e 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.375f, curarea->winx-0.375, G.v2d->cur.ymin, G.v2d->cur.ymax); + myortho2(-0.375f, curarea->winx-0.375f, 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); @@ -133,7 +133,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key) /* make the little 'open the sliders' widget */ // should eventually be removed BIF_ThemeColor(TH_FACE); // this slot was open... (???... Aligorith) - glRects(2, y + 2*CHANNELHEIGHT - 2, ACTWIDTH - 2, y + CHANNELHEIGHT + 2); + glRects(2, (short)y + 2*CHANNELHEIGHT - 2, ACTWIDTH - 2, (short)y + CHANNELHEIGHT + 2); glColor3ub(0, 0, 0); glRasterPos2f(4, y + CHANNELHEIGHT + 6); BMF_DrawString(G.font, "Sliders"); @@ -144,7 +144,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key) ACTWIDTH = NAMEWIDTH; but=uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR, ICON_DISCLOSURE_TRI_RIGHT, - NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT, + NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT, XIC,YIC-2, &(G.saction->flag), 0, 0, 0, 0, "Show action window sliders"); @@ -155,7 +155,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key) else { but= uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR, ICON_DISCLOSURE_TRI_DOWN, - NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT, + NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT, XIC,YIC-2, &(G.saction->flag), 0, 0, 0, 0, "Hide action window sliders"); @@ -171,7 +171,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key) uiBlockSetEmboss(block, UI_EMBOSS); for (i=1; i < key->totkey; i++) { make_rvk_slider(block, ob, i, - x, y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys"); + (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys"); y-=CHANNELHEIGHT+CHANNELSKIP; @@ -294,7 +294,7 @@ static void action_icu_buts(SpaceAction *saction) * 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.375f, G.v2d->cur.ymin, G.v2d->cur.ymax); sprintf(str, "actionbuttonswin %d", curarea->win); block= uiNewBlock (&curarea->uiblocks, str, @@ -318,7 +318,7 @@ static void action_icu_buts(SpaceAction *saction) /* draw backdrop first */ BIF_ThemeColor(TH_FACE); // change this color... it's ugly - glRects(NAMEWIDTH, G.v2d->cur.ymin, NAMEWIDTH+SLIDERWIDTH, G.v2d->cur.ymax); + glRects(NAMEWIDTH, (short)G.v2d->cur.ymin, NAMEWIDTH+SLIDERWIDTH, (short)G.v2d->cur.ymax); uiBlockSetEmboss(block, UI_EMBOSS); for (ale= act_data.first; ale; ale= ale->next) { @@ -339,7 +339,7 @@ static void action_icu_buts(SpaceAction *saction) /* only show if action channel is selected */ if (SEL_ACHAN(achan)) { make_icu_slider(block, icu, - x, y, SLIDERWIDTH-2, CHANNELHEIGHT-2, + (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2, "Slider to control current value of Constraint Influence"); } } @@ -352,7 +352,7 @@ static void action_icu_buts(SpaceAction *saction) /* only show if action channel is selected */ if (SEL_ACHAN(achan)) { make_icu_slider(block, icu, - x, y, SLIDERWIDTH-2, CHANNELHEIGHT-2, + (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2, "Slider to control current value of IPO-Curve"); } } @@ -383,7 +383,7 @@ void draw_cfra_action (void) float vec[2]; /* Draw a light green line to indicate current frame */ - vec[0]= (G.scene->r.cfra); + vec[0]= (float)(G.scene->r.cfra); vec[0]*= G.scene->r.framelen; vec[1]= G.v2d->cur.ymin; @@ -820,13 +820,13 @@ static void draw_channel_names(void) /* draw protect 'lock' */ if (protect > -1) { offset = 16; - BIF_icon_draw(NAMEWIDTH-offset, yminc, protect); + BIF_icon_draw((float)NAMEWIDTH-offset, yminc, protect); } /* draw mute 'eye' */ if (mute > -1) { offset += 16; - BIF_icon_draw(NAMEWIDTH-offset, yminc, mute); + BIF_icon_draw((float)(NAMEWIDTH-offset), yminc, mute); } } @@ -838,7 +838,7 @@ static void draw_channel_names(void) BLI_freelistN(&act_data); /* re-adjust view matrices for correct scaling */ - myortho2(0, NAMEWIDTH, 0, (ofsy+G.v2d->mask.ymax) - (ofsy+G.v2d->mask.ymin)); // Scaling + myortho2(0, NAMEWIDTH, 0, (float)(ofsy+G.v2d->mask.ymax) - (ofsy+G.v2d->mask.ymin)); // Scaling } /* sets or clears hidden flags */ @@ -969,7 +969,7 @@ static void draw_channel_strips(void) if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22); else glColor4ub(col2[0], col2[1], col2[2], 0x22); } - glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+CHANNELHEIGHT/2); + glRectf((float)frame1_x, (float)channel_y-CHANNELHEIGHT/2, (float)G.v2d->hor.xmax, (float)channel_y+CHANNELHEIGHT/2); if (ale->datatype == ALE_GROUP) { if (sel) glColor4ub(col1a[0], col1a[1], col1a[2], 0x22); @@ -979,7 +979,7 @@ static void draw_channel_strips(void) if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22); else glColor4ub(col2[0], col2[1], col2[2], 0x22); } - glRectf(act_start, channel_y-CHANNELHEIGHT/2, act_end, channel_y+CHANNELHEIGHT/2); + glRectf((float)act_start, (float)channel_y-CHANNELHEIGHT/2, (float)act_end, (float)channel_y+CHANNELHEIGHT/2); } else if (datatype == ACTCONT_SHAPEKEY) { gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y); @@ -988,11 +988,11 @@ static void draw_channel_strips(void) * get a desaturated orange background */ glColor4ub(col2[0], col2[1], col2[2], 0x22); - glRectf(0, channel_y-CHANNELHEIGHT/2, frame1_x, channel_y+CHANNELHEIGHT/2); + glRectf(0.0f, (float)channel_y-CHANNELHEIGHT/2, (float)frame1_x, (float)channel_y+CHANNELHEIGHT/2); /* frames one and higher get a saturated orange background */ glColor4ub(col2[0], col2[1], col2[2], 0x44); - glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+CHANNELHEIGHT/2); + glRectf((float)frame1_x, (float)channel_y-CHANNELHEIGHT/2, (float)G.v2d->hor.xmax, (float)channel_y+CHANNELHEIGHT/2.0f); } else if (datatype == ACTCONT_GPENCIL) { gla2DDrawTranslatePt(di, G.v2d->cur.xmin, y, &frame1_x, &channel_y); @@ -1000,12 +1000,12 @@ static void draw_channel_strips(void) /* frames less than one get less saturated background */ if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22); else glColor4ub(col2[0], col2[1], col2[2], 0x22); - glRectf(0, channel_y-CHANNELHEIGHT/2, frame1_x, channel_y+CHANNELHEIGHT/2); + glRectf(0.0f, (float)channel_y-CHANNELHEIGHT/2, (float)frame1_x, (float)channel_y+CHANNELHEIGHT/2); /* frames one and higher get a saturated background */ if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x44); else glColor4ub(col2[0], col2[1], col2[2], 0x44); - glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+CHANNELHEIGHT/2); + glRectf((float)frame1_x, (float)channel_y-CHANNELHEIGHT/2, (float)G.v2d->hor.xmax, (float)channel_y+CHANNELHEIGHT/2); } } @@ -1061,8 +1061,8 @@ static void draw_channel_strips(void) cpack(0x0); glBegin(GL_LINES); - glVertex2f(frame1_x, G.v2d->mask.ymin - 100); - glVertex2f(frame1_x, G.v2d->mask.ymax); + glVertex2f((float)frame1_x, (float)G.v2d->mask.ymin - 100); + glVertex2f((float)frame1_x, (float)G.v2d->mask.ymax); glEnd(); } @@ -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.375f, curarea->winx-0.375, -0.375f, curarea->winy-0.375); + myortho2(-0.375f, curarea->winx-0.375f, -0.375f, curarea->winy-0.375f); if (G.v2d->scroll) drawscroll(0); } @@ -1361,7 +1361,7 @@ void drawactionspace(ScrArea *sa, void *spacedata) } mywinset(curarea->win); // reset scissor too - myortho2(-0.375f, curarea->winx-0.375, -0.375f, curarea->winy-0.375); + myortho2(-0.375f, curarea->winx-0.375f, -0.375f, curarea->winy-0.375f); draw_area_emboss(sa); /* it is important to end a view in a transform compatible with buttons */ @@ -1584,7 +1584,7 @@ static void draw_keylist(gla2DDrawInfo *di, ListBase *keys, ListBase *blocks, fl BIF_ThemeColor4(TH_STRIP_SELECT); else BIF_ThemeColor4(TH_STRIP); - glRectf(sc_xa, sc_ya-3, sc_xb, sc_yb+5); + glRectf((float)sc_xa, (float)sc_ya-3, (float)sc_xb, (float)sc_yb+5); } } } |