Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate openhost messages #1

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ launcher/build
*.wad
*.app

include/wwfcPayloadPublicKey.hpp
4 changes: 2 additions & 2 deletions include/wwfcCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ typedef double f64;
#ifndef WWFC_DOMAIN

# ifdef PROD
# define WWFC_DOMAIN "wiilink24.com"
# define WWFC_DOMAIN "zplwii.xyz"
# else
# define WWFC_DOMAIN "nwfc.wiinoma.com" // Points to localhost
# define WWFC_DOMAIN "zplwii.xyz" // Points to localhost
# endif

#endif
Expand Down
140 changes: 43 additions & 97 deletions include/wwfcPayloadPublicKey.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,104 +3,50 @@
namespace wwfc
{

#ifdef PROD

// Production payload key
constexpr unsigned char PayloadPublicKey[] = {
0x7d, 0x18, 0x2b, 0x27, 0x9c, 0xab, 0x6b, 0x69, 0x40, 0x8d, 0x11, 0xb7,
0x5e, 0x76, 0xb2, 0xda, 0xa6, 0x18, 0xa1, 0x0e, 0x5d, 0x5f, 0xf3, 0xc9,
0x0a, 0x51, 0xfd, 0x69, 0x03, 0xa6, 0x96, 0x70, 0x28, 0xcf, 0x22, 0x4b,
0xbd, 0xbd, 0xb2, 0x62, 0xaa, 0xa0, 0x07, 0x9a, 0x7a, 0xbf, 0xdc, 0x99,
0x89, 0x53, 0x4a, 0xfc, 0xfe, 0xa0, 0xf4, 0xa6, 0x46, 0x11, 0xb2, 0x03,
0xd0, 0xb1, 0xf1, 0x09, 0xb2, 0xe2, 0x3f, 0x64, 0xac, 0x5d, 0x8a, 0x05,
0x05, 0x52, 0x18, 0xb4, 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1a, 0xb9, 0x0f, 0x09, 0x5e, 0xd9, 0x9a, 0x6c, 0xaa, 0xa7,
0xf0, 0xd0, 0x19, 0xc5, 0xc4, 0xa8, 0xae, 0x59, 0xda, 0xa0, 0xc2, 0xa2,
0xf3, 0x53, 0x9a, 0x1c, 0x88, 0x3d, 0xeb, 0x6b, 0x3f, 0x1f, 0x23, 0xa5,
0xc8, 0x14, 0xf2, 0x42, 0x5e, 0x56, 0x6a, 0xea, 0xba, 0x07, 0x48, 0x51,
0x27, 0xca, 0x1e, 0x19, 0x00, 0x79, 0x15, 0x59, 0xfd, 0x80, 0x67, 0xdc,
0x78, 0x86, 0xc1, 0x70, 0x36, 0x0c, 0xe0, 0xee, 0x24, 0xfe, 0x0f, 0xf3,
};

#else

// Development payload key
constexpr unsigned char PayloadPublicKey[] = {
0x3f, 0x32, 0xeb, 0x87, 0xb9, 0x75, 0x15, 0xc9, 0x60, 0x17, 0x7c, 0xcf,
0x52, 0x18, 0x36, 0x66, 0x8e, 0xe9, 0x26, 0xe8, 0x58, 0x1f, 0xff, 0x84,
0xca, 0x63, 0x63, 0x9f, 0x4f, 0xa5, 0x77, 0x41, 0xe4, 0x4e, 0x5c, 0x49,
0xb7, 0x54, 0x15, 0xf5, 0x74, 0x70, 0xbc, 0xf4, 0xce, 0x5e, 0x66, 0x78,
0xf1, 0xe5, 0xfe, 0x3a, 0x98, 0x18, 0xbd, 0x8f, 0x9a, 0xb7, 0x52, 0x99,
0x7c, 0x80, 0x00, 0x81, 0xf3, 0xc0, 0xce, 0xf1, 0x8b, 0xac, 0x43, 0x18,
0x44, 0x95, 0x7e, 0xb8, 0x06, 0x41, 0x0e, 0xa7, 0x3e, 0x0e, 0xc0, 0x68,
0x01, 0x69, 0x88, 0x86, 0x81, 0x2f, 0xfe, 0x5d, 0xfb, 0x62, 0xcf, 0x0e,
0xdf, 0x4b, 0x1c, 0x67, 0x0f, 0x09, 0xaf, 0x37, 0x40, 0x60, 0x06, 0x34,
0xe4, 0xc8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x64, 0xf2, 0x99,
};

#endif

} // namespace wwfc
4 changes: 2 additions & 2 deletions patch/wwfcPatch.s
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#ifndef WWFC_DOMAIN

# ifdef PROD
# define WWFC_DOMAIN "wiilink24.com"
# define WWFC_DOMAIN "zplwii.xyz"
# else
# define WWFC_DOMAIN "nwfc.wiinoma.com" // Points to localhost
# define WWFC_DOMAIN "zplwii.xyz" // Points to localhost
# endif

#endif
Expand Down
4 changes: 2 additions & 2 deletions payload/import/mkw/net/userHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class UserHandler
private:
static const u16 s_maxMiis = 2;
static const u16 s_minRating = 1;
static const u16 s_maxRating = 9999;
static const u16 s_maxRating = 30000;
};

static_assert(sizeof(Packet) == 0xC0);
Expand Down Expand Up @@ -122,4 +122,4 @@ static_assert(sizeof(UserHandler) == 0x9F0);

#endif

} // namespace mkw::Net
} // namespace mkw::Net
58 changes: 47 additions & 11 deletions payload/import/mkw/ui/page/openHostPage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "import/mkw/system/system.hpp"
#include "import/mkw/ui/multiMenuInputManager.hpp"
#include "import/mkw/ui/section/sectionManager.hpp"
#include "import/revolution.h"
#include "messagePopupPage.hpp"
#include "yesNoPopupPage.hpp"

Expand Down Expand Up @@ -82,6 +83,7 @@ class OpenHostPage : public Page
void transition(State state)
{
Section* section = SectionManager::Instance()->currentSection();
u8 language = RVL::SCGetLanguage();

if (state == s_state) {
return;
Expand All @@ -93,12 +95,25 @@ class OpenHostPage : public Page
}
case State::Prompt: {
FormatParam formatParam{};
formatParam.strings[0] =
L"Enable Open Host?\n\n"
L"This feature allows players who\n"
L"add your friend code to meet up with you,\n"
L"even if you don't add them back.";

if (language == 0) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A switch statement would probably be better in this case

formatParam.strings[0] =
L"こうかいホストをゆうこうにしますか?\n\n"
L"この機能はあなたのフレンドコードを\n"
L"追加したプレイヤーはあなたが追加し返さなくても\n"
L"フレンドとしてあなたと会えるようになる機能です";
} else if (language == 3) {
formatParam.strings[0] =
L"Activer l'Open Host?\n\n"
L"Cette fonctionnalité permet aux joueurs qui\n"
L"ajoutent votre code ami de vous rejoindre,\n"
L"même si vous ne les avez pas ajoutés.";
} else {
formatParam.strings[0] =
L"Enable Open Host?\n\n"
L"This feature allows players who\n"
L"add your friend code to meet up with you,\n"
L"even if you don't add them back.";
}
YesNoPopupPage* yesNoPopupPage =
section->page<YesNoPopupPage>(PageId::YesNoPopup);
yesNoPopupPage->reset();
Expand All @@ -117,14 +132,35 @@ class OpenHostPage : public Page
case State::Result: {
FormatParam formatParam{};
if (!s_sentOpenHostValue) {
formatParam.strings[0] = L"You have lost connection to\n"
L"the server.\n\n"
L"Please try again later.";
if (language == 0) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

formatParam.strings[0] = L"サーバーからの接続が切断されました\n\n\n"
L"もう一度やり直してください";
} else if (language == 3) {
formatParam.strings[0] = L"Vous avez perdu la connexion\n"
L"au serveur.\n\n"
L"Veuillez réessayer ultérieurement.";
} else {
formatParam.strings[0] = L"You have lost connection to\n"
L"the server.\n\n"
L"Please try again later.";
}
} else {
if (s_openHostEnabled) {
formatParam.strings[0] = L"Open Host is now enabled!";
if (language == 0) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

formatParam.strings[0] = L"こうかいホストをゆうこうにしました!";
} else if (language == 3) {
formatParam.strings[0] = L"L'Open Host est maintenant activé!";
} else {
formatParam.strings[0] = L"Open Host is now enabled!";
}
} else {
formatParam.strings[0] = L"Open Host is now disabled!";
if (language == 0) {
formatParam.strings[0] = L"こうかいホストをむこうにしました!";
} else if (language == 3) {
formatParam.strings[0] = L"L'Open Host est maintenant désactivé!";
} else {
formatParam.strings[0] = L"Open Host is now disabled!";
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions payload/import/revolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ LONGCALL bool SCGetProductSN( //
u32* serial
) AT(ADDRESS_SCGetProductSN);

LONGCALL u8 SCGetLanguage( //
void
) AT(RMCXD_PORT(0x801B1D0C, 0x801B1C6C, 0x801B1C2C, 0x801B2068));

#ifdef __cplusplus
}
}
Expand Down
Loading