Skip to content

Commit 12138d9

Browse files
committed
Update AddRemovePartnersC + Update README.md + Other minor edits
1 parent 1eaed32 commit 12138d9

File tree

8 files changed

+40
-27
lines changed

8 files changed

+40
-27
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
This contains the tools for Paper Mario: The Thousand Year Door I have built. Most of these were built completely blind without any debug information.
2-
* docs: Not a tool, this folder contains various pieces documentation
3-
* ttydasm: Disassembler for the event command scripting language
4-
* rellink: REL file linking tool
1+
This contains the practice codes that I have made for Paper Mario: The Thousand-Year Door. The initial code for this project came from PistonMiner's work. https://github.com/PistonMiner/ttyd-tools
2+
3+
The codes are stored on the save files (gci files) listed on the releases page. You must use the proper file for your version of the game.
4+
G8ME = US, G8MJ = JP, G8MP = EU
5+
https://github.com/Zephiles/ttyd-tools/releases
6+
7+
To use them on console, you need to use a homebrew app to move the save file onto your memory card, and then use the provided gct files with your prefered homebrew app.
8+
https://github.com/Zephiles/ttyd-tools/tree/master/ttyd-tools/relloader-ttyd/REL_Loader/GCT
9+
10+
To use them on an emulator such as Dolphin, you need to either import the save file onto the virtual memory card used by the emulator, or move the file into the GCI folder (this is a Dolphin thing). You must then use either the provided Action Replay code or the provided Gecko code. The Gecko code is shorter, so that is the prefered code to use. The Action Replay code is provided mainly for people who happen to be using the old Action Replay discs, or for people who are having issues applying Gecko codes in Dolphin.
11+
https://github.com/Zephiles/ttyd-tools/tree/master/ttyd-tools/relloader-ttyd/REL_Loader/Action_Replay
12+
https://github.com/Zephiles/ttyd-tools/tree/master/ttyd-tools/relloader-ttyd/REL_Loader/Gecko

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,8 @@
752752
// 80142948:partyGetTechLv
753753
// 8014298C:partyGetHp
754754
// 801429D0:partyChkJoin
755-
// 80142A18:partyLeft
756-
// 80142A5C:partyJoin
755+
80142A18:partyLeft
756+
80142A5C:partyJoin
757757
// 80142AA0:marioGetExtraPartyId
758758
80142B38:marioGetPartyId
759759
// 80142BD0:marioGetParty

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,8 @@
749749
// 8013B868:partyGetTechLv
750750
// 8013B8AC:partyGetHp
751751
// 8013B8F0:partyChkJoin
752-
// 8013B938:partyLeft
753-
// 8013B97C:partyJoin
752+
8013B938:partyLeft
753+
8013B97C:partyJoin
754754
// 8013B9C0:marioGetExtraPartyId
755755
8013BA58:marioGetPartyId
756756
// 8013BAF0:marioGetParty

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,8 @@
752752
// 80140E60:partyGetTechLv
753753
// 80140EA4:partyGetHp
754754
// 80140EE8:partyChkJoin
755-
// 80140F30:partyLeft
756-
// 80140F74:partyJoin
755+
80140F30:partyLeft
756+
80140F74:partyJoin
757757
// 80140FB8:marioGetExtraPartyId
758758
80141050:marioGetPartyId
759759
// 801410E8:marioGetParty

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ extern "C" {
77
// partyGetTechLv
88
// partyGetHp
99
// partyChkJoin
10-
// partyLeft
11-
// partyJoin
10+
void partyLeft(uint32_t id);
11+
void partyJoin(uint32_t id);
1212
// marioGetExtraPartyId
1313
uint32_t marioGetPartyId();
1414
// marioGetParty

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ extern "C" {
6969
// partyPaperOff
7070
// partyPaperOn
7171
// anotherPartyGetPtr
72-
void *partyGetPtr(uint32_t marioGetPartyIdResult);
72+
void *partyGetPtr(uint32_t partyId);
7373

7474
}
7575

ttyd-tools/rel/source/codes/AddRemovePartnersC.cpp

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <ttyd/mariost.h>
44
#include <ttyd/system.h>
5-
#include <ttyd/mario_pouch.h>
5+
#include <ttyd/mario_party.h>
66
#include <ttyd/win_party.h>
77

88
#include <cstdio>
@@ -22,16 +22,16 @@ void Mod::addOrRemovePartners()
2222
{
2323
// Currently in the partners menu
2424
uint32_t ButtonInput = ttyd::system::keyGetButton(0);
25-
uint32_t PouchAddress = reinterpret_cast<uint32_t>(ttyd::mario_pouch::pouchGetPtr());
2625

2726
if ((ButtonInput & AddPartnersCombo) == AddPartnersCombo)
2827
{
2928
if (!addOrRemovePartnersDisable)
3029
{
31-
for (int i = 0; i < 7; i++)
30+
31+
// Add all partners
32+
for (int i = 1; i <= 7; i++)
3233
{
33-
PouchAddress += 0xE;
34-
*reinterpret_cast<uint8_t *>(PouchAddress + 0x1) = 1;
34+
ttyd::mario_party::partyJoin(i);
3535
}
3636

3737
// Reload party menu
@@ -50,25 +50,30 @@ void Mod::addOrRemovePartners()
5050
{
5151
// Currently inside partners menu
5252
uint32_t PartnerOnCursor = *reinterpret_cast<uint32_t *>(PauseMenuAddress + 0x1D8);
53+
uint8_t PartnerToRemove;
5354

55+
// Get proper partner value
5456
switch (PartnerOnCursor)
5557
{
5658
case 0: // Goombella
57-
*reinterpret_cast<uint8_t *>(PouchAddress + 0xF) = 0; break;
59+
PartnerToRemove = 1; break;
5860
case 1: // Koops
59-
*reinterpret_cast<uint8_t *>(PouchAddress + 0x1D) = 0; break;
61+
PartnerToRemove = 2; break;
6062
case 2: // Flurrie
61-
*reinterpret_cast<uint8_t *>(PouchAddress + 0x47) = 0; break;
63+
PartnerToRemove = 5; break;
6264
case 3: // Yoshi
63-
*reinterpret_cast<uint8_t *>(PouchAddress + 0x39) = 0; break;
65+
PartnerToRemove = 4; break;
6466
case 4: // Vivian
65-
*reinterpret_cast<uint8_t *>(PouchAddress + 0x55) = 0; break;
67+
PartnerToRemove = 6; break;
6668
case 5: // Bobbery
67-
*reinterpret_cast<uint8_t *>(PouchAddress + 0x2B) = 0; break;
68-
case 6: // Mowz
69-
*reinterpret_cast<uint8_t *>(PouchAddress + 0x63) = 0; break;
69+
PartnerToRemove = 3; break;
70+
default: // case 6: Mowz
71+
PartnerToRemove = 7; break;
7072
}
7173

74+
// Remove partner
75+
ttyd::mario_party::partyLeft(PartnerToRemove);
76+
7277
// Reload party menu
7378
uint32_t *PauseMenuPointer = reinterpret_cast<uint32_t *>(PauseMenuAddress);
7479
ttyd::win_party::winPartyExit(PauseMenuPointer);

ttyd-tools/rel/source/codes/ReloadScreenC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#include <ttyd/system.h>
44
#include <ttyd/seqdrv.h>
5-
#include <ttyd/mariost.h>
65
#include <ttyd/string.h>
6+
#include <ttyd/mariost.h>
77
#include <ttyd/camdrv.h>
88
#include <ttyd/pmario_sound.h>
99
#include <ttyd/mario_cam.h>

0 commit comments

Comments
 (0)