From 6692eff3a3474564fb22dccca3afb7c791e74340 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Thu, 11 Jun 2026 03:10:45 -0700 Subject: [PATCH] partially working colossal wallet --- include/d/d_item.h | 4 ++++ include/d/d_item_data.h | 7 +++++++ src/d/d_item.cpp | 9 ++++++++- src/d/d_item_data.cpp | 4 ++++ src/d/d_menu_collect.cpp | 2 ++ src/d/d_save.cpp | 6 +++++- 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/include/d/d_item.h b/include/d/d_item.h index 0d379c0578..eccc79a544 100644 --- a/include/d/d_item.h +++ b/include/d/d_item.h @@ -400,4 +400,8 @@ BOOL isBottleItem(u8 item_no); u8 check_itemno(int i_itemNo); BOOL isInsect(u8 i_itemNo); +#if TARGET_PC +void item_func_WALLET_LV4(); +#endif + #endif /* D_D_ITEM_H */ diff --git a/include/d/d_item_data.h b/include/d/d_item_data.h index a1770be241..c3db86396b 100644 --- a/include/d/d_item_data.h +++ b/include/d/d_item_data.h @@ -350,4 +350,11 @@ enum { /* 0xFF */ dItemNo_NONE_e, }; +#if TARGET_PC +// HD item mappings +enum { + dItemNo_WALLET_LV4_e = 0xDA, +}; +#endif + #endif /* D_D_ITEM_DATA_H */ diff --git a/src/d/d_item.cpp b/src/d/d_item.cpp index cb525139db..cda78d1f2e 100644 --- a/src/d/d_item.cpp +++ b/src/d/d_item.cpp @@ -229,7 +229,7 @@ static void (*item_func_ptr[256])() = { item_func_F_MAYFLY, item_func_noentry, item_func_noentry, - item_func_noentry, + DUSK_IF_ELSE(item_func_WALLET_LV4, item_func_noentry), item_func_noentry, item_func_noentry, item_func_noentry, @@ -2187,4 +2187,11 @@ int addBombCount(u8 i_bombType, u8 i_addNum) { return i_addNum; } +#if TARGET_PC +// HD item functions +void item_func_WALLET_LV4() { + dComIfGs_setWalletSize(3); +} +#endif + u8* dEnemyItem_c::mData; diff --git a/src/d/d_item_data.cpp b/src/d/d_item_data.cpp index 2a84fb615a..c0065ce72f 100644 --- a/src/d/d_item_data.cpp +++ b/src/d/d_item_data.cpp @@ -221,7 +221,11 @@ dItem_itemResource dItem_data::item_resource[] = { {"O_gD_kagm", 0x0009, 0x000F, 0x0006, 0x000C,-0x0001, -0x1, -0x1, 0x0031, 0x50, 0x0000}, {"F_gD_rupy", 0x0004,-0x0001,-0x0001, 0x0007,-0x0001, 0x0, -0x1, 0x002D, 0x64, 0x0000}, {"F_gD_rupy", 0x0004,-0x0001,-0x0001, 0x0007,-0x0001, 0x0, -0x1, 0x002D, 0x64, 0x0000}, +#if TARGET_PC + {"O_gD_puL4", 0x0001,-0x0001,-0x0001, -0x0001,-0x0001, -0x1, -0x1, 0x00AF, 0x26, 0x0251}, +#else {"F_gD_rupy", 0x0004,-0x0001,-0x0001, 0x0007,-0x0001, 0x0, -0x1, 0x002D, 0x64, 0x0000}, +#endif {"F_gD_rupy", 0x0004,-0x0001,-0x0001, 0x0007,-0x0001, 0x0, -0x1, 0x002D, 0x64, 0x0000}, {"F_gD_rupy", 0x0004,-0x0001,-0x0001, 0x0007,-0x0001, 0x0, -0x1, 0x002D, 0x64, 0x0000}, {"F_gD_rupy", 0x0004,-0x0001,-0x0001, 0x0007,-0x0001, 0x0, -0x1, 0x002D, 0x64, 0x0000}, diff --git a/src/d/d_menu_collect.cpp b/src/d/d_menu_collect.cpp index 7ac70e4a7b..770610bd0d 100644 --- a/src/d/d_menu_collect.cpp +++ b/src/d/d_menu_collect.cpp @@ -685,6 +685,8 @@ void dMenu_Collect2D_c::screenSet() { field_0x184[0][3] = 0x199; } else if (dComIfGs_getWalletSize() == BIG_WALLET) { field_0x184[0][3] = 0x19a; + } if (dusk::tphd_active() && dComIfGs_getWalletSize() == 3) { + field_0x184[0][3] = 0x19c; } else { field_0x184[0][3] = 0x19b; } diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index af2a6db28a..e17d9ae487 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -118,7 +118,7 @@ u8 dSv_player_status_a_c::getMixItemIndex(int i_no) const { } u16 dSv_player_status_a_c::getRupeeMax() const { - if (mWalletSize < 3) { // if you make this a default, it wont match. Compiler, pls. + if (mWalletSize < 3 IF_DUSK(|| (dusk::tphd_active() && mWalletSize < 4))) { // if you make this a default, it wont match. Compiler, pls. switch (mWalletSize) { case WALLET: #if TARGET_PC @@ -138,6 +138,10 @@ u16 dSv_player_status_a_c::getRupeeMax() const { #else return 1000; #endif + #if TARGET_PC + case 3: // colossal wallet + return 9999; + #endif } }