explicit casting, removes warnings
This commit is contained in:
committed by
Joshua Granick
parent
75bdc7e248
commit
580946913a
@@ -19,7 +19,7 @@ namespace lime {
|
|||||||
|
|
||||||
for (int i = 0; i < 256; i++) {
|
for (int i = 0; i < 256; i++) {
|
||||||
|
|
||||||
__alpha16[i] = ceil ((float)(i + 1) * ((1 << 16) / 0xFF));
|
__alpha16[i] = (int) ceil ((float)(i + 1) * ((1 << 16) / 0xFF));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ namespace lime {
|
|||||||
|
|
||||||
void ImageDataUtil::SetFormat (Image* image, PixelFormat format) {
|
void ImageDataUtil::SetFormat (Image* image, PixelFormat format) {
|
||||||
|
|
||||||
int index, a16;
|
int index;
|
||||||
int length = image->buffer->data->Length () / 4;
|
int length = image->buffer->data->Length () / 4;
|
||||||
int r1, g1, b1, a1, r2, g2, b2, a2;
|
int r1, g1, b1, a1, r2, g2, b2, a2;
|
||||||
int r, g, b, a;
|
int r, g, b, a;
|
||||||
@@ -796,10 +796,10 @@ namespace lime {
|
|||||||
|
|
||||||
stride = image->buffer->Stride ();
|
stride = image->buffer->Stride ();
|
||||||
|
|
||||||
x = ceil (this->rect->x);
|
x = (int) ceil (this->rect->x);
|
||||||
y = ceil (this->rect->y);
|
y = (int) ceil (this->rect->y);
|
||||||
width = floor (this->rect->width);
|
width = (int) floor (this->rect->width);
|
||||||
height = floor (this->rect->height);
|
height = (int) floor (this->rect->height);
|
||||||
offset = (stride * (this->y + image->offsetY)) + ((this->x + image->offsetX) * 4);
|
offset = (stride * (this->y + image->offsetY)) + ((this->x + image->offsetX) * 4);
|
||||||
|
|
||||||
|
|
||||||
@@ -810,10 +810,10 @@ namespace lime {
|
|||||||
|
|
||||||
rect->Contract (x, y, width, height);
|
rect->Contract (x, y, width, height);
|
||||||
|
|
||||||
this->x = ceil (rect->x);
|
this->x = (int) ceil (rect->x);
|
||||||
this->y = ceil (rect->y);
|
this->y = (int) ceil (rect->y);
|
||||||
this->width = floor (rect->width);
|
this->width = (int) floor (rect->width);
|
||||||
this->height = floor (rect->height);
|
this->height = (int) floor (rect->height);
|
||||||
offset = (stride * (this->y + image->offsetY)) + ((this->x + image->offsetX) * 4);
|
offset = (stride * (this->y + image->offsetY)) + ((this->x + image->offsetX) * 4);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user