Skip to content

Commit 98dfa09

Browse files
committed
Added an option to keep your badges when warping by event
This option is added onto the Keep Standard Inventory option, which has been renamed to Keep Inventory.
1 parent cb7fd83 commit 98dfa09

File tree

11 files changed

+125
-25
lines changed

11 files changed

+125
-25
lines changed

ttyd-tools/rel/include/commonfunctions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ uint32_t getCurrentYoshiColorId();
3939
void setNewYoshiColorId(uint32_t colorId);
4040
void spawnFollower(ttyd::party::PartyMembers followerId);
4141
bool checkIfBadgeEquipped(int16_t badge);
42+
bool checkIfHaveItem(int16_t item);
4243
void recheckJumpAndHammerLevels();
4344
uint32_t getCurrentPitFloor();
4445
uint32_t getCurrentFPS();

ttyd-tools/rel/include/global.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,12 @@ struct WarpByEventStruct
703703
}
704704
};
705705

706+
struct WarpByEventInventoryStruct
707+
{
708+
int16_t StandardItems[20];
709+
int16_t Badges[200];
710+
};
711+
706712
struct WarpByEventDetailsStruct
707713
{
708714
#ifdef TTYD_JP

ttyd-tools/rel/include/ttyd.eu.lst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,8 +933,8 @@
933933
// 800D3FC0:pouchGetKpaCoin
934934
// 800D3FCC:pouchMajinaiInit
935935
// 800D3FFC:pouchArriveBadge
936-
// 800D402C:pouchUnEquipBadgeID
937-
// 800D4084:pouchEquipBadgeID
936+
800D402C:pouchUnEquipBadgeID
937+
800D4084:pouchEquipBadgeID
938938
// 800D40D8:pouchEquipCheckBadgeIndex
939939
800D40F8:pouchEquipCheckBadge
940940
// 800D41C0:pouchUnEquipBadgeIndex

ttyd-tools/rel/include/ttyd.jp.lst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,8 @@
931931
// 800CF07C:pouchGetKpaCoin
932932
// 800CF088:pouchMajinaiInit
933933
// 800CF0B8:pouchArriveBadge
934-
// 800CF0E8:pouchUnEquipBadgeID
935-
// 800CF140:pouchEquipBadgeID
934+
800CF0E8:pouchUnEquipBadgeID
935+
800CF140:pouchEquipBadgeID
936936
// 800CF194:pouchEquipCheckBadgeIndex
937937
800CF1B4:pouchEquipCheckBadge
938938
// 800CF27C:pouchUnEquipBadgeIndex

ttyd-tools/rel/include/ttyd.us.lst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,8 @@
931931
// 800D31C8:pouchGetKpaCoin
932932
// 800D31D4:pouchMajinaiInit
933933
// 800D3204:pouchArriveBadge
934-
// 800D3234:pouchUnEquipBadgeID
935-
// 800D328C:pouchEquipBadgeID
934+
800D3234:pouchUnEquipBadgeID
935+
800D328C:pouchEquipBadgeID
936936
// 800D32E0:pouchEquipCheckBadgeIndex
937937
800D3300:pouchEquipCheckBadge
938938
// 800D33C8:pouchUnEquipBadgeIndex

ttyd-tools/rel/include/ttyd/mario_pouch.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ void pouchGetStarStone(uint32_t starId);
2121
// pouchGetKpaCoin
2222
// pouchMajinaiInit
2323
// pouchArriveBadge
24-
// pouchUnEquipBadgeID
25-
// pouchEquipBadgeID
24+
bool pouchUnEquipBadgeID(int16_t badge);
25+
bool pouchEquipBadgeID(int16_t badge);
2626
// pouchEquipCheckBadgeIndex
2727
uint32_t pouchEquipCheckBadge(int16_t badge);
2828
// pouchUnEquipBadgeIndex

ttyd-tools/rel/source/commonfunctions.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ bool checkIfBadgeEquipped(int16_t badge)
263263
return ttyd::mario_pouch::pouchEquipCheckBadge(badge) > 0;
264264
}
265265

266+
bool checkIfHaveItem(int16_t item)
267+
{
268+
return ttyd::mario_pouch::pouchCheckItem(item) > 0;
269+
}
270+
266271
void recheckJumpAndHammerLevels()
267272
{
268273
ttyd::mario_pouch::pouchGetJumpLv();

ttyd-tools/rel/source/cxx.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,11 @@ void operator delete[](void *ptr)
1818
{
1919
return ttyd::memory::__memFree(0, ptr);
2020
}
21+
void operator delete(void *ptr, std::size_t size)
22+
{
23+
return ttyd::memory::__memFree(0, ptr);
24+
}
25+
void operator delete[](void *ptr, std::size_t size)
26+
{
27+
return ttyd::memory::__memFree(0, ptr);
28+
}

ttyd-tools/rel/source/draw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3421,10 +3421,10 @@ void drawWarpByEventMenuDetails()
34213421
String = "No";
34223422
}
34233423

3424-
int32_t tempPosX = PosX + 232;
3424+
int32_t tempPosX = PosX + 147;
34253425

34263426
#ifdef TTYD_JP
3427-
tempPosX -= 10;
3427+
tempPosX -= 4;
34283428
#endif
34293429

34303430
drawText(String, tempPosX, PosY, Alpha, Color, Scale);

ttyd-tools/rel/source/global.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace mod {
55

6-
const char *VersionNumber = "v3.0.38";
6+
const char *VersionNumber = "v3.0.39";
77

88
const char *RootLines[] =
99
{
@@ -1589,7 +1589,7 @@ const char *WarpDescriptions[] =
15891589
const char *WarpEventLines[] =
15901590
{
15911591
"Select Event",
1592-
"Keep Standard Inventory",
1592+
"Keep Inventory",
15931593
"Set Flags",
15941594
"Warp",
15951595
};

0 commit comments

Comments
 (0)