Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/QFO2Tool/Edit_Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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");
}
}
4 changes: 2 additions & 2 deletions src/QFO2Tool/Image_Render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));

}
}
10 changes: 5 additions & 5 deletions src/QFO2Tool/Preview_Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand All @@ -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);
///////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -290,4 +290,4 @@ void show_image_stats_MSK(image_data* img_data, ImFont* font)
ImGui::Text(buff);

ImGui::PopFont();
}
}
10 changes: 5 additions & 5 deletions src/QFO2Tool/Preview_Tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -603,4 +603,4 @@ void draw_tiles_ImGui(image_data *img_data, ImVec2 Top_Corner, ImVec2 Bottom_Cor
// )
// }
//}
}
}