mirror of
https://gitlab.com/hashborgir/d2tweaks-rnd2k.git
synced 2025-10-13 16:34:22 -05:00
Stats display refactor using ini file done.
This commit is contained in:
@@ -53,13 +53,12 @@ namespace diablo2 {
|
||||
|
||||
static int32_t get_view_offset_x();
|
||||
static int32_t get_view_offset_y();
|
||||
|
||||
|
||||
static uint32_t get_mouse_x();
|
||||
static uint32_t get_mouse_y();
|
||||
static bool get_ui_window_state(ui_window_t window);
|
||||
static void* get_buysellbtn();
|
||||
|
||||
|
||||
static void play_sound(uint32_t soundId, structures::unit* u, uint32_t ticks, BOOL prePick, uint32_t cache);
|
||||
|
||||
static structures::unit* get_unit_by_guid(int32_t type, int32_t guid);
|
||||
@@ -68,14 +67,14 @@ namespace diablo2 {
|
||||
static void print_chat(wchar_t* string, uint32_t color);
|
||||
|
||||
static bool cache_gfx_data(structures::gfxdata* gfxData,
|
||||
structures::unit* unit,
|
||||
structures::cellfile* cellfFile,
|
||||
int32_t direction,
|
||||
int32_t frame,
|
||||
int32_t* outIndex,
|
||||
int8_t flags,
|
||||
int32_t colorTint);
|
||||
|
||||
structures::unit* unit,
|
||||
structures::cellfile* cellfFile,
|
||||
int32_t direction,
|
||||
int32_t frame,
|
||||
int32_t* outIndex,
|
||||
int8_t flags,
|
||||
int32_t colorTint);
|
||||
|
||||
static structures::cellfile* load_gfx_resource(char* path);
|
||||
static int32_t unload_gfx_resource(structures::cellfile* handle);
|
||||
static int32_t send_to_server_7(BYTE type, DWORD num, DWORD unk1, DWORD unk2);
|
||||
@@ -90,6 +89,5 @@ namespace diablo2 {
|
||||
static int32_t send_to_server_9(BYTE type, DWORD num, DWORD unk1);
|
||||
|
||||
static void set_ui_toggle(int nToggle, int nUIState, BOOL bToggle);
|
||||
|
||||
};
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -43,10 +43,9 @@ namespace diablo2 {
|
||||
static bool __fastcall pickup_item(structures::game* game, structures::unit* player, uint32_t guid, uint32_t* ptrItemCarried);
|
||||
static structures::unit* get_unit_owner(structures::game* game, structures::unit* unit);
|
||||
static void* iterate_unit_pets(structures::game* game, structures::unit* unit,
|
||||
const std::function<void(structures::game*, structures::unit*, structures::unit*)>& cb);
|
||||
const std::function<void(structures::game*, structures::unit*, structures::unit*)>& cb);
|
||||
|
||||
static void update_inventory_items(structures::game* game, structures::unit* player);
|
||||
static uint32_t __fastcall diablo2::d2_game::transmogrify(diablo2::structures::game* game, diablo2::structures::unit* player);
|
||||
|
||||
};
|
||||
}
|
||||
|
@@ -18,6 +18,5 @@ namespace diablo2 {
|
||||
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, DWORD color, int transTbl);
|
||||
|
||||
};
|
||||
}
|
@@ -26,7 +26,7 @@ namespace diablo2 {
|
||||
uint32_t dwCostAdd; //0x80
|
||||
uint16_t wDropSound; //0x84
|
||||
uint16_t wUseSound; //0x86
|
||||
uint32_t dwDropSfxFrame; //0x88
|
||||
uint32_t dwDropSfxFrame; //0x88
|
||||
uint32_t dwProp1; //0x8C
|
||||
uint32_t dwPar1; //0x90
|
||||
uint32_t dwMin1; //0x94
|
||||
|
@@ -106,7 +106,7 @@ namespace diablo2 {
|
||||
uint32_t* pHirelings; //+000001A0 055D8CD8 hirelings.txt (limit = 256)
|
||||
int nHirelings; //+000001A4 00000078 # of hirelings records
|
||||
int pMercFirst[256]; //+000001A8 00000000 array of 256 integers (namefirst column from hirelings.txt)
|
||||
int pMercLast[256]; //+000005A8 0000000C array of 256 integers (namelast column from hirelings.txt)
|
||||
int pMercLast[256]; //+000005A8 0000000C array of 256 integers (namelast column from hirelings.txt)
|
||||
void* pNPCs; //+000009A8 05724F74 npcs.txt
|
||||
int nNPCs; //+000009AC 00000011 # of npcs records
|
||||
void* pColours; //+000009B0 01417568 colors.txt
|
||||
|
@@ -69,9 +69,9 @@ namespace diablo2 {
|
||||
ITEMFLAG_FROMPLAYER = 0x01000000,
|
||||
ITEMFLAG_RUNEuint16_t = 0x04000000
|
||||
*/
|
||||
uint32_t guid1; //+1C Global Unique ID 1
|
||||
uint32_t guid2; //+20 Global Unique ID 2
|
||||
uint32_t guid3; //+24 Global Unique ID 3
|
||||
uint32_t guid1; //+1C Global Unique ID 1
|
||||
uint32_t guid2; //+20 Global Unique ID 2
|
||||
uint32_t guid3; //+24 Global Unique ID 3
|
||||
uint32_t unique_id; //+28
|
||||
uint8_t ilvl; //+2C
|
||||
uint8_t uk1[0x03]; //+2D
|
||||
@@ -108,7 +108,7 @@ namespace diablo2 {
|
||||
uint8_t item_data3; //+47 //D2Common10854 D2Common10853
|
||||
uint8_t p_ear_level; //+48
|
||||
uint8_t var_gfx; //+49
|
||||
char i_name[0x12]; //+4A //inscribed/ear get_name
|
||||
char i_name[0x12]; //+4A //inscribed/ear get_name
|
||||
inventory* inventory; //+5C
|
||||
unit* pt_prev_item; //+60
|
||||
unit* pt_next_item; //+64
|
||||
|
@@ -5,7 +5,7 @@
|
||||
namespace diablo2 {
|
||||
namespace structures {
|
||||
struct game;
|
||||
|
||||
|
||||
struct net_client {
|
||||
uint32_t client_id; //+00
|
||||
uint8_t uk1[0x06]; //+04
|
||||
|
@@ -4,52 +4,52 @@
|
||||
|
||||
namespace diablo2 {
|
||||
namespace structures {
|
||||
struct inventory;
|
||||
struct inventory;
|
||||
|
||||
struct npc_gamble //sizeof 0xC
|
||||
{
|
||||
inventory* pInventory; //+00
|
||||
uint32_t dwGUID; //+04 npc_gamble* pNext; //+08
|
||||
};
|
||||
struct npc_gamble //sizeof 0xC
|
||||
{
|
||||
inventory* pInventory; //+00
|
||||
uint32_t dwGUID; //+04 npc_gamble* pNext; //+08
|
||||
};
|
||||
|
||||
struct npc_record //sizeof 0x44
|
||||
{
|
||||
int nNPC; //+00
|
||||
inventory* pInventory; //+04
|
||||
npc_gamble* pGamble; //+08
|
||||
bool bGambleInit; //+0C
|
||||
uint32_t* pMercData; //+10 //D2MercDataStrc*
|
||||
uint32_t* pEvent; //+14 //D2NPCEventStrc*
|
||||
uint32_t* pVendorChain; //+18 //D2VendorChainStrc*
|
||||
bool bTrading; //+1C
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
bool bFlags[8]; //+20
|
||||
struct
|
||||
{
|
||||
bool bVendorInit; //+20
|
||||
bool bHireInit; //+21
|
||||
uint8_t nAct; //+22
|
||||
bool bTrader; //+23
|
||||
bool bLevelRefresh; //+24
|
||||
bool bInited; //+25
|
||||
bool bForceVendor; //+26
|
||||
bool bRefreshInventory; //+27
|
||||
};
|
||||
};
|
||||
struct npc_record //sizeof 0x44
|
||||
{
|
||||
int nNPC; //+00
|
||||
inventory* pInventory; //+04
|
||||
npc_gamble* pGamble; //+08
|
||||
bool bGambleInit; //+0C
|
||||
uint32_t* pMercData; //+10 //D2MercDataStrc*
|
||||
uint32_t* pEvent; //+14 //D2NPCEventStrc*
|
||||
uint32_t* pVendorChain; //+18 //D2VendorChainStrc*
|
||||
bool bTrading; //+1C
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
bool bFlags[8]; //+20
|
||||
struct
|
||||
{
|
||||
bool bVendorInit; //+20
|
||||
bool bHireInit; //+21
|
||||
uint8_t nAct; //+22
|
||||
bool bTrader; //+23
|
||||
bool bLevelRefresh; //+24
|
||||
bool bInited; //+25
|
||||
bool bForceVendor; //+26
|
||||
bool bRefreshInventory; //+27
|
||||
};
|
||||
};
|
||||
|
||||
uint32_t dwTicks; //+28
|
||||
uint32_t pProxy[4]; //+2C //D2UnitProxyStrc
|
||||
uint32_t dwUnk; //+3C
|
||||
uint32_t dwNPCGUID; //+40
|
||||
};
|
||||
uint32_t dwTicks; //+28
|
||||
uint32_t pProxy[4]; //+2C //D2UnitProxyStrc
|
||||
uint32_t dwUnk; //+3C
|
||||
uint32_t dwNPCGUID; //+40
|
||||
};
|
||||
|
||||
uint32_t pTrade; //+20 //D2NPCTradeStrc
|
||||
};
|
||||
};
|
||||
}
|
||||
uint32_t pTrade; //+20 //D2NPCTradeStrc
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
@@ -5,20 +5,20 @@
|
||||
namespace diablo2 {
|
||||
namespace structures {
|
||||
struct net_client;
|
||||
|
||||
|
||||
struct player_data {
|
||||
char name[0x10]; //+00 Player Name
|
||||
void* pt_quest[3]; //+10 Quest Pointers for each difficulty
|
||||
char name[0x10]; //+00 Player Name
|
||||
void* pt_quest[3]; //+10 Quest Pointers for each difficulty
|
||||
uint8_t uk1[0x18]; //+1C //before : 0x14
|
||||
void* pt_arena_unit; //+34 ptArena for the Unit
|
||||
void* pt_arena_unit; //+34 ptArena for the Unit
|
||||
uint8_t uk2[0x4]; //+38 //before : 0x7
|
||||
uint16_t mp_source_portal_unique_id; //+3C Source Portal Unique_ID
|
||||
uint16_t mp_source_portal_unique_id; //+3C Source Portal Unique_ID
|
||||
uint8_t uk3[0x2]; //+3E
|
||||
uint16_t mp_dest_portal_unique_id; //+40 Destination Portal Unique_ID
|
||||
uint8_t uk4[0x06]; //+42
|
||||
uint8_t pt_object_un_id; //+48 Object UniqueID for TownPortals
|
||||
uint8_t uk5[0x53]; //+49
|
||||
net_client* net_client; //+9C ptClient
|
||||
uint16_t mp_dest_portal_unique_id; //+40 Destination Portal Unique_ID
|
||||
uint8_t uk4[0x06]; //+42
|
||||
uint8_t pt_object_un_id; //+48 Object UniqueID for TownPortals
|
||||
uint8_t uk5[0x53]; //+49
|
||||
net_client* net_client; //+9C ptClient
|
||||
};
|
||||
}
|
||||
}
|
@@ -5,7 +5,7 @@
|
||||
namespace diablo2 {
|
||||
namespace structures {
|
||||
struct unit;
|
||||
|
||||
|
||||
struct room//size=0x80
|
||||
{
|
||||
//ptRoom +48 0 = spawn new units (monster, objects e.tc), 1 = don't spawn any new units
|
||||
|
@@ -22,8 +22,6 @@ namespace diablo2 {
|
||||
struct statslistex;
|
||||
struct quest_record;
|
||||
struct npc_record;
|
||||
|
||||
|
||||
|
||||
enum class unit_type_t : int32_t {
|
||||
UNIT_TYPE_PLAYER = 0,
|
||||
@@ -76,8 +74,6 @@ namespace diablo2 {
|
||||
ITEMFLAG_ITEM = 0x08000000
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct unit {
|
||||
unit_type_t type;
|
||||
|
||||
|
@@ -15,7 +15,7 @@ namespace diablo2 {
|
||||
public:
|
||||
explicit mpq_streambuf(const std::string& path);
|
||||
~mpq_streambuf();
|
||||
|
||||
|
||||
protected:
|
||||
int_type underflow() override;
|
||||
};
|
||||
@@ -23,8 +23,6 @@ namespace diablo2 {
|
||||
mpq_streambuf m_streambuf;
|
||||
public:
|
||||
explicit mpq_ifstream(const std::string& path);
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user