From 7987ba9eac158785f7a2dd670fb4f70ef8c5d00b Mon Sep 17 00:00:00 2001 From: Meleneth Date: Sat, 8 Jun 2024 07:51:01 +0000 Subject: [PATCH] Fix most remaining warnings --- src/QFO2Tool/Edit_Image.cpp | 4 ++-- src/QFO2Tool/Image_Render.cpp | 4 ++-- src/QFO2Tool/Preview_Image.cpp | 10 +++++----- src/QFO2Tool/Preview_Tiles.cpp | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/QFO2Tool/Edit_Image.cpp b/src/QFO2Tool/Edit_Image.cpp index 95c2a8a..9c3f855 100644 --- a/src/QFO2Tool/Edit_Image.cpp +++ b/src/QFO2Tool/Edit_Image.cpp @@ -47,7 +47,7 @@ void Edit_Image(variables* My_Variables, LF* F_Prop, bool Palette_Update, uint8_ ImGuiWindow* window = ImGui::GetCurrentWindow(); //image I'm trying to pan with window->DrawList->AddImage( - (ImTextureID)edit_data->render_texture, + (ImTextureID)(uintptr_t)edit_data->render_texture, top_corner(edit_data), bottom_corner(size, top_corner(edit_data)), uv_min, uv_max, ImGui::GetColorU32(tint)); @@ -341,4 +341,4 @@ void brush_size_handler(variables* My_Variables) My_Variables->brush_size.y = My_Variables->brush_size.x; } ImGui::DragFloat("###height", &My_Variables->brush_size.y, 1.0f, 1.0f, FLT_MAX, "Brush Height: %.0f pixels"); -} \ No newline at end of file +} diff --git a/src/QFO2Tool/Image_Render.cpp b/src/QFO2Tool/Image_Render.cpp index 025e9f4..a86b9a2 100644 --- a/src/QFO2Tool/Image_Render.cpp +++ b/src/QFO2Tool/Image_Render.cpp @@ -21,9 +21,9 @@ void image_render(variables* My_Variables, image_data* img_data) ImGuiWindow* window = ImGui::GetCurrentWindow(); //image I'm trying to pan with window->DrawList->AddImage( - (ImTextureID)img_data->render_texture, + (ImTextureID)(uintptr_t)img_data->render_texture, top_corner(img_data), bottom_corner(size, top_corner(img_data)), uv_min, uv_max, ImGui::GetColorU32(My_Variables->tint_col)); -} \ No newline at end of file +} diff --git a/src/QFO2Tool/Preview_Image.cpp b/src/QFO2Tool/Preview_Image.cpp index 0a50b4d..30b5377 100644 --- a/src/QFO2Tool/Preview_Image.cpp +++ b/src/QFO2Tool/Preview_Image.cpp @@ -48,7 +48,7 @@ void Preview_FRM_Image(variables* My_Variables, struct image_data* img_data, boo ImGuiWindow* window = ImGui::GetCurrentWindow(); //image I'm trying to pan and zoom with window->DrawList->AddImage( - (ImTextureID)img_data->render_texture, + (ImTextureID)(uintptr_t)img_data->render_texture, top_corner(img_data), bottom_corner(size, top_corner(img_data)), uv_min, uv_max, ImGui::GetColorU32(My_Variables->tint_col)); @@ -88,7 +88,7 @@ void Preview_MSK_Image(variables* My_Variables, struct image_data* img_data, boo ImGuiWindow* window = ImGui::GetCurrentWindow(); //image I'm trying to pan and zoom with window->DrawList->AddImage( - (ImTextureID)img_data->render_texture, + (ImTextureID)(uintptr_t)img_data->render_texture, top_corner(img_data), bottom_corner(size, top_corner(img_data)), uv_min, uv_max, ImGui::GetColorU32(My_Variables->tint_col)); @@ -138,7 +138,7 @@ void Preview_Image(variables* My_Variables, struct image_data* img_data, bool sh ImGuiWindow* window = ImGui::GetCurrentWindow(); //image I'm trying to pan and zoom with window->DrawList->AddImage( - (ImTextureID)img_data->render_texture, + (ImTextureID)(uintptr_t)img_data->render_texture, top_corner(img_data), bottom_corner(size, top_corner(img_data)), uv_min, uv_max, ImGui::GetColorU32(My_Variables->tint_col)); @@ -156,7 +156,7 @@ void Preview_Image(variables* My_Variables, struct image_data* img_data, bool sh ImVec2 tile_min = { 0,0 }; ImVec2 tile_max = { tile_w, tile_h }; //window->DrawList->AddImage( - // (ImTextureID)My_Variables->tile_texture_prev, + // (ImTextureID)(uintptr_t)My_Variables->tile_texture_prev, // tile_corner, tile_bottom, tile_min, tile_max); /////////////////////////////////////////////////////////////////////// @@ -290,4 +290,4 @@ void show_image_stats_MSK(image_data* img_data, ImFont* font) ImGui::Text(buff); ImGui::PopFont(); -} \ No newline at end of file +} diff --git a/src/QFO2Tool/Preview_Tiles.cpp b/src/QFO2Tool/Preview_Tiles.cpp index ca9181a..3a0e2ae 100644 --- a/src/QFO2Tool/Preview_Tiles.cpp +++ b/src/QFO2Tool/Preview_Tiles.cpp @@ -99,13 +99,13 @@ void tile_me(int tile_w, int tile_h, int img_w, int img_h, int scale, image_data // image I'm trying to pan and zoom with window->DrawList->AddImage( - (ImTextureID)img_data->render_texture, + (ImTextureID)(uintptr_t)img_data->render_texture, new_corner, new_bottom, uv_min, uv_max, ImGui::GetColorU32(tint_col)); // window->DrawList->AddImage( - // (ImTextureID)img_data->render_texture, + // (ImTextureID)(uintptr_t)img_data->render_texture, // new_corner, bottom_corner(size, new_corner), // Top_Left, Bottom_Right, // ImGui::GetColorU32(tint_col)); @@ -305,7 +305,7 @@ void draw_TMAP_tiles(user_info* usr_nfo, image_data *img_data, { window->DrawList->AddImageQuad( - (ImTextureID)img_data->render_texture, + (ImTextureID)(uintptr_t)img_data->render_texture, Left, Top, Right, Bottom, uv_l, uv_t, uv_r, uv_b); @@ -365,7 +365,7 @@ void Prev_TMAP_Tiles(user_info* usr_info, variables *My_Variables, image_data *i ImGuiWindow *window = ImGui::GetCurrentWindow(); window->DrawList->AddImage( - (ImTextureID)img_data->render_texture, + (ImTextureID)(uintptr_t)img_data->render_texture, top_corner(img_data), bottom_corner(size, top_corner(img_data)), uv_min, uv_max, ImGui::GetColorU32(My_Variables->tint_col)); @@ -603,4 +603,4 @@ void draw_tiles_ImGui(image_data *img_data, ImVec2 Top_Corner, ImVec2 Bottom_Cor // ) // } //} -} \ No newline at end of file +}