diff --git a/build/Debug/D2tweaks.ilk b/build/Debug/D2tweaks.ilk index 42b593b..c4f861c 100644 Binary files a/build/Debug/D2tweaks.ilk and b/build/Debug/D2tweaks.ilk differ diff --git a/build/Debug/D2tweaks.log b/build/Debug/D2tweaks.log index fa5656b..04e5a0e 100644 --- a/build/Debug/D2tweaks.log +++ b/build/Debug/D2tweaks.log @@ -1,3 +1,36 @@ C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(517,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory. + client.cpp autosort_client.cpp + auto_gold_pickup_client.cpp + auto_item_pickup_client.cpp + client_module.cpp + damage_display_client.cpp +D:\VSCode\d2tweaks-rnd2k\src\d2tweaks\client\modules\damage_display\damage_display_client.cpp(138,12): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data +D:\VSCode\d2tweaks-rnd2k\src\d2tweaks\client\modules\damage_display\damage_display_client.cpp(144,31): warning C4244: '=': conversion from 'ULONGLONG' to 'long', possible loss of data +D:\VSCode\d2tweaks-rnd2k\src\d2tweaks\client\modules\damage_display\damage_display_client.cpp(252,59): warning C4244: 'argument': conversion from 'float' to 'int', possible loss of data + item_drop_message_client.cpp + item_move_client.cpp +D:\VSCode\d2tweaks-rnd2k\src\d2tweaks\client\modules\item_move\item_move_client.cpp(99,33): warning C4018: '<': signed/unsigned mismatch + loot_filter_settings_menu.cpp + loot_filter_settings_toggle_menu.cpp + small_patches.cpp + test.cpp + trader_update_client.cpp + transmute_client.cpp + asset_manager.cpp + trader_update_server.cpp + server.cpp + button.cpp + checkbox.cpp + group.cpp + image.cpp + label.cpp + menu.cpp + ui_manager.cpp + d2gfx.cpp + d2win.cpp + main.cpp + D2Template.cpp + DllNotify.cpp + LINK : ..\..\Diablo II\MODS\ironman-dev\D2tweaks.dll not found or not built by the last incremental link; performing full link D2tweaks.vcxproj -> D:\Diablo II\MODS\ironman-dev\D2tweaks.dll diff --git a/build/Debug/D2tweaks.tlog/CL.command.1.tlog b/build/Debug/D2tweaks.tlog/CL.command.1.tlog index 1cb1c8f..72ba9fb 100644 Binary files a/build/Debug/D2tweaks.tlog/CL.command.1.tlog and b/build/Debug/D2tweaks.tlog/CL.command.1.tlog differ diff --git a/build/Debug/D2tweaks.tlog/CL.read.1.tlog b/build/Debug/D2tweaks.tlog/CL.read.1.tlog index 91bde92..8d3f5a4 100644 Binary files a/build/Debug/D2tweaks.tlog/CL.read.1.tlog and b/build/Debug/D2tweaks.tlog/CL.read.1.tlog differ diff --git a/build/Debug/D2tweaks.tlog/CL.write.1.tlog b/build/Debug/D2tweaks.tlog/CL.write.1.tlog index 7ab433c..357dacc 100644 Binary files a/build/Debug/D2tweaks.tlog/CL.write.1.tlog and b/build/Debug/D2tweaks.tlog/CL.write.1.tlog differ diff --git a/build/Debug/D2tweaks.tlog/link.read.1.tlog b/build/Debug/D2tweaks.tlog/link.read.1.tlog index 3cd0a7f..8f2dc7a 100644 Binary files a/build/Debug/D2tweaks.tlog/link.read.1.tlog and b/build/Debug/D2tweaks.tlog/link.read.1.tlog differ diff --git a/build/Debug/src/d2tweaks/client/client.obj b/build/Debug/src/d2tweaks/client/client.obj index dbb97fa..17f3f76 100644 Binary files a/build/Debug/src/d2tweaks/client/client.obj and b/build/Debug/src/d2tweaks/client/client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/auto_gold_pickup/auto_gold_pickup_client.obj b/build/Debug/src/d2tweaks/client/modules/auto_gold_pickup/auto_gold_pickup_client.obj index 3a00012..4523a66 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/auto_gold_pickup/auto_gold_pickup_client.obj and b/build/Debug/src/d2tweaks/client/modules/auto_gold_pickup/auto_gold_pickup_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/auto_item_pickup/auto_item_pickup_client.obj b/build/Debug/src/d2tweaks/client/modules/auto_item_pickup/auto_item_pickup_client.obj index c2dbb6f..7f2c0ee 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/auto_item_pickup/auto_item_pickup_client.obj and b/build/Debug/src/d2tweaks/client/modules/auto_item_pickup/auto_item_pickup_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/autosort/autosort_client.obj b/build/Debug/src/d2tweaks/client/modules/autosort/autosort_client.obj index 9f8b908..eeb82ff 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/autosort/autosort_client.obj and b/build/Debug/src/d2tweaks/client/modules/autosort/autosort_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/client_module.obj b/build/Debug/src/d2tweaks/client/modules/client_module.obj index 76aa59a..90136e5 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/client_module.obj and b/build/Debug/src/d2tweaks/client/modules/client_module.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/damage_display/damage_display_client.obj b/build/Debug/src/d2tweaks/client/modules/damage_display/damage_display_client.obj index cd0414e..2759dc3 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/damage_display/damage_display_client.obj and b/build/Debug/src/d2tweaks/client/modules/damage_display/damage_display_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/item_drop_message/item_drop_message_client.obj b/build/Debug/src/d2tweaks/client/modules/item_drop_message/item_drop_message_client.obj index d957b9a..e458144 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/item_drop_message/item_drop_message_client.obj and b/build/Debug/src/d2tweaks/client/modules/item_drop_message/item_drop_message_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/item_move/item_move_client.obj b/build/Debug/src/d2tweaks/client/modules/item_move/item_move_client.obj index 6027d78..21716fe 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/item_move/item_move_client.obj and b/build/Debug/src/d2tweaks/client/modules/item_move/item_move_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.obj b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.obj index 1cda60a..ede3fe5 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.obj and b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_toggle_menu.obj b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_toggle_menu.obj index d5f6833..b0f2d90 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_toggle_menu.obj and b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_toggle_menu.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/small_patches/small_patches.obj b/build/Debug/src/d2tweaks/client/modules/small_patches/small_patches.obj index b4b598a..a9915e4 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/small_patches/small_patches.obj and b/build/Debug/src/d2tweaks/client/modules/small_patches/small_patches.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/test/test.obj b/build/Debug/src/d2tweaks/client/modules/test/test.obj index b7f4669..c0b3250 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/test/test.obj and b/build/Debug/src/d2tweaks/client/modules/test/test.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/trader_update/trader_update_client.obj b/build/Debug/src/d2tweaks/client/modules/trader_update/trader_update_client.obj index 9e10971..6bd8083 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/trader_update/trader_update_client.obj and b/build/Debug/src/d2tweaks/client/modules/trader_update/trader_update_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/transmute/transmute_client.obj b/build/Debug/src/d2tweaks/client/modules/transmute/transmute_client.obj index 6b55778..b363c7d 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/transmute/transmute_client.obj and b/build/Debug/src/d2tweaks/client/modules/transmute/transmute_client.obj differ diff --git a/build/Debug/src/d2tweaks/common/asset_manager.obj b/build/Debug/src/d2tweaks/common/asset_manager.obj index e2d0711..daad80c 100644 Binary files a/build/Debug/src/d2tweaks/common/asset_manager.obj and b/build/Debug/src/d2tweaks/common/asset_manager.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/trader_update/trader_update_server.obj b/build/Debug/src/d2tweaks/server/modules/trader_update/trader_update_server.obj index 555bebc..386227b 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/trader_update/trader_update_server.obj and b/build/Debug/src/d2tweaks/server/modules/trader_update/trader_update_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/server.obj b/build/Debug/src/d2tweaks/server/server.obj index c628ff5..c64f353 100644 Binary files a/build/Debug/src/d2tweaks/server/server.obj and b/build/Debug/src/d2tweaks/server/server.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/button.obj b/build/Debug/src/d2tweaks/ui/controls/button.obj index 14eafdb..3103aad 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/button.obj and b/build/Debug/src/d2tweaks/ui/controls/button.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/checkbox.obj b/build/Debug/src/d2tweaks/ui/controls/checkbox.obj index 906d10a..149dfe5 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/checkbox.obj and b/build/Debug/src/d2tweaks/ui/controls/checkbox.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/group.obj b/build/Debug/src/d2tweaks/ui/controls/group.obj index 0ba5d50..87c185d 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/group.obj and b/build/Debug/src/d2tweaks/ui/controls/group.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/image.obj b/build/Debug/src/d2tweaks/ui/controls/image.obj index 04d95ea..325288f 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/image.obj and b/build/Debug/src/d2tweaks/ui/controls/image.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/label.obj b/build/Debug/src/d2tweaks/ui/controls/label.obj index 5b41b31..e5ec723 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/label.obj and b/build/Debug/src/d2tweaks/ui/controls/label.obj differ diff --git a/build/Debug/src/d2tweaks/ui/menu.obj b/build/Debug/src/d2tweaks/ui/menu.obj index f54c355..7798f30 100644 Binary files a/build/Debug/src/d2tweaks/ui/menu.obj and b/build/Debug/src/d2tweaks/ui/menu.obj differ diff --git a/build/Debug/src/d2tweaks/ui/ui_manager.obj b/build/Debug/src/d2tweaks/ui/ui_manager.obj index c4bb72f..2e5634a 100644 Binary files a/build/Debug/src/d2tweaks/ui/ui_manager.obj and b/build/Debug/src/d2tweaks/ui/ui_manager.obj differ diff --git a/build/Debug/src/diablo2/d2gfx.obj b/build/Debug/src/diablo2/d2gfx.obj index 1dfbba1..421ccc0 100644 Binary files a/build/Debug/src/diablo2/d2gfx.obj and b/build/Debug/src/diablo2/d2gfx.obj differ diff --git a/build/Debug/src/diablo2/d2win.obj b/build/Debug/src/diablo2/d2win.obj index e182887..1efa49e 100644 Binary files a/build/Debug/src/diablo2/d2win.obj and b/build/Debug/src/diablo2/d2win.obj differ diff --git a/build/Debug/src/main.obj b/build/Debug/src/main.obj index a23cbb3..da330a0 100644 Binary files a/build/Debug/src/main.obj and b/build/Debug/src/main.obj differ diff --git a/build/Debug/vc143.pdb b/build/Debug/vc143.pdb index ef0a1c4..dad259e 100644 Binary files a/build/Debug/vc143.pdb and b/build/Debug/vc143.pdb differ diff --git a/build/Debug/vendor/D2Template/D2Template.obj b/build/Debug/vendor/D2Template/D2Template.obj index 5ef20da..8f016bc 100644 Binary files a/build/Debug/vendor/D2Template/D2Template.obj and b/build/Debug/vendor/D2Template/D2Template.obj differ diff --git a/build/Debug/vendor/DllNotify/DllNotify.obj b/build/Debug/vendor/DllNotify/DllNotify.obj index 852a5a7..59a3af3 100644 Binary files a/build/Debug/vendor/DllNotify/DllNotify.obj and b/build/Debug/vendor/DllNotify/DllNotify.obj differ diff --git a/include/diablo2/d2gfx.h b/include/diablo2/d2gfx.h index 9d17f7b..dbf5d68 100644 --- a/include/diablo2/d2gfx.h +++ b/include/diablo2/d2gfx.h @@ -17,7 +17,7 @@ namespace diablo2 { static int32_t adjust_perspective_coords(int32_t x, int32_t y, int32_t* adjustX, int32_t* adjustY); static int32_t get_resolution_mode(); static void draw_image(structures::gfxdata* data, uint32_t x, uint32_t y, int32_t gamma, int32_t drawType, void* palette); - static void draw_filled_rect(int left, int top, int right, int bottom, ULONG color, ULONG transTbl); + static void draw_filled_rect(int left, int top, int right, int bottom, DWORD color, int transTbl); }; } \ No newline at end of file diff --git a/include/diablo2/d2win.h b/include/diablo2/d2win.h index 6f3b62f..548f73d 100644 --- a/include/diablo2/d2win.h +++ b/include/diablo2/d2win.h @@ -49,6 +49,7 @@ namespace diablo2 { static void draw_text(wchar_t* str, uint32_t x, uint32_t y, ui_color_t color, int32_t transTbl); static void draw_boxed_text(wchar_t* str, uint32_t x, uint32_t y, int32_t paletteIndex, int32_t transTbl, ui_color_t color); + static int32_t D2Win_10034_MixRGB(uint8_t nRed, uint8_t nGreen, uint8_t nBlue); static void set_popup_properties(wchar_t* str, uint32_t x, uint32_t y, ui_color_t color, int32_t align); static void draw_popup(); diff --git a/src/d2tweaks/client/modules/autosort/autosort_client.cpp b/src/d2tweaks/client/modules/autosort/autosort_client.cpp index db98a78..6cede75 100644 --- a/src/d2tweaks/client/modules/autosort/autosort_client.cpp +++ b/src/d2tweaks/client/modules/autosort/autosort_client.cpp @@ -138,6 +138,7 @@ public: int statsFont = GetPrivateProfileIntA("Options", "statsFont", 0, "./d2tweaks.ini"); + void draw() override { auto stats = globalStatsVector; int textOffset = 40; // Initial offset for the first line @@ -319,12 +320,22 @@ public: // print player health, mana, and stamina bars, lastexp, nextexp, and level // Get current HP, Mana, and Stamina along with their maximum values - int statHP = diablo2::d2_common::get_stat(player, static_cast(6), NULL); - int statMaxHP = diablo2::d2_common::get_stat(player, static_cast(7), NULL); - int statMana = diablo2::d2_common::get_stat(player, static_cast(8), NULL); - int statMaxMana = diablo2::d2_common::get_stat(player, static_cast(9), NULL); - int statStamina = diablo2::d2_common::get_stat(player, static_cast(10), NULL); - int statMaxStamina = diablo2::d2_common::get_stat(player, static_cast(11), NULL); + int statHP = diablo2::d2_common::get_stat(player, static_cast(6), NULL) / 256; + int statMaxHP = diablo2::d2_common::get_stat(player, static_cast(7), NULL) / 256; + int statMana = diablo2::d2_common::get_stat(player, static_cast(8), NULL) / 256; + int statMaxMana = diablo2::d2_common::get_stat(player, static_cast(9), NULL) / 256; + int statStamina = diablo2::d2_common::get_stat(player, static_cast(10), NULL) / 256; + int statMaxStamina = diablo2::d2_common::get_stat(player, static_cast(11), NULL) / 256; + + // Convert the integer values to wide character strings + std::wstring strHP = std::to_wstring(statHP); + std::wstring strMaxHP = std::to_wstring(statMaxHP); + std::wstring strMana = std::to_wstring(statMana); + std::wstring strMaxMana = std::to_wstring(statMaxMana); + std::wstring strStamina = std::to_wstring(statStamina); + std::wstring strMaxStamina = std::to_wstring(statMaxStamina); + + diablo2::d2_win::set_current_font(diablo2::UI_FONT_16); // Set font to FONT16 // Calculate the percentages of current HP, Mana, and Stamina float healthPercentage = static_cast(statHP) / static_cast(statMaxHP); @@ -333,14 +344,17 @@ public: // Define the dimensions for the bars int barWidth = 200; // Width of the bars - int barHeight = 10; // Height of the bars + int barHeight = 16; // Height of the bars // Define the coordinates for the bars - int barX = 15; // Left coordinate of the bars - int barY_HP = 600; // Top coordinate of the HP bar + int barX = 245; // Left coordinate of the bars + int barY_HP = 728; // Top coordinate of the HP bar int barY_Mana = barY_HP + barHeight + 4; // Top coordinate of the Mana bar with separator int barY_Stamina = barY_Mana + barHeight + 4; // Top coordinate of the Stamina bar with separator + std::wstring life = strHP + L" / " + strMaxHP; + std::wstring mana = strMana + L" / " + strMaxMana; + std::wstring stamina = strStamina + L" / " + strMaxStamina; // Calculate the filled widths of the bars @@ -351,23 +365,59 @@ public: HWND diabloIIWnd = FindDiabloIIWindow(); // Draw the filled HP bar - // diablo2::d2_gfx::draw_filled_rect(barX, barY_HP, barX + filledHPWidth, barY_HP + barHeight, 1, 7); - DrawFilledRect(diabloIIWnd, barX, barY_HP, barX + filledHPWidth, barY_HP + barHeight, RGB(255, 0, 0)); // Red color for HP + diablo2::d2_gfx::draw_filled_rect(barX, barY_HP, barX + filledHPWidth, barY_HP + barHeight, 10, 255); + //DrawFilledRect(diabloIIWnd, barX, barY_HP, barX + filledHPWidth, barY_HP + barHeight, RGB(255, 0, 0)); // Red color for HP + diablo2::d2_win::draw_text(const_cast(life.c_str()), barX + 20, barY_HP + 15, stat.colorStatValue, 0); + + // Draw the filled Mana bar - // diablo2::d2_gfx::draw_filled_rect(barX, barY_Mana, barX + filledManaWidth, barY_Mana + barHeight, 3, 7); - DrawFilledRect(diabloIIWnd, barX, barY_Mana, barX + filledManaWidth, barY_Mana + barHeight, RGB(100, 100, 255)); // Blue color for Mana + diablo2::d2_gfx::draw_filled_rect(barX, barY_Mana, barX + filledManaWidth, barY_Mana + barHeight, 156, 255); + //DrawFilledRect(diabloIIWnd, barX, barY_Mana, barX + filledManaWidth, barY_Mana + barHeight, RGB(100, 100, 255)); // Blue color for Mana + diablo2::d2_win::draw_text(const_cast(mana.c_str()), barX + 20, barY_Mana + 15, stat.colorStatValue, 0); + + /* + // Define the number of separators + int numColors = 256; + int numColumns = 4; + int colorsPerColumn = numColors / numColumns; + int separatorHeight = 1; // Height of each separator + int columnOffset = 200; // Offset for each column + + // Iterate over each column + for (int column = 0; column < numColumns; ++column) { + // Calculate the starting X coordinate for this column + int columnX = barX + (column * columnOffset); + + // Draw the filled Mana bars for this column + for (int i = 0; i < colorsPerColumn; ++i) { + int colorIndex = column * colorsPerColumn + i; + int separatorY = barY_Mana + barHeight + i * (separatorHeight + barHeight); + + // Draw the filled Mana bar + diablo2::d2_gfx::draw_filled_rect(columnX, separatorY, columnX + filledManaWidth, separatorY + barHeight, colorIndex, 255); + + // Draw the index number at the same coordinates as the bar + std::wstring indexStr = std::to_wstring(colorIndex); + diablo2::d2_win::draw_text(const_cast(indexStr.c_str()), columnX - 20, separatorY, diablo2::UI_COLOR_DARK_GOLD, 0); + } + } + */ + + + + // Draw the filled Stamina bar - // diablo2::d2_gfx::draw_filled_rect(barX, barY_Stamina, barX + filledStaminaWidth, barY_Stamina + barHeight, 9, 7); - DrawFilledRect(diabloIIWnd, barX, barY_Stamina, barX + filledStaminaWidth, barY_Stamina + barHeight, RGB(255, 255, 0)); // Green color for Stamina + // diablo2::d2_gfx::draw_filled_rect(barX, barY_Stamina, barX + filledStaminaWidth, barY_Stamina + barHeight, 12, 255); + //DrawFilledRect(diabloIIWnd, barX, barY_Stamina, barX + filledStaminaWidth, barY_Stamina + barHeight, RGB(255, 255, 0)); // Green color for Stamina int statLevel = diablo2::d2_common::get_stat(player, static_cast(12), NULL); int statLastExp = diablo2::d2_common::get_stat(player, static_cast(29), NULL); int statNextExp = diablo2::d2_common::get_stat(player, static_cast(30), NULL); - + diablo2::d2_win::set_current_font(diablo2::UI_FONT_16); // Set font to FONT16 } @@ -397,6 +447,7 @@ public: menu::draw(); } + private: static bool should_draw() { return diablo2::d2_client::get_ui_window_state(diablo2::UI_WINDOW_INVENTORY) || diff --git a/src/d2tweaks/client/modules/damage_display/damage_display_client.cpp b/src/d2tweaks/client/modules/damage_display/damage_display_client.cpp index aa49a82..915e6e7 100644 --- a/src/d2tweaks/client/modules/damage_display/damage_display_client.cpp +++ b/src/d2tweaks/client/modules/damage_display/damage_display_client.cpp @@ -249,7 +249,7 @@ static void draw_damage_labels() { int _barHeight = GetPrivateProfileIntA("Options", "barHeight", 0, "./D2Tweaks.ini"); diablo2::d2_win::draw_text(const_cast(combinedText.c_str()), textX, textY, textColor, 0); - diablo2::d2_gfx::draw_filled_rect(textX, textY, textX + healthPercentage * 60, textY + _barHeight, 9, 7); + diablo2::d2_gfx::draw_filled_rect(textX, textY, textX + healthPercentage * 60, textY + _barHeight, 9, 255); const auto offset = static_cast(lerp(static_cast(label->unit_height) + 5.f, static_cast(label->unit_height) + 30.f, static_cast(delta) / static_cast(DISPLAY_TIME))); my -= offset; diff --git a/src/diablo2/d2gfx.cpp b/src/diablo2/d2gfx.cpp index 678c762..2a82f66 100644 --- a/src/diablo2/d2gfx.cpp +++ b/src/diablo2/d2gfx.cpp @@ -34,7 +34,7 @@ void diablo2::d2_gfx::draw_image(structures::gfxdata* data, uint32_t x, uint32_t } -void diablo2::d2_gfx::draw_filled_rect(int left , int top, int right, int bottom, ULONG color, ULONG transTbl) { - static wrap_func_std_import draw_boxed_text(10055, get_base()); +void diablo2::d2_gfx::draw_filled_rect(int left , int top, int right, int bottom, DWORD color, int transTbl) { + static wrap_func_std_import draw_boxed_text(10056, get_base()); draw_boxed_text(left, top, right, bottom, color, transTbl); } \ No newline at end of file diff --git a/src/diablo2/d2win.cpp b/src/diablo2/d2win.cpp index fcf71a2..56bfc9d 100644 --- a/src/diablo2/d2win.cpp +++ b/src/diablo2/d2win.cpp @@ -22,7 +22,11 @@ void diablo2::d2_win::draw_boxed_text(wchar_t* str, uint32_t x, uint32_t y, int3 draw_boxed_text(str, x, y, paletteIndex, transTbl, color); } - +int32_t diablo2::d2_win::D2Win_10034_MixRGB(uint8_t nRed, uint8_t nGreen, uint8_t nBlue) { + static wrap_func_fast_import D2Win_10034_MixRGB(10034, get_base()); + auto xColor = D2Win_10034_MixRGB(nRed, nGreen, nBlue); + return xColor; +} void diablo2::d2_win::set_popup_properties(wchar_t* str, uint32_t x, uint32_t y, ui_color_t color, int32_t align) { static wrap_func_fast_import hover_text(10129, get_base());