diff --git a/src/commands/cmd_cel_properties.cpp b/src/commands/cmd_cel_properties.cpp index 329143878..339194a1b 100644 --- a/src/commands/cmd_cel_properties.cpp +++ b/src/commands/cmd_cel_properties.cpp @@ -88,7 +88,9 @@ void CelPropertiesCommand::onExecute(Context* context) button_ok->setEnabled(false); } - label_frame->setTextf("%d/%d", sprite->getCurrentFrame()+1, sprite->getTotalFrames()); + label_frame->setTextf("%d/%d", + (int)sprite->getCurrentFrame()+1, + (int)sprite->getTotalFrames()); if (cel != NULL) { // Position diff --git a/src/commands/cmd_frame_properties.cpp b/src/commands/cmd_frame_properties.cpp index 06d8d0e13..f6f115af6 100644 --- a/src/commands/cmd_frame_properties.cpp +++ b/src/commands/cmd_frame_properties.cpp @@ -112,7 +112,7 @@ void FramePropertiesCommand::onExecute(Context* context) if (m_target == ALL_FRAMES) window->setText("All"); else - window->setTextf("%d", sprite_frame); + window->setTextf("%d", (int)sprite_frame); frlen->setTextf("%d", sprite->getFrameDuration(sprite->getCurrentFrame())); diff --git a/src/commands/cmd_new_frame.cpp b/src/commands/cmd_new_frame.cpp index d6dd244a4..80fd006d8 100644 --- a/src/commands/cmd_new_frame.cpp +++ b/src/commands/cmd_new_frame.cpp @@ -77,8 +77,8 @@ void NewFrameCommand::onExecute(Context* context) update_screen_for_document(document); StatusBar::instance() ->showTip(1000, "New frame %d/%d", - sprite->getCurrentFrame()+1, - sprite->getTotalFrames()); + (int)sprite->getCurrentFrame()+1, + (int)sprite->getTotalFrames()); } ////////////////////////////////////////////////////////////////////// diff --git a/src/commands/cmd_sprite_properties.cpp b/src/commands/cmd_sprite_properties.cpp index 9b688cfcc..091b0d119 100644 --- a/src/commands/cmd_sprite_properties.cpp +++ b/src/commands/cmd_sprite_properties.cpp @@ -117,7 +117,7 @@ void SpritePropertiesCommand::onExecute(Context* context) size->setText(buf); // How many frames - frames->setTextf("%d", sprite->getTotalFrames()); + frames->setTextf("%d", (int)sprite->getTotalFrames()); if (sprite->getPixelFormat() == IMAGE_INDEXED) { color_button = new ColorButton(Color::fromIndex(sprite->getTransparentColor()), diff --git a/src/file/ase_format.cpp b/src/file/ase_format.cpp index 201b5867f..06a6ce8e0 100644 --- a/src/file/ase_format.cpp +++ b/src/file/ase_format.cpp @@ -997,12 +997,12 @@ static Cel *ase_file_read_cel_chunk(FILE *f, Sprite *sprite, FrameNumber frame, layer = sprite->indexToLayer(layer_index); if (!layer) { fop_error(fop, "Frame %d didn't found layer with index %d\n", - frame, layer_index); + (int)frame, layer_index); return NULL; } if (!layer->is_image()) { fop_error(fop, "Invalid .ase file (frame %d in layer %d which does not contain images\n", - frame, layer_index); + (int)frame, layer_index); return NULL; } diff --git a/src/file/gif_format.cpp b/src/file/gif_format.cpp index 054b191b7..29a3b112e 100644 --- a/src/file/gif_format.cpp +++ b/src/file/gif_format.cpp @@ -156,7 +156,7 @@ bool GifFormat::onLoad(FileOp* fop) if (frame_x < 0 || frame_y < 0 || frame_x + frame_w > data->sprite_w || frame_y + frame_h > data->sprite_h) - throw base::Exception("Image %d is out of sprite bounds.\n", frame_num); + throw base::Exception("Image %d is out of sprite bounds.\n", (int)frame_num); // Add a new frames. if (frame_num >= FrameNumber(data->frames.size())) @@ -214,7 +214,7 @@ bool GifFormat::onLoad(FileOp* fop) data->frames[frame_num].disposal_method = disposal_method; data->frames[frame_num].mask_index = transparent_index; - PRINTF("Frame[%d] transparent index = %d\n", frame_num, transparent_index); + PRINTF("Frame[%d] transparent index = %d\n", (int)frame_num, transparent_index); ++frame_num; @@ -595,16 +595,16 @@ bool GifFormat::onSave(FileOp* fop) memcpy(extension_bytes, "NETSCAPE2.0", 11); if (EGifPutExtensionFirst(gif_file, APPLICATION_EXT_FUNC_CODE, 11, extension_bytes) == GIF_ERROR) - throw base::Exception("Error writing GIF graphics extension record for frame %d.\n", frame_num); + throw base::Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num); extension_bytes[0] = 1; extension_bytes[1] = (loop & 0xff); extension_bytes[2] = (loop >> 8) & 0xff; if (EGifPutExtensionNext(gif_file, APPLICATION_EXT_FUNC_CODE, 3, extension_bytes) == GIF_ERROR) - throw base::Exception("Error writing GIF graphics extension record for frame %d.\n", frame_num); + throw base::Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num); if (EGifPutExtensionLast(gif_file, APPLICATION_EXT_FUNC_CODE, 0, NULL) == GIF_ERROR) - throw base::Exception("Error writing GIF graphics extension record for frame %d.\n", frame_num); + throw base::Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num); } // Write graphics extension record (to save the duration of the @@ -622,7 +622,7 @@ bool GifFormat::onSave(FileOp* fop) extension_bytes[3] = (transparent_index >= 0 ? transparent_index: 0); if (EGifPutExtension(gif_file, GRAPHICS_EXT_FUNC_CODE, 4, extension_bytes) == GIF_ERROR) - throw base::Exception("Error writing GIF graphics extension record for frame %d.\n", frame_num); + throw base::Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num); } // Image color map @@ -642,7 +642,7 @@ bool GifFormat::onSave(FileOp* fop) frame_x, frame_y, frame_w, frame_h, interlace ? 1: 0, image_color_map) == GIF_ERROR) - throw base::Exception("Error writing GIF frame %d.\n", frame_num); + throw base::Exception("Error writing GIF frame %d.\n", (int)frame_num); // Write the image data (pixels). if (interlace) { @@ -651,7 +651,7 @@ bool GifFormat::onSave(FileOp* fop) for (int y = interlaced_offset[i]; y < frame_h; y += interlaced_jumps[i]) { IndexedTraits::address_t addr = image_address_fast(current_image, frame_x, frame_y + y); if (EGifPutLine(gif_file, addr, frame_w) == GIF_ERROR) - throw base::Exception("Error writing GIF image scanlines for frame %d.\n", frame_num); + throw base::Exception("Error writing GIF image scanlines for frame %d.\n", (int)frame_num); } } else { @@ -659,7 +659,7 @@ bool GifFormat::onSave(FileOp* fop) for (int y = 0; y < frame_h; ++y) { IndexedTraits::address_t addr = image_address_fast(current_image, frame_x, frame_y + y); if (EGifPutLine(gif_file, addr, frame_w) == GIF_ERROR) - throw base::Exception("Error writing GIF image scanlines for frame %d.\n", frame_num); + throw base::Exception("Error writing GIF image scanlines for frame %d.\n", (int)frame_num); } }