Build with -Wfloat-conversion + fix all warnings
This commit is contained in:
1 parent
17c459e384
commit
a919774fe4
38 files changed
+199
-203
No files matched your search
@@ -1047,8 +1047,8 @@ static int SetDrawState(GL_RenderData *data, const SDL_RenderCommand *cmd, const
|
||||
viewport->w, viewport->h);
|
||||
if (viewport->w && viewport->h) {
|
||||
data->glOrtho((GLdouble)0, (GLdouble)viewport->w,
|
||||
(GLdouble)istarget ? 0 : viewport->h,
|
||||
(GLdouble)istarget ? viewport->h : 0,
|
||||
(GLdouble)(istarget ? 0 : viewport->h),
|
||||
(GLdouble)(istarget ? viewport->h : 0),
|
||||
0.0, 1.0);
|
||||
}
|
||||
data->glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
@@ -128,10 +128,8 @@ typedef struct
|
||||
float x, y, z;
|
||||
} VertTCV;
|
||||
|
||||
#define PI 3.14159265358979f
|
||||
|
||||
#define radToDeg(x) ((x)*180.f / PI)
|
||||
#define degToRad(x) ((x)*PI / 180.f)
|
||||
#define radToDeg(x) ((x)*180.f / SDL_PI_F)
|
||||
#define degToRad(x) ((x)*SDL_PI_F / 180.f)
|
||||
|
||||
static float MathAbs(float x)
|
||||
{
|
||||
@@ -809,7 +807,7 @@ static int PSP_QueueCopy(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Tex
|
||||
float curX = x;
|
||||
const float endX = x + width;
|
||||
const float slice = 64.0f;
|
||||
const size_t count = SDL_ceilf(width / slice);
|
||||
const size_t count = (size_t)SDL_ceilf(width / slice);
|
||||
size_t i;
|
||||
float ustep = (u1 - u0) / width * slice;
|
||||
|
||||
@@ -877,7 +875,7 @@ static int PSP_QueueCopyEx(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_T
|
||||
|
||||
cmd->data.draw.count = 1;
|
||||
|
||||
MathSincos(degToRad(360 - angle), &s, &c);
|
||||
MathSincos(degToRad((float)(360 - angle)), &s, &c);
|
||||
|
||||
cw1 = c * -centerx;
|
||||
sw1 = s * -centerx;
|
||||
|
||||
@@ -838,8 +838,8 @@ static int SetDrawState(VITA_GXM_RenderData *data, const SDL_RenderCommand *cmd)
|
||||
if (data->drawstate.viewport_dirty) {
|
||||
const SDL_Rect *viewport = &data->drawstate.viewport;
|
||||
|
||||
float sw = viewport->w / 2.;
|
||||
float sh = viewport->h / 2.;
|
||||
float sw = viewport->w / 2.f;
|
||||
float sh = viewport->h / 2.f;
|
||||
|
||||
float x_scale = sw;
|
||||
float x_off = viewport->x + sw;
|
||||
|
||||
Reference in new issue
Block a user