From 910b261a5d3b157146f11dc906d8b4af86d0ee50 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Mon, 28 Sep 2026 20:36:08 +0000 Subject: [PATCH 1/3] wip: salvaged iplAddressEdit (old luna, contains hacks to remove) --- include/scene/address/iplAddressEdit.h | 19 +- src/scene/address/iplAddressEdit.cpp | 3362 +++++++++++++++++++++--- 2 files changed, 3071 insertions(+), 310 deletions(-) diff --git a/include/scene/address/iplAddressEdit.h b/include/scene/address/iplAddressEdit.h index 9bd7fb13..c4db65e3 100644 --- a/include/scene/address/iplAddressEdit.h +++ b/include/scene/address/iplAddressEdit.h @@ -2,12 +2,27 @@ #define IPL_SCENE_ADDRESS_EDIT_H #include "iplSceneHeader.h" +#include "scene/button/iplButton.h" namespace ipl { namespace scene { - FADER_SCENE_CLASS(AddressEdit) { + FADER_SCENE_CLASS(AddressEdit), public ButtonEventHandlerBase { public: AddressEdit(EGG::Heap * heap, int friendCode); + virtual ~AddressEdit(); + + virtual void prepare(); + virtual void create(); + virtual void draw(); + + virtual void initCalcNormal(); + virtual void initCalcFadeout(); + virtual void calcCommonAfter(); + + virtual FaderSceneCommand calcFadein(); + virtual FaderSceneCommand calcNormal(); + virtual FaderSceneCommand calcFadeout(); + virtual void onEventDerived(u32 compId, u32 event, const controller::Interface* con); void stt_msg_code_add(); void stt_msg_code_edit(); @@ -26,7 +41,7 @@ namespace ipl { }; private: - u8 unk_0x58[0x498]; + u8 unk_0x64[0x48c]; }; } // namespace scene } // namespace ipl diff --git a/src/scene/address/iplAddressEdit.cpp b/src/scene/address/iplAddressEdit.cpp index 6971ad2b..13fc55ac 100644 --- a/src/scene/address/iplAddressEdit.cpp +++ b/src/scene/address/iplAddressEdit.cpp @@ -1,6 +1,10 @@ #include "scene/address/iplAddressEdit.h" +#include "layout/iplGuiManager.h" +#include "scene/textBalloon/iplBalloon.h" +#include "sound/iplSound.h" #include "system/iplSystem.h" +#include "system/iplNigaoe.h" #include #include @@ -23,308 +27,233 @@ enum { static ChkHostNameError CheckHostName(const char* hostName, u32 hostNameLength); -u64 s_addressEditDataPool[269] = { - 0x425f6372645f6274, - 0x6e5f303000425f63, - 0x72645f62746e5f31, - 0x3000425f6372645f, - 0x62746e5f31310042, - 0x5f6d69695f69636f, - 0x6e5f303000425f63, - 0x6172645f62657461, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x425f6372645f6564, - 0x67695f3030006261, - 0x6c6c6f6f6e2e6173, - 0x680074685f416472, - 0x6573735f622e6272, - 0x6c79740074685f41, - 0x64726573735f625f, - 0x636172645f737472, - 0x742e62726c616e00, - 0x636172645f737472, - 0x745f666e73680074, - 0x685f416472657373, - 0x5f625f62746e5f69, - 0x6e2e62726c616e00, - 0x6372645f62746e5f, - 0x3030006372645f62, - 0x746e5f3130006372, - 0x645f62746e5f3131, - 0x006d69695f69636f, - 0x6e5f303000545f66, - 0x726e645f6372645f, - 0x30300074685f4164, - 0x726573735f625f62, - 0x746e5f7073682e62, - 0x726c616e0074685f, - 0x4164726573735f62, - 0x5f62746e5f6f7574, - 0x2e62726c616e0074, - 0x685f416472657373, - 0x5f625f62746e5f73, - 0x636c5f696e2e6272, - 0x6c616e0074685f41, - 0x64726573735f625f, - 0x62746e5f73636c5f, - 0x6f75742e62726c61, - 0x6e006372645f6274, - 0x6e5f677279007468, - 0x5f4164726573735f, - 0x625f636172645f6d, - 0x73675f616c705f69, - 0x6e2e62726c616e00, - 0x636172645f6d7367, - 0x0074685f41647265, - 0x73735f625f636172, - 0x645f6d73675f616c, - 0x705f6f75742e6272, - 0x6c616e0074685f41, - 0x64726573735f625f, - 0x636172645f666e73, - 0x682e62726c616e00, - 0x545f6372645f6274, - 0x6e5f303000545f63, - 0x72645f62746e5f31, - 0x3000545f6372645f, - 0x62746e5f31310054, - 0x5f6372645f62746e, - 0x5f67727900545f63, - 0x6172645f6d73675f, - 0x303000545f6e616d, - 0x655f30300074685f, - 0x4164726573735f63, - 0x2e62726c79740074, - 0x685f416472657373, - 0x5f635f636172645f, - 0x737472742e62726c, - 0x616e00475f636172, - 0x645f737472745f66, - 0x6e73680074685f41, - 0x64726573735f635f, - 0x7175657374696f6e, - 0x5f616c705f696e2e, - 0x62726c616e00475f, - 0x7175657374696f6e, - 0x5f30300074685f41, - 0x64726573735f635f, - 0x6e616d655f616c70, - 0x5f696e2e62726c61, - 0x6e00475f6e616d65, - 0x5f30300074685f41, - 0x64726573735f635f, - 0x6d73675f616c705f, - 0x696e2e62726c616e, - 0x00475f6d73675f30, - 0x300074685f416472, - 0x6573735f635f6d69, - 0x695f616c705f696e, - 0x2e62726c616e0074, - 0x685f416472657373, - 0x5f635f7175657374, - 0x696f6e5f616c705f, - 0x6f75742e62726c61, - 0x6e0074685f416472, - 0x6573735f635f6e61, - 0x6d655f616c705f6f, - 0x75742e62726c616e, - 0x0074685f41647265, - 0x73735f635f6d7367, - 0x5f616c705f6f7574, - 0x2e62726c616e0074, - 0x685f416472657373, - 0x5f635f6d69695f61, - 0x6c705f6f75742e62, - 0x726c616e0074685f, - 0x4164726573735f63, - 0x5f636172645f666e, - 0x73682e62726c616e, - 0x006d795f4261636b, - 0x5f612e62726c7974, - 0x006d795f4261636b, - 0x5f615f4170656172, - 0x2e62726c616e0050, - 0x6963747572655f30, - 0x30006d795f426163, - 0x6b5f615f4c6f7374, - 0x2e62726c616e0054, - 0x5f7175657374696f, - 0x6e5f303000545f6d, - 0x73675f3030006d79, - 0x5f49706c546f7042, - 0x616c6c6f6f6e5f61, - 0x2e62726c79740000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x545f6d69695f6d73, - 0x675f303000574950, - 0x4c5f53455f42545f, - 0x5441524745545449, - 0x4e47005749504c5f, - 0x53455f4445434944, - 0x4500000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x5749504c5f53455f, - 0x43414e43454c0000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000250030, - 0x00360064000a0000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, - 0x0000000000000000, +namespace ipl { + namespace scene { + class AddressEditEvent : public ::gui::EventHandler { + public: + virtual void onEvent(u32 componentId, u32 event, void* data); + + private: + AddressEdit* mpParent; + }; + + class AddressInputEvent : public ::gui::EventHandler { + public: + virtual void onEvent(u32 componentId, u32 event, void* data); + + private: + AddressEdit* mpParent; + }; + } +} + +extern "C" u8 __vt__Q33ipl5scene11AddressEdit[]; +extern "C" void __ct__Q33ipl5scene14FaderSceneBaseFPQ23EGG4Heap(void*, EGG::Heap*); +extern "C" void __dt__Q33ipl6nigaoe6ObjectFv(void*, int); +extern "C" void __dt__Q33ipl5scene4BaseFv(void*, int); +extern "C" void __dl__FPv(void*); + +struct AddressEditDataPool { + u64 prefix[8]; + u32 padding; + const char* panes[5]; + u64 suffix[121]; +}; +AddressEditDataPool s_addressEditDataPool = { + { + 0x425f6372645f6274, 0x6e5f303000425f63, + 0x72645f62746e5f31, 0x3000425f6372645f, + 0x62746e5f31310042, 0x5f6d69695f69636f, + 0x6e5f303000425f63, 0x6172645f62657461 + }, + 0, + { + reinterpret_cast(&s_addressEditDataPool) + 0x00, + reinterpret_cast(&s_addressEditDataPool) + 0x0d, + reinterpret_cast(&s_addressEditDataPool) + 0x1a, + reinterpret_cast(&s_addressEditDataPool) + 0x27, + reinterpret_cast(&s_addressEditDataPool) + 0x35 + }, + { + 0x425f6372645f6564, 0x67695f3030006261, 0x6c6c6f6f6e2e6173, 0x680074685f416472, + 0x6573735f622e6272, 0x6c79740074685f41, 0x64726573735f625f, 0x636172645f737472, + 0x742e62726c616e00, 0x636172645f737472, 0x745f666e73680074, 0x685f416472657373, + 0x5f625f62746e5f69, 0x6e2e62726c616e00, 0x6372645f62746e5f, 0x3030006372645f62, + 0x746e5f3130006372, 0x645f62746e5f3131, 0x006d69695f69636f, 0x6e5f303000545f66, + 0x726e645f6372645f, 0x30300074685f4164, 0x726573735f625f62, 0x746e5f7073682e62, + 0x726c616e0074685f, 0x4164726573735f62, 0x5f62746e5f6f7574, 0x2e62726c616e0074, + 0x685f416472657373, 0x5f625f62746e5f73, 0x636c5f696e2e6272, 0x6c616e0074685f41, + 0x64726573735f625f, 0x62746e5f73636c5f, 0x6f75742e62726c61, 0x6e006372645f6274, + 0x6e5f677279007468, 0x5f4164726573735f, 0x625f636172645f6d, 0x73675f616c705f69, + 0x6e2e62726c616e00, 0x636172645f6d7367, 0x0074685f41647265, 0x73735f625f636172, + 0x645f6d73675f616c, 0x705f6f75742e6272, 0x6c616e0074685f41, 0x64726573735f625f, + 0x636172645f666e73, 0x682e62726c616e00, 0x545f6372645f6274, 0x6e5f303000545f63, + 0x72645f62746e5f31, 0x3000545f6372645f, 0x62746e5f31310054, 0x5f6372645f62746e, + 0x5f67727900545f63, 0x6172645f6d73675f, 0x303000545f6e616d, 0x655f30300074685f, + 0x4164726573735f63, 0x2e62726c79740074, 0x685f416472657373, 0x5f635f636172645f, + 0x737472742e62726c, 0x616e00475f636172, 0x645f737472745f66, 0x6e73680074685f41, + 0x64726573735f635f, 0x7175657374696f6e, 0x5f616c705f696e2e, 0x62726c616e00475f, + 0x7175657374696f6e, 0x5f30300074685f41, 0x64726573735f635f, 0x6e616d655f616c70, + 0x5f696e2e62726c61, 0x6e00475f6e616d65, 0x5f30300074685f41, 0x64726573735f635f, + 0x6d73675f616c705f, 0x696e2e62726c616e, 0x00475f6d73675f30, 0x300074685f416472, + 0x6573735f635f6d69, 0x695f616c705f696e, 0x2e62726c616e0074, 0x685f416472657373, + 0x5f635f7175657374, 0x696f6e5f616c705f, 0x6f75742e62726c61, 0x6e0074685f416472, + 0x6573735f635f6e61, 0x6d655f616c705f6f, 0x75742e62726c616e, 0x0074685f41647265, + 0x73735f635f6d7367, 0x5f616c705f6f7574, 0x2e62726c616e0074, 0x685f416472657373, + 0x5f635f6d69695f61, 0x6c705f6f75742e62, 0x726c616e0074685f, 0x4164726573735f63, + 0x5f636172645f666e, 0x73682e62726c616e, 0x006d795f4261636b, 0x5f612e62726c7974, + 0x006d795f4261636b, 0x5f615f4170656172, 0x2e62726c616e0050, 0x6963747572655f30, + 0x30006d795f426163, 0x6b5f615f4c6f7374, 0x2e62726c616e0054, 0x5f7175657374696f, + 0x6e5f303000545f6d, 0x73675f3030006d79, 0x5f49706c546f7042, 0x616c6c6f6f6e5f61, + 0x2e62726c79740000 + } }; -extern "C" char lbl_81647EE0; +ipl::scene::AddressEdit::AddressEdit(EGG::Heap* heap, int friendCode) + : FaderSceneBase(heap), ButtonEventHandlerBase() { + u8* object = reinterpret_cast(this); + u32 zero = 0; + + *reinterpret_cast(object + 0x84) = friendCode; + *reinterpret_cast(object + 0x88) = -1; + *reinterpret_cast(object + 0x8c) = -1; + *reinterpret_cast(object + 0xa4) = zero; + *reinterpret_cast(object + 0x4d4) = this; + + reinterpret_cast(object + 0xb0)->clear(); + + *reinterpret_cast(object + 0x4d8) = 0; + *reinterpret_cast(object + 0x4dc) = zero; + *reinterpret_cast(object + 0x4e8) = zero; + *reinterpret_cast(object + 0x28) = 3; + for (int i = 0; i < 5; ++i) { + *reinterpret_cast(object + 0x90 + i * 4) = zero; + } + for (int i = 0; i < 8; ++i) { + object[0x4e0 + i] = 0; + } +} + +ipl::scene::AddressEdit::~AddressEdit() { + ipl::nigaoe::Object* object = *reinterpret_cast( + reinterpret_cast(this) + 0x4dc); + if (object != 0) { + __dt__Q33ipl6nigaoe6ObjectFv(object, 1); + } +} + + +extern "C" char lbl_81647EE0[]; +extern "C" char lbl_81647FC9[]; +extern "C" char lbl_81647FD5[]; +extern "C" char lbl_816480FD[]; +extern "C" char lbl_8164810B[]; +extern "C" __declspec(section ".sdata") const char* lbl_816965E0; +extern "C" __declspec(section ".sdata") char lbl_816965E4[]; +extern "C" __declspec(section ".sdata") const char lbl_816965EA[]; +extern "C" __declspec(section ".sdata") wchar_t lbl_816965E8[]; +extern "C" __declspec(section ".sdata") const wchar_t lbl_816965F0[]; +extern "C" u8 __vt__Q33ipl5scene16AddressEditEvent[]; +extern "C" u8 __vt__Q33ipl5scene17AddressInputEvent[]; +extern "C" void* __nw__FUl(u32); +extern "C" ipl::layout::Object* __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( + void*, EGG::Heap*, ipl::nand::LayoutFile*, const char*, const char*); +extern "C" ipl::math::VEC3* __ct__Q33ipl4math4VEC3Ffff(ipl::math::VEC3*, f32, f32, f32); +extern "C" ipl::scene::TextBalloon* __ct__Q33ipl5scene11TextBalloonFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCcRCQ33ipl4math4VEC3ff( + void*, EGG::Heap*, ipl::nand::LayoutFile*, const char*, const char*, const ipl::math::VEC3&, f32, f32); +extern "C" BOOL RFLSearchOfficialData(const RFLCreateID*, u16*); +extern "C" ipl::gui::PaneManager* __ct__Q33ipl3gui11PaneManagerFPQ23gui12EventHandlerPCQ34nw4r3lyt8DrawInfoPQ23EGG4HeapPQ23EGG9Allocatorb( + void*, gui::EventHandler*, const nw4r::lyt::DrawInfo*, EGG::Heap*, EGG::Allocator*, bool); +extern "C" void initAnmFrame__Q33ipl6layout8AnimatorFv(void*); +extern "C" char sFriendInfo__Q23ipl5scene[]; extern "C" char smArg__Q23ipl6System; extern "C" const char* smButtonName__Q33ipl5scene6Button[]; extern "C" void readLayoutAsync__Q33ipl4nand7ManagerFPQ23EGG4HeapPCcb(); -extern "C" void List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(); +extern "C" void* List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(void*, u16); extern "C" void getScene__Q33ipl5scene7ManagerFi(); -extern "C" void setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler(); -extern "C" void calc__Q33ipl5scene11TextBalloonFv(); +extern "C" void setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler(void*, void*, void*); +extern "C" void animation__Q33ipl5scene6ButtonFi(void*, int); +extern "C" void calc__Q33ipl5scene11TextBalloonFv(void*); extern "C" void calc__Q33ipl6layout6ObjectFv(); -extern "C" void isActive__Q33ipl5scene6ButtonCFv(); -extern "C" void update__Q33ipl5scene6ButtonFv(); -extern "C" void update__Q33ipl3gui11PaneManagerFv(); +extern "C" bool isActive__Q33ipl5scene6ButtonCFv(void*); +extern "C" void update__Q33ipl5scene6ButtonFv(void*); +extern "C" void update__Q33ipl3gui11PaneManagerFv(void*); extern "C" void setOrtho__Q33ipl7utility8GraphicsFUl(); extern "C" void draw__Q33ipl6layout6ObjectFv(); extern "C" void draw__Q33ipl5scene11TextBalloonFv(); -extern "C" void callBtn1__Q23ipl12DialogWindowFUlUl(); +extern "C" ipl::math::VEC3* __ct__Q33ipl4math4VEC3Ffff(ipl::math::VEC3*, f32, f32, f32); + + + + + + + + + + +extern "C" int get_button_no__Q33ipl5scene11AddressEditFPCc(void*, const char*); +extern "C" void callBtn1__Q23ipl12DialogWindowFUlUl(void*, u32, u32); extern "C" void callS2Btn2__Q23ipl12DialogWindowFUlUlb(); -extern "C" void reserveText__Q33ipl5scene6ButtonFiUl(); -extern "C" void reserveAnm__Q33ipl5scene6ButtonFi(); -extern "C" void initFrame__Q33ipl7utility15FrameControllerFv(); +extern "C" void reserveText__Q33ipl5scene6ButtonFiUl(void*, int, u32); +extern "C" void reserveAnm__Q33ipl5scene6ButtonFi(void*, int); +extern "C" void initFrame__Q33ipl7utility15FrameControllerFv(void*); extern "C" void getMessage__Q33ipl7message7MessageCFUl(); extern "C" void del__Q33ipl5scene15FriendListCacheFUl(); -extern "C" void reset_friend__Q33ipl5scene7AddressFv(); +extern "C" void reset_friend__Q33ipl5scene7AddressFv(void*); +extern "C" void add_friendinfo__Q33ipl5scene11AddressEditFv(void*); +extern "C" void delete_friendinfo__Q33ipl5scene11AddressEditFv(void*); +extern "C" void add__Q33ipl5scene15FriendListCacheFUlRC15NWC24FriendInfo( + void*, u32, const NWC24FriendInfo&); +extern "C" void sendRegisterMail__Q33ipl5scene15FriendListCacheFUl(void*, u32); +extern "C" void update__Q33ipl5scene15FriendListCacheFUlPCwUx(void*, u32, const wchar_t*, u64); +extern "C" void setName__Q43ipl5scene11AddressEdit6StringFPCw(void*, const wchar_t*); +extern "C" void setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw(void*, const wchar_t*); +extern "C" void setEMail__Q43ipl5scene11AddressEdit6StringFPCw(void*, const wchar_t*); +extern "C" void set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + void*, nw4r::lyt::Pane*, const wchar_t*); +extern "C" void setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + ipl::scene::AddressEdit*, const wchar_t*, bool); +extern "C" void wiiid_utf16__Q33ipl5scene11AddressEditFUxPw(u64, wchar_t*); +extern "C" void ANSIToUTF16__Q33ipl7utility13CharacterCodeFPwPCUcl(wchar_t*, const u8*, s32); +extern "C" const wchar_t* getName__Q33ipl6nigaoe6ObjectCFv(void*); +extern "C" void nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( + ipl::nigaoe::Object*, void*); +extern "C" void nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( + ipl::nigaoe::Object*, void*); +extern "C" void update_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" NWC24Err NWC24CheckPublicMailAddr_(const char*); +extern "C" void reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(void*, int, void*); +extern "C" void createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( + void*, int, void*, void*, void*); extern "C" void __div2u(); extern "C" void __mod2u(); -extern "C" void UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(); +extern "C" void UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(u8*, const wchar_t*, s32); extern "C" void isValidId__Q33ipl5scene15FriendListCacheFRCUx(); extern "C" void isDupId__Q33ipl5scene15FriendListCacheFRCUx(); extern "C" void isDupMail__Q33ipl5scene15FriendListCacheFPCc(); +extern "C" NWC24Err getErrCode__Q33ipl5scene15FriendListCacheCFv(void*); extern "C" u64 utf16_wiiid__Q33ipl5scene11AddressEditFPCw(const wchar_t*); +extern "C" void stt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_decide_anm__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_btn_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_del_msg_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_del_msg_fadeout_to_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_del_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_select_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_ipt_wait_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_ipt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_ipt_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void enableKSXFilter__Q29textinput7ManagerFb(textinput::Manager*, bool); +extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_code_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" int isDupCode__Q43ipl5scene11AddressEdit6StringCFv(void*); +extern "C" int isMyCode__Q43ipl5scene11AddressEdit6StringCFv(void*); +extern "C" void stt_add_name_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_mii_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); extern "C" void _savegpr_29(); extern "C" void _restgpr_29(); extern "C" void _savegpr_23(); @@ -333,6 +262,36 @@ extern "C" void _savegpr_27(); extern "C" void _restgpr_23(); extern "C" void _restgpr_29(); extern "C" void _restgpr_27(); +extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(void*); +extern "C" bool getConnectEnableFlag__Q33ipl3ncd10NCDSettingFv(); +extern "C" void reserveSceneChange__Q33ipl5scene4BaseFiPv(void*, int, void*); +extern "C" void start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( + ipl::scene::AddressEdit*, const char*, ipl::controller::Interface*); +extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( + ipl::scene::AddressEdit*, const char*); +extern "C" void start_left_event__Q33ipl5scene11AddressEditFPCc( + ipl::scene::AddressEdit*, const char*); +extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( + ipl::scene::AddressEdit*, const char*, int); +extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( + ipl::scene::AddressEdit*, const char*, int); +extern "C" void start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( + ipl::scene::AddressEdit*, const char*, int); +extern "C" NWC24Err check__Q33ipl5scene15FriendListCacheFv(void*); +extern "C" void set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( + ipl::scene::AddressEdit*, wchar_t*, u32, NWC24Err); + + + + + + + + + + + + void ipl::scene::AddressEdit::stt_msg_code_add() { if (System::getDialog()->getLastResult() == DialogWindow::RESULT_BUTTON) { @@ -358,7 +317,1004 @@ void ipl::scene::AddressEdit::stt_msg_nwc24_error() { } } -extern "C" asm void __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl() { +extern "C" void stt_msg_no_established__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + switch (ipl::System::getDialog()->getLastResult()) { + case 1: + reset_gui__Q33ipl5scene11AddressEditFv(self); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + break; + default: + break; + } +} + +extern "C" void stt_msg_code_invalid__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::System::getScene(5); + switch (ipl::System::getDialog()->getLastResult()) { + case 1: + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + break; + default: + break; + } +} + +extern "C" void stt_msg_dup_wii_no__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::System::getScene(5); + switch (ipl::System::getDialog()->getLastResult()) { + case 1: + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + break; + default: + break; + } +} + +extern "C" void stt_msg_dup_email__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::System::getScene(5); + switch (ipl::System::getDialog()->getLastResult()) { + case 1: + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + break; + default: + break; + } +} + +extern "C" void stt_msg_my_wii_no__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::System::getScene(5); + switch (ipl::System::getDialog()->getLastResult()) { + case 1: + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + break; + default: + break; + } +} + +extern "C" void stt_msg_no_mii_add__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::System::getScene(5); + switch (ipl::System::getDialog()->getLastResult()) { + case 1: + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1d; + break; + default: + break; + } +} + +extern "C" void stt_msg_add_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* button = ipl::System::getScene(5); + switch (ipl::System::getDialog()->getLastResult()) { + case 1: + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + break; + default: + break; + } +} + +extern "C" void stt_add_code_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* button = ipl::System::getScene(5); + if (isActive__Q33ipl5scene6ButtonCFv(button)) { + update__Q33ipl5scene6ButtonFv(button); + } + if (*reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x11) { + update__Q33ipl3gui11PaneManagerFv(*reinterpret_cast(reinterpret_cast(self) + 0x7c)); + } +} + +extern "C" void stt_add_name_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* button = ipl::System::getScene(5); + if (isActive__Q33ipl5scene6ButtonCFv(button)) { + update__Q33ipl5scene6ButtonFv(button); + } + if (*reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x19) { + update__Q33ipl3gui11PaneManagerFv(*reinterpret_cast(reinterpret_cast(self) + 0x7c)); + } +} + +extern "C" void stt_add_name_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::keyboard::Manager::State* state = ipl::System::getKeyboard()->getState(); + void* button = ipl::System::getScene(5); + s32 keyboardType = state->iplType; + + if (keyboardType == 3) { + goto state_disappearing; + } + if (keyboardType >= 3) { + goto state_at_or_after_disappearing; + } + if (keyboardType >= 2) { + goto done; + } + if (keyboardType >= 0) { + goto state_hidden; + } + goto done; + +state_at_or_after_disappearing: + if (keyboardType >= 5) { + goto done; + } + goto state_visible; + +state_disappearing: { + bool nameWasEmpty = *reinterpret_cast(reinterpret_cast(self) + 0x2b4) == 0; + if (state->pressOK) { + setName__Q43ipl5scene11AddressEdit6StringFPCw( + reinterpret_cast(self) + 0xb0, state->wcString); + nw4r::lyt::Pane* pane = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_8164810B, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); + } + if (*reinterpret_cast(reinterpret_cast(self) + 0x2b4) == 0) { + if (!nameWasEmpty) { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + } else { + if (nameWasEmpty) { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + } + } + } + goto done; + +state_visible: { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x19; + if (static_cast(ipl::System::getRegion()) == 6) { + enableKSXFilter__Q29textinput7ManagerFb(ipl::System::getKeyboard()->baseMgr(), false); + } + } + goto done; + +state_hidden: { + setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + self, NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); + } + +done: + return; +} + + + +extern "C" void stt_add_mii_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* button = ipl::System::getScene(5); + if (isActive__Q33ipl5scene6ButtonCFv(button)) { + update__Q33ipl5scene6ButtonFv(button); + } + if (*reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x1d) { + update__Q33ipl3gui11PaneManagerFv(*reinterpret_cast(reinterpret_cast(self) + 0x7c)); + } +} + +extern "C" void stt_add_mii_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::scene::Base* child = self->getChild(); + if (child != NULL) { + child = self->getChild(); + s32 faceId = *reinterpret_cast(reinterpret_cast(child) + 0x23c); + if (faceId >= 0 && ipl::System::getMiiManager()->isAvalable(faceId) && + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) == 0) { + RFLAdditionalInfo additionalInfo; + RFLGetAdditionalInfo(&additionalInfo, RFLDataSource_Official, NULL, faceId); + if (!RFLiIsSameID( + reinterpret_cast(reinterpret_cast(self) + 0x4e0), + &additionalInfo.createID)) { + memcpy(reinterpret_cast(reinterpret_cast(self) + 0x4e0), + &additionalInfo.createID, sizeof(RFLCreateID)); + ipl::System::getMiiManager()->create(ipl::System::getMem2App(), 0x4c, 0x4c, faceId, + nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, + self); + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 1; + reinterpret_cast( + *reinterpret_cast(reinterpret_cast(self) + 0x7c))->init(); + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + } + } + } + + if (self->getChild() == NULL && + *reinterpret_cast(reinterpret_cast(ipl::System::getSceneManager()) + 0x104) == 0) { + void* handler = self; + if (self != NULL) { + handler = reinterpret_cast(self) + 0x58; + } + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), handler, NULL); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1d; + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 0; + } +} + +extern "C" void stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + char* pool = lbl_81647EE0; + + if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 9)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 5)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 8)) + 0x14) != 1) { + s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x8c); + if (state == 6) { + goto state_done; + } + if (state >= 6) { + goto state_six_or_more; + } + if (state >= 5) { + goto state_five; + } + goto state_done; + + state_six_or_more: + if (state >= 8) { + goto state_done; + } + goto state_seven; + + state_five: { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + + nw4r::lyt::Pane* label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3ef, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x32)); + label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); + label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3fd, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x49)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x18; + } + goto state_done; + + state_seven: { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x10); + initAnmFrame__Q33ipl6layout8AnimatorFv(pane); + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x11); + initAnmFrame__Q33ipl6layout8AnimatorFv(pane); + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x12); + initAnmFrame__Q33ipl6layout8AnimatorFv(pane); + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1c); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + + nw4r::lyt::Pane* label = (*reinterpret_cast( + reinterpret_cast(self) + 0x68))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x21d, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x44)); + label = (*reinterpret_cast( + reinterpret_cast(self) + 0x68))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); + label = (*reinterpret_cast( + reinterpret_cast(self) + 0x68))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0xf5, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, reinterpret_cast(reinterpret_cast(self) + 0x2cc)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x21; + } + state_done: + ; + } +} + +extern "C" void stt_select_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::scene::Base* child = self->getChild(); + if (child != NULL) { + child = self->getChild(); + s32 faceId = *reinterpret_cast(reinterpret_cast(child) + 0x23c); + if (faceId >= 0 && ipl::System::getMiiManager()->isAvalable(faceId) && + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) == 0) { + RFLAdditionalInfo additionalInfo; + RFLGetAdditionalInfo(&additionalInfo, RFLDataSource_Official, NULL, faceId); + if (!RFLiIsSameID( + reinterpret_cast(reinterpret_cast(self) + 0x4e0), + &additionalInfo.createID)) { + memcpy(reinterpret_cast(reinterpret_cast(self) + 0x4e0), + &additionalInfo.createID, sizeof(RFLCreateID)); + ipl::System::getMiiManager()->create(ipl::System::getMem2App(), 0x4c, 0x4c, faceId, + nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, + self); + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 1; + update_friendinfo__Q33ipl5scene11AddressEditFv(self); + } + } + } + + if (self->getChild() == NULL && + *reinterpret_cast(reinterpret_cast(ipl::System::getSceneManager()) + 0x104) == 0) { + void* handler = self; + if (self != NULL) { + handler = reinterpret_cast(self) + 0x58; + } + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), handler, NULL); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 0; + reinterpret_cast( + *reinterpret_cast(reinterpret_cast(self) + 0x70))->init(); + for (u32 i = 0; i < 5; i++) { + *reinterpret_cast(reinterpret_cast(self) + 0x90 + i * 4) = 0; + } + } +} + +extern "C" void stt_add_confirm_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* button = ipl::System::getScene(5); + if (isActive__Q33ipl5scene6ButtonCFv(button)) { + update__Q33ipl5scene6ButtonFv(button); + } + if (*reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x22) { + update__Q33ipl3gui11PaneManagerFv(*reinterpret_cast(reinterpret_cast(self) + 0x70)); + } +} + +extern "C" void stt_wait_parental__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* scene = ipl::System::getScene(0x1b); + if (scene != NULL) { + switch (*reinterpret_cast(reinterpret_cast(scene) + 0x70)) { + case 1: + *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x29; + break; + case 2: + case 3: + *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 0; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x29; + break; + default: + break; + } + } +} + +extern "C" void stt_wait_parental_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* scene = ipl::System::getScene(0x1b); + if (scene != NULL) { + switch (*reinterpret_cast(reinterpret_cast(scene) + 0x70)) { + case 1: + *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x2c; + break; + case 2: + case 3: + *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 0; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x2c; + break; + default: + break; + } + } +} + +extern "C" void stt_wait_parental_dst__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + if (self->getChild() == NULL) { + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d8) != 0) { + ipl::System::getFader()->fadeOut(); + reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(1)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + } else { + animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xb); + void* handler = reinterpret_cast(self); + if (self != NULL) { + handler = reinterpret_cast(reinterpret_cast(self) + 0x58); + } + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), handler, NULL); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + } + } +} + +extern "C" void stt_wait_parental_dst_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + if (self->getChild() == NULL) { + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d8) != 0) { + ipl::System::getFader()->fadeOut(); + reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(4)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + } else { + animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xb); + void* handler = reinterpret_cast(self); + if (self != NULL) { + handler = reinterpret_cast(reinterpret_cast(self) + 0x58); + } + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), handler, NULL); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + } + } +} + +extern "C" void stt_msg_net__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + switch (ipl::System::getDialog()->getLastResult()) { + case 2: + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + break; + case 1: { + SCParentalControlsInfo info; + if (SCGetParentalControl(&info) && (info.enable & SC_PARENTAL_FLAG_ENABLED)) { + void* button = ipl::System::getScene(5); + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler(button, NULL, NULL); + animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xc); + createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( + self, 0x1b, self, NULL, reinterpret_cast(1)); + *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 0; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x28; + } else { + ipl::System::getFader()->fadeOut(); + reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(1)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + } + break; + } + default: + break; + } +} + +extern "C" void stt_msg_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + switch (ipl::System::getDialog()->getLastResult()) { + case 2: + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + break; + case 1: { + SCParentalControlsInfo info; + if (SCGetParentalControl(&info) && (info.enable & SC_PARENTAL_FLAG_ENABLED)) { + void* button = ipl::System::getScene(5); + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler(button, NULL, NULL); + animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xc); + createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( + self, 0x1b, self, NULL, reinterpret_cast(1)); + *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 0; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x2b; + } else { + ipl::System::getFader()->fadeOut(); + reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(4)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + } + break; + } + default: + break; + } +} + +extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(void* object) { + ipl::scene::AddressEdit* self = reinterpret_cast(object); + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x70))->init(); + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x7c))->init(); + for (s32 i = 0; i < 5; i++) { + s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + i * 4); + if (*count > 0) { + void* list = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(list) + 0x28c, i + 0xb); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + *count = 0; + } + } +} + +extern "C" void add_friendinfo__Q33ipl5scene11AddressEditFv(void* object) { + ipl::scene::AddressEdit* self = reinterpret_cast(object); + NWC24FriendInfo info ALIGN32; + memset(&info, 0, sizeof(info)); + switch (*reinterpret_cast(reinterpret_cast(self) + 0x84)) { + case 1: + info.attr.type = 1; + { + const wchar_t* name = reinterpret_cast(reinterpret_cast(self) + 0x2b4); + wchar_t* destination = reinterpret_cast(info.attr.name); + wcsncpy(destination, name, 0xa); + } + info.addr.wiiId = utf16_wiiid__Q33ipl5scene11AddressEditFPCw( + reinterpret_cast(reinterpret_cast(self) + 0xb0)); + memcpy(&info.attr.fdId, reinterpret_cast(self) + 0x4e0, 8); + break; + case 2: + info.attr.type = 2; + { + const wchar_t* name = reinterpret_cast(reinterpret_cast(self) + 0x2b4); + wchar_t* destination = reinterpret_cast(info.attr.name); + wcsncpy(destination, name, 0xa); + } + { + const wchar_t* address = reinterpret_cast(reinterpret_cast(self) + 0xb0); + u8* destination = reinterpret_cast(&info.addr); + UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(destination, address, 0x100); + } + memcpy(&info.attr.fdId, reinterpret_cast(self) + 0x4e0, 8); + break; + default: + break; + } + u32 index = *reinterpret_cast(reinterpret_cast(ipl::System::getScene(0x14)) + 0xc0); + if (index >= 100) { + index = 0; + for (u32 count = 100; count != 0; count--) { + if (!*reinterpret_cast(reinterpret_cast( + *reinterpret_cast(reinterpret_cast(self) + 0x4ec)) + 0x7d00 + index)) { + break; + } + index++; + } + } + add__Q33ipl5scene15FriendListCacheFUlRC15NWC24FriendInfo( + *reinterpret_cast(reinterpret_cast(self) + 0x4ec), index, info); + if (*reinterpret_cast(reinterpret_cast(self) + 0x84) == 2) { + sendRegisterMail__Q33ipl5scene15FriendListCacheFUl( + *reinterpret_cast(reinterpret_cast(self) + 0x4ec), index); + } +} + +extern "C" void set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + void*, nw4r::lyt::Pane* pane, const wchar_t* text) { + nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast(pane); + textBox->SetString(text, 0); +} + +struct AddressEditTextBoxAccess { + void setTextBox(nw4r::lyt::Pane* pane, const wchar_t* text) { + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(this, pane, text); + } +}; + +struct AddressEditStringAccess { + void setName(const wchar_t* value) { + setName__Q43ipl5scene11AddressEdit6StringFPCw(this, value); + } + + void setWiiNo(const wchar_t* value) { + setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw(this, value); + } + + void setEMail(const wchar_t* value) { + setEMail__Q43ipl5scene11AddressEdit6StringFPCw(this, value); + } +}; + +extern "C" void update_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + memset(sFriendInfo__Q23ipl5scene + 8, 0, 0x18); + wcsncpy(reinterpret_cast(sFriendInfo__Q23ipl5scene + 8), + reinterpret_cast(reinterpret_cast(self) + 0x2b4), 0xa); + memcpy(sFriendInfo__Q23ipl5scene + 0x20, reinterpret_cast(self) + 0x4e0, 8); + update__Q33ipl5scene15FriendListCacheFUlPCwUx( + *reinterpret_cast(reinterpret_cast(self) + 0x4ec), + *reinterpret_cast(reinterpret_cast(self) + 0xa4), + reinterpret_cast(sFriendInfo__Q23ipl5scene + 8), + *reinterpret_cast(sFriendInfo__Q23ipl5scene + 0x20)); + reset_friend__Q33ipl5scene7AddressFv(ipl::System::getScene(0x14)); +} + +extern "C" void setEMail__Q43ipl5scene11AddressEdit6StringFPCw(void* self, const wchar_t* value) { + u8* bytes = reinterpret_cast(self); + bytes[0x422] = 0; + memset(self, 0, 0x204); + wcsncpy(reinterpret_cast(self), value, 0xff); + u32 length = wcslen(value); + memset(bytes + 0x21c, 0, 0x204); + if (length > 0x10) { + wcsncpy(reinterpret_cast(bytes + 0x21c), value, 0xe); + wcscpy(reinterpret_cast(bytes + 0x238), lbl_816965F0); + } else { + wcscpy(reinterpret_cast(bytes + 0x21c), value); + } + u8 addr[0x100]; + memset(addr, 0, sizeof(addr)); + UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(addr, value, 0x100); + bytes[0x420] = NWC24CheckPublicMailAddr_(reinterpret_cast(addr)) ? 0 : 1; +} + +extern "C" void get_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + u32 index = *reinterpret_cast(reinterpret_cast(self) + 0xa4); + void* friendInfo = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); + friendInfo = reinterpret_cast(friendInfo) + index * 0x140; + memcpy(sFriendInfo__Q23ipl5scene, friendInfo, 0x140); + setName__Q43ipl5scene11AddressEdit6StringFPCw( + reinterpret_cast(self) + 0xb0, + reinterpret_cast(sFriendInfo__Q23ipl5scene + 8)); + const wchar_t* name = reinterpret_cast(reinterpret_cast(self) + 0x2b4); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, + (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt() + ->GetRootPane() + ->FindPaneByName(lbl_8164810B, true), + name); + wchar_t wiiNo[0x100]; + wchar_t email[0x102]; + if (*reinterpret_cast(sFriendInfo__Q23ipl5scene) == 1) { + memset(wiiNo, 0, sizeof(wiiNo)); + wiiid_utf16__Q33ipl5scene11AddressEditFUxPw( + *reinterpret_cast(sFriendInfo__Q23ipl5scene + 0x40), wiiNo); + setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw( + reinterpret_cast(self) + 0xb0, wiiNo); + } else { + memset(email, 0, sizeof(email)); + ANSIToUTF16__Q33ipl7utility13CharacterCodeFPwPCUcl( + email, reinterpret_cast(sFriendInfo__Q23ipl5scene + 0x40), 0x102); + setEMail__Q43ipl5scene11AddressEdit6StringFPCw( + reinterpret_cast(self) + 0xb0, email); + } + const wchar_t* friendCode = reinterpret_cast(reinterpret_cast(self) + 0x2cc); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, + (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt() + ->GetRootPane() + ->FindPaneByName(lbl_81647FD5, true), + friendCode); + memcpy(reinterpret_cast(self) + 0x4e0, sFriendInfo__Q23ipl5scene + 0x20, 8); +} + +extern "C" void nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( + ipl::nigaoe::Object* object, void* callbackWork) { + ipl::scene::AddressEdit* self = reinterpret_cast(callbackWork); + ipl::nigaoe::Object** icon = reinterpret_cast(reinterpret_cast(self) + 0x4dc); + if (*icon != NULL) { + __dt__Q33ipl6nigaoe6ObjectFv(*icon, 1); + } + *icon = object; + ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_81647FC9, true); + pane->GetMaterial()->SetTexture(0, object->getIconTexture()); + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 2; + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->init( + getName__Q33ipl6nigaoe6ObjectCFv(object), 0xa); +} + +extern "C" void nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( + ipl::nigaoe::Object* object, void* callbackWork) { + ipl::scene::AddressEdit* self = reinterpret_cast(callbackWork); + ipl::nigaoe::Object** icon = reinterpret_cast(reinterpret_cast(self) + 0x4dc); + if (*icon != NULL) { + __dt__Q33ipl6nigaoe6ObjectFv(*icon, 1); + } + *icon = object; + ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x74); + nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_81647FC9, true); + pane->GetMaterial()->SetTexture(0, object->getIconTexture()); + layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_81647FC9, true); + pane->GetMaterial()->SetTexture(0, object->getIconTexture()); + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 2; + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->init( + getName__Q33ipl6nigaoe6ObjectCFv(object), 0xa); +} + +extern "C" void setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + ipl::scene::AddressEdit* self, const wchar_t* text, bool flag) { + if (!flag && (text == NULL || *text != L'\0')) { + goto set_empty_title; + } + switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + case 0xe: + case 0x1a: + ipl::System::getKeyboard()->baseMgr()->setTitleText(ipl::System::getMessage(0x15e)); + return; + case 0x12: + ipl::System::getKeyboard()->baseMgr()->setTitleText(ipl::System::getMessage(0x15d)); + break; + } + return; + +set_empty_title: + ipl::System::getKeyboard()->baseMgr()->setTitleText(lbl_816965E8); +} + + + +void ipl::scene::AddressEditEvent::onEvent(u32 componentId, u32 event, void* data) { + s32 signedEvent = static_cast(event); + ::gui::Manager* manager = mpManager; + ::gui::PaneComponent* component = + static_cast< ::gui::PaneComponent*>(manager->getComponent(componentId)); + const char* paneName = component->getPane()->GetName(); + + if (signedEvent == 1) goto point_event; + if (signedEvent >= 1) goto left_check; + if (signedEvent >= 0) goto trig_event; + goto done; + +left_check: + if (signedEvent >= 3) goto done; + goto left_event; + +point_event: + if (data != NULL) { + start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( + mpParent, paneName, static_cast(data)); + } + goto done; + +left_event: + start_left_event__Q33ipl5scene11AddressEditFPCc( + mpParent, paneName); + goto done; + +trig_event: + if (data != NULL && + static_cast(data)->downTrg(0x100800)) { + start_trig_event__Q33ipl5scene11AddressEditFPCc( + mpParent, paneName); + } + +done: + ; +} +void ipl::scene::AddressInputEvent::onEvent(u32 componentId, u32 event, void* data) { + s32 signedEvent = static_cast(event); + ::gui::Manager* manager = mpManager; + ::gui::PaneComponent* component = + static_cast< ::gui::PaneComponent*>(manager->getComponent(componentId)); + const char* paneName = component->getPane()->GetName(); + + if (signedEvent == 1) goto point_event; + if (signedEvent >= 1) goto left_check; + if (signedEvent >= 0) goto trig_event; + goto done; + +left_check: + if (signedEvent >= 3) goto done; + goto left_event; + +trig_event: { + ipl::controller::Interface* controller = + static_cast(data); + if (controller == NULL || !controller->downTrg(0x100800)) goto done; + int channel = controller->getChannel(); + start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( + mpParent, paneName, channel); + goto done; +} + +point_event: { + if (data == NULL) goto done; + int channel = static_cast(data)->getChannel(); + start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( + mpParent, paneName, channel); + goto done; +} + +left_event: { + if (data == NULL) goto done; + int channel = static_cast(data)->getChannel(); + start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( + mpParent, paneName, channel); +} + +done: + ; +} +extern "C" void stt_wait_delete__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* button = ipl::System::getScene(5); + switch (ipl::System::getDialog()->getLastResult()) { + case 2: { + delete_friendinfo__Q33ipl5scene11AddressEditFv(self); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1d); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 6; + break; + } + case 1: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1d); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 5; + break; + } + default: + break; + } +} + +extern "C" void stt_add_confirm_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* list = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(list) + 0x28c, 0x1e); + if (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1) { + void* button = ipl::System::getScene(5); + switch (*reinterpret_cast(reinterpret_cast(self) + 0x8c)) { + case 5: { + void* paneList = *reinterpret_cast(reinterpret_cast(self) + 0x74); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(paneList) + 0x28c, 0); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1c; + break; + } + case 7: + add_friendinfo__Q33ipl5scene11AddressEditFv(self); + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x29); + reset_friend__Q33ipl5scene7AddressFv(ipl::System::getScene(0x14)); + callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x4a, 0x2e); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x26; + break; + default: + break; + } + } +} + +extern "C" void stt_wait_del_msg_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1d)) + 0x14) != 1) { + s32 index = *reinterpret_cast(reinterpret_cast(self) + 0xa4); + u32 type = *reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x4ec) + index * 0x140 + 4); + void* pane; + if (type == 2) { + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x10); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } else { + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1a); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x11); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x12); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 2; + } +} + +extern "C" void stt_msg_no_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + switch (ipl::System::getDialog()->getLastResult()) { + case 1: { + void* manager = *reinterpret_cast(reinterpret_cast(self) + 0x70); + reinterpret_cast(manager)->init(); + for (u32 i = 0; i < 5; i++) { + *reinterpret_cast(reinterpret_cast(self) + 0x90 + i * 4) = 0; + } + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + break; + } + default: + break; + } +} + +extern "C" void stt_wait_decide_anm_add__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + s32 complete = 1; + for (s32 i = 0; i < 5; i++) { + u16 index = (u16)(*reinterpret_cast(reinterpret_cast(self) + 0x88) + 6); + void* list = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(list) + 0x28c, index); + u32 state = *reinterpret_cast(reinterpret_cast(pane) + 0x14); + complete = (complete & (state - 1 > 0)) != 0; + } + if (complete != 0) { + switch (*reinterpret_cast(reinterpret_cast(self) + 0x88)) { + case 4: + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x70))->init(); + ipl::System::getDialog()->callBtn1( + reinterpret_cast(reinterpret_cast(self) + 0xb0)->getDispCodeLong(), 0x2e); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x25; + break; + default: + break; + } + } +} + +extern "C" void stt_add_confirm_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* paneList = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(paneList) + 0x28c, 0); + if (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1) { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x22; + } +} + +extern "C" void stt_add_name_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2)) + 0x14) != 1) { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x19; + } +} + +extern "C" void stt_add_mii_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 4)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 0)) + 0x14) != 1) { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1d; + } +} + +extern "C" void stt_add_code_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 0)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 4)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2)) + 0x14) != 1) { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + } +} + +extern "C" void stt_ipt_wait_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 5)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 8)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 9)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x80)) + 0x28c, 1)) + 0x14) != 1) { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + } +} + +extern "C" asm void __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( + void*, ipl::keyboard::Manager::KeyboardType, const wchar_t*, u32, u32) { nofralloc stw r4, 0(r3) stw r5, 4(r3) @@ -367,6 +1323,171 @@ extern "C" asm void __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboa blr } +extern "C" void stt_wait_decide_anm__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + char* pool = lbl_81647EE0; + s32 complete = 1; + void* button = ipl::System::getScene(5); + for (s32 i = 0; i < 5; i++) { + u16 index = (u16)(*reinterpret_cast(reinterpret_cast(self) + 0x88) + 6); + void* list = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(list) + 0x28c, index); + u32 state = *reinterpret_cast(reinterpret_cast(pane) + 0x14); + complete = (complete & (state - 1 > 0)) != 0; + } + if (complete == 0) { + return; + } + u8* bytes = reinterpret_cast(self); + s32 state = *reinterpret_cast(bytes + 0x88); + switch (state) { + case 2: { + u32 index = *reinterpret_cast(bytes + 0xa4); + u8* friendInfo = reinterpret_cast(*reinterpret_cast(bytes + 0x4ec)) + index * 0x140; + ipl::layout::Animator* animator; + if (*reinterpret_cast(friendInfo + 4) == 2) { + animator = (*reinterpret_cast(bytes + 0x68))->getAnim(0x15); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + } else { + animator = (*reinterpret_cast(bytes + 0x68))->getAnim(0x1b); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + } + animator = (*reinterpret_cast(bytes + 0x68))->getAnim(0x16); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + animator = (*reinterpret_cast(bytes + 0x68))->getAnim(0x17); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + *reinterpret_cast(bytes + 0x64) = 3; + reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + break; + } + case 1: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + ipl::layout::Animator* animator = + (*reinterpret_cast(bytes + 0x74))->getAnim(0); + animator->initFrame(); + u32 one = 1; + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = one; + animator = (*reinterpret_cast(bytes + 0x74))->getAnim(1); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = one; + animator = (*reinterpret_cast(bytes + 0x74))->getAnim(2); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = one; + animator = (*reinterpret_cast(bytes + 0x74))->getAnim(3); + animator->initAnmFrame(); + animator = (*reinterpret_cast(bytes + 0x80))->getAnim(0); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = one; + nw4r::lyt::Pane* textPane = (*reinterpret_cast(bytes + 0x74)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3ef, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, textPane, ipl::System::getMessage(0x32)); + textPane = (*reinterpret_cast(bytes + 0x74)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, textPane, reinterpret_cast(bytes + 0x2b4)); + textPane = (*reinterpret_cast(bytes + 0x74)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3fd, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, textPane, ipl::System::getMessage(0x49)); + reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + *reinterpret_cast(bytes + 0x64) = 0xc; + break; + } + case 3: { + if (*reinterpret_cast(bytes + 0x4e8) != 1) { + *reinterpret_cast(bytes + 0x4e8) = 0; + if (RFLGetAvailableOfficialDataNum() != 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( + self, 0x1c, self, 0, reinterpret_cast(1)); + *reinterpret_cast(bytes + 0x64) = 0xb; + } else { + ipl::System::getDialog()->callBtn1(0x17c, 0x2e); + *reinterpret_cast(bytes + 0x64) = 0xa; + } + reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); + } + break; + } + case 0: { + SCParentalControlsInfo parentalInfo; + BOOL parentalResult = SCGetParentalControl(&parentalInfo); + if (!getConnectEnableFlag__Q33ipl3ncd10NCDSettingFv()) { + animation__Q33ipl5scene6ButtonFi(button, 0x1d); + ipl::System::getDialog()->callBtn2(0x144, 0x146, 0x25, false); + *reinterpret_cast(bytes + 0x64) = 0x27; + } else if ((SCGetWCFlags() & 1) == 0) { + animation__Q33ipl5scene6ButtonFi(button, 0x1d); + ipl::System::getDialog()->callBtn2(0x17e, 0x146, 0x25, false); + *reinterpret_cast(bytes + 0x64) = 0x2a; + } else if (parentalResult != 0 && (parentalInfo.enable & 0x80) != 0 && + (SCGetNetContentRestrictions() & 2) != 0) { + animation__Q33ipl5scene6ButtonFi(button, 0x1d); + ipl::System::getDialog()->callBtn1(0x14c, 0x2e); + *reinterpret_cast(bytes + 0x64) = 0x2d; + } else { + if (check__Q33ipl5scene15FriendListCacheFv( + *reinterpret_cast(bytes + 0x4ec)) == NWC24_ERR_NETWORK || + *reinterpret_cast(reinterpret_cast( + *reinterpret_cast(bytes + 0x4ec)) + 0x9d74) == NWC24_ERR_SERVER || + *reinterpret_cast(reinterpret_cast( + *reinterpret_cast(bytes + 0x4ec)) + 0x9d74) == NWC24_ERR_FULL) { + wchar_t errorMessage[0x400]; + wchar_t* errorMessagePointer = errorMessage - 1; + for (s32 i = 0; i < 0x200; i++) { + errorMessagePointer[1] = 0; + errorMessagePointer += 2; + *errorMessagePointer = 0; + } + set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( + self, errorMessage, 0x400, + *reinterpret_cast(reinterpret_cast( + *reinterpret_cast(bytes + 0x4ec)) + 0x9d74)); + ipl::System::getDialog()->callBtn1(errorMessage, 0x2e); + animation__Q33ipl5scene6ButtonFi(button, 0x1d); + *reinterpret_cast(bytes + 0x64) = 0x2e; + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x27); + reserveText__Q33ipl5scene6ButtonFiUl(button, 0, 0x4f); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + reserveSceneChange__Q33ipl5scene4BaseFiPv(self, 0xb, reinterpret_cast(1)); + ipl::layout::Animator* animator = + (*reinterpret_cast(bytes + 0x68))->getAnim(0x1e); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + *reinterpret_cast(bytes + 0x64) = 0x30; + } + } + reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + break; + } + case 4: { + ipl::DialogWindow* dialog = ipl::System::getDialog(); + const wchar_t* code = reinterpret_cast(bytes + 0xb0)->getDispCodeLong(); + dialog->callBtn1(code, 0x2e); + reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + *reinterpret_cast(bytes + 0x64) = 9; + break; + } + default: + *reinterpret_cast(bytes + 0x64) = 0; + break; + } +} + const wchar_t* ipl::scene::AddressEdit::String::getDispCodeLong() const { if (reinterpret_cast(this)[0x422] == 0) { return; @@ -374,7 +1495,7 @@ const wchar_t* ipl::scene::AddressEdit::String::getDispCodeLong() const { return reinterpret_cast(reinterpret_cast(this) + 0x21c); } -extern "C" asm void getName__Q33ipl6nigaoe6ObjectCFv() { +extern "C" asm const wchar_t* getName__Q33ipl6nigaoe6ObjectCFv(void*) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -410,7 +1531,7 @@ void ipl::scene::AddressEdit::String::clear() { reinterpret_cast(this)[0x422] = 0; } -extern "C" asm void setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw() { +extern "C" asm void setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw(void*, const wchar_t*) { nofralloc stwu r1, -0x20(r1) mflr r0 @@ -491,7 +1612,7 @@ setWiiNo_L4: blr } -extern "C" asm void isDupCode__Q43ipl5scene11AddressEdit6StringCFv() { +extern "C" asm int isDupCode__Q43ipl5scene11AddressEdit6StringCFv(void*) { nofralloc stwu r1, -0x120(r1) mflr r0 @@ -530,7 +1651,7 @@ isDupCode_L2: blr } -extern "C" asm void isMyCode__Q43ipl5scene11AddressEdit6StringCFv() { +extern "C" asm int isMyCode__Q43ipl5scene11AddressEdit6StringCFv(void*) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -585,6 +1706,265 @@ extern "C" asm void prepare__Q33ipl5scene11AddressEditFv() { blr } +extern "C" void create__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + const char* pool = reinterpret_cast(&s_addressEditDataPool); + const char* const* paneNames; + ipl::layout::Object* bLayout; + ipl::scene::SceneObj* board = ipl::System::getScene(4); + ipl::nand::LayoutFile* boardFile = *reinterpret_cast( + reinterpret_cast(board) + 0xd20); + + bLayout = reinterpret_cast(__nw__FUl(0x580)); + if (bLayout != NULL) { + bLayout = __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( + bLayout, *reinterpret_cast(reinterpret_cast(self) + 0x24), + boardFile, lbl_816965E4, pool + 0x72); + } + bLayout->bindToGroup(pool + 0x84, pool + 0xa0, false, true); + bLayout->bindToGroup(pool + 0xaf, pool + 0xc8, false, true); + bLayout->bindToGroup(pool + 0xaf, pool + 0xd3, false, false); + bLayout->bindToGroup(pool + 0xaf, pool + 0xde, false, false); + bLayout->bindToGroup(pool + 0xaf, pool + 0xe9, false, false); + bLayout->bind(pool + 0xaf, pool + 0xf5, false, false); + bLayout->bindToGroup(pool + 0x103, pool + 0xc8, false, false); + bLayout->bindToGroup(pool + 0x103, pool + 0xd3, false, false); + bLayout->bindToGroup(pool + 0x103, pool + 0xde, false, false); + bLayout->bindToGroup(pool + 0x103, pool + 0xe9, false, false); + bLayout->bind(pool + 0x103, pool + 0xf5, false, false); + bLayout->bindToGroup(pool + 0x11d, pool + 0xc8, false, false); + bLayout->bindToGroup(pool + 0x11d, pool + 0xd3, false, true); + bLayout->bindToGroup(pool + 0x11d, pool + 0xde, false, true); + bLayout->bindToGroup(pool + 0x11d, pool + 0xe9, false, true); + bLayout->bind(pool + 0x11d, pool + 0xf5, false, true); + bLayout->bindToGroup(pool + 0x137, pool + 0xc8, false, false); + bLayout->bindToGroup(pool + 0x137, pool + 0xd3, false, false); + bLayout->bindToGroup(pool + 0x137, pool + 0xde, false, false); + bLayout->bindToGroup(pool + 0x137, pool + 0xe9, false, false); + bLayout->bind(pool + 0x137, pool + 0xf5, false, false); + bLayout->bindToGroup(pool + 0x154, pool + 0xc8, false, true); + bLayout->bindToGroup(pool + 0x154, pool + 0xd3, false, true); + bLayout->bindToGroup(pool + 0x154, pool + 0xde, false, true); + bLayout->bindToGroup(pool + 0x154, pool + 0xe9, false, true); + bLayout->bind(pool + 0x154, pool + 0xf5, false, true); + bLayout->bindToGroup(pool + 0x137, pool + 0x172, false, true); + bLayout->bindToGroup(pool + 0x154, pool + 0x172, false, false); + bLayout->bindToGroup(pool + 0x17e, pool + 0x1a0, false, true); + bLayout->bindToGroup(pool + 0x1a9, pool + 0x1a0, false, false); + bLayout->bindToGroup(pool + 0x1cc, pool + 0xa0, false, false); + bLayout->finishBinding(); + + u32* editEvent = reinterpret_cast(__nw__FUl(0x10)); + if (editEvent != NULL) { + editEvent[2] = 0; + editEvent[0] = reinterpret_cast(__vt__Q33ipl5scene16AddressEditEvent); + editEvent[3] = reinterpret_cast(self); + } + void* editManagerMemory = __nw__FUl(0x34); + ipl::gui::PaneManager* editManager = reinterpret_cast(editManagerMemory); + if (editManagerMemory != NULL) { + editManager = __ct__Q33ipl3gui11PaneManagerFPQ23gui12EventHandlerPCQ34nw4r3lyt8DrawInfoPQ23EGG4HeapPQ23EGG9Allocatorb( + editManagerMemory, reinterpret_cast(editEvent), bLayout->getDrawInfo(), NULL, NULL, + false); + } + editManager->setupScene(bLayout); + editManager->setAllComponentTriggerTarget(false); + paneNames = reinterpret_cast(pool + 0x44); + for (s32 i = 0; i < 5; i++) { + const char* paneName = paneNames[i]; + nw4r::lyt::Pane* pane = bLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); + editManager->setTriggerTarget(pane, true); + } + *reinterpret_cast(reinterpret_cast(self) + 0x68) = bLayout; + *reinterpret_cast(reinterpret_cast(self) + 0x6c) = editEvent; + *reinterpret_cast(reinterpret_cast(self) + 0x70) = editManager; + + nw4r::lyt::Pane* textPane = bLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x1e8, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2a)); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x1f5, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2b)); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x202, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2f)); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x20f, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2a)); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x21d, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, lbl_816965E8); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, lbl_816965E8); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0xf5, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, lbl_816965E8); + + ipl::layout::Object* cLayout = reinterpret_cast(__nw__FUl(0x580)); + if (cLayout != NULL) { + cLayout = __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( + cLayout, *reinterpret_cast(reinterpret_cast(self) + 0x24), + boardFile, lbl_816965E4, pool + 0x235); + } + cLayout->bindToGroup(pool + 0x247, pool + 0x263, false, true); + cLayout->bindToGroup(pool + 0x274, pool + 0x296, false, true); + cLayout->bindToGroup(pool + 0x2a4, pool + 0x2c2, false, true); + cLayout->bindToGroup(pool + 0x2cc, pool + 0x2e9, false, true); + cLayout->bindToGroup(pool + 0x2f2, lbl_816965EA, false, true); + cLayout->bindToGroup(pool + 0x30f, pool + 0x296, false, false); + cLayout->bindToGroup(pool + 0x332, pool + 0x2c2, false, false); + cLayout->bindToGroup(pool + 0x351, pool + 0x2e9, false, false); + cLayout->bindToGroup(pool + 0x36f, lbl_816965EA, false, false); + cLayout->bindToGroup(pool + 0x38d, pool + 0x263, false, false); + cLayout->finishBinding(); + + u32* inputEvent = reinterpret_cast(__nw__FUl(0x10)); + if (inputEvent != NULL) { + inputEvent[2] = 0; + inputEvent[0] = reinterpret_cast(__vt__Q33ipl5scene17AddressInputEvent); + inputEvent[3] = reinterpret_cast(self); + } + void* inputManagerMemory = __nw__FUl(0x34); + ipl::gui::PaneManager* inputManager = reinterpret_cast(inputManagerMemory); + if (inputManagerMemory != NULL) { + inputManager = __ct__Q33ipl3gui11PaneManagerFPQ23gui12EventHandlerPCQ34nw4r3lyt8DrawInfoPQ23EGG4HeapPQ23EGG9Allocatorb( + inputManagerMemory, reinterpret_cast(inputEvent), cLayout->getDrawInfo(), NULL, NULL, + false); + } + inputManager->setupScene(cLayout); + inputManager->setAllComponentTriggerTarget(false); + textPane = cLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_816965E0, true); + inputManager->setTriggerTarget(textPane, true); + *reinterpret_cast(reinterpret_cast(self) + 0x74) = cLayout; + *reinterpret_cast(reinterpret_cast(self) + 0x78) = inputEvent; + *reinterpret_cast(reinterpret_cast(self) + 0x7c) = inputManager; + + ipl::layout::Object* background = reinterpret_cast(__nw__FUl(0x580)); + if (background != NULL) { + background = __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( + background, *reinterpret_cast(reinterpret_cast(self) + 0x24), + boardFile, lbl_816965E4, pool + 0x3a9); + } + *reinterpret_cast(reinterpret_cast(self) + 0x80) = background; + background->bind(pool + 0x3b9, pool + 0x3cf, false, true); + (*reinterpret_cast(reinterpret_cast(self) + 0x80)) + ->bind(pool + 0x3da, pool + 0x3cf, false, false); + (*reinterpret_cast(reinterpret_cast(self) + 0x80))->finishBinding(); + (*reinterpret_cast(reinterpret_cast(self) + 0x80)) + ->getAnim(0)->initAnmFrame(); + + reinterpret_cast(reinterpret_cast(self) + 0xb0)->clear(); + memset(sFriendInfo__Q23ipl5scene, 0, 0x140); + *reinterpret_cast(reinterpret_cast(self) + 0x4dc) = 0; + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 0; + ipl::scene::SceneObj* addressScene = ipl::System::getScene(0x14); + *reinterpret_cast(reinterpret_cast(self) + 0x4ec) = + *reinterpret_cast(reinterpret_cast(addressScene) + 0x274); + + s32 mode = *reinterpret_cast(reinterpret_cast(self) + 0x84); + ipl::layout::Animator* animator; + wchar_t* friendText; + switch (mode) { + case 0: { + *reinterpret_cast(reinterpret_cast(self) + 0xa4) = + *reinterpret_cast(reinterpret_cast(addressScene) + 0xc0); + get_friendinfo__Q33ipl5scene11AddressEditFv(self); + u32 friendIndex = *reinterpret_cast(reinterpret_cast(self) + 0xa4); + u8* friendInfo = reinterpret_cast( + *reinterpret_cast(reinterpret_cast(self) + 0x4ec)) + friendIndex * 0x140; + if (*reinterpret_cast(friendInfo + 4) == 2) { + (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x15)->initAnmFrame(); + (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x1a)->initAnmFrame(); + } else { + (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x10)->initAnmFrame(); + (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x1b)->initAnmFrame(); + } + animator = (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0); + animator->initFrame(); + friendText = reinterpret_cast(reinterpret_cast(self) + 0x2b4); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, friendText); + friendText = reinterpret_cast(reinterpret_cast(friendText) + 0x18); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0xf5, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, friendText); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + break; + } + case 1: { + animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(0); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(1); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(3); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x1a)->initAnmFrame(); + (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x10)->initAnmFrame(); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x74)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3ef, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x31)); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x74)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3fd, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x47)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x10; + break; + } + case 2: { + animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(0); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(1); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(3); + animator->initFrame(); + *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; + (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x1a)->initAnmFrame(); + (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x10)->initAnmFrame(); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x74)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3ef, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x3f)); + textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x74)) + ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3fd, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x48)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x10; + break; + } + default: + break; + } + +create_mode_done: + + s16 miiIndex[2]; + if (RFLSearchOfficialData(reinterpret_cast(reinterpret_cast(self) + 0x4e0), + reinterpret_cast(miiIndex))) { + ipl::System::getMiiManager()->create(ipl::System::getMem2App(), 0x4c, 0x4c, miiIndex[0], + nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, self); + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 1; + } + + ipl::System::getKeyboard()->init(); + + ipl::scene::TextBalloon* balloon = reinterpret_cast(__nw__FUl(0x3c)); + if (balloon != NULL) { + f32 balloonWidth = 30.0f; + f32 balloonHeight = 120.0f; + EGG::Heap* heap = *reinterpret_cast(reinterpret_cast(self) + 0x24); + ipl::math::VEC3 position; + ipl::math::VEC3* positionPtr = __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); + balloon = __ct__Q33ipl5scene11TextBalloonFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCcRCQ33ipl4math4VEC3ff( + balloon, heap, + *reinterpret_cast(reinterpret_cast(self) + 0xac), + lbl_816965E4, pool + 0x406, *positionPtr, balloonHeight, balloonWidth); + } + *reinterpret_cast(reinterpret_cast(self) + 0xa8) = balloon; +} + extern "C" asm void calcFadein__Q33ipl5scene11AddressEditFv() { nofralloc stwu r1, -0x10(r1) @@ -645,6 +2025,293 @@ initCalcNormal_L1: blr } +extern "C" ipl::scene::FaderSceneCommand calcNormal__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + case 0: + stt_normal__Q33ipl5scene11AddressEditFv(self); + break; + case 1: + stt_wait_decide_anm__Q33ipl5scene11AddressEditFv(self); + break; + case 2: + stt_wait_btn_fadein__Q33ipl5scene11AddressEditFv(self); + break; + case 3: + stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv(self); + break; + case 4: + stt_wait_del_msg_fadein__Q33ipl5scene11AddressEditFv(self); + break; + case 5: + stt_wait_del_msg_fadeout__Q33ipl5scene11AddressEditFv(self); + break; + case 6: + stt_wait_del_msg_fadeout_to_rlt__Q33ipl5scene11AddressEditFv(self); + break; + case 7: + stt_wait_delete__Q33ipl5scene11AddressEditFv(self); + break; + case 8: + stt_msg_del_rlt__Q33ipl5scene11AddressEditFv(self); + break; + case 9: + self->stt_msg_code_edit(); + break; + case 10: + stt_msg_no_mii__Q33ipl5scene11AddressEditFv(self); + break; + case 11: + stt_select_mii__Q33ipl5scene11AddressEditFv(self); + break; + case 12: + stt_ipt_wait_fadein__Q33ipl5scene11AddressEditFv(self); + break; + case 13: + stt_ipt_normal__Q33ipl5scene11AddressEditFv(self); + break; + case 14: + stt_ipt_input__Q33ipl5scene11AddressEditFv(self); + break; + case 15: + stt_ipt_wait_fadeout__Q33ipl5scene11AddressEditFv(self); + break; + case 16: + stt_add_code_fadein__Q33ipl5scene11AddressEditFv(self); + break; + case 17: + stt_add_code_normal__Q33ipl5scene11AddressEditFv(self); + break; + case 18: + stt_add_code_input__Q33ipl5scene11AddressEditFv(self); + break; + case 19: + stt_msg_code_invalid__Q33ipl5scene11AddressEditFv(self); + break; + case 20: + stt_msg_dup_wii_no__Q33ipl5scene11AddressEditFv(self); + break; + case 21: + stt_msg_dup_email__Q33ipl5scene11AddressEditFv(self); + break; + case 22: + stt_msg_my_wii_no__Q33ipl5scene11AddressEditFv(self); + break; + case 23: + stt_add_code_fadeout__Q33ipl5scene11AddressEditFv(self); + break; + case 24: + stt_add_name_fadein__Q33ipl5scene11AddressEditFv(self); + break; + case 25: + stt_add_name_normal__Q33ipl5scene11AddressEditFv(self); + break; + case 26: + stt_add_name_input__Q33ipl5scene11AddressEditFv(self); + break; + case 27: + stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(self); + break; + case 28: + stt_add_mii_fadein__Q33ipl5scene11AddressEditFv(self); + break; + case 29: + stt_add_mii_normal__Q33ipl5scene11AddressEditFv(self); + break; + case 30: + stt_add_mii_input__Q33ipl5scene11AddressEditFv(self); + break; + case 31: + stt_msg_no_mii_add__Q33ipl5scene11AddressEditFv(self); + break; + case 32: + stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv(self); + break; + case 33: + stt_add_confirm_fadein__Q33ipl5scene11AddressEditFv(self); + break; + case 34: + stt_add_confirm_normal__Q33ipl5scene11AddressEditFv(self); + break; + case 35: + stt_add_confirm_fadeout__Q33ipl5scene11AddressEditFv(self); + break; + case 36: + stt_wait_decide_anm_add__Q33ipl5scene11AddressEditFv(self); + break; + case 37: + self->stt_msg_code_add(); + break; + case 38: + stt_msg_add_rlt__Q33ipl5scene11AddressEditFv(self); + break; + case 39: + stt_msg_net__Q33ipl5scene11AddressEditFv(self); + break; + case 40: + stt_wait_parental__Q33ipl5scene11AddressEditFv(self); + break; + case 41: + stt_wait_parental_dst__Q33ipl5scene11AddressEditFv(self); + break; + case 42: + stt_msg_wc__Q33ipl5scene11AddressEditFv(self); + break; + case 43: + stt_wait_parental_wc__Q33ipl5scene11AddressEditFv(self); + break; + case 44: + stt_wait_parental_dst_wc__Q33ipl5scene11AddressEditFv(self); + break; + case 45: + self->stt_msg_parental(); + break; + case 46: + self->stt_msg_nwc24_error(); + break; + case 47: + stt_msg_no_established__Q33ipl5scene11AddressEditFv(self); + break; + } + + switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + case 0: + case 3: + case 9: + case 12: + case 29: + case 32: + case 34: + case 35: + case 36: + case 39: + case 42: + case 45: + case 46: + case 47: + calc__Q33ipl5scene11TextBalloonFv(*reinterpret_cast(reinterpret_cast(self) + 0xa8)); + break; + } + + return *reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x30 + ? ipl::scene::FADER_SCN_NEXT + : ipl::scene::FADER_SCN_CONTINUE; +} + +extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + char* pool = lbl_81647EE0; + + if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 5)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6)) + 0x14) != 1 && + *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 9)) + 0x14) != 1) { + s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x8c); + if (state == 6) { + goto state_done; + } + if (state >= 6) { + goto state_six_or_more; + } + if (state >= 5) { + goto state_five; + } + goto state_done; + + state_six_or_more: + if (state >= 8) { + goto state_done; + } + goto state_seven; + + state_five: { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + + s32 inputType = *reinterpret_cast(reinterpret_cast(self) + 0x84); + switch (inputType) { + case 2: + goto address_type_two; + case 1: + goto address_type_one; + default: + goto address_type_common; + } + + address_type_one: { + nw4r::lyt::Pane* label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + pool + 0x3ef, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x31)); + label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + pool + 0x3fd, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x47)); + } + goto address_type_common; + + address_type_two: { + nw4r::lyt::Pane* label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + pool + 0x3ef, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x3f)); + label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + pool + 0x3fd, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x48)); + } + + address_type_common: { + nw4r::lyt::Pane* label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + pool + 0x22b, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, reinterpret_cast(reinterpret_cast(self) + 0x2cc)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x10; + } + goto state_done; + } + + state_seven: { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 4); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + + nw4r::lyt::Pane* label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + pool + 0x3ef, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x55)); + label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + "T_mii_msg_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x8b)); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1c; + } + state_done: + ; + } +} + extern "C" asm void initCalcFadeout__Q33ipl5scene11AddressEditFv() { nofralloc stwu r1, -0x10(r1) @@ -699,7 +2366,7 @@ extern "C" asm void calcCommonAfter__Q33ipl5scene11AddressEditFv() { blr } -extern "C" asm void stt_normal__Q33ipl5scene11AddressEditFv() { +extern "C" asm void stt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -733,7 +2400,7 @@ stt_normal_L2: blr } -extern "C" asm void stt_wait_del_msg_fadein__Q33ipl5scene11AddressEditFv() { +extern "C" asm void stt_wait_del_msg_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -757,7 +2424,7 @@ stt_wait_del_msg_fadein_L1: blr } -extern "C" asm void delete_friendinfo__Q33ipl5scene11AddressEditFv() { +extern "C" asm void delete_friendinfo__Q33ipl5scene11AddressEditFv(void* self) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -778,17 +2445,6 @@ extern "C" asm void delete_friendinfo__Q33ipl5scene11AddressEditFv() { blr } -extern "C" int get_button_no__Q33ipl5scene11AddressEditFPCc(void*, const char* paneName) { - int result = -1; - for (int i = 0; i < 5; i++) { - if (strcmp(smButtonName__Q33ipl5scene6Button[i], paneName) == 0) { - result = i; - break; - } - } - return result; -} - extern "C" u64 utf16_wiiid__Q33ipl5scene11AddressEditFPCw(const wchar_t* value) { u64 result = 0; u64 multiplier = 1; @@ -799,7 +2455,7 @@ extern "C" u64 utf16_wiiid__Q33ipl5scene11AddressEditFPCw(const wchar_t* value) return result; } -extern "C" asm void wiiid_utf16__Q33ipl5scene11AddressEditFUxPw() { +extern "C" asm void wiiid_utf16__Q33ipl5scene11AddressEditFUxPw(u64, wchar_t*) { nofralloc stwu r1, -0x30(r1) mflr r0 @@ -948,7 +2604,7 @@ draw_L1: blr } -extern "C" asm void stt_wait_btn_fadein__Q33ipl5scene11AddressEditFv() { +extern "C" asm void stt_wait_btn_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -1016,7 +2672,44 @@ stt_wait_btn_fadein_L3: blr } -extern "C" asm void stt_wait_del_msg_fadeout_to_rlt__Q33ipl5scene11AddressEditFv() { +extern "C" void stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + u8* bytes = reinterpret_cast(self); + u32 index = *reinterpret_cast(bytes + 0xa4); + u8* friendInfo = *reinterpret_cast(bytes + 0x4ec) + index * 0x140; + u32 friendType = *reinterpret_cast(friendInfo + 4); + u32 friendFinished; + if (friendType == 2) { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x15); + friendFinished = *reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1; + } else { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x1b); + friendFinished = *reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1; + } + + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x16); + u32 finished = (friendFinished & (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1)) != 0; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x17); + finished = (finished & (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1)) != 0; + + if (finished != 0) { + ipl::layout::Object* layoutObject = *reinterpret_cast(bytes + 0x68); + nw4r::lyt::Pane* label = layoutObject->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_816480FD, true); + const wchar_t* message = ipl::System::getMessage(0x30); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, label, message); + ipl::System::getDialog()->callS2Btn2(0x142, 0x141, true); + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x1c); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + *reinterpret_cast(bytes + 0x64) = 4; + } +} + +extern "C" asm void stt_wait_del_msg_fadeout_to_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -1046,7 +2739,7 @@ stt_wait_del_msg_fadeout_to_rlt_L1: blr } -extern "C" asm void stt_msg_del_rlt__Q33ipl5scene11AddressEditFv() { +extern "C" asm void stt_msg_del_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -1091,7 +2784,7 @@ stt_msg_del_rlt_L1: blr } -extern "C" asm void stt_ipt_wait_fadein__Q33ipl5scene11AddressEditFv() { +extern "C" asm void stt_ipt_wait_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -1136,7 +2829,7 @@ stt_ipt_wait_fadein_L1: blr } -extern "C" asm void stt_ipt_normal__Q33ipl5scene11AddressEditFv() { +extern "C" asm void stt_ipt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*) { nofralloc stwu r1, -0x10(r1) mflr r0 @@ -1170,6 +2863,238 @@ stt_ipt_normal_L2: blr } +extern "C" void stt_ipt_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::keyboard::Manager::State* state = ipl::System::getKeyboard()->getState(); + ipl::scene::Manager* sceneManager = ipl::System::getSceneManager(); + void* button = sceneManager->getScene(5); + s32 keyboardType = state->iplType; + if (keyboardType == ipl::keyboard::Manager::STATE_DISAPPEARING) { + goto state_disappearing; + } + if (keyboardType >= ipl::keyboard::Manager::STATE_DISAPPEARING) { + goto state_at_or_after_disappearing; + } + if (keyboardType >= ipl::keyboard::Manager::STATE_VISIBLE) { + goto done; + } + if (keyboardType >= ipl::keyboard::Manager::STATE_HIDDEN) { + goto state_hidden; + } + goto done; + +state_at_or_after_disappearing: + if (keyboardType >= 5) { + goto done; + } + goto state_hidden_after_disappear; + +state_disappearing: { + bool nameWasEmpty = *reinterpret_cast(reinterpret_cast(self) + 0x2b4) == 0; + if (state->pressOK) { + setName__Q43ipl5scene11AddressEdit6StringFPCw( + reinterpret_cast(self) + 0xb0, state->wcString); + ipl::layout::Object* layout = + *reinterpret_cast(reinterpret_cast(self) + 0x74); + nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_8164810B, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); + } + if (*reinterpret_cast(reinterpret_cast(self) + 0x2b4) == 0) { + if (!nameWasEmpty) { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + } else { + if (nameWasEmpty) { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + } + } + } + goto done; + +state_hidden_after_disappear: { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0xd; + if (static_cast(ipl::System::getRegion()) == 6) { + enableKSXFilter__Q29textinput7ManagerFb(ipl::System::getKeyboard()->baseMgr(), false); + } + } + goto done; + +state_hidden: { + setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + self, NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); + } + +done: + return; +} + +extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + ipl::keyboard::Manager::State* state = ipl::System::getKeyboard()->getState(); + void* button = ipl::System::getScene(5); + switch (state->iplType) { + case ipl::keyboard::Manager::STATE_DISAPPEARING: { + bool codeWasEmpty = *reinterpret_cast(reinterpret_cast(self) + 0xb0) == 0; + u8* code = reinterpret_cast(self) + 0xb0; + if (state->pressOK) { + if (*reinterpret_cast(reinterpret_cast(self) + 0x84) == 1) { + setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw( + code, state->wcString); + } else { + setEMail__Q43ipl5scene11AddressEdit6StringFPCw( + code, state->wcString); + } + nw4r::lyt::Pane* label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_8164810B, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, reinterpret_cast(reinterpret_cast(self) + 0x2cc)); + } + if (*reinterpret_cast(reinterpret_cast(self) + 0xb0) == 0) { + if (!codeWasEmpty) { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + } else { + if (codeWasEmpty) { + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) != 0 && + isDupCode__Q43ipl5scene11AddressEdit6StringCFv(code) == 0 && + isMyCode__Q43ipl5scene11AddressEdit6StringCFv(code) == 0) { + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + } + } + break; + } + case ipl::keyboard::Manager::STATE_HIDDEN_AFTER_DISAPPEAR: + if (state->pressOK) { + if (*reinterpret_cast(reinterpret_cast(self) + 0xb0) != 0) { + if (*reinterpret_cast(reinterpret_cast(self) + 0x84) == 1) { + if (isMyCode__Q43ipl5scene11AddressEdit6StringCFv( + reinterpret_cast(self) + 0xb0) != 0) { + callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x56, 0x2e); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x16; + } else if (isDupCode__Q43ipl5scene11AddressEdit6StringCFv( + reinterpret_cast(self) + 0xb0) != 0) { + callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x52, 0x2e); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x14; + } else if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) == 0) { + callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x54, 0x2e); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x13; + } else { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + } + } else if (isDupCode__Q43ipl5scene11AddressEdit6StringCFv( + reinterpret_cast(self) + 0xb0) != 0) { + callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x53, 0x2e); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x15; + } else if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) == 0) { + callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x1be, 0x2e); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x13; + } else { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + } + } else { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + } + } else { + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + } + break; + case ipl::keyboard::Manager::STATE_HIDDEN: + case ipl::keyboard::Manager::STATE_APPEARING: + if (*reinterpret_cast(reinterpret_cast(self) + 0x84) != 1) { + setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + self, NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); + } + break; + default: + break; + } +} + +extern "C" void stt_add_code_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x74); + const u8* poolBase = reinterpret_cast(&s_addressEditDataPool); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(layout) + 0x28c, 5); + if (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1) { + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6); + if (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1) { + nw4r::lyt::Pane* label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + reinterpret_cast(poolBase + 0x3ef), true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x32)); + label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + reinterpret_cast(poolBase + 0x3fd), true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, ipl::System::getMessage(0x49)); + label = (*reinterpret_cast( + reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + reinterpret_cast(poolBase + 0x22b), true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, label, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + if (*reinterpret_cast(reinterpret_cast(self) + 0x2b4) != 0) { + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } else { + pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + ipl::System::getKeyboard()->init(); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x18; + } + } +} + /* This is a modified version of NWC24CheckPublicMailAddr. Changes: @@ -1299,3 +3224,824 @@ static ChkHostNameError CheckHostName(const char* hostName, u32 hostNameLength) return CHECK_HOSTNAME_SUCCESS; } + + + + + +extern "C" void start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( + ipl::scene::AddressEdit* self, const char* paneName, ipl::controller::Interface* controller) { + int buttonNo = get_button_no__Q33ipl5scene11AddressEditFPCc(self, paneName); + s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x64); + + switch (state) { + case 0: + goto state0; + case 0x22: + goto state22; + default: + goto done; + } + +state0: + switch (buttonNo) { + case 0: + goto state0Button0; + case 1: + case 2: + goto state0Common; + case 3: + goto state0Button3; + default: + goto done; + } + +state0Button0: { + u32 friendIndex = *reinterpret_cast(reinterpret_cast(self) + 0xa4); + u8* friendList = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); + u32 friendType = *reinterpret_cast(friendList + friendIndex * 0x140 + 4); + if (friendType != 2) { + goto done; + } + s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + if (*count == 0) { + void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(layout) + 0x28c, buttonNo + 1); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::snd::getSystem()->startSE( + "WIPL_SE_BT_TARGETTING"); + controller->rumble(1); + } + ++*count; + goto done; +} + +state0Button3: { + s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + if (*count == 0) { + ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); + ipl::math::VEC3 position; + __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); + PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast(&position), reinterpret_cast(&position)); + f32 xOffset = 15.0f; + f32 height = 50.0f; + f32 scale = 0.5f; + position.x = position.x + xOffset; + position.y = position.y + scale * height; + (*reinterpret_cast(reinterpret_cast(self) + 0xa8)) + ->setPos(position, false, 1); + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadein(); + } +} + +state0Common: { + s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + if (*count == 0) { + void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(layout) + 0x28c, buttonNo + 1); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::snd::getSystem()->startSE( + "WIPL_SE_BT_TARGETTING"); + controller->rumble(1); + } + ++*count; + goto done; +} + +state22: + switch (buttonNo) { + case 3: + goto state22Button3; + default: + goto done; + } +state22Button3: + { + s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + if (*count == 0) { + ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); + ipl::math::VEC3 position; + __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); + PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast(&position), reinterpret_cast(&position)); + f32 xOffset = 15.0f; + f32 height = 50.0f; + f32 scale = 0.5f; + position.x = position.x + xOffset; + position.y = position.y + scale * height; + (*reinterpret_cast(reinterpret_cast(self) + 0xa8)) + ->setPos(position, false, 1); + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadein(); + } + ++*count; + } + +done: + return; +} + +extern "C" void start_left_event__Q33ipl5scene11AddressEditFPCc( + ipl::scene::AddressEdit* self, const char* paneName) { + int buttonNo = get_button_no__Q33ipl5scene11AddressEditFPCc(self, paneName); + s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x64); + switch (state) { + case 0x22: + goto state22; + case 0: + switch (buttonNo) { + case 3: + goto state0Button3; + case 0: + goto state0Friend; + case 1: + case 2: + goto state0Common; + default: + break; + } + break; + default: + break; + } + goto done; + +state0Friend: { + u32 friendIndex = *reinterpret_cast(reinterpret_cast(self) + 0xa4); + u8* friendList = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); + u32 friendType = *reinterpret_cast(friendList + friendIndex * 0x140 + 4); + if (friendType != 2) { + goto done; + } + s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + if (*count == 1) { + void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(layout) + 0x28c, buttonNo + 0xb); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + if (*count > 0) { + --*count; + } + goto done; + } + +state0Button3: { + s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + if (*count == 1) { + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + } + --*count; + goto done; + } + +state0Common: { + s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + if (*count == 1) { + void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(layout) + 0x28c, buttonNo + 0xb); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + } + if (*count > 0) { + --*count; + } + goto done; + } + +state22: + if (buttonNo != 3) { + goto done; + } + { + s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + if (*count == 1) { + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + } + --*count; + } + +done: + return; +} + +extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( + ipl::scene::AddressEdit* self, const char* paneName) { + int buttonNo = get_button_no__Q33ipl5scene11AddressEditFPCc(self, paneName); + s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x64); + + switch (state) { + case 0: { + if (buttonNo == 0) { + goto state0Friend; + } + if (buttonNo < 0) { + break; + } + if (buttonNo >= 5) { + break; + } + goto state0Event; + + state0Friend: { + u32 friendIndex = *reinterpret_cast(reinterpret_cast(self) + 0xa4); + u8* friendList = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); + u32 friendType = *reinterpret_cast(friendList + friendIndex * 0x140 + 4); + if (friendType != 2) { + goto state0FriendError; + } + reset_gui__Q33ipl5scene11AddressEditFv(self); + void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(layout) + 0x28c, buttonNo + 6); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x88) = buttonNo; + ipl::snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 1; + break; + } + + state0FriendError: { + callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x57, 0x2e); + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x2f; + break; + } + + state0Event: { + void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(layout) + 0x28c, buttonNo + 6); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x88) = buttonNo; + ipl::snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 1; + break; + } + } + break; + + case 0x22: + switch (buttonNo) { + case 4: + goto state22Button4; + default: + break; + } + break; + + state22Button4: { + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + for (s32 i = 0; i < 5; ++i) { + *reinterpret_cast(reinterpret_cast(self) + 0x90 + i * 4) = 0; + } + void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(layout) + 0x28c, 10); + initFrame__Q33ipl7utility15FrameControllerFv(pane); + *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x88) = buttonNo; + ipl::snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x24; + break; + } + } +} + +extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( + ipl::scene::AddressEdit* self, const char* paneName, int channel) { + ipl::scene::SceneObj* button = ipl::System::getScene(5); + ipl::controller::Interface* controller = ipl::System::getControllerManager()->getYoungController(); + if (controller == NULL) { + return; + } + if (controller->getChannel() != channel) { + return; + } + if (!strcmp(lbl_816965E0, paneName)) { + s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x64); + switch (state) { + case 0xd: { + ipl::keyboard::Manager::KeyboardSetting setting; + __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( + &setting, static_cast(0xb), + reinterpret_cast(reinterpret_cast(self) + 0x2b4), 0xa, 1); + + switch (ipl::System::getRegion()) { + case 0xb: { + void* oemDictionary; + void* systemDictionary; + systemDictionary = ipl::System::getKeyboard()->getZiSystemDic(); + oemDictionary = ipl::System::getKeyboard()->getZiOemDic(); + textinput::InputForm* inputForm = ipl::System::getKeyboard()->baseMgr()->getInputForm(); + inputForm->setZiDictionary(oemDictionary, systemDictionary); + setting.type = static_cast(0xd); + break; + } + case 6: + enableKSXFilter__Q29textinput7ManagerFb( + ipl::System::getKeyboard()->baseMgr(), true); + setting.type = static_cast(0xd); + break; + default: + break; + } + + ipl::System::getKeyboard()->start(channel, setting); + setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + self, reinterpret_cast(reinterpret_cast(self) + 0x2b4), false); + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + } + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0xe; + break; + } + case 0x11: { + if (*reinterpret_cast(reinterpret_cast(self) + 0x84) == 1) { + ipl::keyboard::Manager::KeyboardSetting setting; + __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( + &setting, static_cast(0xc), + reinterpret_cast(reinterpret_cast(self) + 0xb0), 0x10, 2); + ipl::System::getKeyboard()->start(channel, setting); + } else { + ipl::keyboard::Manager::KeyboardSetting setting; + __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( + &setting, static_cast(7), + reinterpret_cast(reinterpret_cast(self) + 0xb0), 0x63, 5); + ipl::System::getKeyboard()->start(channel, setting); + } + setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + self, reinterpret_cast(reinterpret_cast(self) + 0xb0), false); + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) != 0 && + isDupCode__Q43ipl5scene11AddressEdit6StringCFv(reinterpret_cast(self) + 0xb0) == 0 && + isMyCode__Q43ipl5scene11AddressEdit6StringCFv(reinterpret_cast(self) + 0xb0) == 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + } + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x12; + break; + } + case 0x19: { + ipl::keyboard::Manager::KeyboardSetting setting; + __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( + &setting, static_cast(0xb), + reinterpret_cast(reinterpret_cast(self) + 0x2b4), 0xa, 1); + + switch (ipl::System::getRegion()) { + case 0xb: { + void* oemDictionary; + void* systemDictionary; + systemDictionary = ipl::System::getKeyboard()->getZiSystemDic(); + oemDictionary = ipl::System::getKeyboard()->getZiOemDic(); + textinput::InputForm* inputForm = ipl::System::getKeyboard()->baseMgr()->getInputForm(); + inputForm->setZiDictionary(oemDictionary, systemDictionary); + setting.type = static_cast(0xd); + break; + } + case 6: + enableKSXFilter__Q29textinput7ManagerFb( + ipl::System::getKeyboard()->baseMgr(), true); + setting.type = static_cast(0xd); + break; + default: + break; + } + + ipl::System::getKeyboard()->start(channel, setting); + setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + self, reinterpret_cast(reinterpret_cast(self) + 0x2b4), false); + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + } + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1a; + break; + } + case 0x1d: + if (*reinterpret_cast(reinterpret_cast(self) + 0x4e8) != 1) { + *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 0; + if (RFLGetAvailableOfficialDataNum() != 0) { + createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( + self, 0x1c, self, NULL, reinterpret_cast(2)); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1e; + } else { + callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x17c, 0x2e); + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1f; + } + } + break; + default: + break; + } + } +} + + +extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( + ipl::scene::AddressEdit* self, const char* paneName, int channel) { + ipl::controller::Interface* controller = ipl::System::getControllerManager()->getYoungController(); + if (controller != NULL) { + if (controller->getChannel() == channel) { + switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + case 0x1d: { + char paneNameCopy[12] = "mii_icon_00"; + if (strcmp(paneNameCopy, paneName) == 0) { + ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x74); + nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); + ipl::math::VEC3 position; + __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); + PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast(&position), reinterpret_cast(&position)); + f32 y; + f32 offset; + offset = 50.0f; + y = position.y; + position.y = y + offset; + (*reinterpret_cast(reinterpret_cast(self) + 0xa8)) + ->setPos(position, false, 0); + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadein(); + } + break; + } + } + } + } +} + +extern "C" void onEventDerived__Q33ipl5scene11AddressEditFUlUlPCQ33ipl10controller9Interface( + ipl::scene::AddressEdit* self, u32 componentId, u32 event, + const ipl::controller::Interface* controller) { + const char* pool = lbl_81647EE0; + gui::Manager* manager = *reinterpret_cast( + reinterpret_cast(self) + 0x5c); + gui::PaneComponent* component = + static_cast(manager->getComponent(componentId)); + nw4r::lyt::Pane* pane = component->getPane(); + + const char* paneName = pane->GetName(); + if (event != 0) { + return; + } + if (controller == NULL) { + return; + } + if (!controller->downTrg(0x100800)) { + return; + } + void* button = ipl::System::getScene(5); + ipl::System::getScene(0x14); + + if (strcmp(paneName, smButtonName__Q33ipl5scene6Button[5]) == 0) { + switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + case 0: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + reserveText__Q33ipl5scene6ButtonFiUl(button, 0, 0x23); + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x29); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x68)) + 0x28c, 0x1e); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); + (*reinterpret_cast( + reinterpret_cast(self) + 0xa8))->fadeoutForce(); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + break; + } + case 0xd: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + } + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 9); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x80)) + 0x28c, 1); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + get_friendinfo__Q33ipl5scene11AddressEditFv(self); + ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0xf; + break; + } + case 0x11: { + reserveSceneChange__Q33ipl5scene4BaseFiPv( + self, *reinterpret_cast(reinterpret_cast(self) + 0x34), NULL); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) != 0 && + isDupCode__Q43ipl5scene11AddressEdit6StringCFv( + reinterpret_cast(self) + 0xb0) == 0 && + isMyCode__Q43ipl5scene11AddressEdit6StringCFv( + reinterpret_cast(self) + 0xb0) == 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + } + void* frame; + if (*reinterpret_cast(reinterpret_cast(self) + 0xb0) != 0) { + frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 6); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + } else { + frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 7); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + } + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 9); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 5); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + break; + } + case 0x19: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 6); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + } else { + u16 nameLength = *reinterpret_cast(reinterpret_cast(self) + 0x2b4); + if (nameLength != 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 6); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 7); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + } + } + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 5); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1b; + break; + } + case 0x1d: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 5); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 8); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x20; + (*reinterpret_cast( + reinterpret_cast(self) + 0xa8))->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + break; + } + case 0x22: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x68)) + 0x28c, 0x1e); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x23; + (*reinterpret_cast( + reinterpret_cast(self) + 0xa8))->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + break; + } + } + } else if (strcmp(paneName, smButtonName__Q33ipl5scene6Button[7]) == 0) { + switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + case 0xd: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + ipl::layout::Object* layout = *reinterpret_cast( + reinterpret_cast(self) + 0x68); + nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName( + pool + 0x22b, true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, reinterpret_cast( + reinterpret_cast(self) + 0x2b4)); + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 9); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x80)) + 0x28c, 1); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + update_friendinfo__Q33ipl5scene11AddressEditFv(self); + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0xf; + break; + } + case 0x11: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + } + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 5); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 6); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x17; + break; + } + case 0x19: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 5); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 6); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1b; + reset_gui__Q33ipl5scene11AddressEditFv(self); + break; + } + case 0x1d: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x74)) + 0x28c, 9); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x20; + (*reinterpret_cast( + reinterpret_cast(self) + 0xa8))->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + break; + } + case 0x22: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( + reinterpret_cast(*reinterpret_cast( + reinterpret_cast(self) + 0x68)) + 0x28c, 0x1e); + initFrame__Q33ipl7utility15FrameControllerFv(frame); + *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; + ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); + *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x23; + (*reinterpret_cast( + reinterpret_cast(self) + 0xa8))->fadeoutForce(); + break; + } + } + } +} + +extern "C" void start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( + ipl::scene::AddressEdit* self, const char* paneName, int channel) { + ipl::controller::Interface* controller = ipl::System::getControllerManager()->getYoungController(); + if (controller != NULL) { + if (controller->getChannel() == channel) { + switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + case 0x1d: { + char paneNameCopy[12] = "mii_icon_00"; + if (strcmp(paneNameCopy, paneName) == 0) { + (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + } + break; + } + } + } + } +} + +extern "C" void set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( + ipl::scene::AddressEdit* self, wchar_t* outErrMsg, u32 outErrMsgLen, NWC24Err nwc24Err) { + memset(outErrMsg, 0, outErrMsgLen * sizeof(wchar_t)); + wcsncat(outErrMsg, ipl::System::getMessage(MESG_ERROR_CODE), outErrMsgLen - wcslen(outErrMsg)); + + wchar_t nwc24ErrStr[32]; + memset(nwc24ErrStr, 0, sizeof(nwc24ErrStr)); + void* friendListCache = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); + NWC24Err errorCode = getErrCode__Q33ipl5scene15FriendListCacheCFv(friendListCache); + swprintf(nwc24ErrStr, sizeof(nwc24ErrStr) / sizeof(wchar_t), L"%06d\n", errorCode); + wcsncat(outErrMsg, nwc24ErrStr, outErrMsgLen - wcslen(outErrMsg)); + + u32 messageId = MESG_ERROR_NWC24_SERVER; + switch (nwc24Err) { + case NWC24_ERR_NETWORK: + messageId = MESG_ERROR_NWC24_NETWORK; + break; + case NWC24_ERR_SERVER: + case NWC24_ERR_FULL: + messageId = MESG_ERROR_NWC24_SERVER; + break; + default: + break; + } + wcsncat(outErrMsg, ipl::System::getMessage(messageId), outErrMsgLen - wcslen(outErrMsg)); +} + + + + + + + +extern "C" int get_button_no__Q33ipl5scene11AddressEditFPCc(void*, const char* paneName) { + int result = -1; + for (int i = 0; i < 5; i++) { + if (strcmp(smButtonName__Q33ipl5scene6Button[i], paneName) == 0) { + result = i; + break; + } + } + return result; +} -- 2.49.1 From 3a31f4298a8a1f78644953b4617db3bdeaf2ee17 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Mon, 28 Sep 2026 22:32:24 +0000 Subject: [PATCH 2/3] decompile address edit --- config/43U/symbols.txt | 66 +- include/scene/address/iplAddressEdit.h | 49 +- src/scene/address/iplAddressEdit.cpp | 3417 +++++++++++------------- 3 files changed, 1613 insertions(+), 1919 deletions(-) diff --git a/config/43U/symbols.txt b/config/43U/symbols.txt index 44359545..2ab7fbb1 100644 --- a/config/43U/symbols.txt +++ b/config/43U/symbols.txt @@ -13835,8 +13835,8 @@ scAnmTable__10homebutton = .rodata:0x8160F378; // type:object size:0x60 scope:lo scGroupAnmTable__10homebutton = .rodata:0x8160F3D8; // type:object size:0x250 scope:local data:4byte __DVDErrorMessage = .rodata:0x8160F628; // type:object size:0x28 lbl_8160F650 = .rodata:0x8160F650; // type:object size:0x16 data:2byte -lbl_8160F668 = .rodata:0x8160F668; // type:object size:0xB data:byte -lbl_8160F673 = .rodata:0x8160F673; // type:object size:0xC data:byte +specials$18760 = .rodata:0x8160F668; // type:object size:0xB data:byte +@19145 = .rodata:0x8160F673; // type:object size:0xC data:byte lbl_8160F67F = .rodata:0x8160F67F; // type:object size:0xD data:byte lbl_8160F690 = .rodata:0x8160F690; // type:object size:0x18 data:2byte scAnmFrame__Q23ipl5scene = .rodata:0x8160F6A8; // type:object size:0x20 scope:local @@ -15435,26 +15435,46 @@ __vt__Q33ipl5scene7Address = .data:0x81647B70; // type:object size:0x120 @11177 = .data:0x81647D9A; // type:object size:0xF scope:local data:string __vt__Q33ipl5scene18AddressAddSelEvent = .data:0x81647DAC; // type:object size:0x18 __vt__Q33ipl5scene13AddressAddSel = .data:0x81647DC4; // type:object size:0x88 -lbl_81647EE0 = .data:0x81647EE0; // type:object size:0xD data:string -lbl_81647EED = .data:0x81647EED; // type:object size:0xD data:string -lbl_81647EFA = .data:0x81647EFA; // type:object size:0xD data:string -lbl_81647F07 = .data:0x81647F07; // type:object size:0xE data:string -lbl_81647F15 = .data:0x81647F15; // type:object size:0xC data:string -lbl_81647F24 = .data:0x81647F24; // type:object size:0x14 -lbl_81647F38 = .data:0x81647F38; // type:object size:0xE data:string -lbl_81647F46 = .data:0x81647F46; // type:object size:0x83 -lbl_81647FC9 = .data:0x81647FC9; // type:object size:0xC data:string -lbl_81647FD5 = .data:0x81647FD5; // type:object size:0x128 -lbl_816480FD = .data:0x816480FD; // type:object size:0xE data:string -lbl_8164810B = .data:0x8164810B; // type:object size:0x1F5 -jumptable_81648300 = .data:0x81648300; // type:object size:0xC0 scope:local -jumptable_816483C0 = .data:0x816483C0; // type:object size:0xC0 scope:local -lbl_8164848D = .data:0x8164848D; // type:object size:0x16 data:string -lbl_816484A3 = .data:0x816484A3; // type:object size:0xF data:string -jumptable_816484B4 = .data:0x816484B4; // type:object size:0x44 scope:local -jumptable_81648508 = .data:0x81648508; // type:object size:0x58 scope:local -jumptable_81648560 = .data:0x81648560; // type:object size:0x8C scope:local -lbl_816485EC = .data:0x816485EC; // type:object size:0xC data:wstring +@16959 = .data:0x81647EE0; // type:object size:0xD data:string +@16960 = .data:0x81647EED; // type:object size:0xD data:string +@16961 = .data:0x81647EFA; // type:object size:0xD data:string +@16962 = .data:0x81647F07; // type:object size:0xE data:string +@16963 = .data:0x81647F15; // type:object size:0xC data:string +sButtonPaneNames = .data:0x81647F24; // type:object size:0x14 +@16964 = .data:0x81647F38; // type:object size:0xE data:string +@23886 = .data:0x81647F46; // type:object size:0xC data:string +@24207 = .data:0x81647F52; // type:object size:0x12 data:string +@24208 = .data:0x81647F64; // type:object size:0x1C data:string +@24209 = .data:0x81647F80; // type:object size:0xF data:string +@24210 = .data:0x81647F8F; // type:object size:0x19 data:string +@24211 = .data:0x81647FA8; // type:object size:0xB data:string +@24212 = .data:0x81647FB3; // type:object size:0xB data:string +@24213 = .data:0x81647FBE; // type:object size:0xB data:string +@24214 = .data:0x81647FC9; // type:object size:0xC data:string +@24215 = .data:0x81647FD5; // type:object size:0xE data:string +@24216 = .data:0x81647FE3; // type:object size:0x1A data:string +@24217 = .data:0x81647FFD; // type:object size:0x1A data:string +@24218 = .data:0x81648017; // type:object size:0x1D data:string +@24219 = .data:0x81648034; // type:object size:0x1E data:string +@24220 = .data:0x81648052; // type:object size:0xC data:string +@24221 = .data:0x8164805E; // type:object size:0x22 data:string +@24222 = .data:0x81648080; // type:object size:0x9 data:string +@24223 = .data:0x81648089; // type:object size:0x23 data:string +@24224 = .data:0x816480AC; // type:object size:0x1C data:string +@24225 = .data:0x816480C8; // type:object size:0xD data:string +@24226 = .data:0x816480D5; // type:object size:0xD data:string +@24227 = .data:0x816480E2; // type:object size:0xD data:string +@24228 = .data:0x816480EF; // type:object size:0xE data:string +@24229 = .data:0x816480FD; // type:object size:0xE data:string +@24231 = .data:0x8164810B; // type:object size:0x1F5 +@25188 = .data:0x81648300; // type:object size:0xC0 scope:local +@25187 = .data:0x816483C0; // type:object size:0xC0 scope:local +@25711 = .data:0x8164848D; // type:object size:0x16 data:string +@25835 = .data:0x816484A3; // type:object size:0xF data:string +@25838 = .data:0x816484B4; // type:object size:0x44 scope:local +@26007 = .data:0x81648508; // type:object size:0x58 scope:local +@26006 = .data:0x81648560; // type:object size:0x8C scope:local +@26030 = .data:0x816485EC; // type:object size:0xC data:wstring __vt__Q33ipl5scene17AddressInputEvent = .data:0x816485F8; // type:object size:0x18 __vt__Q33ipl5scene16AddressEditEvent = .data:0x81648610; // type:object size:0x18 __vt__Q33ipl5scene11AddressEdit = .data:0x81648628; // type:object size:0x120 @@ -21691,7 +21711,7 @@ lbl_816965C4 = .sdata:0x816965C4; // type:object size:0x6 data:string lbl_816965CA = .sdata:0x816965CA; // type:object size:0x4 smButtonName__Q33ipl5scene13AddressAddSel = .sdata:0x816965D0; // type:object size:0x8 @10971 = .sdata:0x816965D8; // type:object size:0x4 scope:local data:string -lbl_816965E0 = .sdata:0x816965E0; // type:object size:0x4 data:4byte +sInputPaneName = .sdata:0x816965E0; // type:object size:0x4 data:4byte lbl_816965E4 = .sdata:0x816965E4; // type:object size:0x4 data:string lbl_816965E8 = .sdata:0x816965E8; // type:object size:0x2 lbl_816965EA = .sdata:0x816965EA; // type:object size:0x6 data:string diff --git a/include/scene/address/iplAddressEdit.h b/include/scene/address/iplAddressEdit.h index c4db65e3..cf1b8899 100644 --- a/include/scene/address/iplAddressEdit.h +++ b/include/scene/address/iplAddressEdit.h @@ -4,8 +4,18 @@ #include "iplSceneHeader.h" #include "scene/button/iplButton.h" +#include + namespace ipl { + namespace nigaoe { + class Object; + } + namespace scene { + class AddressEditEvent; + class AddressInputEvent; + class FriendListCache; + FADER_SCENE_CLASS(AddressEdit), public ButtonEventHandlerBase { public: AddressEdit(EGG::Heap * heap, int friendCode); @@ -28,11 +38,26 @@ namespace ipl { void stt_msg_code_edit(); void stt_msg_parental(); void stt_msg_nwc24_error(); + void update_friendinfo(); + void requestSceneChange(int sceneId, void* args) { reserveSceneChange(sceneId, args); } + u32 getPreviousScene() const { return getPrevSceneID(); } + EGG::Heap* getHeap() { return getSceneHeap(); } + ::gui::Manager* getGuiManager() { return mpManager; } class String { public: void clear(); const wchar_t* getDispCodeLong() const; + void setName(const wchar_t* value); + void setEMail(const wchar_t* value); + void setWiiNo(const wchar_t* value); + + wchar_t mValue[0x102]; + wchar_t mName[0x0c]; + wchar_t mDisplayText[0x102]; + bool mbValidMail; + bool mbNameNotEmpty; + bool mbHasWiiNo; }; enum { @@ -40,8 +65,28 @@ namespace ipl { SCENE_ADD_EMAIL, }; - private: - u8 unk_0x64[0x48c]; + int mState; + layout::Object* mpCodeLayout; + AddressEditEvent* mpEditEvent; + gui::PaneManager* mpEditGui; + layout::Object* mpNameLayout; + AddressInputEvent* mpInputEvent; + gui::PaneManager* mpInputGui; + layout::Object* mpBackgroundLayout; + int mMode; + int mSelectedButton; + int mSubState; + s32 mPointCount[5]; + u32 mSelectedFriend; + TextBalloon* mpBalloon; + nand::LayoutFile* mpBalloonFile; + String mString; + AddressEdit* mpCallbackOwner; + bool mbParentalOK; + nigaoe::Object* mpNigaoe; + RFLCreateID mCreateID; + int mNigaoeState; + FriendListCache* mpFriendCache; }; } // namespace scene } // namespace ipl diff --git a/src/scene/address/iplAddressEdit.cpp b/src/scene/address/iplAddressEdit.cpp index 13fc55ac..b500deb8 100644 --- a/src/scene/address/iplAddressEdit.cpp +++ b/src/scene/address/iplAddressEdit.cpp @@ -1,4 +1,9 @@ #include "scene/address/iplAddressEdit.h" +#include "scene/address/iplAddress.h" +#include "scene/board/iplBoard.h" +#include "scene/faceSelect/iplFaceSelect.h" +#include "scene/parentalDialog/iplParentalDialog.h" +#include "scene/iplSceneManager.h" #include "layout/iplGuiManager.h" #include "scene/textBalloon/iplBalloon.h" @@ -27,10 +32,18 @@ enum { static ChkHostNameError CheckHostName(const char* hostName, u32 hostNameLength); +static const char* sButtonPaneNames[5] = { + "B_crd_btn_00", "B_crd_btn_10", "B_crd_btn_11", "B_mii_icon_00", "B_card_beta" +}; + +static const char* sInputPaneName = "B_crd_edgi_00"; + namespace ipl { namespace scene { class AddressEditEvent : public ::gui::EventHandler { public: + AddressEditEvent(AddressEdit* parent) : mpParent(parent) {} + virtual void onEvent(u32 componentId, u32 event, void* data); private: @@ -39,6 +52,8 @@ namespace ipl { class AddressInputEvent : public ::gui::EventHandler { public: + AddressInputEvent(AddressEdit* parent) : mpParent(parent) {} + virtual void onEvent(u32 componentId, u32 event, void* data); private: @@ -52,107 +67,85 @@ extern "C" void __ct__Q33ipl5scene14FaderSceneBaseFPQ23EGG4Heap(void*, EGG::Heap extern "C" void __dt__Q33ipl6nigaoe6ObjectFv(void*, int); extern "C" void __dt__Q33ipl5scene4BaseFv(void*, int); extern "C" void __dl__FPv(void*); +extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( + ipl::scene::AddressEdit*, const char*, ipl::controller::Interface*); +extern "C" void start_left_event__Q33ipl5scene11AddressEditFPCc( + ipl::scene::AddressEdit*, const char*); +extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( + ipl::scene::AddressEdit*, const char*); +extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( + ipl::scene::AddressEdit*, const char*, int); +extern "C" void start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( + ipl::scene::AddressEdit*, const char*, int); +extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( + ipl::scene::AddressEdit*, const char*, int); -struct AddressEditDataPool { - u64 prefix[8]; - u32 padding; - const char* panes[5]; - u64 suffix[121]; -}; -AddressEditDataPool s_addressEditDataPool = { - { - 0x425f6372645f6274, 0x6e5f303000425f63, - 0x72645f62746e5f31, 0x3000425f6372645f, - 0x62746e5f31310042, 0x5f6d69695f69636f, - 0x6e5f303000425f63, 0x6172645f62657461 - }, - 0, - { - reinterpret_cast(&s_addressEditDataPool) + 0x00, - reinterpret_cast(&s_addressEditDataPool) + 0x0d, - reinterpret_cast(&s_addressEditDataPool) + 0x1a, - reinterpret_cast(&s_addressEditDataPool) + 0x27, - reinterpret_cast(&s_addressEditDataPool) + 0x35 - }, - { - 0x425f6372645f6564, 0x67695f3030006261, 0x6c6c6f6f6e2e6173, 0x680074685f416472, - 0x6573735f622e6272, 0x6c79740074685f41, 0x64726573735f625f, 0x636172645f737472, - 0x742e62726c616e00, 0x636172645f737472, 0x745f666e73680074, 0x685f416472657373, - 0x5f625f62746e5f69, 0x6e2e62726c616e00, 0x6372645f62746e5f, 0x3030006372645f62, - 0x746e5f3130006372, 0x645f62746e5f3131, 0x006d69695f69636f, 0x6e5f303000545f66, - 0x726e645f6372645f, 0x30300074685f4164, 0x726573735f625f62, 0x746e5f7073682e62, - 0x726c616e0074685f, 0x4164726573735f62, 0x5f62746e5f6f7574, 0x2e62726c616e0074, - 0x685f416472657373, 0x5f625f62746e5f73, 0x636c5f696e2e6272, 0x6c616e0074685f41, - 0x64726573735f625f, 0x62746e5f73636c5f, 0x6f75742e62726c61, 0x6e006372645f6274, - 0x6e5f677279007468, 0x5f4164726573735f, 0x625f636172645f6d, 0x73675f616c705f69, - 0x6e2e62726c616e00, 0x636172645f6d7367, 0x0074685f41647265, 0x73735f625f636172, - 0x645f6d73675f616c, 0x705f6f75742e6272, 0x6c616e0074685f41, 0x64726573735f625f, - 0x636172645f666e73, 0x682e62726c616e00, 0x545f6372645f6274, 0x6e5f303000545f63, - 0x72645f62746e5f31, 0x3000545f6372645f, 0x62746e5f31310054, 0x5f6372645f62746e, - 0x5f67727900545f63, 0x6172645f6d73675f, 0x303000545f6e616d, 0x655f30300074685f, - 0x4164726573735f63, 0x2e62726c79740074, 0x685f416472657373, 0x5f635f636172645f, - 0x737472742e62726c, 0x616e00475f636172, 0x645f737472745f66, 0x6e73680074685f41, - 0x64726573735f635f, 0x7175657374696f6e, 0x5f616c705f696e2e, 0x62726c616e00475f, - 0x7175657374696f6e, 0x5f30300074685f41, 0x64726573735f635f, 0x6e616d655f616c70, - 0x5f696e2e62726c61, 0x6e00475f6e616d65, 0x5f30300074685f41, 0x64726573735f635f, - 0x6d73675f616c705f, 0x696e2e62726c616e, 0x00475f6d73675f30, 0x300074685f416472, - 0x6573735f635f6d69, 0x695f616c705f696e, 0x2e62726c616e0074, 0x685f416472657373, - 0x5f635f7175657374, 0x696f6e5f616c705f, 0x6f75742e62726c61, 0x6e0074685f416472, - 0x6573735f635f6e61, 0x6d655f616c705f6f, 0x75742e62726c616e, 0x0074685f41647265, - 0x73735f635f6d7367, 0x5f616c705f6f7574, 0x2e62726c616e0074, 0x685f416472657373, - 0x5f635f6d69695f61, 0x6c705f6f75742e62, 0x726c616e0074685f, 0x4164726573735f63, - 0x5f636172645f666e, 0x73682e62726c616e, 0x006d795f4261636b, 0x5f612e62726c7974, - 0x006d795f4261636b, 0x5f615f4170656172, 0x2e62726c616e0050, 0x6963747572655f30, - 0x30006d795f426163, 0x6b5f615f4c6f7374, 0x2e62726c616e0054, 0x5f7175657374696f, - 0x6e5f303000545f6d, 0x73675f3030006d79, 0x5f49706c546f7042, 0x616c6c6f6f6e5f61, - 0x2e62726c79740000 - } -}; ipl::scene::AddressEdit::AddressEdit(EGG::Heap* heap, int friendCode) : FaderSceneBase(heap), ButtonEventHandlerBase() { - u8* object = reinterpret_cast(this); - u32 zero = 0; - - *reinterpret_cast(object + 0x84) = friendCode; - *reinterpret_cast(object + 0x88) = -1; - *reinterpret_cast(object + 0x8c) = -1; - *reinterpret_cast(object + 0xa4) = zero; - *reinterpret_cast(object + 0x4d4) = this; - - reinterpret_cast(object + 0xb0)->clear(); - - *reinterpret_cast(object + 0x4d8) = 0; - *reinterpret_cast(object + 0x4dc) = zero; - *reinterpret_cast(object + 0x4e8) = zero; - *reinterpret_cast(object + 0x28) = 3; + mMode = friendCode; + mSelectedButton = -1; + mSubState = -1; + mSelectedFriend = 0; + mpCallbackOwner = this; + mString.clear(); + mbParentalOK = false; + mpNigaoe = NULL; + mNigaoeState = 0; + setSceneParentFlags(3); for (int i = 0; i < 5; ++i) { - *reinterpret_cast(object + 0x90 + i * 4) = zero; + mPointCount[i] = 0; } for (int i = 0; i < 8; ++i) { - object[0x4e0 + i] = 0; + mCreateID.data[i] = 0; } } ipl::scene::AddressEdit::~AddressEdit() { - ipl::nigaoe::Object* object = *reinterpret_cast( - reinterpret_cast(this) + 0x4dc); - if (object != 0) { - __dt__Q33ipl6nigaoe6ObjectFv(object, 1); + if (mpNigaoe != NULL) { + __dt__Q33ipl6nigaoe6ObjectFv(mpNigaoe, 1); + } +} + +void ipl::scene::AddressEdit::stt_msg_code_add() { + if (System::getDialog()->getLastResult() == DialogWindow::RESULT_BUTTON) { + mState = 0x22; + } +} + +void ipl::scene::AddressEdit::stt_msg_code_edit() { + if (System::getDialog()->getLastResult() == DialogWindow::RESULT_BUTTON) { + mState = 0; + } +} + +void ipl::scene::AddressEdit::stt_msg_parental() { + if (System::getDialog()->getLastResult() == DialogWindow::RESULT_BUTTON) { + mState = 0; + } +} + +void ipl::scene::AddressEdit::stt_msg_nwc24_error() { + if (System::getDialog()->getLastResult() == DialogWindow::RESULT_BUTTON) { + mState = 0; + } +} + +extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + self->mpEditGui->init(); + self->mpInputGui->init(); + for (s32 i = 0; i < 5; ++i) { + if (self->mPointCount[i] > 0) { + ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(i + 0xb); + animator->initFrame(); + animator->restart(); + } + self->mPointCount[i] = 0; } } -extern "C" char lbl_81647EE0[]; -extern "C" char lbl_81647FC9[]; -extern "C" char lbl_81647FD5[]; -extern "C" char lbl_816480FD[]; -extern "C" char lbl_8164810B[]; -extern "C" __declspec(section ".sdata") const char* lbl_816965E0; -extern "C" __declspec(section ".sdata") char lbl_816965E4[]; -extern "C" __declspec(section ".sdata") const char lbl_816965EA[]; -extern "C" __declspec(section ".sdata") wchar_t lbl_816965E8[]; -extern "C" __declspec(section ".sdata") const wchar_t lbl_816965F0[]; extern "C" u8 __vt__Q33ipl5scene16AddressEditEvent[]; extern "C" u8 __vt__Q33ipl5scene17AddressInputEvent[]; extern "C" void* __nw__FUl(u32); @@ -165,7 +158,7 @@ extern "C" BOOL RFLSearchOfficialData(const RFLCreateID*, u16*); extern "C" ipl::gui::PaneManager* __ct__Q33ipl3gui11PaneManagerFPQ23gui12EventHandlerPCQ34nw4r3lyt8DrawInfoPQ23EGG4HeapPQ23EGG9Allocatorb( void*, gui::EventHandler*, const nw4r::lyt::DrawInfo*, EGG::Heap*, EGG::Allocator*, bool); extern "C" void initAnmFrame__Q33ipl6layout8AnimatorFv(void*); -extern "C" char sFriendInfo__Q23ipl5scene[]; +extern "C" NWC24FriendInfo sFriendInfo__Q23ipl5scene; extern "C" char smArg__Q23ipl6System; extern "C" const char* smButtonName__Q33ipl5scene6Button[]; extern "C" void readLayoutAsync__Q33ipl4nand7ManagerFPQ23EGG4HeapPCcb(); @@ -201,17 +194,15 @@ extern "C" void initFrame__Q33ipl7utility15FrameControllerFv(void*); extern "C" void getMessage__Q33ipl7message7MessageCFUl(); extern "C" void del__Q33ipl5scene15FriendListCacheFUl(); extern "C" void reset_friend__Q33ipl5scene7AddressFv(void*); -extern "C" void add_friendinfo__Q33ipl5scene11AddressEditFv(void*); +extern "C" void add_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); extern "C" void delete_friendinfo__Q33ipl5scene11AddressEditFv(void*); extern "C" void add__Q33ipl5scene15FriendListCacheFUlRC15NWC24FriendInfo( void*, u32, const NWC24FriendInfo&); extern "C" void sendRegisterMail__Q33ipl5scene15FriendListCacheFUl(void*, u32); extern "C" void update__Q33ipl5scene15FriendListCacheFUlPCwUx(void*, u32, const wchar_t*, u64); -extern "C" void setName__Q43ipl5scene11AddressEdit6StringFPCw(void*, const wchar_t*); extern "C" void setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw(void*, const wchar_t*); -extern "C" void setEMail__Q43ipl5scene11AddressEdit6StringFPCw(void*, const wchar_t*); extern "C" void set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - void*, nw4r::lyt::Pane*, const wchar_t*); + ipl::scene::AddressEdit*, nw4r::lyt::Pane*, const wchar_t*); extern "C" void setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( ipl::scene::AddressEdit*, const wchar_t*, bool); extern "C" void wiiid_utf16__Q33ipl5scene11AddressEditFUxPw(u64, wchar_t*); @@ -221,7 +212,6 @@ extern "C" void nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6ni ipl::nigaoe::Object*, void*); extern "C" void nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( ipl::nigaoe::Object*, void*); -extern "C" void update_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); extern "C" NWC24Err NWC24CheckPublicMailAddr_(const char*); extern "C" void reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(void*, int, void*); extern "C" void createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( @@ -233,1266 +223,186 @@ extern "C" void isValidId__Q33ipl5scene15FriendListCacheFRCUx(); extern "C" void isDupId__Q33ipl5scene15FriendListCacheFRCUx(); extern "C" void isDupMail__Q33ipl5scene15FriendListCacheFPCc(); extern "C" NWC24Err getErrCode__Q33ipl5scene15FriendListCacheCFv(void*); +extern "C" BOOL getConnectEnableFlag__Q33ipl3ncd10NCDSettingFv(); +extern "C" void set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( + ipl::scene::AddressEdit*, wchar_t*, u32, NWC24Err); +extern "C" void get_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); extern "C" u64 utf16_wiiid__Q33ipl5scene11AddressEditFPCw(const wchar_t*); -extern "C" void stt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_decide_anm__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_btn_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_del_msg_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_del_msg_fadeout_to_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_del_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_select_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_ipt_wait_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_ipt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_ipt_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void enableKSXFilter__Q29textinput7ManagerFb(textinput::Manager*, bool); -extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_code_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" int isDupCode__Q43ipl5scene11AddressEdit6StringCFv(void*); -extern "C" int isMyCode__Q43ipl5scene11AddressEdit6StringCFv(void*); -extern "C" void stt_add_name_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_mii_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); extern "C" void _savegpr_29(); extern "C" void _restgpr_29(); extern "C" void _savegpr_23(); -extern "C" void _savegpr_29(); extern "C" void _savegpr_27(); extern "C" void _restgpr_23(); -extern "C" void _restgpr_29(); extern "C" void _restgpr_27(); -extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(void*); -extern "C" bool getConnectEnableFlag__Q33ipl3ncd10NCDSettingFv(); -extern "C" void reserveSceneChange__Q33ipl5scene4BaseFiPv(void*, int, void*); -extern "C" void start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( - ipl::scene::AddressEdit*, const char*, ipl::controller::Interface*); -extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( - ipl::scene::AddressEdit*, const char*); -extern "C" void start_left_event__Q33ipl5scene11AddressEditFPCc( - ipl::scene::AddressEdit*, const char*); -extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( - ipl::scene::AddressEdit*, const char*, int); -extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( - ipl::scene::AddressEdit*, const char*, int); -extern "C" void start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( - ipl::scene::AddressEdit*, const char*, int); -extern "C" NWC24Err check__Q33ipl5scene15FriendListCacheFv(void*); -extern "C" void set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( - ipl::scene::AddressEdit*, wchar_t*, u32, NWC24Err); - - - - - - - - - - - - - -void ipl::scene::AddressEdit::stt_msg_code_add() { - if (System::getDialog()->getLastResult() == DialogWindow::RESULT_BUTTON) { - *reinterpret_cast(reinterpret_cast(this) + 0x64) = 0x22; - } +extern "C" void stt_add_code_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_code_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_code_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_confirm_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_confirm_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_confirm_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_mii_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_mii_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_mii_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_name_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_name_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_add_name_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_ipt_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_ipt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_ipt_wait_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_ipt_wait_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_add_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_code_invalid__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_del_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_dup_email__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_dup_wii_no__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_my_wii_no__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_net__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_no_established__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_no_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_no_mii_add__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_select_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_btn_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_del_msg_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_del_msg_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_del_msg_fadeout_to_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_delete__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_decide_anm_add__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_parental__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_parental_dst__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_parental_dst_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_wait_parental_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void enableKSXFilter__Q29textinput7ManagerFb(textinput::Manager*, bool); +extern "C" void __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( + ipl::keyboard::Manager::KeyboardSetting*, ipl::keyboard::Manager::KeyboardType, + const wchar_t*, u32, u32); +extern "C" void __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( + ipl::keyboard::Manager::KeyboardSetting* setting, + ipl::keyboard::Manager::KeyboardType type, const wchar_t* value, u32 stringLimit, + u32 rowLimit) { + setting->type = type; + setting->wcString = value; + setting->stringLimit = stringLimit; + setting->rowLimit = rowLimit; } - -void ipl::scene::AddressEdit::stt_msg_code_edit() { - if (System::getDialog()->getLastResult() == DialogWindow::RESULT_BUTTON) { - *reinterpret_cast(reinterpret_cast(this) + 0x64) = 0; - } -} - -void ipl::scene::AddressEdit::stt_msg_parental() { - if (System::getDialog()->getLastResult() == DialogWindow::RESULT_BUTTON) { - *reinterpret_cast(reinterpret_cast(this) + 0x64) = 0; - } -} - -void ipl::scene::AddressEdit::stt_msg_nwc24_error() { - if (System::getDialog()->getLastResult() == DialogWindow::RESULT_BUTTON) { - *reinterpret_cast(reinterpret_cast(this) + 0x64) = 0; - } -} - -extern "C" void stt_msg_no_established__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +extern "C" void stt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); +extern "C" void stt_msg_no_established__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { switch (ipl::System::getDialog()->getLastResult()) { case 1: reset_gui__Q33ipl5scene11AddressEditFv(self); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + self->mState = 0; break; default: break; } } -extern "C" void stt_msg_code_invalid__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +extern "C" void stt_msg_code_invalid__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + self->mState = 0x11; break; default: break; } } -extern "C" void stt_msg_dup_wii_no__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +extern "C" void stt_msg_dup_wii_no__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + self->mState = 0x11; break; default: break; } } -extern "C" void stt_msg_dup_email__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +extern "C" void stt_msg_dup_email__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + self->mState = 0x11; break; default: break; } } -extern "C" void stt_msg_my_wii_no__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +extern "C" void stt_msg_my_wii_no__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + self->mState = 0x11; break; default: break; } } -extern "C" void stt_msg_no_mii_add__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +extern "C" void stt_msg_no_mii_add__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1d; + self->mState = 0x1d; break; default: break; } } -extern "C" void stt_msg_add_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +extern "C" void stt_msg_add_rlt__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { void* button = ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + self->mState = 0x30; break; default: break; } } -extern "C" void stt_add_code_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +extern "C" void stt_add_code_normal__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { void* button = ipl::System::getScene(5); if (isActive__Q33ipl5scene6ButtonCFv(button)) { update__Q33ipl5scene6ButtonFv(button); } - if (*reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x11) { - update__Q33ipl3gui11PaneManagerFv(*reinterpret_cast(reinterpret_cast(self) + 0x7c)); + if (self->mState == 0x11) { + update__Q33ipl3gui11PaneManagerFv(self->mpInputGui); } } -extern "C" void stt_add_name_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +extern "C" void stt_add_name_normal__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { void* button = ipl::System::getScene(5); if (isActive__Q33ipl5scene6ButtonCFv(button)) { update__Q33ipl5scene6ButtonFv(button); } - if (*reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x19) { - update__Q33ipl3gui11PaneManagerFv(*reinterpret_cast(reinterpret_cast(self) + 0x7c)); - } -} - -extern "C" void stt_add_name_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - ipl::keyboard::Manager::State* state = ipl::System::getKeyboard()->getState(); - void* button = ipl::System::getScene(5); - s32 keyboardType = state->iplType; - - if (keyboardType == 3) { - goto state_disappearing; - } - if (keyboardType >= 3) { - goto state_at_or_after_disappearing; - } - if (keyboardType >= 2) { - goto done; - } - if (keyboardType >= 0) { - goto state_hidden; - } - goto done; - -state_at_or_after_disappearing: - if (keyboardType >= 5) { - goto done; - } - goto state_visible; - -state_disappearing: { - bool nameWasEmpty = *reinterpret_cast(reinterpret_cast(self) + 0x2b4) == 0; - if (state->pressOK) { - setName__Q43ipl5scene11AddressEdit6StringFPCw( - reinterpret_cast(self) + 0xb0, state->wcString); - nw4r::lyt::Pane* pane = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_8164810B, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); - } - if (*reinterpret_cast(reinterpret_cast(self) + 0x2b4) == 0) { - if (!nameWasEmpty) { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - } - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - } else { - if (nameWasEmpty) { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - } - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - } - } - } - goto done; - -state_visible: { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x19; - if (static_cast(ipl::System::getRegion()) == 6) { - enableKSXFilter__Q29textinput7ManagerFb(ipl::System::getKeyboard()->baseMgr(), false); - } - } - goto done; - -state_hidden: { - setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); - } - -done: - return; -} - - - -extern "C" void stt_add_mii_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - void* button = ipl::System::getScene(5); - if (isActive__Q33ipl5scene6ButtonCFv(button)) { - update__Q33ipl5scene6ButtonFv(button); - } - if (*reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x1d) { - update__Q33ipl3gui11PaneManagerFv(*reinterpret_cast(reinterpret_cast(self) + 0x7c)); - } -} - -extern "C" void stt_add_mii_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - ipl::scene::Base* child = self->getChild(); - if (child != NULL) { - child = self->getChild(); - s32 faceId = *reinterpret_cast(reinterpret_cast(child) + 0x23c); - if (faceId >= 0 && ipl::System::getMiiManager()->isAvalable(faceId) && - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) == 0) { - RFLAdditionalInfo additionalInfo; - RFLGetAdditionalInfo(&additionalInfo, RFLDataSource_Official, NULL, faceId); - if (!RFLiIsSameID( - reinterpret_cast(reinterpret_cast(self) + 0x4e0), - &additionalInfo.createID)) { - memcpy(reinterpret_cast(reinterpret_cast(self) + 0x4e0), - &additionalInfo.createID, sizeof(RFLCreateID)); - ipl::System::getMiiManager()->create(ipl::System::getMem2App(), 0x4c, 0x4c, faceId, - nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, - self); - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 1; - reinterpret_cast( - *reinterpret_cast(reinterpret_cast(self) + 0x7c))->init(); - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); - } - } - } - - if (self->getChild() == NULL && - *reinterpret_cast(reinterpret_cast(ipl::System::getSceneManager()) + 0x104) == 0) { - void* handler = self; - if (self != NULL) { - handler = reinterpret_cast(self) + 0x58; - } - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), handler, NULL); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1d; - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 0; - } -} - -extern "C" void stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - char* pool = lbl_81647EE0; - - if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 9)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 5)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 8)) + 0x14) != 1) { - s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x8c); - if (state == 6) { - goto state_done; - } - if (state >= 6) { - goto state_six_or_more; - } - if (state >= 5) { - goto state_five; - } - goto state_done; - - state_six_or_more: - if (state >= 8) { - goto state_done; - } - goto state_seven; - - state_five: { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - - nw4r::lyt::Pane* label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3ef, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x32)); - label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); - label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3fd, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x49)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x18; - } - goto state_done; - - state_seven: { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x10); - initAnmFrame__Q33ipl6layout8AnimatorFv(pane); - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x11); - initAnmFrame__Q33ipl6layout8AnimatorFv(pane); - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x12); - initAnmFrame__Q33ipl6layout8AnimatorFv(pane); - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1c); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - - nw4r::lyt::Pane* label = (*reinterpret_cast( - reinterpret_cast(self) + 0x68))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x21d, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x44)); - label = (*reinterpret_cast( - reinterpret_cast(self) + 0x68))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); - label = (*reinterpret_cast( - reinterpret_cast(self) + 0x68))->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0xf5, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, reinterpret_cast(reinterpret_cast(self) + 0x2cc)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x21; - } - state_done: - ; - } -} - -extern "C" void stt_select_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - ipl::scene::Base* child = self->getChild(); - if (child != NULL) { - child = self->getChild(); - s32 faceId = *reinterpret_cast(reinterpret_cast(child) + 0x23c); - if (faceId >= 0 && ipl::System::getMiiManager()->isAvalable(faceId) && - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) == 0) { - RFLAdditionalInfo additionalInfo; - RFLGetAdditionalInfo(&additionalInfo, RFLDataSource_Official, NULL, faceId); - if (!RFLiIsSameID( - reinterpret_cast(reinterpret_cast(self) + 0x4e0), - &additionalInfo.createID)) { - memcpy(reinterpret_cast(reinterpret_cast(self) + 0x4e0), - &additionalInfo.createID, sizeof(RFLCreateID)); - ipl::System::getMiiManager()->create(ipl::System::getMem2App(), 0x4c, 0x4c, faceId, - nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, - self); - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 1; - update_friendinfo__Q33ipl5scene11AddressEditFv(self); - } - } - } - - if (self->getChild() == NULL && - *reinterpret_cast(reinterpret_cast(ipl::System::getSceneManager()) + 0x104) == 0) { - void* handler = self; - if (self != NULL) { - handler = reinterpret_cast(self) + 0x58; - } - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), handler, NULL); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 0; - reinterpret_cast( - *reinterpret_cast(reinterpret_cast(self) + 0x70))->init(); - for (u32 i = 0; i < 5; i++) { - *reinterpret_cast(reinterpret_cast(self) + 0x90 + i * 4) = 0; - } - } -} - -extern "C" void stt_add_confirm_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - void* button = ipl::System::getScene(5); - if (isActive__Q33ipl5scene6ButtonCFv(button)) { - update__Q33ipl5scene6ButtonFv(button); - } - if (*reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x22) { - update__Q33ipl3gui11PaneManagerFv(*reinterpret_cast(reinterpret_cast(self) + 0x70)); - } -} - -extern "C" void stt_wait_parental__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - void* scene = ipl::System::getScene(0x1b); - if (scene != NULL) { - switch (*reinterpret_cast(reinterpret_cast(scene) + 0x70)) { - case 1: - *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x29; - break; - case 2: - case 3: - *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 0; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x29; - break; - default: - break; - } - } -} - -extern "C" void stt_wait_parental_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - void* scene = ipl::System::getScene(0x1b); - if (scene != NULL) { - switch (*reinterpret_cast(reinterpret_cast(scene) + 0x70)) { - case 1: - *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x2c; - break; - case 2: - case 3: - *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 0; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x2c; - break; - default: - break; - } - } -} - -extern "C" void stt_wait_parental_dst__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - if (self->getChild() == NULL) { - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d8) != 0) { - ipl::System::getFader()->fadeOut(); - reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(1)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; - } else { - animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xb); - void* handler = reinterpret_cast(self); - if (self != NULL) { - handler = reinterpret_cast(reinterpret_cast(self) + 0x58); - } - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), handler, NULL); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; - } - } -} - -extern "C" void stt_wait_parental_dst_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - if (self->getChild() == NULL) { - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d8) != 0) { - ipl::System::getFader()->fadeOut(); - reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(4)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; - } else { - animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xb); - void* handler = reinterpret_cast(self); - if (self != NULL) { - handler = reinterpret_cast(reinterpret_cast(self) + 0x58); - } - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), handler, NULL); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; - } - } -} - -extern "C" void stt_msg_net__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - switch (ipl::System::getDialog()->getLastResult()) { - case 2: - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; - break; - case 1: { - SCParentalControlsInfo info; - if (SCGetParentalControl(&info) && (info.enable & SC_PARENTAL_FLAG_ENABLED)) { - void* button = ipl::System::getScene(5); - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler(button, NULL, NULL); - animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xc); - createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( - self, 0x1b, self, NULL, reinterpret_cast(1)); - *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 0; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x28; - } else { - ipl::System::getFader()->fadeOut(); - reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(1)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; - } - break; - } - default: - break; - } -} - -extern "C" void stt_msg_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - switch (ipl::System::getDialog()->getLastResult()) { - case 2: - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; - break; - case 1: { - SCParentalControlsInfo info; - if (SCGetParentalControl(&info) && (info.enable & SC_PARENTAL_FLAG_ENABLED)) { - void* button = ipl::System::getScene(5); - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler(button, NULL, NULL); - animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xc); - createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( - self, 0x1b, self, NULL, reinterpret_cast(1)); - *reinterpret_cast(reinterpret_cast(self) + 0x4d8) = 0; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x2b; - } else { - ipl::System::getFader()->fadeOut(); - reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(4)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; - } - break; - } - default: - break; - } -} - -extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(void* object) { - ipl::scene::AddressEdit* self = reinterpret_cast(object); - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x70))->init(); - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x7c))->init(); - for (s32 i = 0; i < 5; i++) { - s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + i * 4); - if (*count > 0) { - void* list = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(list) + 0x28c, i + 0xb); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - *count = 0; - } - } -} - -extern "C" void add_friendinfo__Q33ipl5scene11AddressEditFv(void* object) { - ipl::scene::AddressEdit* self = reinterpret_cast(object); - NWC24FriendInfo info ALIGN32; - memset(&info, 0, sizeof(info)); - switch (*reinterpret_cast(reinterpret_cast(self) + 0x84)) { - case 1: - info.attr.type = 1; - { - const wchar_t* name = reinterpret_cast(reinterpret_cast(self) + 0x2b4); - wchar_t* destination = reinterpret_cast(info.attr.name); - wcsncpy(destination, name, 0xa); - } - info.addr.wiiId = utf16_wiiid__Q33ipl5scene11AddressEditFPCw( - reinterpret_cast(reinterpret_cast(self) + 0xb0)); - memcpy(&info.attr.fdId, reinterpret_cast(self) + 0x4e0, 8); - break; - case 2: - info.attr.type = 2; - { - const wchar_t* name = reinterpret_cast(reinterpret_cast(self) + 0x2b4); - wchar_t* destination = reinterpret_cast(info.attr.name); - wcsncpy(destination, name, 0xa); - } - { - const wchar_t* address = reinterpret_cast(reinterpret_cast(self) + 0xb0); - u8* destination = reinterpret_cast(&info.addr); - UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(destination, address, 0x100); - } - memcpy(&info.attr.fdId, reinterpret_cast(self) + 0x4e0, 8); - break; - default: - break; - } - u32 index = *reinterpret_cast(reinterpret_cast(ipl::System::getScene(0x14)) + 0xc0); - if (index >= 100) { - index = 0; - for (u32 count = 100; count != 0; count--) { - if (!*reinterpret_cast(reinterpret_cast( - *reinterpret_cast(reinterpret_cast(self) + 0x4ec)) + 0x7d00 + index)) { - break; - } - index++; - } - } - add__Q33ipl5scene15FriendListCacheFUlRC15NWC24FriendInfo( - *reinterpret_cast(reinterpret_cast(self) + 0x4ec), index, info); - if (*reinterpret_cast(reinterpret_cast(self) + 0x84) == 2) { - sendRegisterMail__Q33ipl5scene15FriendListCacheFUl( - *reinterpret_cast(reinterpret_cast(self) + 0x4ec), index); - } -} - -extern "C" void set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - void*, nw4r::lyt::Pane* pane, const wchar_t* text) { - nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast(pane); - textBox->SetString(text, 0); -} - -struct AddressEditTextBoxAccess { - void setTextBox(nw4r::lyt::Pane* pane, const wchar_t* text) { - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(this, pane, text); - } -}; - -struct AddressEditStringAccess { - void setName(const wchar_t* value) { - setName__Q43ipl5scene11AddressEdit6StringFPCw(this, value); - } - - void setWiiNo(const wchar_t* value) { - setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw(this, value); - } - - void setEMail(const wchar_t* value) { - setEMail__Q43ipl5scene11AddressEdit6StringFPCw(this, value); - } -}; - -extern "C" void update_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - memset(sFriendInfo__Q23ipl5scene + 8, 0, 0x18); - wcsncpy(reinterpret_cast(sFriendInfo__Q23ipl5scene + 8), - reinterpret_cast(reinterpret_cast(self) + 0x2b4), 0xa); - memcpy(sFriendInfo__Q23ipl5scene + 0x20, reinterpret_cast(self) + 0x4e0, 8); - update__Q33ipl5scene15FriendListCacheFUlPCwUx( - *reinterpret_cast(reinterpret_cast(self) + 0x4ec), - *reinterpret_cast(reinterpret_cast(self) + 0xa4), - reinterpret_cast(sFriendInfo__Q23ipl5scene + 8), - *reinterpret_cast(sFriendInfo__Q23ipl5scene + 0x20)); - reset_friend__Q33ipl5scene7AddressFv(ipl::System::getScene(0x14)); -} - -extern "C" void setEMail__Q43ipl5scene11AddressEdit6StringFPCw(void* self, const wchar_t* value) { - u8* bytes = reinterpret_cast(self); - bytes[0x422] = 0; - memset(self, 0, 0x204); - wcsncpy(reinterpret_cast(self), value, 0xff); - u32 length = wcslen(value); - memset(bytes + 0x21c, 0, 0x204); - if (length > 0x10) { - wcsncpy(reinterpret_cast(bytes + 0x21c), value, 0xe); - wcscpy(reinterpret_cast(bytes + 0x238), lbl_816965F0); - } else { - wcscpy(reinterpret_cast(bytes + 0x21c), value); - } - u8 addr[0x100]; - memset(addr, 0, sizeof(addr)); - UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(addr, value, 0x100); - bytes[0x420] = NWC24CheckPublicMailAddr_(reinterpret_cast(addr)) ? 0 : 1; -} - -extern "C" void get_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - u32 index = *reinterpret_cast(reinterpret_cast(self) + 0xa4); - void* friendInfo = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); - friendInfo = reinterpret_cast(friendInfo) + index * 0x140; - memcpy(sFriendInfo__Q23ipl5scene, friendInfo, 0x140); - setName__Q43ipl5scene11AddressEdit6StringFPCw( - reinterpret_cast(self) + 0xb0, - reinterpret_cast(sFriendInfo__Q23ipl5scene + 8)); - const wchar_t* name = reinterpret_cast(reinterpret_cast(self) + 0x2b4); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, - (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt() - ->GetRootPane() - ->FindPaneByName(lbl_8164810B, true), - name); - wchar_t wiiNo[0x100]; - wchar_t email[0x102]; - if (*reinterpret_cast(sFriendInfo__Q23ipl5scene) == 1) { - memset(wiiNo, 0, sizeof(wiiNo)); - wiiid_utf16__Q33ipl5scene11AddressEditFUxPw( - *reinterpret_cast(sFriendInfo__Q23ipl5scene + 0x40), wiiNo); - setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw( - reinterpret_cast(self) + 0xb0, wiiNo); - } else { - memset(email, 0, sizeof(email)); - ANSIToUTF16__Q33ipl7utility13CharacterCodeFPwPCUcl( - email, reinterpret_cast(sFriendInfo__Q23ipl5scene + 0x40), 0x102); - setEMail__Q43ipl5scene11AddressEdit6StringFPCw( - reinterpret_cast(self) + 0xb0, email); - } - const wchar_t* friendCode = reinterpret_cast(reinterpret_cast(self) + 0x2cc); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, - (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt() - ->GetRootPane() - ->FindPaneByName(lbl_81647FD5, true), - friendCode); - memcpy(reinterpret_cast(self) + 0x4e0, sFriendInfo__Q23ipl5scene + 0x20, 8); -} - -extern "C" void nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( - ipl::nigaoe::Object* object, void* callbackWork) { - ipl::scene::AddressEdit* self = reinterpret_cast(callbackWork); - ipl::nigaoe::Object** icon = reinterpret_cast(reinterpret_cast(self) + 0x4dc); - if (*icon != NULL) { - __dt__Q33ipl6nigaoe6ObjectFv(*icon, 1); - } - *icon = object; - ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); - nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_81647FC9, true); - pane->GetMaterial()->SetTexture(0, object->getIconTexture()); - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 2; - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->init( - getName__Q33ipl6nigaoe6ObjectCFv(object), 0xa); -} - -extern "C" void nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( - ipl::nigaoe::Object* object, void* callbackWork) { - ipl::scene::AddressEdit* self = reinterpret_cast(callbackWork); - ipl::nigaoe::Object** icon = reinterpret_cast(reinterpret_cast(self) + 0x4dc); - if (*icon != NULL) { - __dt__Q33ipl6nigaoe6ObjectFv(*icon, 1); - } - *icon = object; - ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x74); - nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_81647FC9, true); - pane->GetMaterial()->SetTexture(0, object->getIconTexture()); - layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); - pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_81647FC9, true); - pane->GetMaterial()->SetTexture(0, object->getIconTexture()); - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 2; - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->init( - getName__Q33ipl6nigaoe6ObjectCFv(object), 0xa); -} - -extern "C" void setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - ipl::scene::AddressEdit* self, const wchar_t* text, bool flag) { - if (!flag && (text == NULL || *text != L'\0')) { - goto set_empty_title; - } - switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { - case 0xe: - case 0x1a: - ipl::System::getKeyboard()->baseMgr()->setTitleText(ipl::System::getMessage(0x15e)); - return; - case 0x12: - ipl::System::getKeyboard()->baseMgr()->setTitleText(ipl::System::getMessage(0x15d)); - break; - } - return; - -set_empty_title: - ipl::System::getKeyboard()->baseMgr()->setTitleText(lbl_816965E8); -} - - - -void ipl::scene::AddressEditEvent::onEvent(u32 componentId, u32 event, void* data) { - s32 signedEvent = static_cast(event); - ::gui::Manager* manager = mpManager; - ::gui::PaneComponent* component = - static_cast< ::gui::PaneComponent*>(manager->getComponent(componentId)); - const char* paneName = component->getPane()->GetName(); - - if (signedEvent == 1) goto point_event; - if (signedEvent >= 1) goto left_check; - if (signedEvent >= 0) goto trig_event; - goto done; - -left_check: - if (signedEvent >= 3) goto done; - goto left_event; - -point_event: - if (data != NULL) { - start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( - mpParent, paneName, static_cast(data)); - } - goto done; - -left_event: - start_left_event__Q33ipl5scene11AddressEditFPCc( - mpParent, paneName); - goto done; - -trig_event: - if (data != NULL && - static_cast(data)->downTrg(0x100800)) { - start_trig_event__Q33ipl5scene11AddressEditFPCc( - mpParent, paneName); - } - -done: - ; -} -void ipl::scene::AddressInputEvent::onEvent(u32 componentId, u32 event, void* data) { - s32 signedEvent = static_cast(event); - ::gui::Manager* manager = mpManager; - ::gui::PaneComponent* component = - static_cast< ::gui::PaneComponent*>(manager->getComponent(componentId)); - const char* paneName = component->getPane()->GetName(); - - if (signedEvent == 1) goto point_event; - if (signedEvent >= 1) goto left_check; - if (signedEvent >= 0) goto trig_event; - goto done; - -left_check: - if (signedEvent >= 3) goto done; - goto left_event; - -trig_event: { - ipl::controller::Interface* controller = - static_cast(data); - if (controller == NULL || !controller->downTrg(0x100800)) goto done; - int channel = controller->getChannel(); - start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( - mpParent, paneName, channel); - goto done; -} - -point_event: { - if (data == NULL) goto done; - int channel = static_cast(data)->getChannel(); - start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( - mpParent, paneName, channel); - goto done; -} - -left_event: { - if (data == NULL) goto done; - int channel = static_cast(data)->getChannel(); - start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( - mpParent, paneName, channel); -} - -done: - ; -} -extern "C" void stt_wait_delete__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - void* button = ipl::System::getScene(5); - switch (ipl::System::getDialog()->getLastResult()) { - case 2: { - delete_friendinfo__Q33ipl5scene11AddressEditFv(self); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1d); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 6; - break; - } - case 1: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1d); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 5; - break; - } - default: - break; - } -} - -extern "C" void stt_add_confirm_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - void* list = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(list) + 0x28c, 0x1e); - if (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1) { - void* button = ipl::System::getScene(5); - switch (*reinterpret_cast(reinterpret_cast(self) + 0x8c)) { - case 5: { - void* paneList = *reinterpret_cast(reinterpret_cast(self) + 0x74); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(paneList) + 0x28c, 0); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1c; - break; - } - case 7: - add_friendinfo__Q33ipl5scene11AddressEditFv(self); - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x29); - reset_friend__Q33ipl5scene7AddressFv(ipl::System::getScene(0x14)); - callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x4a, 0x2e); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x26; - break; - default: - break; - } - } -} - -extern "C" void stt_wait_del_msg_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1d)) + 0x14) != 1) { - s32 index = *reinterpret_cast(reinterpret_cast(self) + 0xa4); - u32 type = *reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x4ec) + index * 0x140 + 4); - void* pane; - if (type == 2) { - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x10); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - } else { - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x1a); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - } - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x11); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x68)) + 0x28c, 0x12); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 2; - } -} - -extern "C" void stt_msg_no_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - switch (ipl::System::getDialog()->getLastResult()) { - case 1: { - void* manager = *reinterpret_cast(reinterpret_cast(self) + 0x70); - reinterpret_cast(manager)->init(); - for (u32 i = 0; i < 5; i++) { - *reinterpret_cast(reinterpret_cast(self) + 0x90 + i * 4) = 0; - } - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; - break; - } - default: - break; - } -} - -extern "C" void stt_wait_decide_anm_add__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - s32 complete = 1; - for (s32 i = 0; i < 5; i++) { - u16 index = (u16)(*reinterpret_cast(reinterpret_cast(self) + 0x88) + 6); - void* list = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(list) + 0x28c, index); - u32 state = *reinterpret_cast(reinterpret_cast(pane) + 0x14); - complete = (complete & (state - 1 > 0)) != 0; - } - if (complete != 0) { - switch (*reinterpret_cast(reinterpret_cast(self) + 0x88)) { - case 4: - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x70))->init(); - ipl::System::getDialog()->callBtn1( - reinterpret_cast(reinterpret_cast(self) + 0xb0)->getDispCodeLong(), 0x2e); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x25; - break; - default: - break; - } - } -} - -extern "C" void stt_add_confirm_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - void* paneList = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(paneList) + 0x28c, 0); - if (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1) { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x22; - } -} - -extern "C" void stt_add_name_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2)) + 0x14) != 1) { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x19; - } -} - -extern "C" void stt_add_mii_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 4)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 0)) + 0x14) != 1) { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1d; - } -} - -extern "C" void stt_add_code_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 0)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 4)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2)) + 0x14) != 1) { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; - } -} - -extern "C" void stt_ipt_wait_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 5)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 8)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 9)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x80)) + 0x28c, 1)) + 0x14) != 1) { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; - } -} - -extern "C" asm void __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( - void*, ipl::keyboard::Manager::KeyboardType, const wchar_t*, u32, u32) { - nofralloc - stw r4, 0(r3) - stw r5, 4(r3) - stw r6, 8(r3) - stw r7, 0xc(r3) - blr -} - -extern "C" void stt_wait_decide_anm__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - char* pool = lbl_81647EE0; - s32 complete = 1; - void* button = ipl::System::getScene(5); - for (s32 i = 0; i < 5; i++) { - u16 index = (u16)(*reinterpret_cast(reinterpret_cast(self) + 0x88) + 6); - void* list = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(reinterpret_cast(list) + 0x28c, index); - u32 state = *reinterpret_cast(reinterpret_cast(pane) + 0x14); - complete = (complete & (state - 1 > 0)) != 0; - } - if (complete == 0) { - return; - } - u8* bytes = reinterpret_cast(self); - s32 state = *reinterpret_cast(bytes + 0x88); - switch (state) { - case 2: { - u32 index = *reinterpret_cast(bytes + 0xa4); - u8* friendInfo = reinterpret_cast(*reinterpret_cast(bytes + 0x4ec)) + index * 0x140; - ipl::layout::Animator* animator; - if (*reinterpret_cast(friendInfo + 4) == 2) { - animator = (*reinterpret_cast(bytes + 0x68))->getAnim(0x15); - animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - } else { - animator = (*reinterpret_cast(bytes + 0x68))->getAnim(0x1b); - animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - } - animator = (*reinterpret_cast(bytes + 0x68))->getAnim(0x16); - animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - animator = (*reinterpret_cast(bytes + 0x68))->getAnim(0x17); - animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - *reinterpret_cast(bytes + 0x64) = 3; - reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); - break; - } - case 1: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - ipl::layout::Animator* animator = - (*reinterpret_cast(bytes + 0x74))->getAnim(0); - animator->initFrame(); - u32 one = 1; - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = one; - animator = (*reinterpret_cast(bytes + 0x74))->getAnim(1); - animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = one; - animator = (*reinterpret_cast(bytes + 0x74))->getAnim(2); - animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = one; - animator = (*reinterpret_cast(bytes + 0x74))->getAnim(3); - animator->initAnmFrame(); - animator = (*reinterpret_cast(bytes + 0x80))->getAnim(0); - animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = one; - nw4r::lyt::Pane* textPane = (*reinterpret_cast(bytes + 0x74)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3ef, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, textPane, ipl::System::getMessage(0x32)); - textPane = (*reinterpret_cast(bytes + 0x74)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, textPane, reinterpret_cast(bytes + 0x2b4)); - textPane = (*reinterpret_cast(bytes + 0x74)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3fd, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, textPane, ipl::System::getMessage(0x49)); - reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); - *reinterpret_cast(bytes + 0x64) = 0xc; - break; - } - case 3: { - if (*reinterpret_cast(bytes + 0x4e8) != 1) { - *reinterpret_cast(bytes + 0x4e8) = 0; - if (RFLGetAvailableOfficialDataNum() != 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( - self, 0x1c, self, 0, reinterpret_cast(1)); - *reinterpret_cast(bytes + 0x64) = 0xb; - } else { - ipl::System::getDialog()->callBtn1(0x17c, 0x2e); - *reinterpret_cast(bytes + 0x64) = 0xa; - } - reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); - } - break; - } - case 0: { - SCParentalControlsInfo parentalInfo; - BOOL parentalResult = SCGetParentalControl(&parentalInfo); - if (!getConnectEnableFlag__Q33ipl3ncd10NCDSettingFv()) { - animation__Q33ipl5scene6ButtonFi(button, 0x1d); - ipl::System::getDialog()->callBtn2(0x144, 0x146, 0x25, false); - *reinterpret_cast(bytes + 0x64) = 0x27; - } else if ((SCGetWCFlags() & 1) == 0) { - animation__Q33ipl5scene6ButtonFi(button, 0x1d); - ipl::System::getDialog()->callBtn2(0x17e, 0x146, 0x25, false); - *reinterpret_cast(bytes + 0x64) = 0x2a; - } else if (parentalResult != 0 && (parentalInfo.enable & 0x80) != 0 && - (SCGetNetContentRestrictions() & 2) != 0) { - animation__Q33ipl5scene6ButtonFi(button, 0x1d); - ipl::System::getDialog()->callBtn1(0x14c, 0x2e); - *reinterpret_cast(bytes + 0x64) = 0x2d; - } else { - if (check__Q33ipl5scene15FriendListCacheFv( - *reinterpret_cast(bytes + 0x4ec)) == NWC24_ERR_NETWORK || - *reinterpret_cast(reinterpret_cast( - *reinterpret_cast(bytes + 0x4ec)) + 0x9d74) == NWC24_ERR_SERVER || - *reinterpret_cast(reinterpret_cast( - *reinterpret_cast(bytes + 0x4ec)) + 0x9d74) == NWC24_ERR_FULL) { - wchar_t errorMessage[0x400]; - wchar_t* errorMessagePointer = errorMessage - 1; - for (s32 i = 0; i < 0x200; i++) { - errorMessagePointer[1] = 0; - errorMessagePointer += 2; - *errorMessagePointer = 0; - } - set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( - self, errorMessage, 0x400, - *reinterpret_cast(reinterpret_cast( - *reinterpret_cast(bytes + 0x4ec)) + 0x9d74)); - ipl::System::getDialog()->callBtn1(errorMessage, 0x2e); - animation__Q33ipl5scene6ButtonFi(button, 0x1d); - *reinterpret_cast(bytes + 0x64) = 0x2e; - } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x27); - reserveText__Q33ipl5scene6ButtonFiUl(button, 0, 0x4f); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - reserveSceneChange__Q33ipl5scene4BaseFiPv(self, 0xb, reinterpret_cast(1)); - ipl::layout::Animator* animator = - (*reinterpret_cast(bytes + 0x68))->getAnim(0x1e); - animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - *reinterpret_cast(bytes + 0x64) = 0x30; - } - } - reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); - break; - } - case 4: { - ipl::DialogWindow* dialog = ipl::System::getDialog(); - const wchar_t* code = reinterpret_cast(bytes + 0xb0)->getDispCodeLong(); - dialog->callBtn1(code, 0x2e); - reinterpret_cast(*reinterpret_cast(bytes + 0xa8))->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); - *reinterpret_cast(bytes + 0x64) = 9; - break; - } - default: - *reinterpret_cast(bytes + 0x64) = 0; - break; + if (self->mState == 0x19) { + update__Q33ipl3gui11PaneManagerFv(self->mpInputGui); } } const wchar_t* ipl::scene::AddressEdit::String::getDispCodeLong() const { - if (reinterpret_cast(this)[0x422] == 0) { + if (!mbHasWiiNo) { return; } - return reinterpret_cast(reinterpret_cast(this) + 0x21c); + return mDisplayText; } extern "C" asm const wchar_t* getName__Q33ipl6nigaoe6ObjectCFv(void*) { @@ -1523,12 +433,30 @@ extern "C" asm void getInputForm__Q29textinput7ManagerFv() { } void ipl::scene::AddressEdit::String::clear() { - memset(this, 0, 0x204); - memset(reinterpret_cast(this) + 0x204, 0, 0x18); - memset(reinterpret_cast(this) + 0x21c, 0, 0x204); - reinterpret_cast(this)[0x420] = 0; - reinterpret_cast(this)[0x421] = 0; - reinterpret_cast(this)[0x422] = 0; + memset(mValue, 0, sizeof(mValue)); + memset(mName, 0, sizeof(mName)); + memset(mDisplayText, 0, sizeof(mDisplayText)); + mbValidMail = false; + mbNameNotEmpty = false; + mbHasWiiNo = false; +} + +void ipl::scene::AddressEdit::String::setEMail(const wchar_t* value) { + mbHasWiiNo = false; + memset(mValue, 0, sizeof(mValue)); + wcsncpy(mValue, value, 0xff); + u32 length = wcslen(value); + memset(mDisplayText, 0, sizeof(mDisplayText)); + if (length > 0x10) { + wcsncpy(mDisplayText, value, 0xe); + wcscpy(mDisplayText + 0xe, L"..."); + } else { + wcscpy(mDisplayText, value); + } + u8 address[0x100]; + memset(address, 0, sizeof(address)); + UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(address, value, sizeof(address)); + mbValidMail = !NWC24CheckPublicMailAddr_(reinterpret_cast(address)); } extern "C" asm void setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw(void*, const wchar_t*) { @@ -1683,255 +611,223 @@ isMyCode_L2: blr } -extern "C" asm void prepare__Q33ipl5scene11AddressEditFv() { - nofralloc - stwu r1, -0x10(r1) - mflr r0 - lis r4, smArg__Q23ipl6System@ha - lis r5, lbl_81647EE0@ha - stw r0, 0x14(r1) - addi r4, r4, smArg__Q23ipl6System@l - addi r5, r5, lbl_81647EE0@l - li r6, 0 - stw r31, 0xc(r1) - mr r31, r3 - lwz r3, 0x6c(r4) - lwz r4, 0x24(r31) - bl readLayoutAsync__Q33ipl4nand7ManagerFPQ23EGG4HeapPCcb - stw r3, 0xac(r31) - lwz r31, 0xc(r1) - lwz r0, 0x14(r1) - mtlr r0 - addi r1, r1, 0x10 - blr +void ipl::scene::AddressEdit::prepare() { + mpBalloonFile = ipl::System::getNandManager()->readLayoutAsync( + getSceneHeap(), "balloon.ash", false); } extern "C" void create__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - const char* pool = reinterpret_cast(&s_addressEditDataPool); - const char* const* paneNames; + ipl::layout::Object* bLayout; - ipl::scene::SceneObj* board = ipl::System::getScene(4); - ipl::nand::LayoutFile* boardFile = *reinterpret_cast( - reinterpret_cast(board) + 0xd20); + ipl::scene::Board* board = static_cast(ipl::System::getScene(4)); + ipl::nand::LayoutFile* boardFile = board->getLayoutFile(); bLayout = reinterpret_cast(__nw__FUl(0x580)); if (bLayout != NULL) { bLayout = __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( - bLayout, *reinterpret_cast(reinterpret_cast(self) + 0x24), - boardFile, lbl_816965E4, pool + 0x72); + bLayout, self->getHeap(), boardFile, "arc", "th_Adress_b.brlyt"); } - bLayout->bindToGroup(pool + 0x84, pool + 0xa0, false, true); - bLayout->bindToGroup(pool + 0xaf, pool + 0xc8, false, true); - bLayout->bindToGroup(pool + 0xaf, pool + 0xd3, false, false); - bLayout->bindToGroup(pool + 0xaf, pool + 0xde, false, false); - bLayout->bindToGroup(pool + 0xaf, pool + 0xe9, false, false); - bLayout->bind(pool + 0xaf, pool + 0xf5, false, false); - bLayout->bindToGroup(pool + 0x103, pool + 0xc8, false, false); - bLayout->bindToGroup(pool + 0x103, pool + 0xd3, false, false); - bLayout->bindToGroup(pool + 0x103, pool + 0xde, false, false); - bLayout->bindToGroup(pool + 0x103, pool + 0xe9, false, false); - bLayout->bind(pool + 0x103, pool + 0xf5, false, false); - bLayout->bindToGroup(pool + 0x11d, pool + 0xc8, false, false); - bLayout->bindToGroup(pool + 0x11d, pool + 0xd3, false, true); - bLayout->bindToGroup(pool + 0x11d, pool + 0xde, false, true); - bLayout->bindToGroup(pool + 0x11d, pool + 0xe9, false, true); - bLayout->bind(pool + 0x11d, pool + 0xf5, false, true); - bLayout->bindToGroup(pool + 0x137, pool + 0xc8, false, false); - bLayout->bindToGroup(pool + 0x137, pool + 0xd3, false, false); - bLayout->bindToGroup(pool + 0x137, pool + 0xde, false, false); - bLayout->bindToGroup(pool + 0x137, pool + 0xe9, false, false); - bLayout->bind(pool + 0x137, pool + 0xf5, false, false); - bLayout->bindToGroup(pool + 0x154, pool + 0xc8, false, true); - bLayout->bindToGroup(pool + 0x154, pool + 0xd3, false, true); - bLayout->bindToGroup(pool + 0x154, pool + 0xde, false, true); - bLayout->bindToGroup(pool + 0x154, pool + 0xe9, false, true); - bLayout->bind(pool + 0x154, pool + 0xf5, false, true); - bLayout->bindToGroup(pool + 0x137, pool + 0x172, false, true); - bLayout->bindToGroup(pool + 0x154, pool + 0x172, false, false); - bLayout->bindToGroup(pool + 0x17e, pool + 0x1a0, false, true); - bLayout->bindToGroup(pool + 0x1a9, pool + 0x1a0, false, false); - bLayout->bindToGroup(pool + 0x1cc, pool + 0xa0, false, false); + bLayout->bindToGroup("th_Adress_b_card_strt.brlan", "card_strt_fnsh", false, true); + bLayout->bindToGroup("th_Adress_b_btn_in.brlan", "crd_btn_00", false, true); + bLayout->bindToGroup("th_Adress_b_btn_in.brlan", "crd_btn_10", false, false); + bLayout->bindToGroup("th_Adress_b_btn_in.brlan", "crd_btn_11", false, false); + bLayout->bindToGroup("th_Adress_b_btn_in.brlan", "mii_icon_00", false, false); + bLayout->bind("th_Adress_b_btn_in.brlan", "T_frnd_crd_00", false, false); + bLayout->bindToGroup("th_Adress_b_btn_psh.brlan", "crd_btn_00", false, false); + bLayout->bindToGroup("th_Adress_b_btn_psh.brlan", "crd_btn_10", false, false); + bLayout->bindToGroup("th_Adress_b_btn_psh.brlan", "crd_btn_11", false, false); + bLayout->bindToGroup("th_Adress_b_btn_psh.brlan", "mii_icon_00", false, false); + bLayout->bind("th_Adress_b_btn_psh.brlan", "T_frnd_crd_00", false, false); + bLayout->bindToGroup("th_Adress_b_btn_out.brlan", "crd_btn_00", false, false); + bLayout->bindToGroup("th_Adress_b_btn_out.brlan", "crd_btn_10", false, true); + bLayout->bindToGroup("th_Adress_b_btn_out.brlan", "crd_btn_11", false, true); + bLayout->bindToGroup("th_Adress_b_btn_out.brlan", "mii_icon_00", false, true); + bLayout->bind("th_Adress_b_btn_out.brlan", "T_frnd_crd_00", false, true); + bLayout->bindToGroup("th_Adress_b_btn_scl_in.brlan", "crd_btn_00", false, false); + bLayout->bindToGroup("th_Adress_b_btn_scl_in.brlan", "crd_btn_10", false, false); + bLayout->bindToGroup("th_Adress_b_btn_scl_in.brlan", "crd_btn_11", false, false); + bLayout->bindToGroup("th_Adress_b_btn_scl_in.brlan", "mii_icon_00", false, false); + bLayout->bind("th_Adress_b_btn_scl_in.brlan", "T_frnd_crd_00", false, false); + bLayout->bindToGroup("th_Adress_b_btn_scl_out.brlan", "crd_btn_00", false, true); + bLayout->bindToGroup("th_Adress_b_btn_scl_out.brlan", "crd_btn_10", false, true); + bLayout->bindToGroup("th_Adress_b_btn_scl_out.brlan", "crd_btn_11", false, true); + bLayout->bindToGroup("th_Adress_b_btn_scl_out.brlan", "mii_icon_00", false, true); + bLayout->bind("th_Adress_b_btn_scl_out.brlan", "T_frnd_crd_00", false, true); + bLayout->bindToGroup("th_Adress_b_btn_scl_in.brlan", "crd_btn_gry", false, true); + bLayout->bindToGroup("th_Adress_b_btn_scl_out.brlan", "crd_btn_gry", false, false); + bLayout->bindToGroup("th_Adress_b_card_msg_alp_in.brlan", "card_msg", false, true); + bLayout->bindToGroup("th_Adress_b_card_msg_alp_out.brlan", "card_msg", false, false); + bLayout->bindToGroup("th_Adress_b_card_fnsh.brlan", "card_strt_fnsh", false, false); bLayout->finishBinding(); - u32* editEvent = reinterpret_cast(__nw__FUl(0x10)); + ipl::scene::AddressEditEvent* editEvent = static_cast(__nw__FUl(sizeof(ipl::scene::AddressEditEvent))); if (editEvent != NULL) { - editEvent[2] = 0; - editEvent[0] = reinterpret_cast(__vt__Q33ipl5scene16AddressEditEvent); - editEvent[3] = reinterpret_cast(self); + new (editEvent) ipl::scene::AddressEditEvent(self); } void* editManagerMemory = __nw__FUl(0x34); ipl::gui::PaneManager* editManager = reinterpret_cast(editManagerMemory); if (editManagerMemory != NULL) { editManager = __ct__Q33ipl3gui11PaneManagerFPQ23gui12EventHandlerPCQ34nw4r3lyt8DrawInfoPQ23EGG4HeapPQ23EGG9Allocatorb( - editManagerMemory, reinterpret_cast(editEvent), bLayout->getDrawInfo(), NULL, NULL, + editManagerMemory, static_cast(editEvent), bLayout->getDrawInfo(), NULL, NULL, false); } editManager->setupScene(bLayout); editManager->setAllComponentTriggerTarget(false); - paneNames = reinterpret_cast(pool + 0x44); for (s32 i = 0; i < 5; i++) { - const char* paneName = paneNames[i]; + const char* paneName = sButtonPaneNames[i]; nw4r::lyt::Pane* pane = bLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); editManager->setTriggerTarget(pane, true); } - *reinterpret_cast(reinterpret_cast(self) + 0x68) = bLayout; - *reinterpret_cast(reinterpret_cast(self) + 0x6c) = editEvent; - *reinterpret_cast(reinterpret_cast(self) + 0x70) = editManager; + self->mpCodeLayout = bLayout; + self->mpEditEvent = editEvent; + self->mpEditGui = editManager; - nw4r::lyt::Pane* textPane = bLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x1e8, true); + nw4r::lyt::Pane* textPane = bLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2a)); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x1f5, true); + textPane = (self->mpCodeLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_10", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2b)); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x202, true); + textPane = (self->mpCodeLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_11", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2f)); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x20f, true); + textPane = (self->mpCodeLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_gry", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2a)); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x21d, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, lbl_816965E8); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, lbl_816965E8); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0xf5, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, lbl_816965E8); + textPane = (self->mpCodeLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, L""); + textPane = (self->mpCodeLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, L""); + textPane = (self->mpCodeLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, L""); ipl::layout::Object* cLayout = reinterpret_cast(__nw__FUl(0x580)); if (cLayout != NULL) { cLayout = __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( - cLayout, *reinterpret_cast(reinterpret_cast(self) + 0x24), - boardFile, lbl_816965E4, pool + 0x235); + cLayout, self->getHeap(), boardFile, "arc", "th_Adress_c.brlyt"); } - cLayout->bindToGroup(pool + 0x247, pool + 0x263, false, true); - cLayout->bindToGroup(pool + 0x274, pool + 0x296, false, true); - cLayout->bindToGroup(pool + 0x2a4, pool + 0x2c2, false, true); - cLayout->bindToGroup(pool + 0x2cc, pool + 0x2e9, false, true); - cLayout->bindToGroup(pool + 0x2f2, lbl_816965EA, false, true); - cLayout->bindToGroup(pool + 0x30f, pool + 0x296, false, false); - cLayout->bindToGroup(pool + 0x332, pool + 0x2c2, false, false); - cLayout->bindToGroup(pool + 0x351, pool + 0x2e9, false, false); - cLayout->bindToGroup(pool + 0x36f, lbl_816965EA, false, false); - cLayout->bindToGroup(pool + 0x38d, pool + 0x263, false, false); + cLayout->bindToGroup("th_Adress_c_card_strt.brlan", "G_card_strt_fnsh", false, true); + cLayout->bindToGroup("th_Adress_c_question_alp_in.brlan", "G_question_00", false, true); + cLayout->bindToGroup("th_Adress_c_name_alp_in.brlan", "G_name_00", false, true); + cLayout->bindToGroup("th_Adress_c_msg_alp_in.brlan", "G_msg_00", false, true); + cLayout->bindToGroup("th_Adress_c_mii_alp_in.brlan", "G_mii", false, true); + cLayout->bindToGroup("th_Adress_c_question_alp_out.brlan", "G_question_00", false, false); + cLayout->bindToGroup("th_Adress_c_name_alp_out.brlan", "G_name_00", false, false); + cLayout->bindToGroup("th_Adress_c_msg_alp_out.brlan", "G_msg_00", false, false); + cLayout->bindToGroup("th_Adress_c_mii_alp_out.brlan", "G_mii", false, false); + cLayout->bindToGroup("th_Adress_c_card_fnsh.brlan", "G_card_strt_fnsh", false, false); cLayout->finishBinding(); - u32* inputEvent = reinterpret_cast(__nw__FUl(0x10)); + ipl::scene::AddressInputEvent* inputEvent = static_cast(__nw__FUl(sizeof(ipl::scene::AddressInputEvent))); if (inputEvent != NULL) { - inputEvent[2] = 0; - inputEvent[0] = reinterpret_cast(__vt__Q33ipl5scene17AddressInputEvent); - inputEvent[3] = reinterpret_cast(self); + new (inputEvent) ipl::scene::AddressInputEvent(self); } void* inputManagerMemory = __nw__FUl(0x34); ipl::gui::PaneManager* inputManager = reinterpret_cast(inputManagerMemory); if (inputManagerMemory != NULL) { inputManager = __ct__Q33ipl3gui11PaneManagerFPQ23gui12EventHandlerPCQ34nw4r3lyt8DrawInfoPQ23EGG4HeapPQ23EGG9Allocatorb( - inputManagerMemory, reinterpret_cast(inputEvent), cLayout->getDrawInfo(), NULL, NULL, + inputManagerMemory, static_cast(inputEvent), cLayout->getDrawInfo(), NULL, NULL, false); } inputManager->setupScene(cLayout); inputManager->setAllComponentTriggerTarget(false); - textPane = cLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_816965E0, true); + textPane = cLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(sInputPaneName, true); inputManager->setTriggerTarget(textPane, true); - *reinterpret_cast(reinterpret_cast(self) + 0x74) = cLayout; - *reinterpret_cast(reinterpret_cast(self) + 0x78) = inputEvent; - *reinterpret_cast(reinterpret_cast(self) + 0x7c) = inputManager; + self->mpNameLayout = cLayout; + self->mpInputEvent = inputEvent; + self->mpInputGui = inputManager; ipl::layout::Object* background = reinterpret_cast(__nw__FUl(0x580)); if (background != NULL) { background = __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( - background, *reinterpret_cast(reinterpret_cast(self) + 0x24), - boardFile, lbl_816965E4, pool + 0x3a9); + background, self->getHeap(), boardFile, "arc", "my_Back_a.brlyt"); } - *reinterpret_cast(reinterpret_cast(self) + 0x80) = background; - background->bind(pool + 0x3b9, pool + 0x3cf, false, true); - (*reinterpret_cast(reinterpret_cast(self) + 0x80)) - ->bind(pool + 0x3da, pool + 0x3cf, false, false); - (*reinterpret_cast(reinterpret_cast(self) + 0x80))->finishBinding(); - (*reinterpret_cast(reinterpret_cast(self) + 0x80)) + self->mpBackgroundLayout = background; + background->bind("my_Back_a_Apear.brlan", "Picture_00", false, true); + (self->mpBackgroundLayout) + ->bind("my_Back_a_Lost.brlan", "Picture_00", false, false); + (self->mpBackgroundLayout)->finishBinding(); + (self->mpBackgroundLayout) ->getAnim(0)->initAnmFrame(); - reinterpret_cast(reinterpret_cast(self) + 0xb0)->clear(); - memset(sFriendInfo__Q23ipl5scene, 0, 0x140); - *reinterpret_cast(reinterpret_cast(self) + 0x4dc) = 0; - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 0; + self->mString.clear(); + memset(&sFriendInfo__Q23ipl5scene, 0, sizeof(sFriendInfo__Q23ipl5scene)); + self->mpNigaoe = 0; + self->mNigaoeState = 0; ipl::scene::SceneObj* addressScene = ipl::System::getScene(0x14); - *reinterpret_cast(reinterpret_cast(self) + 0x4ec) = - *reinterpret_cast(reinterpret_cast(addressScene) + 0x274); + ipl::scene::Address* address = static_cast(addressScene); + self->mpFriendCache = address->getFriendCache(); - s32 mode = *reinterpret_cast(reinterpret_cast(self) + 0x84); + s32 mode = self->mMode; ipl::layout::Animator* animator; - wchar_t* friendText; switch (mode) { case 0: { - *reinterpret_cast(reinterpret_cast(self) + 0xa4) = - *reinterpret_cast(reinterpret_cast(addressScene) + 0xc0); + self->mSelectedFriend = address->getChosenFriendIndex(); get_friendinfo__Q33ipl5scene11AddressEditFv(self); - u32 friendIndex = *reinterpret_cast(reinterpret_cast(self) + 0xa4); - u8* friendInfo = reinterpret_cast( - *reinterpret_cast(reinterpret_cast(self) + 0x4ec)) + friendIndex * 0x140; - if (*reinterpret_cast(friendInfo + 4) == 2) { - (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x15)->initAnmFrame(); - (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x1a)->initAnmFrame(); + u32 friendIndex = self->mSelectedFriend; + if (self->mpFriendCache->getInfo(friendIndex).attr.status == 2) { + (self->mpCodeLayout)->getAnim(0x15)->initAnmFrame(); + (self->mpCodeLayout)->getAnim(0x1a)->initAnmFrame(); } else { - (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x10)->initAnmFrame(); - (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x1b)->initAnmFrame(); + (self->mpCodeLayout)->getAnim(0x10)->initAnmFrame(); + (self->mpCodeLayout)->getAnim(0x1b)->initAnmFrame(); } - animator = (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0); + animator = (self->mpCodeLayout)->getAnim(0); animator->initFrame(); - friendText = reinterpret_cast(reinterpret_cast(self) + 0x2b4); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x22b, true); + const wchar_t* friendText = self->mString.mName; + animator->restart(); + textPane = (self->mpCodeLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, friendText); - friendText = reinterpret_cast(reinterpret_cast(friendText) + 0x18); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x68)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0xf5, true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, friendText); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0; + textPane = (self->mpCodeLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, textPane, self->mString.mDisplayText); + self->mState = 0; break; } case 1: { - animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(0); + animator = (self->mpNameLayout)->getAnim(0); animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(1); + animator->restart(); + animator = (self->mpNameLayout)->getAnim(1); animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(3); + animator->restart(); + animator = (self->mpNameLayout)->getAnim(3); animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x1a)->initAnmFrame(); - (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x10)->initAnmFrame(); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x74)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3ef, true); + animator->restart(); + (self->mpCodeLayout)->getAnim(0x1a)->initAnmFrame(); + (self->mpCodeLayout)->getAnim(0x10)->initAnmFrame(); + textPane = (self->mpNameLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_question_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x31)); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x74)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3fd, true); + textPane = (self->mpNameLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x47)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x10; + self->mState = 0x10; break; } case 2: { - animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(0); + animator = (self->mpNameLayout)->getAnim(0); animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(1); + animator->restart(); + animator = (self->mpNameLayout)->getAnim(1); animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - animator = (*reinterpret_cast(reinterpret_cast(self) + 0x74))->getAnim(3); + animator->restart(); + animator = (self->mpNameLayout)->getAnim(3); animator->initFrame(); - *reinterpret_cast(reinterpret_cast(animator) + 0x14) = 1; - (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x1a)->initAnmFrame(); - (*reinterpret_cast(reinterpret_cast(self) + 0x68))->getAnim(0x10)->initAnmFrame(); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x74)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3ef, true); + animator->restart(); + (self->mpCodeLayout)->getAnim(0x1a)->initAnmFrame(); + (self->mpCodeLayout)->getAnim(0x10)->initAnmFrame(); + textPane = (self->mpNameLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_question_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x3f)); - textPane = (*reinterpret_cast(reinterpret_cast(self) + 0x74)) - ->getNW4RLyt()->GetRootPane()->FindPaneByName(pool + 0x3fd, true); + textPane = (self->mpNameLayout) + ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x48)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x10; + self->mState = 0x10; break; } default: @@ -1941,11 +837,11 @@ extern "C" void create__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* sel create_mode_done: s16 miiIndex[2]; - if (RFLSearchOfficialData(reinterpret_cast(reinterpret_cast(self) + 0x4e0), + if (RFLSearchOfficialData(&self->mCreateID, reinterpret_cast(miiIndex))) { ipl::System::getMiiManager()->create(ipl::System::getMem2App(), 0x4c, 0x4c, miiIndex[0], nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, self); - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 1; + self->mNigaoeState = 1; } ipl::System::getKeyboard()->init(); @@ -1954,15 +850,771 @@ create_mode_done: if (balloon != NULL) { f32 balloonWidth = 30.0f; f32 balloonHeight = 120.0f; - EGG::Heap* heap = *reinterpret_cast(reinterpret_cast(self) + 0x24); + EGG::Heap* heap = self->getHeap(); ipl::math::VEC3 position; ipl::math::VEC3* positionPtr = __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); balloon = __ct__Q33ipl5scene11TextBalloonFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCcRCQ33ipl4math4VEC3ff( balloon, heap, - *reinterpret_cast(reinterpret_cast(self) + 0xac), - lbl_816965E4, pool + 0x406, *positionPtr, balloonHeight, balloonWidth); + self->mpBalloonFile, + "arc", "my_IplTopBalloon_a.brlyt", *positionPtr, balloonHeight, balloonWidth); } - *reinterpret_cast(reinterpret_cast(self) + 0xa8) = balloon; + self->mpBalloon = balloon; +} + +extern "C" void stt_wait_decide_anm__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + bool complete = true; + void* button = ipl::System::getScene(5); + for (s32 i = 0; i < 5; ++i) { + u16 index = static_cast(self->mSelectedButton + 6); + complete = complete && !self->mpCodeLayout->getAnim(index)->isPlaying(); + } + if (!complete) { + return; + } + + switch (self->mSelectedButton) { + case 2: { + u32 friendIndex = self->mSelectedFriend; + ipl::layout::Animator* animator; + if (self->mpFriendCache->getInfo(friendIndex).attr.status == 2) { + animator = self->mpCodeLayout->getAnim(0x15); + } else { + animator = self->mpCodeLayout->getAnim(0x1b); + } + animator->initFrame(); + animator->restart(); + animator = self->mpCodeLayout->getAnim(0x16); + animator->initFrame(); + animator->restart(); + animator = self->mpCodeLayout->getAnim(0x17); + animator->initFrame(); + animator->restart(); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + self->mState = 3; + self->mpBalloon->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + break; + } + case 1: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + ipl::layout::Animator* animator = self->mpNameLayout->getAnim(0); + animator->initFrame(); + animator->restart(); + animator = self->mpNameLayout->getAnim(1); + animator->initFrame(); + animator->restart(); + animator = self->mpNameLayout->getAnim(2); + animator->initFrame(); + animator->restart(); + self->mpNameLayout->getAnim(3)->initAnmFrame(); + animator = self->mpBackgroundLayout->getAnim(0); + animator->initFrame(); + animator->restart(); + nw4r::lyt::Pane* textPane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( + "T_question_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, textPane, ipl::System::getMessage(0x32)); + textPane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, textPane, self->mString.mName); + textPane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, textPane, ipl::System::getMessage(0x49)); + self->mpBalloon->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + self->mState = 0xc; + break; + } + case 3: { + if (self->mNigaoeState != 1) { + self->mNigaoeState = 0; + if (RFLGetAvailableOfficialDataNum() != 0) { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( + self, 0x1c, self, 0, reinterpret_cast(1)); + self->mState = 0xb; + } else { + ipl::System::getDialog()->callBtn1(0x17c, 0x2e); + self->mState = 0xa; + } + self->mpBalloon->fadeoutForce(); + } + break; + } + case 0: { + SCParentalControlsInfo parentalInfo; + BOOL parentalResult = SCGetParentalControl(&parentalInfo); + if (!getConnectEnableFlag__Q33ipl3ncd10NCDSettingFv()) { + animation__Q33ipl5scene6ButtonFi(button, 0x1d); + ipl::System::getDialog()->callBtn2(0x144, 0x146, 0x25, false); + self->mState = 0x27; + } else if ((SCGetWCFlags() & 1) == 0) { + animation__Q33ipl5scene6ButtonFi(button, 0x1d); + ipl::System::getDialog()->callBtn2(0x17e, 0x146, 0x25, false); + self->mState = 0x2a; + } else if (parentalResult != 0 && (parentalInfo.enable & 0x80) != 0 && + (SCGetNetContentRestrictions() & 2) != 0) { + animation__Q33ipl5scene6ButtonFi(button, 0x1d); + ipl::System::getDialog()->callBtn1(0x14c, 0x2e); + self->mState = 0x2d; + } else { + s32 friendError = self->mpFriendCache->check(); + if (friendError == NWC24_ERR_NETWORK || + self->mpFriendCache->getLastErr() == NWC24_ERR_SERVER || + self->mpFriendCache->getLastErr() == NWC24_ERR_FULL) { + wchar_t errorMessage[0x400]; + wchar_t* errorMessagePointer = errorMessage - 1; + for (s32 i = 0; i < 0x200; i++) { + errorMessagePointer[1] = 0; + errorMessagePointer += 2; + *errorMessagePointer = 0; + } + set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( + self, errorMessage, 0x400, + static_cast(self->mpFriendCache->getLastErr())); + ipl::System::getDialog()->callBtn1(errorMessage, 0x2e); + animation__Q33ipl5scene6ButtonFi(button, 0x1d); + self->mState = 0x2e; + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x27); + reserveText__Q33ipl5scene6ButtonFiUl(button, 0, 0x4f); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + self->requestSceneChange(0xb, reinterpret_cast(1)); + ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(0x1e); + animator->initFrame(); + animator->restart(); + self->mState = 0x30; + } + } + self->mpBalloon->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + break; + } + case 4: { + ipl::System::getDialog()->callBtn1(self->mString.getDispCodeLong(), 0x2e); + self->mpBalloon->fadeoutForce(); + reset_gui__Q33ipl5scene11AddressEditFv(self); + self->mState = 9; + break; + } + default: + self->mState = 0; + break; + } +} + +extern "C" void stt_wait_delete__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + void* button = ipl::System::getScene(5); + switch (ipl::System::getDialog()->getLastResult()) { + case 2: { + delete_friendinfo__Q33ipl5scene11AddressEditFv(self); + ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(0x1d); + animator->initFrame(); + animator->restart(); + self->mState = 6; + break; + } + case 1: { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(0x1d); + animator->initFrame(); + animator->restart(); + self->mState = 5; + break; + } + default: + break; + } +} + +extern "C" void stt_add_confirm_fadein__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (!self->mpCodeLayout->getAnim(0)->isPlaying()) { + self->mState = 0x22; + } +} + +extern "C" void stt_add_name_fadein__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (!self->mpNameLayout->getAnim(1)->isPlaying() && + !self->mpNameLayout->getAnim(3)->isPlaying() && + !self->mpNameLayout->getAnim(2)->isPlaying()) { + self->mState = 0x19; + } +} + +extern "C" void stt_add_mii_fadein__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (!self->mpNameLayout->getAnim(1)->isPlaying() && + !self->mpNameLayout->getAnim(4)->isPlaying() && + !self->mpNameLayout->getAnim(0)->isPlaying()) { + self->mState = 0x1d; + } +} + +extern "C" void stt_add_code_fadein__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (!self->mpNameLayout->getAnim(0)->isPlaying() && + !self->mpNameLayout->getAnim(1)->isPlaying() && + !self->mpNameLayout->getAnim(3)->isPlaying() && + !self->mpNameLayout->getAnim(4)->isPlaying() && + !self->mpNameLayout->getAnim(2)->isPlaying()) { + self->mState = 0x11; + } +} + +extern "C" void stt_add_name_input__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + ipl::keyboard::Manager::State* state = ipl::System::getKeyboard()->getState(); + void* button = ipl::System::getScene(5); + s32 keyboardType = state->iplType; + if (keyboardType == 3) { + goto state_disappearing; + } + if (keyboardType >= 3) { + goto state_at_or_after_disappearing; + } + if (keyboardType >= 2) { + goto done; + } + if (keyboardType >= 0) { + goto state_hidden; + } + goto done; + +state_at_or_after_disappearing: + if (keyboardType >= 5) { + goto done; + } + goto state_visible; + +state_disappearing: { + bool nameWasEmpty = self->mString.mName[0] == 0; + if (state->pressOK) { + self->mString.setName(state->wcString); + nw4r::lyt::Pane* pane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( + "T_name_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, self->mString.mName); + } + if (self->mString.mName[0] == 0) { + if (!nameWasEmpty) { + ipl::layout::Animator* animator = self->mpNameLayout->getAnim(6); + animator->initFrame(); + animator->restart(); + animator = self->mpNameLayout->getAnim(3); + animator->initFrame(); + animator->restart(); + } + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + } else { + if (nameWasEmpty) { + ipl::layout::Animator* animator = self->mpNameLayout->getAnim(2); + animator->initFrame(); + animator->restart(); + animator = self->mpNameLayout->getAnim(7); + animator->initFrame(); + animator->restart(); + } + if (self->mString.mbNameNotEmpty) { + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + } else { + reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + } + } + } + goto done; + +state_visible: { + self->mState = 0x19; + if (static_cast(ipl::System::getRegion()) == 6) { + enableKSXFilter__Q29textinput7ManagerFb( + ipl::System::getKeyboard()->baseMgr(), false); + } + } + goto done; + +state_hidden: + setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + self, NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); + +done: + return; +} + +extern "C" void stt_add_mii_normal__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + void* button = ipl::System::getScene(5); + if (isActive__Q33ipl5scene6ButtonCFv(button)) { + update__Q33ipl5scene6ButtonFv(button); + } + if (self->mState == 0x1d) { + update__Q33ipl3gui11PaneManagerFv(self->mpInputGui); + } +} + +extern "C" void stt_add_mii_input__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + ipl::scene::Base* child = self->getChild(); + if (child != NULL) { + ipl::scene::FaceSelect* faceSelect = static_cast(child); + s32 faceId = faceSelect->getSelectedFaceId(); + if (faceId >= 0 && ipl::System::getMiiManager()->isAvalable(faceId) && + self->mNigaoeState == 0) { + RFLAdditionalInfo additionalInfo; + RFLGetAdditionalInfo(&additionalInfo, RFLDataSource_Official, NULL, faceId); + if (!RFLiIsSameID(&self->mCreateID, &additionalInfo.createID)) { + self->mCreateID = additionalInfo.createID; + ipl::System::getMiiManager()->create(ipl::System::getMem2App(), 0x4c, 0x4c, faceId, + nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, + self); + self->mNigaoeState = 1; + self->mpInputGui->init(); + self->mpBalloon->fadeoutForce(); + } + } + } + + if (self->getChild() == NULL && + ipl::System::getSceneManager()->getReservedScene() == NULL) { + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), static_cast(self), NULL); + self->mState = 0x1d; + self->mNigaoeState = 0; + } +} + +extern "C" void stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (self->mpNameLayout->getAnim(9)->isPlaying() || + self->mpNameLayout->getAnim(5)->isPlaying() || + self->mpNameLayout->getAnim(8)->isPlaying()) { + return; + } + + if (self->mSubState == 5) { + ipl::layout::Animator* animator = self->mpNameLayout->getAnim(1); + animator->initFrame(); + animator->restart(); + animator = self->mpNameLayout->getAnim(2); + animator->initFrame(); + animator->restart(); + + nw4r::lyt::Pane* pane = + self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_question_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, ipl::System::getMessage(0x32)); + pane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, self->mString.mName); + pane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, ipl::System::getMessage(0x49)); + self->mState = 0x18; + return; + } + + if (self->mSubState == 7) { + ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(0); + animator->initFrame(); + animator->restart(); + self->mpCodeLayout->getAnim(0x10)->initAnmFrame(); + self->mpCodeLayout->getAnim(0x11)->initAnmFrame(); + self->mpCodeLayout->getAnim(0x12)->initAnmFrame(); + animator = self->mpCodeLayout->getAnim(0x1c); + animator->initFrame(); + animator->restart(); + + nw4r::lyt::Pane* pane = + self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, ipl::System::getMessage(0x44)); + pane = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, self->mString.mName); + pane = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, pane, self->mString.mDisplayText); + self->mState = 0x21; + } +} + +extern "C" void stt_ipt_wait_fadeout__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (!self->mpNameLayout->getAnim(5)->isPlaying() && + !self->mpNameLayout->getAnim(7)->isPlaying() && + !self->mpNameLayout->getAnim(6)->isPlaying() && + !self->mpNameLayout->getAnim(8)->isPlaying() && + !self->mpNameLayout->getAnim(9)->isPlaying() && + !self->mpBackgroundLayout->getAnim(1)->isPlaying()) { + self->mState = 0; + } +} + +extern "C" void stt_wait_del_msg_fadeout__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (!self->mpCodeLayout->getAnim(0x1d)->isPlaying()) { + u32 friendIndex = self->mSelectedFriend; + u32 status = self->mpFriendCache->getInfo(friendIndex).attr.status; + ipl::layout::Animator* animator; + if (status == 2) { + animator = self->mpCodeLayout->getAnim(0x10); + } else { + animator = self->mpCodeLayout->getAnim(0x1a); + } + animator->initFrame(); + animator->restart(); + animator = self->mpCodeLayout->getAnim(0x11); + animator->initFrame(); + animator->restart(); + animator = self->mpCodeLayout->getAnim(0x12); + animator->initFrame(); + animator->restart(); + self->mState = 2; + } +} + +extern "C" void stt_msg_no_mii__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + switch (ipl::System::getDialog()->getLastResult()) { + case 1: + self->mpEditGui->init(); + for (u32 i = 0; i < 5; ++i) { + self->mPointCount[i] = 0; + } + self->mState = 0; + break; + default: + break; + } +} + +extern "C" void stt_add_confirm_fadeout__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (!self->mpCodeLayout->getAnim(0x1e)->isPlaying()) { + void* button = ipl::System::getScene(5); + switch (self->mSubState) { + case 5: { + ipl::layout::Animator* animator = self->mpNameLayout->getAnim(0); + animator->initFrame(); + animator->restart(); + self->mState = 0x1c; + break; + } + case 7: + add_friendinfo__Q33ipl5scene11AddressEditFv(self); + reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x29); + reset_friend__Q33ipl5scene7AddressFv(ipl::System::getScene(0x14)); + callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x4a, 0x2e); + self->mState = 0x26; + break; + default: + break; + } + } +} + +extern "C" void stt_wait_decide_anm_add__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + bool complete = true; + for (s32 i = 0; i < 5; ++i) { + u16 index = static_cast(self->mSelectedButton + 6); + complete = (complete & !self->mpCodeLayout->getAnim(index)->isPlaying()) != 0; + } + if (complete) { + switch (self->mSelectedButton) { + case 4: + self->mpEditGui->init(); + ipl::System::getDialog()->callBtn1(self->mString.getDispCodeLong(), 0x2e); + self->mState = 0x25; + break; + default: + break; + } + } +} + +extern "C" void stt_add_confirm_normal__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + void* button = ipl::System::getScene(5); + if (isActive__Q33ipl5scene6ButtonCFv(button)) { + update__Q33ipl5scene6ButtonFv(button); + } + if (self->mState == 0x22) { + self->mpEditGui->update(); + } +} + +extern "C" void stt_wait_parental__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + ipl::scene::ParentalDialog* parental = + static_cast(ipl::System::getScene(0x1b)); + if (parental != NULL) { + switch (parental->getResult()) { + case 1: + self->mbParentalOK = true; + self->mState = 0x29; + break; + case 2: + case 3: + self->mbParentalOK = false; + self->mState = 0x29; + break; + default: + break; + } + } +} + +extern "C" void stt_wait_parental_wc__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + ipl::scene::ParentalDialog* parental = + static_cast(ipl::System::getScene(0x1b)); + if (parental != NULL) { + switch (parental->getResult()) { + case 1: + self->mbParentalOK = true; + self->mState = 0x2c; + break; + case 2: + case 3: + self->mbParentalOK = false; + self->mState = 0x2c; + break; + default: + break; + } + } +} + +extern "C" void stt_wait_parental_dst__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (self->getChild() == NULL) { + if (self->mbParentalOK) { + ipl::System::getFader()->fadeOut(); + reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(1)); + self->mState = 0x30; + } else { + animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xb); + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), static_cast(self), NULL); + self->mState = 0; + } + } +} + +extern "C" void stt_wait_parental_dst_wc__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (self->getChild() == NULL) { + if (self->mbParentalOK) { + ipl::System::getFader()->fadeOut(); + reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(4)); + self->mState = 0x30; + } else { + animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xb); + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), static_cast(self), NULL); + self->mState = 0; + } + } +} + +extern "C" void stt_msg_net__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + switch (ipl::System::getDialog()->getLastResult()) { + case 2: + self->mState = 0; + break; + case 1: { + SCParentalControlsInfo info; + if (SCGetParentalControl(&info) && (info.enable & SC_PARENTAL_FLAG_ENABLED)) { + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), NULL, NULL); + animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xc); + createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( + self, 0x1b, self, NULL, reinterpret_cast(1)); + self->mbParentalOK = false; + self->mState = 0x28; + } else { + ipl::System::getFader()->fadeOut(); + reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(1)); + self->mState = 0x30; + } + break; + } + default: + break; + } +} + +extern "C" void stt_msg_wc__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + switch (ipl::System::getDialog()->getLastResult()) { + case 2: + self->mState = 0; + break; + case 1: { + SCParentalControlsInfo info; + if (SCGetParentalControl(&info) && (info.enable & SC_PARENTAL_FLAG_ENABLED)) { + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), NULL, NULL); + animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xc); + createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( + self, 0x1b, self, NULL, reinterpret_cast(1)); + self->mbParentalOK = false; + self->mState = 0x2b; + } else { + ipl::System::getFader()->fadeOut(); + reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(4)); + self->mState = 0x30; + } + break; + } + default: + break; + } +} + +extern "C" void stt_select_mii__Q33ipl5scene11AddressEditFv( + ipl::scene::AddressEdit* self) { + if (self->getChild() != NULL) { + ipl::scene::FaceSelect* faceSelect = + static_cast(self->getChild()); + s32 faceId = faceSelect->getSelectedFaceId(); + if (faceId >= 0 && ipl::System::getMiiManager()->isAvalable(faceId) && + self->mNigaoeState == 0) { + RFLAdditionalInfo info; + RFLGetAdditionalInfo(&info, RFLDataSource_Official, NULL, faceId); + if (!RFLiIsSameID(&self->mCreateID, &info.createID)) { + memcpy(&self->mCreateID, &info.createID, sizeof(self->mCreateID)); + ipl::System::getMiiManager()->create( + ipl::System::getMem2App(), 0x4c, 0x4c, faceId, + nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, + self); + self->mNigaoeState = 1; + self->update_friendinfo(); + } + } + } + + if (self->getChild() == NULL && ipl::System::getReservedScene() == NULL) { + setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( + ipl::System::getScene(5), static_cast(self), NULL); + self->mState = 0; + self->mNigaoeState = 0; + self->mpEditGui->init(); + for (u32 i = 0; i < 5; ++i) { + self->mPointCount[i] = 0; + } + } +} + +extern "C" void set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + ipl::scene::AddressEdit*, nw4r::lyt::Pane* pane, const wchar_t* text) { + nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast(pane); + textBox->SetString(text, 0); +} + +extern "C" void setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( + ipl::scene::AddressEdit* self, const wchar_t* text, bool flag) { + if (!flag && (text == NULL || *text != L'\0')) { + goto set_empty_title; + } + switch (self->mState) { + case 0xe: + case 0x1a: + ipl::System::getKeyboard()->baseMgr()->setTitleText(ipl::System::getMessage(0x15e)); + return; + case 0x12: + ipl::System::getKeyboard()->baseMgr()->setTitleText(ipl::System::getMessage(0x15d)); + break; + } + return; + +set_empty_title: + ipl::System::getKeyboard()->baseMgr()->setTitleText(L""); +} + +void ipl::scene::AddressEditEvent::onEvent(u32 componentId, u32 event, void* data) { + s32 signedEvent = static_cast(event); + ::gui::Manager* manager = mpManager; + ::gui::PaneComponent* component = + static_cast< ::gui::PaneComponent*>(manager->getComponent(componentId)); + const char* paneName = component->getPane()->GetName(); + + if (signedEvent == 1) { + if (data != NULL) { + start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( + mpParent, paneName, static_cast(data)); + } + } else if (signedEvent >= 1) { + if (signedEvent < 3) { + start_left_event__Q33ipl5scene11AddressEditFPCc(mpParent, paneName); + } + } else if (signedEvent >= 0 && data != NULL && + static_cast(data)->downTrg(0x100800)) { + start_trig_event__Q33ipl5scene11AddressEditFPCc(mpParent, paneName); + } +} + +void ipl::scene::AddressInputEvent::onEvent(u32 componentId, u32 event, void* data) { + s32 signedEvent = static_cast(event); + ::gui::Manager* manager = mpManager; + ::gui::PaneComponent* component = + static_cast< ::gui::PaneComponent*>(manager->getComponent(componentId)); + const char* paneName = component->getPane()->GetName(); + ipl::controller::Interface* controller = static_cast(data); + + if (signedEvent == 1) { + if (controller != NULL) { + start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( + mpParent, paneName, controller->getChannel()); + } + } else if (signedEvent >= 1) { + if (signedEvent < 3 && controller != NULL) { + start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( + mpParent, paneName, controller->getChannel()); + } + } else if (signedEvent >= 0 && controller != NULL && controller->downTrg(0x100800)) { + start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( + mpParent, paneName, controller->getChannel()); + } +} + +extern "C" void nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( + ipl::nigaoe::Object* object, void* callbackWork) { + ipl::scene::AddressEdit* self = static_cast(callbackWork); + if (self->mpNigaoe != NULL) { + __dt__Q33ipl6nigaoe6ObjectFv(self->mpNigaoe, 1); + } + self->mpNigaoe = object; + nw4r::lyt::Pane* pane = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( + "mii_icon_00", true); + pane->GetMaterial()->SetTexture(0, object->getIconTexture()); + self->mNigaoeState = 2; + self->mpBalloon->init(getName__Q33ipl6nigaoe6ObjectCFv(object), 0xa); +} + +extern "C" void nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( + ipl::nigaoe::Object* object, void* callbackWork) { + ipl::scene::AddressEdit* self = static_cast(callbackWork); + if (self->mpNigaoe != NULL) { + __dt__Q33ipl6nigaoe6ObjectFv(self->mpNigaoe, 1); + } + self->mpNigaoe = object; + nw4r::lyt::Pane* pane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( + "mii_icon_00", true); + pane->GetMaterial()->SetTexture(0, object->getIconTexture()); + pane = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("mii_icon_00", true); + pane->GetMaterial()->SetTexture(0, object->getIconTexture()); + self->mNigaoeState = 2; + self->mpBalloon->init(getName__Q33ipl6nigaoe6ObjectCFv(object), 0xa); } extern "C" asm void calcFadein__Q33ipl5scene11AddressEditFv() { @@ -2027,7 +1679,7 @@ initCalcNormal_L1: extern "C" ipl::scene::FaderSceneCommand calcNormal__Q33ipl5scene11AddressEditFv( ipl::scene::AddressEdit* self) { - switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + switch (self->mState) { case 0: stt_normal__Q33ipl5scene11AddressEditFv(self); break; @@ -2174,7 +1826,7 @@ extern "C" ipl::scene::FaderSceneCommand calcNormal__Q33ipl5scene11AddressEditFv break; } - switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + switch (self->mState) { case 0: case 3: case 9: @@ -2189,27 +1841,22 @@ extern "C" ipl::scene::FaderSceneCommand calcNormal__Q33ipl5scene11AddressEditFv case 45: case 46: case 47: - calc__Q33ipl5scene11TextBalloonFv(*reinterpret_cast(reinterpret_cast(self) + 0xa8)); + calc__Q33ipl5scene11TextBalloonFv(self->mpBalloon); break; } - return *reinterpret_cast(reinterpret_cast(self) + 0x64) == 0x30 + return self->mState == 0x30 ? ipl::scene::FADER_SCN_NEXT : ipl::scene::FADER_SCN_CONTINUE; } extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - char* pool = lbl_81647EE0; - if (*reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 5)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6)) + 0x14) != 1 && - *reinterpret_cast(reinterpret_cast(List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 9)) + 0x14) != 1) { - s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x8c); + if (!self->mpNameLayout->getAnim(5)->isPlaying() && + !self->mpNameLayout->getAnim(7)->isPlaying() && + !self->mpNameLayout->getAnim(6)->isPlaying() && + !self->mpNameLayout->getAnim(9)->isPlaying()) { + s32 state = self->mSubState; if (state == 6) { goto state_done; } @@ -2228,16 +1875,14 @@ extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::Ad goto state_seven; state_five: { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Animator* pane = self->mpNameLayout->getAnim(1); + pane->initFrame(); + pane->restart(); + pane = self->mpNameLayout->getAnim(2); + pane->initFrame(); + pane->restart(); - s32 inputType = *reinterpret_cast(reinterpret_cast(self) + 0x84); + s32 inputType = self->mMode; switch (inputType) { case 2: goto address_type_two; @@ -2248,64 +1893,55 @@ extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::Ad } address_type_one: { - nw4r::lyt::Pane* label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( - pool + 0x3ef, true); + nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + "T_question_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( self, label, ipl::System::getMessage(0x31)); - label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( - pool + 0x3fd, true); + label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + "T_msg_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( self, label, ipl::System::getMessage(0x47)); } goto address_type_common; address_type_two: { - nw4r::lyt::Pane* label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( - pool + 0x3ef, true); + nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + "T_question_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( self, label, ipl::System::getMessage(0x3f)); - label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( - pool + 0x3fd, true); + label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + "T_msg_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( self, label, ipl::System::getMessage(0x48)); } address_type_common: { - nw4r::lyt::Pane* label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( - pool + 0x22b, true); + nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + "T_name_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, reinterpret_cast(reinterpret_cast(self) + 0x2cc)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x10; + self, label, self->mString.mDisplayText); + self->mState = 0x10; } goto state_done; } state_seven: { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 4); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Animator* pane = self->mpNameLayout->getAnim(1); + pane->initFrame(); + pane->restart(); + pane = self->mpNameLayout->getAnim(4); + pane->initFrame(); + pane->restart(); - nw4r::lyt::Pane* label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( - pool + 0x3ef, true); + nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + "T_question_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( self, label, ipl::System::getMessage(0x55)); - label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( + label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_mii_msg_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( self, label, ipl::System::getMessage(0x8b)); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1c; + self->mState = 0x1c; } state_done: ; @@ -2502,17 +2138,16 @@ wiiid_utf16_L1: blr } -extern "C" void setName__Q43ipl5scene11AddressEdit6StringFPCw(void* self, const wchar_t* value) { - wchar_t* name = reinterpret_cast(reinterpret_cast(self) + 0x204); - wcsncpy(name, value, 0xa); +void ipl::scene::AddressEdit::String::setName(const wchar_t* value) { + wcsncpy(mName, value, 0xa); u32 length = wcslen(value); - reinterpret_cast(self)[0x421] = 0; + mbNameNotEmpty = false; for (u32 i = 0; i < length; i++) { if (value[i] == 0) { break; } if (value[i] != L' ' && value[i] != 0x3000) { - reinterpret_cast(self)[0x421] = 1; + mbNameNotEmpty = true; break; } } @@ -2673,39 +2308,26 @@ stt_wait_btn_fadein_L3: } extern "C" void stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - u8* bytes = reinterpret_cast(self); - u32 index = *reinterpret_cast(bytes + 0xa4); - u8* friendInfo = *reinterpret_cast(bytes + 0x4ec) + index * 0x140; - u32 friendType = *reinterpret_cast(friendInfo + 4); + u32 index = self->mSelectedFriend; + u32 friendType = self->mpFriendCache->getInfo(index).attr.status; u32 friendFinished; if (friendType == 2) { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x15); - friendFinished = *reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1; + friendFinished = !self->mpCodeLayout->getAnim(0x15)->isPlaying(); } else { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x1b); - friendFinished = *reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1; + friendFinished = !self->mpCodeLayout->getAnim(0x1b)->isPlaying(); } - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x16); - u32 finished = (friendFinished & (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1)) != 0; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x17); - finished = (finished & (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1)) != 0; + bool finished = friendFinished && !self->mpCodeLayout->getAnim(0x16)->isPlaying(); + finished = finished && !self->mpCodeLayout->getAnim(0x17)->isPlaying(); - if (finished != 0) { - ipl::layout::Object* layoutObject = *reinterpret_cast(bytes + 0x68); - nw4r::lyt::Pane* label = layoutObject->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_816480FD, true); + if (finished) { + nw4r::lyt::Pane* label = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); const wchar_t* message = ipl::System::getMessage(0x30); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, label, message); ipl::System::getDialog()->callS2Btn2(0x142, 0x141, true); - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(bytes + 0x68)) + 0x28c, 0x1c); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - *reinterpret_cast(bytes + 0x64) = 4; + self->mpCodeLayout->getAnim(0x1c)->initFrame(); + self->mpCodeLayout->getAnim(0x1c)->restart(); + self->mState = 4; } } @@ -2889,40 +2511,35 @@ state_at_or_after_disappearing: goto state_hidden_after_disappear; state_disappearing: { - bool nameWasEmpty = *reinterpret_cast(reinterpret_cast(self) + 0x2b4) == 0; + bool nameWasEmpty = self->mString.mName[0] == 0; if (state->pressOK) { - setName__Q43ipl5scene11AddressEdit6StringFPCw( - reinterpret_cast(self) + 0xb0, state->wcString); + self->mString.setName(state->wcString); ipl::layout::Object* layout = - *reinterpret_cast(reinterpret_cast(self) + 0x74); - nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_8164810B, true); + self->mpNameLayout; + nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); + self, pane, self->mString.mName); } - if (*reinterpret_cast(reinterpret_cast(self) + 0x2b4) == 0) { + if (self->mString.mName[0] == 0) { if (!nameWasEmpty) { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Animator* pane = self->mpNameLayout->getAnim(6); + pane->initFrame(); + pane->restart(); + pane = self->mpNameLayout->getAnim(3); + pane->initFrame(); + pane->restart(); } reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); } else { if (nameWasEmpty) { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Animator* pane = self->mpNameLayout->getAnim(2); + pane->initFrame(); + pane->restart(); + pane = self->mpNameLayout->getAnim(7); + pane->initFrame(); + pane->restart(); } - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + if (self->mString.mbNameNotEmpty != 0) { reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); } else { @@ -2933,7 +2550,7 @@ state_disappearing: { goto done; state_hidden_after_disappear: { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0xd; + self->mState = 0xd; if (static_cast(ipl::System::getRegion()) == 6) { enableKSXFilter__Q29textinput7ManagerFb(ipl::System::getKeyboard()->baseMgr(), false); } @@ -2954,47 +2571,40 @@ extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::Addr void* button = ipl::System::getScene(5); switch (state->iplType) { case ipl::keyboard::Manager::STATE_DISAPPEARING: { - bool codeWasEmpty = *reinterpret_cast(reinterpret_cast(self) + 0xb0) == 0; - u8* code = reinterpret_cast(self) + 0xb0; + bool codeWasEmpty = self->mString.mValue[0] == 0; if (state->pressOK) { - if (*reinterpret_cast(reinterpret_cast(self) + 0x84) == 1) { + if (self->mMode == 1) { setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw( - code, state->wcString); + &self->mString, state->wcString); } else { - setEMail__Q43ipl5scene11AddressEdit6StringFPCw( - code, state->wcString); + self->mString.setEMail(state->wcString); } - nw4r::lyt::Pane* label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName(lbl_8164810B, true); + nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, reinterpret_cast(reinterpret_cast(self) + 0x2cc)); + self, label, self->mString.mDisplayText); } - if (*reinterpret_cast(reinterpret_cast(self) + 0xb0) == 0) { + if (self->mString.mValue[0] == 0) { if (!codeWasEmpty) { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Animator* pane = self->mpNameLayout->getAnim(6); + pane->initFrame(); + pane->restart(); + pane = self->mpNameLayout->getAnim(3); + pane->initFrame(); + pane->restart(); } reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); } else { if (codeWasEmpty) { - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 7); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Animator* pane = self->mpNameLayout->getAnim(2); + pane->initFrame(); + pane->restart(); + pane = self->mpNameLayout->getAnim(7); + pane->initFrame(); + pane->restart(); } - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) != 0 && - isDupCode__Q43ipl5scene11AddressEdit6StringCFv(code) == 0 && - isMyCode__Q43ipl5scene11AddressEdit6StringCFv(code) == 0) { + if (self->mString.mbValidMail != 0 && + isDupCode__Q43ipl5scene11AddressEdit6StringCFv(&self->mString) == 0 && + isMyCode__Q43ipl5scene11AddressEdit6StringCFv(&self->mString) == 0) { reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); } else { @@ -3005,42 +2615,42 @@ extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::Addr } case ipl::keyboard::Manager::STATE_HIDDEN_AFTER_DISAPPEAR: if (state->pressOK) { - if (*reinterpret_cast(reinterpret_cast(self) + 0xb0) != 0) { - if (*reinterpret_cast(reinterpret_cast(self) + 0x84) == 1) { + if (self->mString.mValue[0] != 0) { + if (self->mMode == 1) { if (isMyCode__Q43ipl5scene11AddressEdit6StringCFv( - reinterpret_cast(self) + 0xb0) != 0) { + &self->mString) != 0) { callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x56, 0x2e); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x16; + self->mState = 0x16; } else if (isDupCode__Q43ipl5scene11AddressEdit6StringCFv( - reinterpret_cast(self) + 0xb0) != 0) { + &self->mString) != 0) { callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x52, 0x2e); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x14; - } else if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) == 0) { + self->mState = 0x14; + } else if (self->mString.mbValidMail == 0) { callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x54, 0x2e); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x13; + self->mState = 0x13; } else { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + self->mState = 0x11; } } else if (isDupCode__Q43ipl5scene11AddressEdit6StringCFv( - reinterpret_cast(self) + 0xb0) != 0) { + &self->mString) != 0) { callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x53, 0x2e); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x15; - } else if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) == 0) { + self->mState = 0x15; + } else if (self->mString.mbValidMail == 0) { callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x1be, 0x2e); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x13; + self->mState = 0x13; } else { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + self->mState = 0x11; } } else { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + self->mState = 0x11; } } else { - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x11; + self->mState = 0x11; } break; case ipl::keyboard::Manager::STATE_HIDDEN: case ipl::keyboard::Manager::STATE_APPEARING: - if (*reinterpret_cast(reinterpret_cast(self) + 0x84) != 1) { + if (self->mMode != 1) { setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( self, NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); } @@ -3051,46 +2661,37 @@ extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::Addr } extern "C" void stt_add_code_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x74); - const u8* poolBase = reinterpret_cast(&s_addressEditDataPool); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(layout) + 0x28c, 5); - if (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1) { - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 6); - if (*reinterpret_cast(reinterpret_cast(pane) + 0x14) != 1) { - nw4r::lyt::Pane* label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( - reinterpret_cast(poolBase + 0x3ef), true); + ipl::layout::Object* layout = self->mpNameLayout; + ipl::layout::Animator* pane = layout->getAnim(5); + if (!pane->isPlaying()) { + pane = self->mpNameLayout->getAnim(6); + if (!pane->isPlaying()) { + nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + reinterpret_cast("T_question_00"), true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( self, label, ipl::System::getMessage(0x32)); - label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( - reinterpret_cast(poolBase + 0x3fd), true); + label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + reinterpret_cast("T_msg_00"), true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( self, label, ipl::System::getMessage(0x49)); - label = (*reinterpret_cast( - reinterpret_cast(self) + 0x74))->getNW4RLyt()->GetRootPane()->FindPaneByName( - reinterpret_cast(poolBase + 0x22b), true); + label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + reinterpret_cast("T_name_00"), true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, reinterpret_cast(reinterpret_cast(self) + 0x2b4)); - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 1); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - if (*reinterpret_cast(reinterpret_cast(self) + 0x2b4) != 0) { - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 2); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + self, label, self->mString.mName); + pane = self->mpNameLayout->getAnim(1); + pane->initFrame(); + pane->restart(); + if (self->mString.mName[0] != 0) { + pane = self->mpNameLayout->getAnim(2); + pane->initFrame(); + pane->restart(); } else { - pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast(reinterpret_cast(self) + 0x74)) + 0x28c, 3); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + pane = self->mpNameLayout->getAnim(3); + pane->initFrame(); + pane->restart(); } ipl::System::getKeyboard()->init(); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x18; + self->mState = 0x18; } } } @@ -3232,7 +2833,7 @@ static ChkHostNameError CheckHostName(const char* hostName, u32 hostNameLength) extern "C" void start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( ipl::scene::AddressEdit* self, const char* paneName, ipl::controller::Interface* controller) { int buttonNo = get_button_no__Q33ipl5scene11AddressEditFPCc(self, paneName); - s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x64); + s32 state = self->mState; switch (state) { case 0: @@ -3257,19 +2858,17 @@ state0: } state0Button0: { - u32 friendIndex = *reinterpret_cast(reinterpret_cast(self) + 0xa4); - u8* friendList = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); - u32 friendType = *reinterpret_cast(friendList + friendIndex * 0x140 + 4); + u32 friendIndex = self->mSelectedFriend; + u32 friendType = self->mpFriendCache->getInfo(friendIndex).attr.status; if (friendType != 2) { goto done; } - s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + s32* count = &self->mPointCount[buttonNo]; if (*count == 0) { - void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(layout) + 0x28c, buttonNo + 1); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Animator* pane = layout->getAnim(buttonNo + 1); + pane->initFrame(); + pane->restart(); ipl::snd::getSystem()->startSE( "WIPL_SE_BT_TARGETTING"); controller->rumble(1); @@ -3279,9 +2878,9 @@ state0Button0: { } state0Button3: { - s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + s32* count = &self->mPointCount[buttonNo]; if (*count == 0) { - ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + ipl::layout::Object* layout = self->mpCodeLayout; nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); ipl::math::VEC3 position; __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); @@ -3291,20 +2890,19 @@ state0Button3: { f32 scale = 0.5f; position.x = position.x + xOffset; position.y = position.y + scale * height; - (*reinterpret_cast(reinterpret_cast(self) + 0xa8)) + (self->mpBalloon) ->setPos(position, false, 1); - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadein(); + (self->mpBalloon)->fadein(); } } state0Common: { - s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + s32* count = &self->mPointCount[buttonNo]; if (*count == 0) { - void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(layout) + 0x28c, buttonNo + 1); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Animator* pane = layout->getAnim(buttonNo + 1); + pane->initFrame(); + pane->restart(); ipl::snd::getSystem()->startSE( "WIPL_SE_BT_TARGETTING"); controller->rumble(1); @@ -3322,9 +2920,9 @@ state22: } state22Button3: { - s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + s32* count = &self->mPointCount[buttonNo]; if (*count == 0) { - ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); + ipl::layout::Object* layout = self->mpCodeLayout; nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); ipl::math::VEC3 position; __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); @@ -3334,9 +2932,9 @@ state22Button3: f32 scale = 0.5f; position.x = position.x + xOffset; position.y = position.y + scale * height; - (*reinterpret_cast(reinterpret_cast(self) + 0xa8)) + (self->mpBalloon) ->setPos(position, false, 1); - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadein(); + (self->mpBalloon)->fadein(); } ++*count; } @@ -3348,7 +2946,7 @@ done: extern "C" void start_left_event__Q33ipl5scene11AddressEditFPCc( ipl::scene::AddressEdit* self, const char* paneName) { int buttonNo = get_button_no__Q33ipl5scene11AddressEditFPCc(self, paneName); - s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x64); + s32 state = self->mState; switch (state) { case 0x22: goto state22; @@ -3371,19 +2969,17 @@ extern "C" void start_left_event__Q33ipl5scene11AddressEditFPCc( goto done; state0Friend: { - u32 friendIndex = *reinterpret_cast(reinterpret_cast(self) + 0xa4); - u8* friendList = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); - u32 friendType = *reinterpret_cast(friendList + friendIndex * 0x140 + 4); + u32 friendIndex = self->mSelectedFriend; + u32 friendType = self->mpFriendCache->getInfo(friendIndex).attr.status; if (friendType != 2) { goto done; } - s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + s32* count = &self->mPointCount[buttonNo]; if (*count == 1) { - void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(layout) + 0x28c, buttonNo + 0xb); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Animator* pane = layout->getAnim(buttonNo + 0xb); + pane->initFrame(); + pane->restart(); } if (*count > 0) { --*count; @@ -3392,22 +2988,21 @@ state0Friend: { } state0Button3: { - s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + s32* count = &self->mPointCount[buttonNo]; if (*count == 1) { - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + (self->mpBalloon)->fadeoutForce(); } --*count; goto done; } state0Common: { - s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + s32* count = &self->mPointCount[buttonNo]; if (*count == 1) { - void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(layout) + 0x28c, buttonNo + 0xb); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; + ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Animator* pane = layout->getAnim(buttonNo + 0xb); + pane->initFrame(); + pane->restart(); } if (*count > 0) { --*count; @@ -3420,9 +3015,9 @@ state22: goto done; } { - s32* count = reinterpret_cast(reinterpret_cast(self) + 0x90 + buttonNo * 4); + s32* count = &self->mPointCount[buttonNo]; if (*count == 1) { - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + (self->mpBalloon)->fadeoutForce(); } --*count; } @@ -3434,7 +3029,7 @@ done: extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( ipl::scene::AddressEdit* self, const char* paneName) { int buttonNo = get_button_no__Q33ipl5scene11AddressEditFPCc(self, paneName); - s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x64); + s32 state = self->mState; switch (state) { case 0: { @@ -3450,41 +3045,38 @@ extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( goto state0Event; state0Friend: { - u32 friendIndex = *reinterpret_cast(reinterpret_cast(self) + 0xa4); - u8* friendList = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); - u32 friendType = *reinterpret_cast(friendList + friendIndex * 0x140 + 4); + u32 friendIndex = self->mSelectedFriend; + u32 friendType = self->mpFriendCache->getInfo(friendIndex).attr.status; if (friendType != 2) { goto state0FriendError; } reset_gui__Q33ipl5scene11AddressEditFv(self); - void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(layout) + 0x28c, buttonNo + 6); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x88) = buttonNo; + ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Animator* pane = layout->getAnim(buttonNo + 6); + pane->initFrame(); + pane->restart(); + self->mSelectedButton = buttonNo; ipl::snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 1; + self->mState = 1; break; } state0FriendError: { callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x57, 0x2e); - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + (self->mpBalloon)->fadeoutForce(); reset_gui__Q33ipl5scene11AddressEditFv(self); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x2f; + self->mState = 0x2f; break; } state0Event: { - void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(layout) + 0x28c, buttonNo + 6); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x88) = buttonNo; + ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Animator* pane = layout->getAnim(buttonNo + 6); + pane->initFrame(); + pane->restart(); + self->mSelectedButton = buttonNo; ipl::snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 1; + self->mState = 1; break; } } @@ -3500,18 +3092,17 @@ extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( break; state22Button4: { - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + (self->mpBalloon)->fadeoutForce(); for (s32 i = 0; i < 5; ++i) { - *reinterpret_cast(reinterpret_cast(self) + 0x90 + i * 4) = 0; + self->mPointCount[i] = 0; } - void* layout = *reinterpret_cast(reinterpret_cast(self) + 0x68); - void* pane = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(layout) + 0x28c, 10); - initFrame__Q33ipl7utility15FrameControllerFv(pane); - *reinterpret_cast(reinterpret_cast(pane) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x88) = buttonNo; + ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Animator* pane = layout->getAnim(10); + pane->initFrame(); + pane->restart(); + self->mSelectedButton = buttonNo; ipl::snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x24; + self->mState = 0x24; break; } } @@ -3527,14 +3118,14 @@ extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( if (controller->getChannel() != channel) { return; } - if (!strcmp(lbl_816965E0, paneName)) { - s32 state = *reinterpret_cast(reinterpret_cast(self) + 0x64); + if (!strcmp(sInputPaneName, paneName)) { + s32 state = self->mState; switch (state) { case 0xd: { ipl::keyboard::Manager::KeyboardSetting setting; __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( &setting, static_cast(0xb), - reinterpret_cast(reinterpret_cast(self) + 0x2b4), 0xa, 1); + self->mString.mName, 0xa, 1); switch (ipl::System::getRegion()) { case 0xb: { @@ -3558,49 +3149,49 @@ extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( ipl::System::getKeyboard()->start(channel, setting); setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, reinterpret_cast(reinterpret_cast(self) + 0x2b4), false); - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + self, self->mString.mName, false); + if (self->mString.mbNameNotEmpty != 0) { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); } else { reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); } reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0xe; + self->mState = 0xe; break; } case 0x11: { - if (*reinterpret_cast(reinterpret_cast(self) + 0x84) == 1) { + if (self->mMode == 1) { ipl::keyboard::Manager::KeyboardSetting setting; __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( &setting, static_cast(0xc), - reinterpret_cast(reinterpret_cast(self) + 0xb0), 0x10, 2); + self->mString.mValue, 0x10, 2); ipl::System::getKeyboard()->start(channel, setting); } else { ipl::keyboard::Manager::KeyboardSetting setting; __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( &setting, static_cast(7), - reinterpret_cast(reinterpret_cast(self) + 0xb0), 0x63, 5); + self->mString.mValue, 0x63, 5); ipl::System::getKeyboard()->start(channel, setting); } setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, reinterpret_cast(reinterpret_cast(self) + 0xb0), false); - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) != 0 && - isDupCode__Q43ipl5scene11AddressEdit6StringCFv(reinterpret_cast(self) + 0xb0) == 0 && - isMyCode__Q43ipl5scene11AddressEdit6StringCFv(reinterpret_cast(self) + 0xb0) == 0) { + self, self->mString.mValue, false); + if (self->mString.mbValidMail != 0 && + isDupCode__Q43ipl5scene11AddressEdit6StringCFv(&self->mString) == 0 && + isMyCode__Q43ipl5scene11AddressEdit6StringCFv(&self->mString) == 0) { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); } else { reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); } ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x12; + self->mState = 0x12; break; } case 0x19: { ipl::keyboard::Manager::KeyboardSetting setting; __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( &setting, static_cast(0xb), - reinterpret_cast(reinterpret_cast(self) + 0x2b4), 0xa, 1); + self->mString.mName, 0xa, 1); switch (ipl::System::getRegion()) { case 0xb: { @@ -3624,31 +3215,31 @@ extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( ipl::System::getKeyboard()->start(channel, setting); setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, reinterpret_cast(reinterpret_cast(self) + 0x2b4), false); - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + self, self->mString.mName, false); + if (self->mString.mbNameNotEmpty != 0) { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); } else { reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); } reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1a; + self->mState = 0x1a; break; } case 0x1d: - if (*reinterpret_cast(reinterpret_cast(self) + 0x4e8) != 1) { - *reinterpret_cast(reinterpret_cast(self) + 0x4e8) = 0; + if (self->mNigaoeState != 1) { + self->mNigaoeState = 0; if (RFLGetAvailableOfficialDataNum() != 0) { createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( self, 0x1c, self, NULL, reinterpret_cast(2)); reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1e; + self->mState = 0x1e; } else { callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x17c, 0x2e); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1f; + self->mState = 0x1f; } } break; @@ -3664,11 +3255,11 @@ extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( ipl::controller::Interface* controller = ipl::System::getControllerManager()->getYoungController(); if (controller != NULL) { if (controller->getChannel() == channel) { - switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + switch (self->mState) { case 0x1d: { char paneNameCopy[12] = "mii_icon_00"; if (strcmp(paneNameCopy, paneName) == 0) { - ipl::layout::Object* layout = *reinterpret_cast(reinterpret_cast(self) + 0x74); + ipl::layout::Object* layout = self->mpNameLayout; nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); ipl::math::VEC3 position; __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); @@ -3678,9 +3269,9 @@ extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( offset = 50.0f; y = position.y; position.y = y + offset; - (*reinterpret_cast(reinterpret_cast(self) + 0xa8)) + (self->mpBalloon) ->setPos(position, false, 0); - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadein(); + (self->mpBalloon)->fadein(); } break; } @@ -3692,9 +3283,8 @@ extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( extern "C" void onEventDerived__Q33ipl5scene11AddressEditFUlUlPCQ33ipl10controller9Interface( ipl::scene::AddressEdit* self, u32 componentId, u32 event, const ipl::controller::Interface* controller) { - const char* pool = lbl_81647EE0; - gui::Manager* manager = *reinterpret_cast( - reinterpret_cast(self) + 0x5c); + + gui::Manager* manager = self->getGuiManager(); gui::PaneComponent* component = static_cast(manager->getComponent(componentId)); nw4r::lyt::Pane* pane = component->getPane(); @@ -3713,148 +3303,119 @@ extern "C" void onEventDerived__Q33ipl5scene11AddressEditFUlUlPCQ33ipl10controll ipl::System::getScene(0x14); if (strcmp(paneName, smButtonName__Q33ipl5scene6Button[5]) == 0) { - switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + switch (self->mState) { case 0: { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); reserveText__Q33ipl5scene6ButtonFiUl(button, 0, 0x23); reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x29); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x68)) + 0x28c, 0x1e); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + ipl::layout::Animator* frame = self->mpCodeLayout->getAnim(0x1e); + frame->initFrame(); + frame->restart(); + self->mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - (*reinterpret_cast( - reinterpret_cast(self) + 0xa8))->fadeoutForce(); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + (self->mpBalloon)->fadeoutForce(); + self->mState = 0x30; break; } case 0xd: { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + if (self->mString.mbNameNotEmpty != 0) { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); } else { reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); } reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 9); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x80)) + 0x28c, 1); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(9); + frame->initFrame(); + frame->restart(); + frame = self->mpBackgroundLayout->getAnim(1); + frame->initFrame(); + frame->restart(); get_friendinfo__Q33ipl5scene11AddressEditFv(self); ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0xf; + self->mState = 0xf; break; } case 0x11: { - reserveSceneChange__Q33ipl5scene4BaseFiPv( - self, *reinterpret_cast(reinterpret_cast(self) + 0x34), NULL); + self->requestSceneChange(self->getPreviousScene(), NULL); reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d0) != 0 && + if (self->mString.mbValidMail != 0 && isDupCode__Q43ipl5scene11AddressEdit6StringCFv( - reinterpret_cast(self) + 0xb0) == 0 && + &self->mString) == 0 && isMyCode__Q43ipl5scene11AddressEdit6StringCFv( - reinterpret_cast(self) + 0xb0) == 0) { + &self->mString) == 0) { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); } else { reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); } - void* frame; - if (*reinterpret_cast(reinterpret_cast(self) + 0xb0) != 0) { - frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 6); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + ipl::layout::Animator* frame; + if (self->mString.mValue[0] != 0) { + frame = self->mpNameLayout->getAnim(6); + frame->initFrame(); + frame->restart(); } else { - frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 7); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + frame = self->mpNameLayout->getAnim(7); + frame->initFrame(); + frame->restart(); } reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 9); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 5); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + frame = self->mpNameLayout->getAnim(9); + frame->initFrame(); + frame->restart(); + frame = self->mpNameLayout->getAnim(5); + frame->initFrame(); + frame->restart(); + self->mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x30; + self->mState = 0x30; break; } case 0x19: { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + if (self->mString.mbNameNotEmpty != 0) { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 6); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(6); + frame->initFrame(); + frame->restart(); } else { - u16 nameLength = *reinterpret_cast(reinterpret_cast(self) + 0x2b4); + u16 nameLength = self->mString.mName[0]; if (nameLength != 0) { reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 6); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(6); + frame->initFrame(); + frame->restart(); } else { reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 7); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(7); + frame->initFrame(); + frame->restart(); } } reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 5); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(5); + frame->initFrame(); + frame->restart(); + self->mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1b; + self->mState = 0x1b; break; } case 0x1d: { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 5); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 8); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(5); + frame->initFrame(); + frame->restart(); + frame = self->mpNameLayout->getAnim(8); + frame->initFrame(); + frame->restart(); + self->mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x20; - (*reinterpret_cast( - reinterpret_cast(self) + 0xa8))->fadeoutForce(); + self->mState = 0x20; + (self->mpBalloon)->fadeoutForce(); reset_gui__Q33ipl5scene11AddressEditFv(self); break; } @@ -3862,89 +3423,72 @@ extern "C" void onEventDerived__Q33ipl5scene11AddressEditFUlUlPCQ33ipl10controll reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x68)) + 0x28c, 0x1e); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 5; + ipl::layout::Animator* frame = self->mpCodeLayout->getAnim(0x1e); + frame->initFrame(); + frame->restart(); + self->mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x23; - (*reinterpret_cast( - reinterpret_cast(self) + 0xa8))->fadeoutForce(); + self->mState = 0x23; + (self->mpBalloon)->fadeoutForce(); reset_gui__Q33ipl5scene11AddressEditFv(self); break; } } } else if (strcmp(paneName, smButtonName__Q33ipl5scene6Button[7]) == 0) { - switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + switch (self->mState) { case 0xd: { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - ipl::layout::Object* layout = *reinterpret_cast( - reinterpret_cast(self) + 0x68); + ipl::layout::Object* layout = self->mpCodeLayout; nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName( - pool + 0x22b, true); + "T_name_00", true); set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, reinterpret_cast( - reinterpret_cast(self) + 0x2b4)); - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 9); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x80)) + 0x28c, 1); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - update_friendinfo__Q33ipl5scene11AddressEditFv(self); + self, pane, self->mString.mName); + self->mSubState = 7; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(9); + frame->initFrame(); + frame->restart(); + frame = self->mpBackgroundLayout->getAnim(1); + frame->initFrame(); + frame->restart(); + self->update_friendinfo(); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0xf; + self->mState = 0xf; break; } case 0x11: { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - if (*reinterpret_cast(reinterpret_cast(self) + 0x4d1) != 0) { + if (self->mString.mbNameNotEmpty != 0) { reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); } else { reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); } - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 5); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 6); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(5); + frame->initFrame(); + frame->restart(); + frame = self->mpNameLayout->getAnim(6); + frame->initFrame(); + frame->restart(); + self->mSubState = 7; ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x17; + self->mState = 0x17; break; } case 0x19: { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 5); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 6); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(5); + frame->initFrame(); + frame->restart(); + frame = self->mpNameLayout->getAnim(6); + frame->initFrame(); + frame->restart(); + self->mSubState = 7; ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x1b; + self->mState = 0x1b; reset_gui__Q33ipl5scene11AddressEditFv(self); break; } @@ -3952,32 +3496,26 @@ extern "C" void onEventDerived__Q33ipl5scene11AddressEditFUlUlPCQ33ipl10controll reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x74)) + 0x28c, 9); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; + ipl::layout::Animator* frame = self->mpNameLayout->getAnim(9); + frame->initFrame(); + frame->restart(); + self->mSubState = 7; ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x20; - (*reinterpret_cast( - reinterpret_cast(self) + 0xa8))->fadeoutForce(); + self->mState = 0x20; + (self->mpBalloon)->fadeoutForce(); reset_gui__Q33ipl5scene11AddressEditFv(self); break; } case 0x22: { reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - void* frame = List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs( - reinterpret_cast(*reinterpret_cast( - reinterpret_cast(self) + 0x68)) + 0x28c, 0x1e); - initFrame__Q33ipl7utility15FrameControllerFv(frame); - *reinterpret_cast(reinterpret_cast(frame) + 0x14) = 1; - *reinterpret_cast(reinterpret_cast(self) + 0x8c) = 7; + ipl::layout::Animator* frame = self->mpCodeLayout->getAnim(0x1e); + frame->initFrame(); + frame->restart(); + self->mSubState = 7; ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - *reinterpret_cast(reinterpret_cast(self) + 0x64) = 0x23; - (*reinterpret_cast( - reinterpret_cast(self) + 0xa8))->fadeoutForce(); + self->mState = 0x23; + (self->mpBalloon)->fadeoutForce(); break; } } @@ -3989,11 +3527,11 @@ extern "C" void start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( ipl::controller::Interface* controller = ipl::System::getControllerManager()->getYoungController(); if (controller != NULL) { if (controller->getChannel() == channel) { - switch (*reinterpret_cast(reinterpret_cast(self) + 0x64)) { + switch (self->mState) { case 0x1d: { char paneNameCopy[12] = "mii_icon_00"; if (strcmp(paneNameCopy, paneName) == 0) { - (*reinterpret_cast(reinterpret_cast(self) + 0xa8))->fadeoutForce(); + (self->mpBalloon)->fadeoutForce(); } break; } @@ -4009,7 +3547,7 @@ extern "C" void set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( wchar_t nwc24ErrStr[32]; memset(nwc24ErrStr, 0, sizeof(nwc24ErrStr)); - void* friendListCache = *reinterpret_cast(reinterpret_cast(self) + 0x4ec); + void* friendListCache = self->mpFriendCache; NWC24Err errorCode = getErrCode__Q33ipl5scene15FriendListCacheCFv(friendListCache); swprintf(nwc24ErrStr, sizeof(nwc24ErrStr) / sizeof(wchar_t), L"%06d\n", errorCode); wcsncat(outErrMsg, nwc24ErrStr, outErrMsgLen - wcslen(outErrMsg)); @@ -4045,3 +3583,94 @@ extern "C" int get_button_no__Q33ipl5scene11AddressEditFPCc(void*, const char* p } return result; } + +extern "C" void add_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + NWC24FriendInfo info ALIGN32; + memset(&info, 0, sizeof(info)); + switch (self->mMode) { + case 1: + info.attr.type = 1; + { + const wchar_t* name = self->mString.mName; + wchar_t* storedName = reinterpret_cast(info.attr.name); + wcsncpy(storedName, name, 0xa); + } + info.addr.wiiId = utf16_wiiid__Q33ipl5scene11AddressEditFPCw(self->mString.mValue); + memcpy(&info.attr.fdId, &self->mCreateID, sizeof(self->mCreateID)); + break; + case 2: + info.attr.type = 2; + { + const wchar_t* name = self->mString.mName; + wchar_t* storedName = reinterpret_cast(info.attr.name); + wcsncpy(storedName, name, 0xa); + } + { + const wchar_t* value = self->mString.mValue; + u8* address = reinterpret_cast(&info.addr); + UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(address, value, sizeof(info.addr)); + } + memcpy(&info.attr.fdId, &self->mCreateID, sizeof(self->mCreateID)); + break; + default: + break; + } + + ipl::scene::Address* address = + static_cast(ipl::System::getScene(0x14)); + u32 index = address->getChosenFriendIndex(); + if (index >= 100) { + index = 0; + for (u32 remaining = 100; remaining != 0; --remaining) { + if (!self->mpFriendCache->isThere(index)) { + break; + } + ++index; + } + } + self->mpFriendCache->add(index, info); + if (self->mMode == 2) { + self->mpFriendCache->sendRegisterMail(index); + } +} + +extern "C" void get_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { + const NWC24FriendInfo& friendInfo = self->mpFriendCache->getInfo(self->mSelectedFriend); + memcpy(&sFriendInfo__Q23ipl5scene, &friendInfo, sizeof(sFriendInfo__Q23ipl5scene)); + self->mString.setName(reinterpret_cast(sFriendInfo__Q23ipl5scene.attr.name)); + const wchar_t* name = self->mString.mName; + nw4r::lyt::Pane* namePane = + self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, namePane, name); + + wchar_t wiiNo[0x100]; + wchar_t email[0x102]; + if (sFriendInfo__Q23ipl5scene.attr.type == 1) { + memset(wiiNo, 0, sizeof(wiiNo)); + wiiid_utf16__Q33ipl5scene11AddressEditFUxPw(sFriendInfo__Q23ipl5scene.addr.wiiId, wiiNo); + self->mString.setWiiNo(wiiNo); + } else { + memset(email, 0, sizeof(email)); + ANSIToUTF16__Q33ipl7utility13CharacterCodeFPwPCUcl( + email, reinterpret_cast(&sFriendInfo__Q23ipl5scene.addr), 0x102); + self->mString.setEMail(email); + } + const wchar_t* displayText = self->mString.mDisplayText; + nw4r::lyt::Pane* friendCodePane = + self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); + set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( + self, friendCodePane, displayText); + memcpy(&self->mCreateID, &sFriendInfo__Q23ipl5scene.attr.fdId, sizeof(self->mCreateID)); +} + +void ipl::scene::AddressEdit::update_friendinfo() { + memset(sFriendInfo__Q23ipl5scene.attr.name, 0, 0x18); + wcsncpy(reinterpret_cast(sFriendInfo__Q23ipl5scene.attr.name), mString.mName, 0xa); + memcpy(&sFriendInfo__Q23ipl5scene.attr.fdId, &mCreateID, sizeof(mCreateID)); + mpFriendCache->update( + mSelectedFriend, + reinterpret_cast(sFriendInfo__Q23ipl5scene.attr.name), + sFriendInfo__Q23ipl5scene.attr.fdId); + reset_friend__Q33ipl5scene7AddressFv(ipl::System::getScene(0x14)); +} -- 2.49.1 From c1b8e7c15d1e7cd70483eb86a271f96453b03778 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Mon, 28 Sep 2026 23:07:32 +0000 Subject: [PATCH 3/3] convert address edit methods --- include/keyboard/tiManager.h | 3 + include/math/iplMathTypes.h | 4 + include/scene/address/iplAddress.h | 3 + include/scene/address/iplAddressEdit.h | 63 + include/system/iplKeyboard.h | 3 + src/scene/address/iplAddressEdit.cpp | 1941 +++++++++++------------- 6 files changed, 966 insertions(+), 1051 deletions(-) diff --git a/include/keyboard/tiManager.h b/include/keyboard/tiManager.h index 9e24205a..c18b8c29 100644 --- a/include/keyboard/tiManager.h +++ b/include/keyboard/tiManager.h @@ -67,6 +67,9 @@ namespace textinput { virtual void setAspectRatio(bool b4x3); virtual void setSecretInputMode(bool secretInputMode) { mpInputForm->setSecretModeOn(secretInputMode); } +#ifdef IPL_ADDRESS_EDIT_CPP + void enableKSXFilter(bool compatibleFilter); +#endif virtual void setDefaultPredictionJP(int num, const char** predicts); virtual void setFixedPredictionJP(int num, const char** predicts); diff --git a/include/math/iplMathTypes.h b/include/math/iplMathTypes.h index f1425545..0e6f9bd6 100644 --- a/include/math/iplMathTypes.h +++ b/include/math/iplMathTypes.h @@ -91,11 +91,15 @@ namespace ipl { y = r.y; z = 0.0f; } +#ifdef IPL_ADDRESS_EDIT_CPP + VEC3(f32 fx, f32 fy, f32 fz); +#else VEC3(f32 fx, f32 fy, f32 fz) { x = fx; y = fy; z = fz; } +#endif VEC3& operator+=(const VEC3& rhs) { VEC3Add(this, this, &rhs); diff --git a/include/scene/address/iplAddress.h b/include/scene/address/iplAddress.h index 8e767e17..8dea5df6 100644 --- a/include/scene/address/iplAddress.h +++ b/include/scene/address/iplAddress.h @@ -258,6 +258,9 @@ namespace ipl { static const math::VEC2 smcPageOffset; friend class AddressEvent; +#ifdef IPL_ADDRESS_EDIT_CPP + friend class AddressEdit; +#endif }; class AddressEvent : public ::gui::EventHandler { diff --git a/include/scene/address/iplAddressEdit.h b/include/scene/address/iplAddressEdit.h index cf1b8899..501c89bf 100644 --- a/include/scene/address/iplAddressEdit.h +++ b/include/scene/address/iplAddressEdit.h @@ -5,6 +5,7 @@ #include "scene/button/iplButton.h" #include +#include namespace ipl { namespace nigaoe { @@ -38,6 +39,68 @@ namespace ipl { void stt_msg_code_edit(); void stt_msg_parental(); void stt_msg_nwc24_error(); + void reset_gui(); + void start_point_event(const char* paneName, controller::Interface* controller); + void start_left_event(const char* paneName); + void start_trig_event(const char* paneName); + void start_ipt_point_event(const char* paneName, int channel); + void start_ipt_left_event(const char* paneName, int channel); + void start_ipt_trig_event(const char* paneName, int channel); + int get_button_no(const char*); + void add_friendinfo(); + void delete_friendinfo(); + void set_textbox(nw4r::lyt::Pane*, const wchar_t*); + void setDefaultTitleText(const wchar_t*, bool); + static void wiiid_utf16(u64, wchar_t*); + static void nigaoe_create_callback_add(ipl::nigaoe::Object*, void*); + static void nigaoe_create_callback_edit(ipl::nigaoe::Object*, void*); + void set_err_msg(wchar_t*, u32, NWC24Err); + void get_friendinfo(); + static u64 utf16_wiiid(const wchar_t*); + void stt_add_code_fadein(); + void stt_add_code_fadeout(); + void stt_add_code_input(); + void stt_add_code_normal(); + void stt_add_confirm_fadein(); + void stt_add_confirm_fadeout(); + void stt_add_confirm_normal(); + void stt_add_mii_fadein(); + void stt_add_mii_fadeout(); + void stt_add_mii_input(); + void stt_add_mii_normal(); + void stt_add_name_fadein(); + void stt_add_name_fadeout(); + void stt_add_name_input(); + void stt_add_name_normal(); + void stt_ipt_input(); + void stt_ipt_normal(); + void stt_ipt_wait_fadein(); + void stt_ipt_wait_fadeout(); + void stt_msg_add_rlt(); + void stt_msg_code_invalid(); + void stt_msg_del_rlt(); + void stt_msg_dup_email(); + void stt_msg_dup_wii_no(); + void stt_msg_my_wii_no(); + void stt_msg_net(); + void stt_msg_no_established(); + void stt_msg_no_mii(); + void stt_msg_no_mii_add(); + void stt_msg_wc(); + void stt_select_mii(); + void stt_wait_btn_fadein(); + void stt_wait_btn_fadeout(); + void stt_wait_del_msg_fadein(); + void stt_wait_del_msg_fadeout(); + void stt_wait_del_msg_fadeout_to_rlt(); + void stt_wait_delete(); + void stt_wait_decide_anm_add(); + void stt_wait_parental(); + void stt_wait_parental_dst(); + void stt_wait_parental_dst_wc(); + void stt_wait_parental_wc(); + void stt_normal(); + void stt_wait_decide_anm(); void update_friendinfo(); void requestSceneChange(int sceneId, void* args) { reserveSceneChange(sceneId, args); } u32 getPreviousScene() const { return getPrevSceneID(); } diff --git a/include/system/iplKeyboard.h b/include/system/iplKeyboard.h index aa8c6df7..717d309d 100644 --- a/include/system/iplKeyboard.h +++ b/include/system/iplKeyboard.h @@ -54,6 +54,9 @@ namespace ipl { const wchar_t* wcString; // 0x04 u32 stringLimit; // 0x08 u32 rowLimit; // 0x0C +#ifdef IPL_ADDRESS_EDIT_CPP + KeyboardSetting(KeyboardType keyboardType, const wchar_t* value, u32 limit, u32 rows); +#endif } KeyboardSetting; typedef struct State { diff --git a/src/scene/address/iplAddressEdit.cpp b/src/scene/address/iplAddressEdit.cpp index b500deb8..791c5145 100644 --- a/src/scene/address/iplAddressEdit.cpp +++ b/src/scene/address/iplAddressEdit.cpp @@ -1,3 +1,4 @@ +#define IPL_ADDRESS_EDIT_CPP #include "scene/address/iplAddressEdit.h" #include "scene/address/iplAddress.h" #include "scene/board/iplBoard.h" @@ -10,6 +11,8 @@ #include "sound/iplSound.h" #include "system/iplSystem.h" #include "system/iplNigaoe.h" +#include "scene/setting/iplNCDSetting.h" +#include "utility/iplCharacterCode.h" #include #include @@ -63,24 +66,15 @@ namespace ipl { } extern "C" u8 __vt__Q33ipl5scene11AddressEdit[]; -extern "C" void __ct__Q33ipl5scene14FaderSceneBaseFPQ23EGG4Heap(void*, EGG::Heap*); -extern "C" void __dt__Q33ipl6nigaoe6ObjectFv(void*, int); -extern "C" void __dt__Q33ipl5scene4BaseFv(void*, int); extern "C" void __dl__FPv(void*); -extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( - ipl::scene::AddressEdit*, const char*, ipl::controller::Interface*); -extern "C" void start_left_event__Q33ipl5scene11AddressEditFPCc( - ipl::scene::AddressEdit*, const char*); -extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( - ipl::scene::AddressEdit*, const char*); -extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( - ipl::scene::AddressEdit*, const char*, int); -extern "C" void start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( - ipl::scene::AddressEdit*, const char*, int); -extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( - ipl::scene::AddressEdit*, const char*, int); +ipl::keyboard::Manager::KeyboardSetting::KeyboardSetting( + ipl::keyboard::Manager::KeyboardType keyboardType, const wchar_t* value, u32 limit, u32 rows) { + type = keyboardType; + wcString = value; + stringLimit = limit; + rowLimit = rows; +} ipl::scene::AddressEdit::AddressEdit(EGG::Heap* heap, int friendCode) : FaderSceneBase(heap), ButtonEventHandlerBase() { @@ -104,7 +98,7 @@ ipl::scene::AddressEdit::AddressEdit(EGG::Heap* heap, int friendCode) ipl::scene::AddressEdit::~AddressEdit() { if (mpNigaoe != NULL) { - __dt__Q33ipl6nigaoe6ObjectFv(mpNigaoe, 1); + delete mpNigaoe; } } @@ -132,16 +126,16 @@ void ipl::scene::AddressEdit::stt_msg_nwc24_error() { } } -extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - self->mpEditGui->init(); - self->mpInputGui->init(); +void ipl::scene::AddressEdit::reset_gui() { + mpEditGui->init(); + mpInputGui->init(); for (s32 i = 0; i < 5; ++i) { - if (self->mPointCount[i] > 0) { - ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(i + 0xb); + if (mPointCount[i] > 0) { + ipl::layout::Animator* animator = mpCodeLayout->getAnim(i + 0xb); animator->initFrame(); animator->restart(); } - self->mPointCount[i] = 0; + mPointCount[i] = 0; } } @@ -149,32 +143,26 @@ extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* extern "C" u8 __vt__Q33ipl5scene16AddressEditEvent[]; extern "C" u8 __vt__Q33ipl5scene17AddressInputEvent[]; extern "C" void* __nw__FUl(u32); -extern "C" ipl::layout::Object* __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( - void*, EGG::Heap*, ipl::nand::LayoutFile*, const char*, const char*); -extern "C" ipl::math::VEC3* __ct__Q33ipl4math4VEC3Ffff(ipl::math::VEC3*, f32, f32, f32); -extern "C" ipl::scene::TextBalloon* __ct__Q33ipl5scene11TextBalloonFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCcRCQ33ipl4math4VEC3ff( - void*, EGG::Heap*, ipl::nand::LayoutFile*, const char*, const char*, const ipl::math::VEC3&, f32, f32); extern "C" BOOL RFLSearchOfficialData(const RFLCreateID*, u16*); -extern "C" ipl::gui::PaneManager* __ct__Q33ipl3gui11PaneManagerFPQ23gui12EventHandlerPCQ34nw4r3lyt8DrawInfoPQ23EGG4HeapPQ23EGG9Allocatorb( - void*, gui::EventHandler*, const nw4r::lyt::DrawInfo*, EGG::Heap*, EGG::Allocator*, bool); -extern "C" void initAnmFrame__Q33ipl6layout8AnimatorFv(void*); + extern "C" NWC24FriendInfo sFriendInfo__Q23ipl5scene; extern "C" char smArg__Q23ipl6System; extern "C" const char* smButtonName__Q33ipl5scene6Button[]; extern "C" void readLayoutAsync__Q33ipl4nand7ManagerFPQ23EGG4HeapPCcb(); -extern "C" void* List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(void*, u16); +extern "C" void List_GetNth__Q24nw4r2utFPCQ34nw4r2ut4ListUs(); extern "C" void getScene__Q33ipl5scene7ManagerFi(); -extern "C" void setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler(void*, void*, void*); -extern "C" void animation__Q33ipl5scene6ButtonFi(void*, int); -extern "C" void calc__Q33ipl5scene11TextBalloonFv(void*); +extern "C" void UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(); +extern "C" void reset_friend__Q33ipl5scene7AddressFv(); +extern "C" void callBtn1__Q23ipl12DialogWindowFUlUl(); +extern "C" void setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler(); +extern "C" void calc__Q33ipl5scene11TextBalloonFv(); extern "C" void calc__Q33ipl6layout6ObjectFv(); -extern "C" bool isActive__Q33ipl5scene6ButtonCFv(void*); -extern "C" void update__Q33ipl5scene6ButtonFv(void*); -extern "C" void update__Q33ipl3gui11PaneManagerFv(void*); +extern "C" void isActive__Q33ipl5scene6ButtonCFv(); +extern "C" void update__Q33ipl5scene6ButtonFv(); +extern "C" void update__Q33ipl3gui11PaneManagerFv(); extern "C" void setOrtho__Q33ipl7utility8GraphicsFUl(); extern "C" void draw__Q33ipl6layout6ObjectFv(); extern "C" void draw__Q33ipl5scene11TextBalloonFv(); -extern "C" ipl::math::VEC3* __ct__Q33ipl4math4VEC3Ffff(ipl::math::VEC3*, f32, f32, f32); @@ -185,216 +173,174 @@ extern "C" ipl::math::VEC3* __ct__Q33ipl4math4VEC3Ffff(ipl::math::VEC3*, f32, f3 -extern "C" int get_button_no__Q33ipl5scene11AddressEditFPCc(void*, const char*); -extern "C" void callBtn1__Q23ipl12DialogWindowFUlUl(void*, u32, u32); +int ipl::scene::AddressEdit::get_button_no(const char*); extern "C" void callS2Btn2__Q23ipl12DialogWindowFUlUlb(); -extern "C" void reserveText__Q33ipl5scene6ButtonFiUl(void*, int, u32); -extern "C" void reserveAnm__Q33ipl5scene6ButtonFi(void*, int); -extern "C" void initFrame__Q33ipl7utility15FrameControllerFv(void*); +extern "C" void reserveText__Q33ipl5scene6ButtonFiUl(); +extern "C" void reserveAnm__Q33ipl5scene6ButtonFi(); +extern "C" void initFrame__Q33ipl7utility15FrameControllerFv(); extern "C" void getMessage__Q33ipl7message7MessageCFUl(); extern "C" void del__Q33ipl5scene15FriendListCacheFUl(); -extern "C" void reset_friend__Q33ipl5scene7AddressFv(void*); -extern "C" void add_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void delete_friendinfo__Q33ipl5scene11AddressEditFv(void*); -extern "C" void add__Q33ipl5scene15FriendListCacheFUlRC15NWC24FriendInfo( - void*, u32, const NWC24FriendInfo&); -extern "C" void sendRegisterMail__Q33ipl5scene15FriendListCacheFUl(void*, u32); -extern "C" void update__Q33ipl5scene15FriendListCacheFUlPCwUx(void*, u32, const wchar_t*, u64); -extern "C" void setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw(void*, const wchar_t*); -extern "C" void set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - ipl::scene::AddressEdit*, nw4r::lyt::Pane*, const wchar_t*); -extern "C" void setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - ipl::scene::AddressEdit*, const wchar_t*, bool); -extern "C" void wiiid_utf16__Q33ipl5scene11AddressEditFUxPw(u64, wchar_t*); -extern "C" void ANSIToUTF16__Q33ipl7utility13CharacterCodeFPwPCUcl(wchar_t*, const u8*, s32); -extern "C" const wchar_t* getName__Q33ipl6nigaoe6ObjectCFv(void*); -extern "C" void nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( - ipl::nigaoe::Object*, void*); -extern "C" void nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( - ipl::nigaoe::Object*, void*); + + + + + + + + extern "C" NWC24Err NWC24CheckPublicMailAddr_(const char*); -extern "C" void reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(void*, int, void*); -extern "C" void createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( - void*, int, void*, void*, void*); extern "C" void __div2u(); extern "C" void __mod2u(); -extern "C" void UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(u8*, const wchar_t*, s32); +extern "C" u64 utf16_wiiid__Q33ipl5scene11AddressEditFPCw(const wchar_t*); extern "C" void isValidId__Q33ipl5scene15FriendListCacheFRCUx(); extern "C" void isDupId__Q33ipl5scene15FriendListCacheFRCUx(); extern "C" void isDupMail__Q33ipl5scene15FriendListCacheFPCc(); -extern "C" NWC24Err getErrCode__Q33ipl5scene15FriendListCacheCFv(void*); -extern "C" BOOL getConnectEnableFlag__Q33ipl3ncd10NCDSettingFv(); -extern "C" void set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( - ipl::scene::AddressEdit*, wchar_t*, u32, NWC24Err); -extern "C" void get_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void reset_gui__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" u64 utf16_wiiid__Q33ipl5scene11AddressEditFPCw(const wchar_t*); + + + extern "C" void _savegpr_29(); extern "C" void _restgpr_29(); extern "C" void _savegpr_23(); extern "C" void _savegpr_27(); extern "C" void _restgpr_23(); extern "C" void _restgpr_27(); -extern "C" void stt_add_code_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_code_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_code_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_confirm_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_confirm_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_confirm_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_mii_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_mii_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_mii_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_name_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_name_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_add_name_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_ipt_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_ipt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_ipt_wait_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_ipt_wait_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_add_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_code_invalid__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_del_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_dup_email__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_dup_wii_no__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_my_wii_no__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_net__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_no_established__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_no_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_no_mii_add__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_select_mii__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_btn_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_del_msg_fadein__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_del_msg_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_del_msg_fadeout_to_rlt__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_delete__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_decide_anm_add__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_parental__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_parental_dst__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_parental_dst_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_wait_parental_wc__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void enableKSXFilter__Q29textinput7ManagerFb(textinput::Manager*, bool); -extern "C" void __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( - ipl::keyboard::Manager::KeyboardSetting*, ipl::keyboard::Manager::KeyboardType, - const wchar_t*, u32, u32); -extern "C" void __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( - ipl::keyboard::Manager::KeyboardSetting* setting, - ipl::keyboard::Manager::KeyboardType type, const wchar_t* value, u32 stringLimit, - u32 rowLimit) { - setting->type = type; - setting->wcString = value; - setting->stringLimit = stringLimit; - setting->rowLimit = rowLimit; -} -extern "C" void stt_normal__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit*); -extern "C" void stt_msg_no_established__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +void ipl::scene::AddressEdit::stt_msg_no_established() { switch (ipl::System::getDialog()->getLastResult()) { case 1: - reset_gui__Q33ipl5scene11AddressEditFv(self); - self->mState = 0; + reset_gui(); + mState = 0; break; default: break; } } -extern "C" void stt_msg_code_invalid__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_msg_code_invalid() { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - self->mState = 0x11; + mState = 0x11; break; default: break; } } -extern "C" void stt_msg_dup_wii_no__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_msg_dup_wii_no() { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - self->mState = 0x11; + mState = 0x11; break; default: break; } } -extern "C" void stt_msg_dup_email__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_msg_dup_email() { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - self->mState = 0x11; + mState = 0x11; break; default: break; } } -extern "C" void stt_msg_my_wii_no__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_msg_my_wii_no() { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - self->mState = 0x11; + mState = 0x11; break; default: break; } } -extern "C" void stt_msg_no_mii_add__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_msg_no_mii_add() { ipl::System::getScene(5); switch (ipl::System::getDialog()->getLastResult()) { case 1: - self->mState = 0x1d; + mState = 0x1d; break; default: break; } } -extern "C" void stt_msg_add_rlt__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - void* button = ipl::System::getScene(5); +void ipl::scene::AddressEdit::stt_msg_add_rlt() { + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); switch (ipl::System::getDialog()->getLastResult()) { case 1: - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - self->mState = 0x30; + button->reserveAnm(0xf); + mState = 0x30; break; default: break; } } -extern "C" void stt_add_code_normal__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - void* button = ipl::System::getScene(5); - if (isActive__Q33ipl5scene6ButtonCFv(button)) { - update__Q33ipl5scene6ButtonFv(button); +void ipl::scene::AddressEdit::stt_add_code_normal() { + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); + if (button->isActive()) { + button->update(); } - if (self->mState == 0x11) { - update__Q33ipl3gui11PaneManagerFv(self->mpInputGui); + if (mState == 0x11) { + mpInputGui->update(); } } -extern "C" void stt_add_name_normal__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - void* button = ipl::System::getScene(5); - if (isActive__Q33ipl5scene6ButtonCFv(button)) { - update__Q33ipl5scene6ButtonFv(button); +void ipl::scene::AddressEdit::stt_add_name_normal() { + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); + if (button->isActive()) { + button->update(); } - if (self->mState == 0x19) { - update__Q33ipl3gui11PaneManagerFv(self->mpInputGui); + if (mState == 0x19) { + mpInputGui->update(); } } @@ -455,7 +401,7 @@ void ipl::scene::AddressEdit::String::setEMail(const wchar_t* value) { } u8 address[0x100]; memset(address, 0, sizeof(address)); - UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(address, value, sizeof(address)); + ipl::utility::CharacterCode::UTF16ToANSI(address, value, sizeof(address)); mbValidMail = !NWC24CheckPublicMailAddr_(reinterpret_cast(address)); } @@ -616,7 +562,7 @@ void ipl::scene::AddressEdit::prepare() { getSceneHeap(), "balloon.ash", false); } -extern "C" void create__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::create() { ipl::layout::Object* bLayout; ipl::scene::Board* board = static_cast(ipl::System::getScene(4)); @@ -624,8 +570,7 @@ extern "C" void create__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* sel bLayout = reinterpret_cast(__nw__FUl(0x580)); if (bLayout != NULL) { - bLayout = __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( - bLayout, self->getHeap(), boardFile, "arc", "th_Adress_b.brlyt"); + bLayout = new (bLayout) ipl::layout::Object(getHeap(), boardFile, "arc", "th_Adress_b.brlyt"); } bLayout->bindToGroup("th_Adress_b_card_strt.brlan", "card_strt_fnsh", false, true); bLayout->bindToGroup("th_Adress_b_btn_in.brlan", "crd_btn_00", false, true); @@ -662,14 +607,12 @@ extern "C" void create__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* sel ipl::scene::AddressEditEvent* editEvent = static_cast(__nw__FUl(sizeof(ipl::scene::AddressEditEvent))); if (editEvent != NULL) { - new (editEvent) ipl::scene::AddressEditEvent(self); + new (editEvent) ipl::scene::AddressEditEvent(this); } void* editManagerMemory = __nw__FUl(0x34); ipl::gui::PaneManager* editManager = reinterpret_cast(editManagerMemory); if (editManagerMemory != NULL) { - editManager = __ct__Q33ipl3gui11PaneManagerFPQ23gui12EventHandlerPCQ34nw4r3lyt8DrawInfoPQ23EGG4HeapPQ23EGG9Allocatorb( - editManagerMemory, static_cast(editEvent), bLayout->getDrawInfo(), NULL, NULL, - false); + editManager = new (editManagerMemory) ipl::gui::PaneManager(static_cast< ::gui::EventHandler*>(editEvent), bLayout->getDrawInfo(), NULL, NULL, false); } editManager->setupScene(bLayout); editManager->setAllComponentTriggerTarget(false); @@ -678,35 +621,34 @@ extern "C" void create__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* sel nw4r::lyt::Pane* pane = bLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); editManager->setTriggerTarget(pane, true); } - self->mpCodeLayout = bLayout; - self->mpEditEvent = editEvent; - self->mpEditGui = editManager; + mpCodeLayout = bLayout; + mpEditEvent = editEvent; + mpEditGui = editManager; nw4r::lyt::Pane* textPane = bLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2a)); - textPane = (self->mpCodeLayout) + set_textbox(textPane, ipl::System::getMessage(0x2a)); + textPane = (mpCodeLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_10", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2b)); - textPane = (self->mpCodeLayout) + set_textbox(textPane, ipl::System::getMessage(0x2b)); + textPane = (mpCodeLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_11", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2f)); - textPane = (self->mpCodeLayout) + set_textbox(textPane, ipl::System::getMessage(0x2f)); + textPane = (mpCodeLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_gry", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x2a)); - textPane = (self->mpCodeLayout) + set_textbox(textPane, ipl::System::getMessage(0x2a)); + textPane = (mpCodeLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, L""); - textPane = (self->mpCodeLayout) + set_textbox(textPane, L""); + textPane = (mpCodeLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, L""); - textPane = (self->mpCodeLayout) + set_textbox(textPane, L""); + textPane = (mpCodeLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, L""); + set_textbox(textPane, L""); ipl::layout::Object* cLayout = reinterpret_cast(__nw__FUl(0x580)); if (cLayout != NULL) { - cLayout = __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( - cLayout, self->getHeap(), boardFile, "arc", "th_Adress_c.brlyt"); + cLayout = new (cLayout) ipl::layout::Object(getHeap(), boardFile, "arc", "th_Adress_c.brlyt"); } cLayout->bindToGroup("th_Adress_c_card_strt.brlan", "G_card_strt_fnsh", false, true); cLayout->bindToGroup("th_Adress_c_question_alp_in.brlan", "G_question_00", false, true); @@ -722,112 +664,108 @@ extern "C" void create__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* sel ipl::scene::AddressInputEvent* inputEvent = static_cast(__nw__FUl(sizeof(ipl::scene::AddressInputEvent))); if (inputEvent != NULL) { - new (inputEvent) ipl::scene::AddressInputEvent(self); + new (inputEvent) ipl::scene::AddressInputEvent(this); } void* inputManagerMemory = __nw__FUl(0x34); ipl::gui::PaneManager* inputManager = reinterpret_cast(inputManagerMemory); if (inputManagerMemory != NULL) { - inputManager = __ct__Q33ipl3gui11PaneManagerFPQ23gui12EventHandlerPCQ34nw4r3lyt8DrawInfoPQ23EGG4HeapPQ23EGG9Allocatorb( - inputManagerMemory, static_cast(inputEvent), cLayout->getDrawInfo(), NULL, NULL, - false); + inputManager = new (inputManagerMemory) ipl::gui::PaneManager(static_cast< ::gui::EventHandler*>(inputEvent), cLayout->getDrawInfo(), NULL, NULL, false); } inputManager->setupScene(cLayout); inputManager->setAllComponentTriggerTarget(false); textPane = cLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(sInputPaneName, true); inputManager->setTriggerTarget(textPane, true); - self->mpNameLayout = cLayout; - self->mpInputEvent = inputEvent; - self->mpInputGui = inputManager; + mpNameLayout = cLayout; + mpInputEvent = inputEvent; + mpInputGui = inputManager; ipl::layout::Object* background = reinterpret_cast(__nw__FUl(0x580)); if (background != NULL) { - background = __ct__Q33ipl6layout6ObjectFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCc( - background, self->getHeap(), boardFile, "arc", "my_Back_a.brlyt"); + background = new (background) ipl::layout::Object(getHeap(), boardFile, "arc", "my_Back_a.brlyt"); } - self->mpBackgroundLayout = background; + mpBackgroundLayout = background; background->bind("my_Back_a_Apear.brlan", "Picture_00", false, true); - (self->mpBackgroundLayout) + (mpBackgroundLayout) ->bind("my_Back_a_Lost.brlan", "Picture_00", false, false); - (self->mpBackgroundLayout)->finishBinding(); - (self->mpBackgroundLayout) + (mpBackgroundLayout)->finishBinding(); + (mpBackgroundLayout) ->getAnim(0)->initAnmFrame(); - self->mString.clear(); + mString.clear(); memset(&sFriendInfo__Q23ipl5scene, 0, sizeof(sFriendInfo__Q23ipl5scene)); - self->mpNigaoe = 0; - self->mNigaoeState = 0; + mpNigaoe = 0; + mNigaoeState = 0; ipl::scene::SceneObj* addressScene = ipl::System::getScene(0x14); ipl::scene::Address* address = static_cast(addressScene); - self->mpFriendCache = address->getFriendCache(); + mpFriendCache = address->getFriendCache(); - s32 mode = self->mMode; + s32 mode = mMode; ipl::layout::Animator* animator; switch (mode) { case 0: { - self->mSelectedFriend = address->getChosenFriendIndex(); - get_friendinfo__Q33ipl5scene11AddressEditFv(self); - u32 friendIndex = self->mSelectedFriend; - if (self->mpFriendCache->getInfo(friendIndex).attr.status == 2) { - (self->mpCodeLayout)->getAnim(0x15)->initAnmFrame(); - (self->mpCodeLayout)->getAnim(0x1a)->initAnmFrame(); + mSelectedFriend = address->getChosenFriendIndex(); + get_friendinfo(); + u32 friendIndex = mSelectedFriend; + if (mpFriendCache->getInfo(friendIndex).attr.status == 2) { + (mpCodeLayout)->getAnim(0x15)->initAnmFrame(); + (mpCodeLayout)->getAnim(0x1a)->initAnmFrame(); } else { - (self->mpCodeLayout)->getAnim(0x10)->initAnmFrame(); - (self->mpCodeLayout)->getAnim(0x1b)->initAnmFrame(); + (mpCodeLayout)->getAnim(0x10)->initAnmFrame(); + (mpCodeLayout)->getAnim(0x1b)->initAnmFrame(); } - animator = (self->mpCodeLayout)->getAnim(0); + animator = (mpCodeLayout)->getAnim(0); animator->initFrame(); - const wchar_t* friendText = self->mString.mName; + const wchar_t* friendText = mString.mName; animator->restart(); - textPane = (self->mpCodeLayout) + textPane = (mpCodeLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, friendText); - textPane = (self->mpCodeLayout) + set_textbox(textPane, friendText); + textPane = (mpCodeLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, textPane, self->mString.mDisplayText); - self->mState = 0; + set_textbox(textPane, mString.mDisplayText); + mState = 0; break; } case 1: { - animator = (self->mpNameLayout)->getAnim(0); + animator = (mpNameLayout)->getAnim(0); animator->initFrame(); animator->restart(); - animator = (self->mpNameLayout)->getAnim(1); + animator = (mpNameLayout)->getAnim(1); animator->initFrame(); animator->restart(); - animator = (self->mpNameLayout)->getAnim(3); + animator = (mpNameLayout)->getAnim(3); animator->initFrame(); animator->restart(); - (self->mpCodeLayout)->getAnim(0x1a)->initAnmFrame(); - (self->mpCodeLayout)->getAnim(0x10)->initAnmFrame(); - textPane = (self->mpNameLayout) + (mpCodeLayout)->getAnim(0x1a)->initAnmFrame(); + (mpCodeLayout)->getAnim(0x10)->initAnmFrame(); + textPane = (mpNameLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_question_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x31)); - textPane = (self->mpNameLayout) + set_textbox(textPane, ipl::System::getMessage(0x31)); + textPane = (mpNameLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x47)); - self->mState = 0x10; + set_textbox(textPane, ipl::System::getMessage(0x47)); + mState = 0x10; break; } case 2: { - animator = (self->mpNameLayout)->getAnim(0); + animator = (mpNameLayout)->getAnim(0); animator->initFrame(); animator->restart(); - animator = (self->mpNameLayout)->getAnim(1); + animator = (mpNameLayout)->getAnim(1); animator->initFrame(); animator->restart(); - animator = (self->mpNameLayout)->getAnim(3); + animator = (mpNameLayout)->getAnim(3); animator->initFrame(); animator->restart(); - (self->mpCodeLayout)->getAnim(0x1a)->initAnmFrame(); - (self->mpCodeLayout)->getAnim(0x10)->initAnmFrame(); - textPane = (self->mpNameLayout) + (mpCodeLayout)->getAnim(0x1a)->initAnmFrame(); + (mpCodeLayout)->getAnim(0x10)->initAnmFrame(); + textPane = (mpNameLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_question_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x3f)); - textPane = (self->mpNameLayout) + set_textbox(textPane, ipl::System::getMessage(0x3f)); + textPane = (mpNameLayout) ->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, textPane, ipl::System::getMessage(0x48)); - self->mState = 0x10; + set_textbox(textPane, ipl::System::getMessage(0x48)); + mState = 0x10; break; } default: @@ -837,11 +775,11 @@ extern "C" void create__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* sel create_mode_done: s16 miiIndex[2]; - if (RFLSearchOfficialData(&self->mCreateID, + if (RFLSearchOfficialData(&mCreateID, reinterpret_cast(miiIndex))) { ipl::System::getMiiManager()->create(ipl::System::getMem2App(), 0x4c, 0x4c, miiIndex[0], - nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, self); - self->mNigaoeState = 1; + ipl::scene::AddressEdit::nigaoe_create_callback_edit, this); + mNigaoeState = 1; } ipl::System::getKeyboard()->init(); @@ -850,121 +788,113 @@ create_mode_done: if (balloon != NULL) { f32 balloonWidth = 30.0f; f32 balloonHeight = 120.0f; - EGG::Heap* heap = self->getHeap(); - ipl::math::VEC3 position; - ipl::math::VEC3* positionPtr = __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); - balloon = __ct__Q33ipl5scene11TextBalloonFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePCcPCcRCQ33ipl4math4VEC3ff( - balloon, heap, - self->mpBalloonFile, - "arc", "my_IplTopBalloon_a.brlyt", *positionPtr, balloonHeight, balloonWidth); + EGG::Heap* heap = getHeap(); + ipl::math::VEC3 position(0.0f, 0.0f, 0.0f); + balloon = new (balloon) ipl::scene::TextBalloon(heap, mpBalloonFile, "arc", "my_IplTopBalloon_a.brlyt", position, balloonHeight, balloonWidth); } - self->mpBalloon = balloon; + mpBalloon = balloon; } -extern "C" void stt_wait_decide_anm__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_wait_decide_anm() { bool complete = true; - void* button = ipl::System::getScene(5); + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); for (s32 i = 0; i < 5; ++i) { - u16 index = static_cast(self->mSelectedButton + 6); - complete = complete && !self->mpCodeLayout->getAnim(index)->isPlaying(); + u16 index = static_cast(mSelectedButton + 6); + complete = complete && !mpCodeLayout->getAnim(index)->isPlaying(); } if (!complete) { return; } - switch (self->mSelectedButton) { + switch (mSelectedButton) { case 2: { - u32 friendIndex = self->mSelectedFriend; + u32 friendIndex = mSelectedFriend; ipl::layout::Animator* animator; - if (self->mpFriendCache->getInfo(friendIndex).attr.status == 2) { - animator = self->mpCodeLayout->getAnim(0x15); + if (mpFriendCache->getInfo(friendIndex).attr.status == 2) { + animator = mpCodeLayout->getAnim(0x15); } else { - animator = self->mpCodeLayout->getAnim(0x1b); + animator = mpCodeLayout->getAnim(0x1b); } animator->initFrame(); animator->restart(); - animator = self->mpCodeLayout->getAnim(0x16); + animator = mpCodeLayout->getAnim(0x16); animator->initFrame(); animator->restart(); - animator = self->mpCodeLayout->getAnim(0x17); + animator = mpCodeLayout->getAnim(0x17); animator->initFrame(); animator->restart(); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - self->mState = 3; - self->mpBalloon->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); + button->reserveAnm(0xc); + mState = 3; + mpBalloon->fadeoutForce(); + reset_gui(); break; } case 1: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - ipl::layout::Animator* animator = self->mpNameLayout->getAnim(0); + button->reserveAnm(0xc); + button->reserveText(1, 0x2e); + button->reserveAnm(0xf); + ipl::layout::Animator* animator = mpNameLayout->getAnim(0); animator->initFrame(); animator->restart(); - animator = self->mpNameLayout->getAnim(1); + animator = mpNameLayout->getAnim(1); animator->initFrame(); animator->restart(); - animator = self->mpNameLayout->getAnim(2); + animator = mpNameLayout->getAnim(2); animator->initFrame(); animator->restart(); - self->mpNameLayout->getAnim(3)->initAnmFrame(); - animator = self->mpBackgroundLayout->getAnim(0); + mpNameLayout->getAnim(3)->initAnmFrame(); + animator = mpBackgroundLayout->getAnim(0); animator->initFrame(); animator->restart(); - nw4r::lyt::Pane* textPane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( + nw4r::lyt::Pane* textPane = mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_question_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, textPane, ipl::System::getMessage(0x32)); - textPane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, textPane, self->mString.mName); - textPane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, textPane, ipl::System::getMessage(0x49)); - self->mpBalloon->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); - self->mState = 0xc; + set_textbox(textPane, ipl::System::getMessage(0x32)); + textPane = mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox(textPane, mString.mName); + textPane = mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); + set_textbox(textPane, ipl::System::getMessage(0x49)); + mpBalloon->fadeoutForce(); + reset_gui(); + mState = 0xc; break; } case 3: { - if (self->mNigaoeState != 1) { - self->mNigaoeState = 0; + if (mNigaoeState != 1) { + mNigaoeState = 0; if (RFLGetAvailableOfficialDataNum() != 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( - self, 0x1c, self, 0, reinterpret_cast(1)); - self->mState = 0xb; + button->reserveAnm(0xc); + button->reserveAnm(0xb); + createChildScene(0x1c, this, 0, reinterpret_cast(1)); + mState = 0xb; } else { ipl::System::getDialog()->callBtn1(0x17c, 0x2e); - self->mState = 0xa; + mState = 0xa; } - self->mpBalloon->fadeoutForce(); + mpBalloon->fadeoutForce(); } break; } case 0: { SCParentalControlsInfo parentalInfo; BOOL parentalResult = SCGetParentalControl(&parentalInfo); - if (!getConnectEnableFlag__Q33ipl3ncd10NCDSettingFv()) { - animation__Q33ipl5scene6ButtonFi(button, 0x1d); + if (!ipl::ncd::NCDSetting::getConnectEnableFlag()) { + button->animation(0x1d); ipl::System::getDialog()->callBtn2(0x144, 0x146, 0x25, false); - self->mState = 0x27; + mState = 0x27; } else if ((SCGetWCFlags() & 1) == 0) { - animation__Q33ipl5scene6ButtonFi(button, 0x1d); + button->animation(0x1d); ipl::System::getDialog()->callBtn2(0x17e, 0x146, 0x25, false); - self->mState = 0x2a; + mState = 0x2a; } else if (parentalResult != 0 && (parentalInfo.enable & 0x80) != 0 && (SCGetNetContentRestrictions() & 2) != 0) { - animation__Q33ipl5scene6ButtonFi(button, 0x1d); + button->animation(0x1d); ipl::System::getDialog()->callBtn1(0x14c, 0x2e); - self->mState = 0x2d; + mState = 0x2d; } else { - s32 friendError = self->mpFriendCache->check(); + s32 friendError = mpFriendCache->check(); if (friendError == NWC24_ERR_NETWORK || - self->mpFriendCache->getLastErr() == NWC24_ERR_SERVER || - self->mpFriendCache->getLastErr() == NWC24_ERR_FULL) { + mpFriendCache->getLastErr() == NWC24_ERR_SERVER || + mpFriendCache->getLastErr() == NWC24_ERR_FULL) { wchar_t errorMessage[0x400]; wchar_t* errorMessagePointer = errorMessage - 1; for (s32 i = 0; i < 0x200; i++) { @@ -972,59 +902,57 @@ extern "C" void stt_wait_decide_anm__Q33ipl5scene11AddressEditFv(ipl::scene::Add errorMessagePointer += 2; *errorMessagePointer = 0; } - set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( - self, errorMessage, 0x400, - static_cast(self->mpFriendCache->getLastErr())); + set_err_msg(errorMessage, 0x400, + static_cast(mpFriendCache->getLastErr())); ipl::System::getDialog()->callBtn1(errorMessage, 0x2e); - animation__Q33ipl5scene6ButtonFi(button, 0x1d); - self->mState = 0x2e; + button->animation(0x1d); + mState = 0x2e; } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x27); - reserveText__Q33ipl5scene6ButtonFiUl(button, 0, 0x4f); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - self->requestSceneChange(0xb, reinterpret_cast(1)); - ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(0x1e); + button->reserveAnm(0xc); + button->reserveText(1, 0x27); + button->reserveText(0, 0x4f); + button->reserveAnm(0xf); + requestSceneChange(0xb, reinterpret_cast(1)); + ipl::layout::Animator* animator = mpCodeLayout->getAnim(0x1e); animator->initFrame(); animator->restart(); - self->mState = 0x30; + mState = 0x30; } } - self->mpBalloon->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); + mpBalloon->fadeoutForce(); + reset_gui(); break; } case 4: { - ipl::System::getDialog()->callBtn1(self->mString.getDispCodeLong(), 0x2e); - self->mpBalloon->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); - self->mState = 9; + ipl::System::getDialog()->callBtn1(mString.getDispCodeLong(), 0x2e); + mpBalloon->fadeoutForce(); + reset_gui(); + mState = 9; break; } default: - self->mState = 0; + mState = 0; break; } } -extern "C" void stt_wait_delete__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - void* button = ipl::System::getScene(5); +void ipl::scene::AddressEdit::stt_wait_delete() { + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); switch (ipl::System::getDialog()->getLastResult()) { case 2: { - delete_friendinfo__Q33ipl5scene11AddressEditFv(self); - ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(0x1d); + delete_friendinfo(); + ipl::layout::Animator* animator = mpCodeLayout->getAnim(0x1d); animator->initFrame(); animator->restart(); - self->mState = 6; + mState = 6; break; } case 1: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(0x1d); + button->reserveAnm(0xb); + ipl::layout::Animator* animator = mpCodeLayout->getAnim(0x1d); animator->initFrame(); animator->restart(); - self->mState = 5; + mState = 5; break; } default: @@ -1032,46 +960,41 @@ extern "C" void stt_wait_delete__Q33ipl5scene11AddressEditFv( } } -extern "C" void stt_add_confirm_fadein__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (!self->mpCodeLayout->getAnim(0)->isPlaying()) { - self->mState = 0x22; +void ipl::scene::AddressEdit::stt_add_confirm_fadein() { + if (!mpCodeLayout->getAnim(0)->isPlaying()) { + mState = 0x22; } } -extern "C" void stt_add_name_fadein__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (!self->mpNameLayout->getAnim(1)->isPlaying() && - !self->mpNameLayout->getAnim(3)->isPlaying() && - !self->mpNameLayout->getAnim(2)->isPlaying()) { - self->mState = 0x19; +void ipl::scene::AddressEdit::stt_add_name_fadein() { + if (!mpNameLayout->getAnim(1)->isPlaying() && + !mpNameLayout->getAnim(3)->isPlaying() && + !mpNameLayout->getAnim(2)->isPlaying()) { + mState = 0x19; } } -extern "C" void stt_add_mii_fadein__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (!self->mpNameLayout->getAnim(1)->isPlaying() && - !self->mpNameLayout->getAnim(4)->isPlaying() && - !self->mpNameLayout->getAnim(0)->isPlaying()) { - self->mState = 0x1d; +void ipl::scene::AddressEdit::stt_add_mii_fadein() { + if (!mpNameLayout->getAnim(1)->isPlaying() && + !mpNameLayout->getAnim(4)->isPlaying() && + !mpNameLayout->getAnim(0)->isPlaying()) { + mState = 0x1d; } } -extern "C" void stt_add_code_fadein__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (!self->mpNameLayout->getAnim(0)->isPlaying() && - !self->mpNameLayout->getAnim(1)->isPlaying() && - !self->mpNameLayout->getAnim(3)->isPlaying() && - !self->mpNameLayout->getAnim(4)->isPlaying() && - !self->mpNameLayout->getAnim(2)->isPlaying()) { - self->mState = 0x11; +void ipl::scene::AddressEdit::stt_add_code_fadein() { + if (!mpNameLayout->getAnim(0)->isPlaying() && + !mpNameLayout->getAnim(1)->isPlaying() && + !mpNameLayout->getAnim(3)->isPlaying() && + !mpNameLayout->getAnim(4)->isPlaying() && + !mpNameLayout->getAnim(2)->isPlaying()) { + mState = 0x11; } } -extern "C" void stt_add_name_input__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_add_name_input() { ipl::keyboard::Manager::State* state = ipl::System::getKeyboard()->getState(); - void* button = ipl::System::getScene(5); + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); s32 keyboardType = state->iplType; if (keyboardType == 3) { goto state_disappearing; @@ -1094,225 +1017,208 @@ state_at_or_after_disappearing: goto state_visible; state_disappearing: { - bool nameWasEmpty = self->mString.mName[0] == 0; + bool nameWasEmpty = mString.mName[0] == 0; if (state->pressOK) { - self->mString.setName(state->wcString); - nw4r::lyt::Pane* pane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( + mString.setName(state->wcString); + nw4r::lyt::Pane* pane = mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, self->mString.mName); + set_textbox(pane, mString.mName); } - if (self->mString.mName[0] == 0) { + if (mString.mName[0] == 0) { if (!nameWasEmpty) { - ipl::layout::Animator* animator = self->mpNameLayout->getAnim(6); + ipl::layout::Animator* animator = mpNameLayout->getAnim(6); animator->initFrame(); animator->restart(); - animator = self->mpNameLayout->getAnim(3); + animator = mpNameLayout->getAnim(3); animator->initFrame(); animator->restart(); } - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + button->reserveAnm(0xb); } else { if (nameWasEmpty) { - ipl::layout::Animator* animator = self->mpNameLayout->getAnim(2); + ipl::layout::Animator* animator = mpNameLayout->getAnim(2); animator->initFrame(); animator->restart(); - animator = self->mpNameLayout->getAnim(7); + animator = mpNameLayout->getAnim(7); animator->initFrame(); animator->restart(); } - if (self->mString.mbNameNotEmpty) { - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + if (mString.mbNameNotEmpty) { + button->reserveText(1, 0x2e); + button->reserveAnm(0xf); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + button->reserveAnm(0xb); } } } goto done; state_visible: { - self->mState = 0x19; + mState = 0x19; if (static_cast(ipl::System::getRegion()) == 6) { - enableKSXFilter__Q29textinput7ManagerFb( - ipl::System::getKeyboard()->baseMgr(), false); + ipl::System::getKeyboard()->baseMgr()->enableKSXFilter(false); } } goto done; state_hidden: - setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); + setDefaultTitleText(NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); done: return; } -extern "C" void stt_add_mii_normal__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - void* button = ipl::System::getScene(5); - if (isActive__Q33ipl5scene6ButtonCFv(button)) { - update__Q33ipl5scene6ButtonFv(button); +void ipl::scene::AddressEdit::stt_add_mii_normal() { + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); + if (button->isActive()) { + button->update(); } - if (self->mState == 0x1d) { - update__Q33ipl3gui11PaneManagerFv(self->mpInputGui); + if (mState == 0x1d) { + mpInputGui->update(); } } -extern "C" void stt_add_mii_input__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - ipl::scene::Base* child = self->getChild(); +void ipl::scene::AddressEdit::stt_add_mii_input() { + ipl::scene::Base* child = getChild(); if (child != NULL) { ipl::scene::FaceSelect* faceSelect = static_cast(child); s32 faceId = faceSelect->getSelectedFaceId(); if (faceId >= 0 && ipl::System::getMiiManager()->isAvalable(faceId) && - self->mNigaoeState == 0) { + mNigaoeState == 0) { RFLAdditionalInfo additionalInfo; RFLGetAdditionalInfo(&additionalInfo, RFLDataSource_Official, NULL, faceId); - if (!RFLiIsSameID(&self->mCreateID, &additionalInfo.createID)) { - self->mCreateID = additionalInfo.createID; + if (!RFLiIsSameID(&mCreateID, &additionalInfo.createID)) { + mCreateID = additionalInfo.createID; ipl::System::getMiiManager()->create(ipl::System::getMem2App(), 0x4c, 0x4c, faceId, - nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, - self); - self->mNigaoeState = 1; - self->mpInputGui->init(); - self->mpBalloon->fadeoutForce(); + ipl::scene::AddressEdit::nigaoe_create_callback_add, + this); + mNigaoeState = 1; + mpInputGui->init(); + mpBalloon->fadeoutForce(); } } } - if (self->getChild() == NULL && + if (getChild() == NULL && ipl::System::getSceneManager()->getReservedScene() == NULL) { - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), static_cast(self), NULL); - self->mState = 0x1d; - self->mNigaoeState = 0; + static_cast(ipl::System::getScene(5))->setEventHandler(static_cast< ::gui::EventHandler*>(this), NULL); + mState = 0x1d; + mNigaoeState = 0; } } -extern "C" void stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (self->mpNameLayout->getAnim(9)->isPlaying() || - self->mpNameLayout->getAnim(5)->isPlaying() || - self->mpNameLayout->getAnim(8)->isPlaying()) { +void ipl::scene::AddressEdit::stt_add_mii_fadeout() { + if (mpNameLayout->getAnim(9)->isPlaying() || + mpNameLayout->getAnim(5)->isPlaying() || + mpNameLayout->getAnim(8)->isPlaying()) { return; } - if (self->mSubState == 5) { - ipl::layout::Animator* animator = self->mpNameLayout->getAnim(1); + if (mSubState == 5) { + ipl::layout::Animator* animator = mpNameLayout->getAnim(1); animator->initFrame(); animator->restart(); - animator = self->mpNameLayout->getAnim(2); + animator = mpNameLayout->getAnim(2); animator->initFrame(); animator->restart(); nw4r::lyt::Pane* pane = - self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_question_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, ipl::System::getMessage(0x32)); - pane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, self->mString.mName); - pane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, ipl::System::getMessage(0x49)); - self->mState = 0x18; + mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_question_00", true); + set_textbox(pane, ipl::System::getMessage(0x32)); + pane = mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox(pane, mString.mName); + pane = mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_msg_00", true); + set_textbox(pane, ipl::System::getMessage(0x49)); + mState = 0x18; return; } - if (self->mSubState == 7) { - ipl::layout::Animator* animator = self->mpCodeLayout->getAnim(0); + if (mSubState == 7) { + ipl::layout::Animator* animator = mpCodeLayout->getAnim(0); animator->initFrame(); animator->restart(); - self->mpCodeLayout->getAnim(0x10)->initAnmFrame(); - self->mpCodeLayout->getAnim(0x11)->initAnmFrame(); - self->mpCodeLayout->getAnim(0x12)->initAnmFrame(); - animator = self->mpCodeLayout->getAnim(0x1c); + mpCodeLayout->getAnim(0x10)->initAnmFrame(); + mpCodeLayout->getAnim(0x11)->initAnmFrame(); + mpCodeLayout->getAnim(0x12)->initAnmFrame(); + animator = mpCodeLayout->getAnim(0x1c); animator->initFrame(); animator->restart(); nw4r::lyt::Pane* pane = - self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, ipl::System::getMessage(0x44)); - pane = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, self->mString.mName); - pane = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, self->mString.mDisplayText); - self->mState = 0x21; + mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); + set_textbox(pane, ipl::System::getMessage(0x44)); + pane = mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox(pane, mString.mName); + pane = mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); + set_textbox(pane, mString.mDisplayText); + mState = 0x21; } } -extern "C" void stt_ipt_wait_fadeout__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (!self->mpNameLayout->getAnim(5)->isPlaying() && - !self->mpNameLayout->getAnim(7)->isPlaying() && - !self->mpNameLayout->getAnim(6)->isPlaying() && - !self->mpNameLayout->getAnim(8)->isPlaying() && - !self->mpNameLayout->getAnim(9)->isPlaying() && - !self->mpBackgroundLayout->getAnim(1)->isPlaying()) { - self->mState = 0; +void ipl::scene::AddressEdit::stt_ipt_wait_fadeout() { + if (!mpNameLayout->getAnim(5)->isPlaying() && + !mpNameLayout->getAnim(7)->isPlaying() && + !mpNameLayout->getAnim(6)->isPlaying() && + !mpNameLayout->getAnim(8)->isPlaying() && + !mpNameLayout->getAnim(9)->isPlaying() && + !mpBackgroundLayout->getAnim(1)->isPlaying()) { + mState = 0; } } -extern "C" void stt_wait_del_msg_fadeout__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (!self->mpCodeLayout->getAnim(0x1d)->isPlaying()) { - u32 friendIndex = self->mSelectedFriend; - u32 status = self->mpFriendCache->getInfo(friendIndex).attr.status; +void ipl::scene::AddressEdit::stt_wait_del_msg_fadeout() { + if (!mpCodeLayout->getAnim(0x1d)->isPlaying()) { + u32 friendIndex = mSelectedFriend; + u32 status = mpFriendCache->getInfo(friendIndex).attr.status; ipl::layout::Animator* animator; if (status == 2) { - animator = self->mpCodeLayout->getAnim(0x10); + animator = mpCodeLayout->getAnim(0x10); } else { - animator = self->mpCodeLayout->getAnim(0x1a); + animator = mpCodeLayout->getAnim(0x1a); } animator->initFrame(); animator->restart(); - animator = self->mpCodeLayout->getAnim(0x11); + animator = mpCodeLayout->getAnim(0x11); animator->initFrame(); animator->restart(); - animator = self->mpCodeLayout->getAnim(0x12); + animator = mpCodeLayout->getAnim(0x12); animator->initFrame(); animator->restart(); - self->mState = 2; + mState = 2; } } -extern "C" void stt_msg_no_mii__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_msg_no_mii() { switch (ipl::System::getDialog()->getLastResult()) { case 1: - self->mpEditGui->init(); + mpEditGui->init(); for (u32 i = 0; i < 5; ++i) { - self->mPointCount[i] = 0; + mPointCount[i] = 0; } - self->mState = 0; + mState = 0; break; default: break; } } -extern "C" void stt_add_confirm_fadeout__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (!self->mpCodeLayout->getAnim(0x1e)->isPlaying()) { - void* button = ipl::System::getScene(5); - switch (self->mSubState) { +void ipl::scene::AddressEdit::stt_add_confirm_fadeout() { + if (!mpCodeLayout->getAnim(0x1e)->isPlaying()) { + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); + switch (mSubState) { case 5: { - ipl::layout::Animator* animator = self->mpNameLayout->getAnim(0); + ipl::layout::Animator* animator = mpNameLayout->getAnim(0); animator->initFrame(); animator->restart(); - self->mState = 0x1c; + mState = 0x1c; break; } case 7: - add_friendinfo__Q33ipl5scene11AddressEditFv(self); - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x29); - reset_friend__Q33ipl5scene7AddressFv(ipl::System::getScene(0x14)); - callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x4a, 0x2e); - self->mState = 0x26; + add_friendinfo(); + button->reserveText(1, 0x29); + static_cast(ipl::System::getScene(0x14))->reset_friend(); + ipl::System::getDialog()->callBtn1(0x4a, 0x2e); + mState = 0x26; break; default: break; @@ -1320,19 +1226,18 @@ extern "C" void stt_add_confirm_fadeout__Q33ipl5scene11AddressEditFv( } } -extern "C" void stt_wait_decide_anm_add__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_wait_decide_anm_add() { bool complete = true; for (s32 i = 0; i < 5; ++i) { - u16 index = static_cast(self->mSelectedButton + 6); - complete = (complete & !self->mpCodeLayout->getAnim(index)->isPlaying()) != 0; + u16 index = static_cast(mSelectedButton + 6); + complete = (complete & !mpCodeLayout->getAnim(index)->isPlaying()) != 0; } if (complete) { - switch (self->mSelectedButton) { + switch (mSelectedButton) { case 4: - self->mpEditGui->init(); - ipl::System::getDialog()->callBtn1(self->mString.getDispCodeLong(), 0x2e); - self->mState = 0x25; + mpEditGui->init(); + ipl::System::getDialog()->callBtn1(mString.getDispCodeLong(), 0x2e); + mState = 0x25; break; default: break; @@ -1340,31 +1245,29 @@ extern "C" void stt_wait_decide_anm_add__Q33ipl5scene11AddressEditFv( } } -extern "C" void stt_add_confirm_normal__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - void* button = ipl::System::getScene(5); - if (isActive__Q33ipl5scene6ButtonCFv(button)) { - update__Q33ipl5scene6ButtonFv(button); +void ipl::scene::AddressEdit::stt_add_confirm_normal() { + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); + if (button->isActive()) { + button->update(); } - if (self->mState == 0x22) { - self->mpEditGui->update(); + if (mState == 0x22) { + mpEditGui->update(); } } -extern "C" void stt_wait_parental__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_wait_parental() { ipl::scene::ParentalDialog* parental = static_cast(ipl::System::getScene(0x1b)); if (parental != NULL) { switch (parental->getResult()) { case 1: - self->mbParentalOK = true; - self->mState = 0x29; + mbParentalOK = true; + mState = 0x29; break; case 2: case 3: - self->mbParentalOK = false; - self->mState = 0x29; + mbParentalOK = false; + mState = 0x29; break; default: break; @@ -1372,20 +1275,19 @@ extern "C" void stt_wait_parental__Q33ipl5scene11AddressEditFv( } } -extern "C" void stt_wait_parental_wc__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_wait_parental_wc() { ipl::scene::ParentalDialog* parental = static_cast(ipl::System::getScene(0x1b)); if (parental != NULL) { switch (parental->getResult()) { case 1: - self->mbParentalOK = true; - self->mState = 0x2c; + mbParentalOK = true; + mState = 0x2c; break; case 2: case 3: - self->mbParentalOK = false; - self->mState = 0x2c; + mbParentalOK = false; + mState = 0x2c; break; default: break; @@ -1393,58 +1295,51 @@ extern "C" void stt_wait_parental_wc__Q33ipl5scene11AddressEditFv( } } -extern "C" void stt_wait_parental_dst__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (self->getChild() == NULL) { - if (self->mbParentalOK) { +void ipl::scene::AddressEdit::stt_wait_parental_dst() { + if (getChild() == NULL) { + if (mbParentalOK) { ipl::System::getFader()->fadeOut(); - reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(1)); - self->mState = 0x30; + reserveAllSceneDestruction(0x12, reinterpret_cast(1)); + mState = 0x30; } else { - animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xb); - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), static_cast(self), NULL); - self->mState = 0; + static_cast(ipl::System::getScene(5))->animation(0xb); + static_cast(ipl::System::getScene(5))->setEventHandler(static_cast< ::gui::EventHandler*>(this), NULL); + mState = 0; } } } -extern "C" void stt_wait_parental_dst_wc__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (self->getChild() == NULL) { - if (self->mbParentalOK) { +void ipl::scene::AddressEdit::stt_wait_parental_dst_wc() { + if (getChild() == NULL) { + if (mbParentalOK) { ipl::System::getFader()->fadeOut(); - reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(4)); - self->mState = 0x30; + reserveAllSceneDestruction(0x12, reinterpret_cast(4)); + mState = 0x30; } else { - animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xb); - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), static_cast(self), NULL); - self->mState = 0; + static_cast(ipl::System::getScene(5))->animation(0xb); + static_cast(ipl::System::getScene(5))->setEventHandler(static_cast< ::gui::EventHandler*>(this), NULL); + mState = 0; } } } -extern "C" void stt_msg_net__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_msg_net() { switch (ipl::System::getDialog()->getLastResult()) { case 2: - self->mState = 0; + mState = 0; break; case 1: { SCParentalControlsInfo info; if (SCGetParentalControl(&info) && (info.enable & SC_PARENTAL_FLAG_ENABLED)) { - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), NULL, NULL); - animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xc); - createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( - self, 0x1b, self, NULL, reinterpret_cast(1)); - self->mbParentalOK = false; - self->mState = 0x28; + static_cast(ipl::System::getScene(5))->setEventHandler(NULL, NULL); + static_cast(ipl::System::getScene(5))->animation(0xc); + createChildScene(0x1b, this, NULL, reinterpret_cast(1)); + mbParentalOK = false; + mState = 0x28; } else { ipl::System::getFader()->fadeOut(); - reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(1)); - self->mState = 0x30; + reserveAllSceneDestruction(0x12, reinterpret_cast(1)); + mState = 0x30; } break; } @@ -1453,26 +1348,23 @@ extern "C" void stt_msg_net__Q33ipl5scene11AddressEditFv( } } -extern "C" void stt_msg_wc__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_msg_wc() { switch (ipl::System::getDialog()->getLastResult()) { case 2: - self->mState = 0; + mState = 0; break; case 1: { SCParentalControlsInfo info; if (SCGetParentalControl(&info) && (info.enable & SC_PARENTAL_FLAG_ENABLED)) { - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), NULL, NULL); - animation__Q33ipl5scene6ButtonFi(ipl::System::getScene(5), 0xc); - createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( - self, 0x1b, self, NULL, reinterpret_cast(1)); - self->mbParentalOK = false; - self->mState = 0x2b; + static_cast(ipl::System::getScene(5))->setEventHandler(NULL, NULL); + static_cast(ipl::System::getScene(5))->animation(0xc); + createChildScene(0x1b, this, NULL, reinterpret_cast(1)); + mbParentalOK = false; + mState = 0x2b; } else { ipl::System::getFader()->fadeOut(); - reserveAllSceneDestruction__Q33ipl5scene4BaseFiPv(self, 0x12, reinterpret_cast(4)); - self->mState = 0x30; + reserveAllSceneDestruction(0x12, reinterpret_cast(4)); + mState = 0x30; } break; } @@ -1481,52 +1373,48 @@ extern "C" void stt_msg_wc__Q33ipl5scene11AddressEditFv( } } -extern "C" void stt_select_mii__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - if (self->getChild() != NULL) { +void ipl::scene::AddressEdit::stt_select_mii() { + if (getChild() != NULL) { ipl::scene::FaceSelect* faceSelect = - static_cast(self->getChild()); + static_cast(getChild()); s32 faceId = faceSelect->getSelectedFaceId(); if (faceId >= 0 && ipl::System::getMiiManager()->isAvalable(faceId) && - self->mNigaoeState == 0) { + mNigaoeState == 0) { RFLAdditionalInfo info; RFLGetAdditionalInfo(&info, RFLDataSource_Official, NULL, faceId); - if (!RFLiIsSameID(&self->mCreateID, &info.createID)) { - memcpy(&self->mCreateID, &info.createID, sizeof(self->mCreateID)); + if (!RFLiIsSameID(&mCreateID, &info.createID)) { + memcpy(&mCreateID, &info.createID, sizeof(mCreateID)); ipl::System::getMiiManager()->create( ipl::System::getMem2App(), 0x4c, 0x4c, faceId, - nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv, - self); - self->mNigaoeState = 1; - self->update_friendinfo(); + ipl::scene::AddressEdit::nigaoe_create_callback_edit, + this); + mNigaoeState = 1; + update_friendinfo(); } } } - if (self->getChild() == NULL && ipl::System::getReservedScene() == NULL) { - setEventHandler__Q33ipl5scene6ButtonFPQ23gui12EventHandlerPQ23gui12EventHandler( - ipl::System::getScene(5), static_cast(self), NULL); - self->mState = 0; - self->mNigaoeState = 0; - self->mpEditGui->init(); + if (getChild() == NULL && ipl::System::getReservedScene() == NULL) { + static_cast(ipl::System::getScene(5))->setEventHandler(static_cast< ::gui::EventHandler*>(this), NULL); + mState = 0; + mNigaoeState = 0; + mpEditGui->init(); for (u32 i = 0; i < 5; ++i) { - self->mPointCount[i] = 0; + mPointCount[i] = 0; } } } -extern "C" void set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - ipl::scene::AddressEdit*, nw4r::lyt::Pane* pane, const wchar_t* text) { +void ipl::scene::AddressEdit::set_textbox(nw4r::lyt::Pane* pane, const wchar_t* text) { nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast(pane); textBox->SetString(text, 0); } -extern "C" void setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - ipl::scene::AddressEdit* self, const wchar_t* text, bool flag) { +void ipl::scene::AddressEdit::setDefaultTitleText(const wchar_t* text, bool flag) { if (!flag && (text == NULL || *text != L'\0')) { goto set_empty_title; } - switch (self->mState) { + switch (mState) { case 0xe: case 0x1a: ipl::System::getKeyboard()->baseMgr()->setTitleText(ipl::System::getMessage(0x15e)); @@ -1550,16 +1438,15 @@ void ipl::scene::AddressEditEvent::onEvent(u32 componentId, u32 event, void* dat if (signedEvent == 1) { if (data != NULL) { - start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( - mpParent, paneName, static_cast(data)); + mpParent->start_point_event(paneName, static_cast(data)); } } else if (signedEvent >= 1) { if (signedEvent < 3) { - start_left_event__Q33ipl5scene11AddressEditFPCc(mpParent, paneName); + mpParent->start_left_event(paneName); } } else if (signedEvent >= 0 && data != NULL && static_cast(data)->downTrg(0x100800)) { - start_trig_event__Q33ipl5scene11AddressEditFPCc(mpParent, paneName); + mpParent->start_trig_event(paneName); } } @@ -1573,39 +1460,34 @@ void ipl::scene::AddressInputEvent::onEvent(u32 componentId, u32 event, void* da if (signedEvent == 1) { if (controller != NULL) { - start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( - mpParent, paneName, controller->getChannel()); + mpParent->start_ipt_point_event(paneName, controller->getChannel()); } } else if (signedEvent >= 1) { if (signedEvent < 3 && controller != NULL) { - start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( - mpParent, paneName, controller->getChannel()); + mpParent->start_ipt_left_event(paneName, controller->getChannel()); } } else if (signedEvent >= 0 && controller != NULL && controller->downTrg(0x100800)) { - start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( - mpParent, paneName, controller->getChannel()); + mpParent->start_ipt_trig_event(paneName, controller->getChannel()); } } -extern "C" void nigaoe_create_callback_edit__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( - ipl::nigaoe::Object* object, void* callbackWork) { +void ipl::scene::AddressEdit::nigaoe_create_callback_edit(ipl::nigaoe::Object* object, void* callbackWork) { ipl::scene::AddressEdit* self = static_cast(callbackWork); if (self->mpNigaoe != NULL) { - __dt__Q33ipl6nigaoe6ObjectFv(self->mpNigaoe, 1); + delete self->mpNigaoe; } self->mpNigaoe = object; nw4r::lyt::Pane* pane = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( "mii_icon_00", true); pane->GetMaterial()->SetTexture(0, object->getIconTexture()); self->mNigaoeState = 2; - self->mpBalloon->init(getName__Q33ipl6nigaoe6ObjectCFv(object), 0xa); + self->mpBalloon->init(object->getName(), 0xa); } -extern "C" void nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6nigaoe6ObjectPv( - ipl::nigaoe::Object* object, void* callbackWork) { +void ipl::scene::AddressEdit::nigaoe_create_callback_add(ipl::nigaoe::Object* object, void* callbackWork) { ipl::scene::AddressEdit* self = static_cast(callbackWork); if (self->mpNigaoe != NULL) { - __dt__Q33ipl6nigaoe6ObjectFv(self->mpNigaoe, 1); + delete self->mpNigaoe; } self->mpNigaoe = object; nw4r::lyt::Pane* pane = self->mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName( @@ -1614,7 +1496,7 @@ extern "C" void nigaoe_create_callback_add__Q33ipl5scene11AddressEditFPQ33ipl6ni pane = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("mii_icon_00", true); pane->GetMaterial()->SetTexture(0, object->getIconTexture()); self->mNigaoeState = 2; - self->mpBalloon->init(getName__Q33ipl6nigaoe6ObjectCFv(object), 0xa); + self->mpBalloon->init(object->getName(), 0xa); } extern "C" asm void calcFadein__Q33ipl5scene11AddressEditFv() { @@ -1677,156 +1559,155 @@ initCalcNormal_L1: blr } -extern "C" ipl::scene::FaderSceneCommand calcNormal__Q33ipl5scene11AddressEditFv( - ipl::scene::AddressEdit* self) { - switch (self->mState) { +ipl::scene::FaderSceneCommand ipl::scene::AddressEdit::calcNormal() { + switch (mState) { case 0: - stt_normal__Q33ipl5scene11AddressEditFv(self); + stt_normal(); break; case 1: - stt_wait_decide_anm__Q33ipl5scene11AddressEditFv(self); + stt_wait_decide_anm(); break; case 2: - stt_wait_btn_fadein__Q33ipl5scene11AddressEditFv(self); + stt_wait_btn_fadein(); break; case 3: - stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv(self); + stt_wait_btn_fadeout(); break; case 4: - stt_wait_del_msg_fadein__Q33ipl5scene11AddressEditFv(self); + stt_wait_del_msg_fadein(); break; case 5: - stt_wait_del_msg_fadeout__Q33ipl5scene11AddressEditFv(self); + stt_wait_del_msg_fadeout(); break; case 6: - stt_wait_del_msg_fadeout_to_rlt__Q33ipl5scene11AddressEditFv(self); + stt_wait_del_msg_fadeout_to_rlt(); break; case 7: - stt_wait_delete__Q33ipl5scene11AddressEditFv(self); + stt_wait_delete(); break; case 8: - stt_msg_del_rlt__Q33ipl5scene11AddressEditFv(self); + stt_msg_del_rlt(); break; case 9: - self->stt_msg_code_edit(); + stt_msg_code_edit(); break; case 10: - stt_msg_no_mii__Q33ipl5scene11AddressEditFv(self); + stt_msg_no_mii(); break; case 11: - stt_select_mii__Q33ipl5scene11AddressEditFv(self); + stt_select_mii(); break; case 12: - stt_ipt_wait_fadein__Q33ipl5scene11AddressEditFv(self); + stt_ipt_wait_fadein(); break; case 13: - stt_ipt_normal__Q33ipl5scene11AddressEditFv(self); + stt_ipt_normal(); break; case 14: - stt_ipt_input__Q33ipl5scene11AddressEditFv(self); + stt_ipt_input(); break; case 15: - stt_ipt_wait_fadeout__Q33ipl5scene11AddressEditFv(self); + stt_ipt_wait_fadeout(); break; case 16: - stt_add_code_fadein__Q33ipl5scene11AddressEditFv(self); + stt_add_code_fadein(); break; case 17: - stt_add_code_normal__Q33ipl5scene11AddressEditFv(self); + stt_add_code_normal(); break; case 18: - stt_add_code_input__Q33ipl5scene11AddressEditFv(self); + stt_add_code_input(); break; case 19: - stt_msg_code_invalid__Q33ipl5scene11AddressEditFv(self); + stt_msg_code_invalid(); break; case 20: - stt_msg_dup_wii_no__Q33ipl5scene11AddressEditFv(self); + stt_msg_dup_wii_no(); break; case 21: - stt_msg_dup_email__Q33ipl5scene11AddressEditFv(self); + stt_msg_dup_email(); break; case 22: - stt_msg_my_wii_no__Q33ipl5scene11AddressEditFv(self); + stt_msg_my_wii_no(); break; case 23: - stt_add_code_fadeout__Q33ipl5scene11AddressEditFv(self); + stt_add_code_fadeout(); break; case 24: - stt_add_name_fadein__Q33ipl5scene11AddressEditFv(self); + stt_add_name_fadein(); break; case 25: - stt_add_name_normal__Q33ipl5scene11AddressEditFv(self); + stt_add_name_normal(); break; case 26: - stt_add_name_input__Q33ipl5scene11AddressEditFv(self); + stt_add_name_input(); break; case 27: - stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(self); + stt_add_name_fadeout(); break; case 28: - stt_add_mii_fadein__Q33ipl5scene11AddressEditFv(self); + stt_add_mii_fadein(); break; case 29: - stt_add_mii_normal__Q33ipl5scene11AddressEditFv(self); + stt_add_mii_normal(); break; case 30: - stt_add_mii_input__Q33ipl5scene11AddressEditFv(self); + stt_add_mii_input(); break; case 31: - stt_msg_no_mii_add__Q33ipl5scene11AddressEditFv(self); + stt_msg_no_mii_add(); break; case 32: - stt_add_mii_fadeout__Q33ipl5scene11AddressEditFv(self); + stt_add_mii_fadeout(); break; case 33: - stt_add_confirm_fadein__Q33ipl5scene11AddressEditFv(self); + stt_add_confirm_fadein(); break; case 34: - stt_add_confirm_normal__Q33ipl5scene11AddressEditFv(self); + stt_add_confirm_normal(); break; case 35: - stt_add_confirm_fadeout__Q33ipl5scene11AddressEditFv(self); + stt_add_confirm_fadeout(); break; case 36: - stt_wait_decide_anm_add__Q33ipl5scene11AddressEditFv(self); + stt_wait_decide_anm_add(); break; case 37: - self->stt_msg_code_add(); + stt_msg_code_add(); break; case 38: - stt_msg_add_rlt__Q33ipl5scene11AddressEditFv(self); + stt_msg_add_rlt(); break; case 39: - stt_msg_net__Q33ipl5scene11AddressEditFv(self); + stt_msg_net(); break; case 40: - stt_wait_parental__Q33ipl5scene11AddressEditFv(self); + stt_wait_parental(); break; case 41: - stt_wait_parental_dst__Q33ipl5scene11AddressEditFv(self); + stt_wait_parental_dst(); break; case 42: - stt_msg_wc__Q33ipl5scene11AddressEditFv(self); + stt_msg_wc(); break; case 43: - stt_wait_parental_wc__Q33ipl5scene11AddressEditFv(self); + stt_wait_parental_wc(); break; case 44: - stt_wait_parental_dst_wc__Q33ipl5scene11AddressEditFv(self); + stt_wait_parental_dst_wc(); break; case 45: - self->stt_msg_parental(); + stt_msg_parental(); break; case 46: - self->stt_msg_nwc24_error(); + stt_msg_nwc24_error(); break; case 47: - stt_msg_no_established__Q33ipl5scene11AddressEditFv(self); + stt_msg_no_established(); break; } - switch (self->mState) { + switch (mState) { case 0: case 3: case 9: @@ -1841,22 +1722,22 @@ extern "C" ipl::scene::FaderSceneCommand calcNormal__Q33ipl5scene11AddressEditFv case 45: case 46: case 47: - calc__Q33ipl5scene11TextBalloonFv(self->mpBalloon); + mpBalloon->calc(); break; } - return self->mState == 0x30 + return mState == 0x30 ? ipl::scene::FADER_SCN_NEXT : ipl::scene::FADER_SCN_CONTINUE; } -extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_add_name_fadeout() { - if (!self->mpNameLayout->getAnim(5)->isPlaying() && - !self->mpNameLayout->getAnim(7)->isPlaying() && - !self->mpNameLayout->getAnim(6)->isPlaying() && - !self->mpNameLayout->getAnim(9)->isPlaying()) { - s32 state = self->mSubState; + if (!mpNameLayout->getAnim(5)->isPlaying() && + !mpNameLayout->getAnim(7)->isPlaying() && + !mpNameLayout->getAnim(6)->isPlaying() && + !mpNameLayout->getAnim(9)->isPlaying()) { + s32 state = mSubState; if (state == 6) { goto state_done; } @@ -1875,14 +1756,14 @@ extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::Ad goto state_seven; state_five: { - ipl::layout::Animator* pane = self->mpNameLayout->getAnim(1); + ipl::layout::Animator* pane = mpNameLayout->getAnim(1); pane->initFrame(); pane->restart(); - pane = self->mpNameLayout->getAnim(2); + pane = mpNameLayout->getAnim(2); pane->initFrame(); pane->restart(); - s32 inputType = self->mMode; + s32 inputType = mMode; switch (inputType) { case 2: goto address_type_two; @@ -1893,55 +1774,48 @@ extern "C" void stt_add_name_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::Ad } address_type_one: { - nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + nw4r::lyt::Pane* label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_question_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x31)); - label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + set_textbox(label, ipl::System::getMessage(0x31)); + label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_msg_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x47)); + set_textbox(label, ipl::System::getMessage(0x47)); } goto address_type_common; address_type_two: { - nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + nw4r::lyt::Pane* label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_question_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x3f)); - label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + set_textbox(label, ipl::System::getMessage(0x3f)); + label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_msg_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x48)); + set_textbox(label, ipl::System::getMessage(0x48)); } address_type_common: { - nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + nw4r::lyt::Pane* label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, self->mString.mDisplayText); - self->mState = 0x10; + set_textbox(label, mString.mDisplayText); + mState = 0x10; } goto state_done; } state_seven: { - ipl::layout::Animator* pane = self->mpNameLayout->getAnim(1); + ipl::layout::Animator* pane = mpNameLayout->getAnim(1); pane->initFrame(); pane->restart(); - pane = self->mpNameLayout->getAnim(4); + pane = mpNameLayout->getAnim(4); pane->initFrame(); pane->restart(); - nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + nw4r::lyt::Pane* label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_question_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x55)); - label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + set_textbox(label, ipl::System::getMessage(0x55)); + label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_mii_msg_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x8b)); - self->mState = 0x1c; + set_textbox(label, ipl::System::getMessage(0x8b)); + mState = 0x1c; } state_done: ; @@ -2081,7 +1955,7 @@ extern "C" asm void delete_friendinfo__Q33ipl5scene11AddressEditFv(void* self) { blr } -extern "C" u64 utf16_wiiid__Q33ipl5scene11AddressEditFPCw(const wchar_t* value) { +u64 ipl::scene::AddressEdit::utf16_wiiid(const wchar_t* value) { u64 result = 0; u64 multiplier = 1; for (int i = 0; i < 0x10; i++) { @@ -2307,27 +2181,27 @@ stt_wait_btn_fadein_L3: blr } -extern "C" void stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - u32 index = self->mSelectedFriend; - u32 friendType = self->mpFriendCache->getInfo(index).attr.status; +void ipl::scene::AddressEdit::stt_wait_btn_fadeout() { + u32 index = mSelectedFriend; + u32 friendType = mpFriendCache->getInfo(index).attr.status; u32 friendFinished; if (friendType == 2) { - friendFinished = !self->mpCodeLayout->getAnim(0x15)->isPlaying(); + friendFinished = !mpCodeLayout->getAnim(0x15)->isPlaying(); } else { - friendFinished = !self->mpCodeLayout->getAnim(0x1b)->isPlaying(); + friendFinished = !mpCodeLayout->getAnim(0x1b)->isPlaying(); } - bool finished = friendFinished && !self->mpCodeLayout->getAnim(0x16)->isPlaying(); - finished = finished && !self->mpCodeLayout->getAnim(0x17)->isPlaying(); + bool finished = friendFinished && !mpCodeLayout->getAnim(0x16)->isPlaying(); + finished = finished && !mpCodeLayout->getAnim(0x17)->isPlaying(); if (finished) { - nw4r::lyt::Pane* label = self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); + nw4r::lyt::Pane* label = mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); const wchar_t* message = ipl::System::getMessage(0x30); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw(self, label, message); + set_textbox(label, message); ipl::System::getDialog()->callS2Btn2(0x142, 0x141, true); - self->mpCodeLayout->getAnim(0x1c)->initFrame(); - self->mpCodeLayout->getAnim(0x1c)->restart(); - self->mState = 4; + mpCodeLayout->getAnim(0x1c)->initFrame(); + mpCodeLayout->getAnim(0x1c)->restart(); + mState = 4; } } @@ -2485,10 +2359,10 @@ stt_ipt_normal_L2: blr } -extern "C" void stt_ipt_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_ipt_input() { ipl::keyboard::Manager::State* state = ipl::System::getKeyboard()->getState(); ipl::scene::Manager* sceneManager = ipl::System::getSceneManager(); - void* button = sceneManager->getScene(5); + ipl::scene::Button* button = static_cast(sceneManager->getScene(5)); s32 keyboardType = state->iplType; if (keyboardType == ipl::keyboard::Manager::STATE_DISAPPEARING) { goto state_disappearing; @@ -2511,148 +2385,144 @@ state_at_or_after_disappearing: goto state_hidden_after_disappear; state_disappearing: { - bool nameWasEmpty = self->mString.mName[0] == 0; + bool nameWasEmpty = mString.mName[0] == 0; if (state->pressOK) { - self->mString.setName(state->wcString); + mString.setName(state->wcString); ipl::layout::Object* layout = - self->mpNameLayout; + mpNameLayout; nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, self->mString.mName); + set_textbox(pane, mString.mName); } - if (self->mString.mName[0] == 0) { + if (mString.mName[0] == 0) { if (!nameWasEmpty) { - ipl::layout::Animator* pane = self->mpNameLayout->getAnim(6); + ipl::layout::Animator* pane = mpNameLayout->getAnim(6); pane->initFrame(); pane->restart(); - pane = self->mpNameLayout->getAnim(3); + pane = mpNameLayout->getAnim(3); pane->initFrame(); pane->restart(); } - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + button->reserveAnm(0xb); } else { if (nameWasEmpty) { - ipl::layout::Animator* pane = self->mpNameLayout->getAnim(2); + ipl::layout::Animator* pane = mpNameLayout->getAnim(2); pane->initFrame(); pane->restart(); - pane = self->mpNameLayout->getAnim(7); + pane = mpNameLayout->getAnim(7); pane->initFrame(); pane->restart(); } - if (self->mString.mbNameNotEmpty != 0) { - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + if (mString.mbNameNotEmpty != 0) { + button->reserveText(1, 0x2e); + button->reserveAnm(0xf); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + button->reserveAnm(0xb); } } } goto done; state_hidden_after_disappear: { - self->mState = 0xd; + mState = 0xd; if (static_cast(ipl::System::getRegion()) == 6) { - enableKSXFilter__Q29textinput7ManagerFb(ipl::System::getKeyboard()->baseMgr(), false); + ipl::System::getKeyboard()->baseMgr()->enableKSXFilter(false); } } goto done; state_hidden: { - setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); + setDefaultTitleText(NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); } done: return; } -extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::stt_add_code_input() { ipl::keyboard::Manager::State* state = ipl::System::getKeyboard()->getState(); - void* button = ipl::System::getScene(5); + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); switch (state->iplType) { case ipl::keyboard::Manager::STATE_DISAPPEARING: { - bool codeWasEmpty = self->mString.mValue[0] == 0; + bool codeWasEmpty = mString.mValue[0] == 0; if (state->pressOK) { - if (self->mMode == 1) { + if (mMode == 1) { setWiiNo__Q43ipl5scene11AddressEdit6StringFPCw( - &self->mString, state->wcString); + &mString, state->wcString); } else { - self->mString.setEMail(state->wcString); + mString.setEMail(state->wcString); } - nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, self->mString.mDisplayText); + nw4r::lyt::Pane* label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox(label, mString.mDisplayText); } - if (self->mString.mValue[0] == 0) { + if (mString.mValue[0] == 0) { if (!codeWasEmpty) { - ipl::layout::Animator* pane = self->mpNameLayout->getAnim(6); + ipl::layout::Animator* pane = mpNameLayout->getAnim(6); pane->initFrame(); pane->restart(); - pane = self->mpNameLayout->getAnim(3); + pane = mpNameLayout->getAnim(3); pane->initFrame(); pane->restart(); } - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + button->reserveAnm(0xb); } else { if (codeWasEmpty) { - ipl::layout::Animator* pane = self->mpNameLayout->getAnim(2); + ipl::layout::Animator* pane = mpNameLayout->getAnim(2); pane->initFrame(); pane->restart(); - pane = self->mpNameLayout->getAnim(7); + pane = mpNameLayout->getAnim(7); pane->initFrame(); pane->restart(); } - if (self->mString.mbValidMail != 0 && - isDupCode__Q43ipl5scene11AddressEdit6StringCFv(&self->mString) == 0 && - isMyCode__Q43ipl5scene11AddressEdit6StringCFv(&self->mString) == 0) { - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + if (mString.mbValidMail != 0 && + isDupCode__Q43ipl5scene11AddressEdit6StringCFv(&mString) == 0 && + isMyCode__Q43ipl5scene11AddressEdit6StringCFv(&mString) == 0) { + button->reserveText(1, 0x2e); + button->reserveAnm(0xf); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + button->reserveAnm(0xb); } } break; } case ipl::keyboard::Manager::STATE_HIDDEN_AFTER_DISAPPEAR: if (state->pressOK) { - if (self->mString.mValue[0] != 0) { - if (self->mMode == 1) { + if (mString.mValue[0] != 0) { + if (mMode == 1) { if (isMyCode__Q43ipl5scene11AddressEdit6StringCFv( - &self->mString) != 0) { - callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x56, 0x2e); - self->mState = 0x16; + &mString) != 0) { + ipl::System::getDialog()->callBtn1(0x56, 0x2e); + mState = 0x16; } else if (isDupCode__Q43ipl5scene11AddressEdit6StringCFv( - &self->mString) != 0) { - callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x52, 0x2e); - self->mState = 0x14; - } else if (self->mString.mbValidMail == 0) { - callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x54, 0x2e); - self->mState = 0x13; + &mString) != 0) { + ipl::System::getDialog()->callBtn1(0x52, 0x2e); + mState = 0x14; + } else if (mString.mbValidMail == 0) { + ipl::System::getDialog()->callBtn1(0x54, 0x2e); + mState = 0x13; } else { - self->mState = 0x11; + mState = 0x11; } } else if (isDupCode__Q43ipl5scene11AddressEdit6StringCFv( - &self->mString) != 0) { - callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x53, 0x2e); - self->mState = 0x15; - } else if (self->mString.mbValidMail == 0) { - callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x1be, 0x2e); - self->mState = 0x13; + &mString) != 0) { + ipl::System::getDialog()->callBtn1(0x53, 0x2e); + mState = 0x15; + } else if (mString.mbValidMail == 0) { + ipl::System::getDialog()->callBtn1(0x1be, 0x2e); + mState = 0x13; } else { - self->mState = 0x11; + mState = 0x11; } } else { - self->mState = 0x11; + mState = 0x11; } } else { - self->mState = 0x11; + mState = 0x11; } break; case ipl::keyboard::Manager::STATE_HIDDEN: case ipl::keyboard::Manager::STATE_APPEARING: - if (self->mMode != 1) { - setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); + if (mMode != 1) { + setDefaultTitleText(NULL, ipl::System::getKeyboard()->baseMgr()->isVacancy()); } break; default: @@ -2660,38 +2530,35 @@ extern "C" void stt_add_code_input__Q33ipl5scene11AddressEditFv(ipl::scene::Addr } } -extern "C" void stt_add_code_fadeout__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - ipl::layout::Object* layout = self->mpNameLayout; +void ipl::scene::AddressEdit::stt_add_code_fadeout() { + ipl::layout::Object* layout = mpNameLayout; ipl::layout::Animator* pane = layout->getAnim(5); if (!pane->isPlaying()) { - pane = self->mpNameLayout->getAnim(6); + pane = mpNameLayout->getAnim(6); if (!pane->isPlaying()) { - nw4r::lyt::Pane* label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + nw4r::lyt::Pane* label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( reinterpret_cast("T_question_00"), true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x32)); - label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + set_textbox(label, ipl::System::getMessage(0x32)); + label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( reinterpret_cast("T_msg_00"), true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, ipl::System::getMessage(0x49)); - label = (self->mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( + set_textbox(label, ipl::System::getMessage(0x49)); + label = (mpNameLayout)->getNW4RLyt()->GetRootPane()->FindPaneByName( reinterpret_cast("T_name_00"), true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, label, self->mString.mName); - pane = self->mpNameLayout->getAnim(1); + set_textbox(label, mString.mName); + pane = mpNameLayout->getAnim(1); pane->initFrame(); pane->restart(); - if (self->mString.mName[0] != 0) { - pane = self->mpNameLayout->getAnim(2); + if (mString.mName[0] != 0) { + pane = mpNameLayout->getAnim(2); pane->initFrame(); pane->restart(); } else { - pane = self->mpNameLayout->getAnim(3); + pane = mpNameLayout->getAnim(3); pane->initFrame(); pane->restart(); } ipl::System::getKeyboard()->init(); - self->mState = 0x18; + mState = 0x18; } } } @@ -2830,10 +2697,10 @@ static ChkHostNameError CheckHostName(const char* hostName, u32 hostNameLength) -extern "C" void start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface( - ipl::scene::AddressEdit* self, const char* paneName, ipl::controller::Interface* controller) { - int buttonNo = get_button_no__Q33ipl5scene11AddressEditFPCc(self, paneName); - s32 state = self->mState; +void ipl::scene::AddressEdit::start_point_event( + const char* paneName, ipl::controller::Interface* controller) { + int buttonNo = get_button_no(paneName); + s32 state = mState; switch (state) { case 0: @@ -2858,14 +2725,14 @@ state0: } state0Button0: { - u32 friendIndex = self->mSelectedFriend; - u32 friendType = self->mpFriendCache->getInfo(friendIndex).attr.status; + u32 friendIndex = mSelectedFriend; + u32 friendType = mpFriendCache->getInfo(friendIndex).attr.status; if (friendType != 2) { goto done; } - s32* count = &self->mPointCount[buttonNo]; + s32* count = &mPointCount[buttonNo]; if (*count == 0) { - ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Object* layout = mpCodeLayout; ipl::layout::Animator* pane = layout->getAnim(buttonNo + 1); pane->initFrame(); pane->restart(); @@ -2878,28 +2745,27 @@ state0Button0: { } state0Button3: { - s32* count = &self->mPointCount[buttonNo]; + s32* count = &mPointCount[buttonNo]; if (*count == 0) { - ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Object* layout = mpCodeLayout; nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); - ipl::math::VEC3 position; - __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); + ipl::math::VEC3 position(0.0f, 0.0f, 0.0f); PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast(&position), reinterpret_cast(&position)); f32 xOffset = 15.0f; f32 height = 50.0f; f32 scale = 0.5f; position.x = position.x + xOffset; position.y = position.y + scale * height; - (self->mpBalloon) + (mpBalloon) ->setPos(position, false, 1); - (self->mpBalloon)->fadein(); + (mpBalloon)->fadein(); } } state0Common: { - s32* count = &self->mPointCount[buttonNo]; + s32* count = &mPointCount[buttonNo]; if (*count == 0) { - ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Object* layout = mpCodeLayout; ipl::layout::Animator* pane = layout->getAnim(buttonNo + 1); pane->initFrame(); pane->restart(); @@ -2920,21 +2786,20 @@ state22: } state22Button3: { - s32* count = &self->mPointCount[buttonNo]; + s32* count = &mPointCount[buttonNo]; if (*count == 0) { - ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Object* layout = mpCodeLayout; nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); - ipl::math::VEC3 position; - __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); + ipl::math::VEC3 position(0.0f, 0.0f, 0.0f); PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast(&position), reinterpret_cast(&position)); f32 xOffset = 15.0f; f32 height = 50.0f; f32 scale = 0.5f; position.x = position.x + xOffset; position.y = position.y + scale * height; - (self->mpBalloon) + (mpBalloon) ->setPos(position, false, 1); - (self->mpBalloon)->fadein(); + (mpBalloon)->fadein(); } ++*count; } @@ -2943,10 +2808,10 @@ done: return; } -extern "C" void start_left_event__Q33ipl5scene11AddressEditFPCc( - ipl::scene::AddressEdit* self, const char* paneName) { - int buttonNo = get_button_no__Q33ipl5scene11AddressEditFPCc(self, paneName); - s32 state = self->mState; +void ipl::scene::AddressEdit::start_left_event( + const char* paneName) { + int buttonNo = get_button_no(paneName); + s32 state = mState; switch (state) { case 0x22: goto state22; @@ -2969,14 +2834,14 @@ extern "C" void start_left_event__Q33ipl5scene11AddressEditFPCc( goto done; state0Friend: { - u32 friendIndex = self->mSelectedFriend; - u32 friendType = self->mpFriendCache->getInfo(friendIndex).attr.status; + u32 friendIndex = mSelectedFriend; + u32 friendType = mpFriendCache->getInfo(friendIndex).attr.status; if (friendType != 2) { goto done; } - s32* count = &self->mPointCount[buttonNo]; + s32* count = &mPointCount[buttonNo]; if (*count == 1) { - ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Object* layout = mpCodeLayout; ipl::layout::Animator* pane = layout->getAnim(buttonNo + 0xb); pane->initFrame(); pane->restart(); @@ -2988,18 +2853,18 @@ state0Friend: { } state0Button3: { - s32* count = &self->mPointCount[buttonNo]; + s32* count = &mPointCount[buttonNo]; if (*count == 1) { - (self->mpBalloon)->fadeoutForce(); + (mpBalloon)->fadeoutForce(); } --*count; goto done; } state0Common: { - s32* count = &self->mPointCount[buttonNo]; + s32* count = &mPointCount[buttonNo]; if (*count == 1) { - ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Object* layout = mpCodeLayout; ipl::layout::Animator* pane = layout->getAnim(buttonNo + 0xb); pane->initFrame(); pane->restart(); @@ -3015,9 +2880,9 @@ state22: goto done; } { - s32* count = &self->mPointCount[buttonNo]; + s32* count = &mPointCount[buttonNo]; if (*count == 1) { - (self->mpBalloon)->fadeoutForce(); + (mpBalloon)->fadeoutForce(); } --*count; } @@ -3026,10 +2891,10 @@ done: return; } -extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( - ipl::scene::AddressEdit* self, const char* paneName) { - int buttonNo = get_button_no__Q33ipl5scene11AddressEditFPCc(self, paneName); - s32 state = self->mState; +void ipl::scene::AddressEdit::start_trig_event( + const char* paneName) { + int buttonNo = get_button_no(paneName); + s32 state = mState; switch (state) { case 0: { @@ -3045,38 +2910,38 @@ extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( goto state0Event; state0Friend: { - u32 friendIndex = self->mSelectedFriend; - u32 friendType = self->mpFriendCache->getInfo(friendIndex).attr.status; + u32 friendIndex = mSelectedFriend; + u32 friendType = mpFriendCache->getInfo(friendIndex).attr.status; if (friendType != 2) { goto state0FriendError; } - reset_gui__Q33ipl5scene11AddressEditFv(self); - ipl::layout::Object* layout = self->mpCodeLayout; + reset_gui(); + ipl::layout::Object* layout = mpCodeLayout; ipl::layout::Animator* pane = layout->getAnim(buttonNo + 6); pane->initFrame(); pane->restart(); - self->mSelectedButton = buttonNo; + mSelectedButton = buttonNo; ipl::snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING"); - self->mState = 1; + mState = 1; break; } state0FriendError: { - callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x57, 0x2e); - (self->mpBalloon)->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); - self->mState = 0x2f; + ipl::System::getDialog()->callBtn1(0x57, 0x2e); + (mpBalloon)->fadeoutForce(); + reset_gui(); + mState = 0x2f; break; } state0Event: { - ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Object* layout = mpCodeLayout; ipl::layout::Animator* pane = layout->getAnim(buttonNo + 6); pane->initFrame(); pane->restart(); - self->mSelectedButton = buttonNo; + mSelectedButton = buttonNo; ipl::snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING"); - self->mState = 1; + mState = 1; break; } } @@ -3092,25 +2957,25 @@ extern "C" void start_trig_event__Q33ipl5scene11AddressEditFPCc( break; state22Button4: { - (self->mpBalloon)->fadeoutForce(); + (mpBalloon)->fadeoutForce(); for (s32 i = 0; i < 5; ++i) { - self->mPointCount[i] = 0; + mPointCount[i] = 0; } - ipl::layout::Object* layout = self->mpCodeLayout; + ipl::layout::Object* layout = mpCodeLayout; ipl::layout::Animator* pane = layout->getAnim(10); pane->initFrame(); pane->restart(); - self->mSelectedButton = buttonNo; + mSelectedButton = buttonNo; ipl::snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING"); - self->mState = 0x24; + mState = 0x24; break; } } } -extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( - ipl::scene::AddressEdit* self, const char* paneName, int channel) { - ipl::scene::SceneObj* button = ipl::System::getScene(5); +void ipl::scene::AddressEdit::start_ipt_trig_event( + const char* paneName, int channel) { + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); ipl::controller::Interface* controller = ipl::System::getControllerManager()->getYoungController(); if (controller == NULL) { return; @@ -3119,13 +2984,10 @@ extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( return; } if (!strcmp(sInputPaneName, paneName)) { - s32 state = self->mState; + s32 state = mState; switch (state) { case 0xd: { - ipl::keyboard::Manager::KeyboardSetting setting; - __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( - &setting, static_cast(0xb), - self->mString.mName, 0xa, 1); + ipl::keyboard::Manager::KeyboardSetting setting(static_cast(0xb), mString.mName, 0xa, 1); switch (ipl::System::getRegion()) { case 0xb: { @@ -3139,8 +3001,7 @@ extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( break; } case 6: - enableKSXFilter__Q29textinput7ManagerFb( - ipl::System::getKeyboard()->baseMgr(), true); + ipl::System::getKeyboard()->baseMgr()->enableKSXFilter(true); setting.type = static_cast(0xd); break; default: @@ -3148,50 +3009,39 @@ extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( } ipl::System::getKeyboard()->start(channel, setting); - setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, self->mString.mName, false); - if (self->mString.mbNameNotEmpty != 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + setDefaultTitleText(mString.mName, false); + if (mString.mbNameNotEmpty != 0) { + button->reserveAnm(0x10); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + button->reserveAnm(0xc); } - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + button->reserveText(1, 0x2e); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0xe; + mState = 0xe; break; } case 0x11: { - if (self->mMode == 1) { - ipl::keyboard::Manager::KeyboardSetting setting; - __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( - &setting, static_cast(0xc), - self->mString.mValue, 0x10, 2); + if (mMode == 1) { + ipl::keyboard::Manager::KeyboardSetting setting(static_cast(0xc), mString.mValue, 0x10, 2); ipl::System::getKeyboard()->start(channel, setting); } else { - ipl::keyboard::Manager::KeyboardSetting setting; - __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( - &setting, static_cast(7), - self->mString.mValue, 0x63, 5); + ipl::keyboard::Manager::KeyboardSetting setting(static_cast(7), mString.mValue, 0x63, 5); ipl::System::getKeyboard()->start(channel, setting); } - setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, self->mString.mValue, false); - if (self->mString.mbValidMail != 0 && - isDupCode__Q43ipl5scene11AddressEdit6StringCFv(&self->mString) == 0 && - isMyCode__Q43ipl5scene11AddressEdit6StringCFv(&self->mString) == 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + setDefaultTitleText(mString.mValue, false); + if (mString.mbValidMail != 0 && + isDupCode__Q43ipl5scene11AddressEdit6StringCFv(&mString) == 0 && + isMyCode__Q43ipl5scene11AddressEdit6StringCFv(&mString) == 0) { + button->reserveAnm(0x10); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + button->reserveAnm(0xc); } ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0x12; + mState = 0x12; break; } case 0x19: { - ipl::keyboard::Manager::KeyboardSetting setting; - __ct__Q43ipl8keyboard7Manager15KeyboardSettingFQ43ipl8keyboard7Manager12KeyboardTypePCwUlUl( - &setting, static_cast(0xb), - self->mString.mName, 0xa, 1); + ipl::keyboard::Manager::KeyboardSetting setting(static_cast(0xb), mString.mName, 0xa, 1); switch (ipl::System::getRegion()) { case 0xb: { @@ -3205,8 +3055,7 @@ extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( break; } case 6: - enableKSXFilter__Q29textinput7ManagerFb( - ipl::System::getKeyboard()->baseMgr(), true); + ipl::System::getKeyboard()->baseMgr()->enableKSXFilter(true); setting.type = static_cast(0xd); break; default: @@ -3214,32 +3063,30 @@ extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( } ipl::System::getKeyboard()->start(channel, setting); - setDefaultTitleText__Q33ipl5scene11AddressEditFPCwb( - self, self->mString.mName, false); - if (self->mString.mbNameNotEmpty != 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + setDefaultTitleText(mString.mName, false); + if (mString.mbNameNotEmpty != 0) { + button->reserveAnm(0x10); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + button->reserveAnm(0xc); } - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x2e); + button->reserveText(1, 0x2e); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0x1a; + mState = 0x1a; break; } case 0x1d: - if (self->mNigaoeState != 1) { - self->mNigaoeState = 0; + if (mNigaoeState != 1) { + mNigaoeState = 0; if (RFLGetAvailableOfficialDataNum() != 0) { - createChildScene__Q33ipl5scene4BaseFiPQ33ipl5scene4BasePQ33ipl5scene4BasePv( - self, 0x1c, self, NULL, reinterpret_cast(2)); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + createChildScene(0x1c, this, NULL, reinterpret_cast(2)); + button->reserveAnm(0x10); + button->reserveAnm(0xb); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0x1e; + mState = 0x1e; } else { - callBtn1__Q23ipl12DialogWindowFUlUl(ipl::System::getDialog(), 0x17c, 0x2e); + ipl::System::getDialog()->callBtn1(0x17c, 0x2e); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0x1f; + mState = 0x1f; } } break; @@ -3250,28 +3097,27 @@ extern "C" void start_ipt_trig_event__Q33ipl5scene11AddressEditFPCci( } -extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( - ipl::scene::AddressEdit* self, const char* paneName, int channel) { +void ipl::scene::AddressEdit::start_ipt_point_event( + const char* paneName, int channel) { ipl::controller::Interface* controller = ipl::System::getControllerManager()->getYoungController(); if (controller != NULL) { if (controller->getChannel() == channel) { - switch (self->mState) { + switch (mState) { case 0x1d: { char paneNameCopy[12] = "mii_icon_00"; if (strcmp(paneNameCopy, paneName) == 0) { - ipl::layout::Object* layout = self->mpNameLayout; + ipl::layout::Object* layout = mpNameLayout; nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true); - ipl::math::VEC3 position; - __ct__Q33ipl4math4VEC3Ffff(&position, 0.0f, 0.0f, 0.0f); + ipl::math::VEC3 position(0.0f, 0.0f, 0.0f); PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast(&position), reinterpret_cast(&position)); f32 y; f32 offset; offset = 50.0f; y = position.y; position.y = y + offset; - (self->mpBalloon) + (mpBalloon) ->setPos(position, false, 0); - (self->mpBalloon)->fadein(); + (mpBalloon)->fadein(); } break; } @@ -3280,11 +3126,9 @@ extern "C" void start_ipt_point_event__Q33ipl5scene11AddressEditFPCci( } } -extern "C" void onEventDerived__Q33ipl5scene11AddressEditFUlUlPCQ33ipl10controller9Interface( - ipl::scene::AddressEdit* self, u32 componentId, u32 event, - const ipl::controller::Interface* controller) { +void ipl::scene::AddressEdit::onEventDerived(u32 componentId, u32 event, const ipl::controller::Interface* controller) { - gui::Manager* manager = self->getGuiManager(); + ::gui::Manager* manager = getGuiManager(); gui::PaneComponent* component = static_cast(manager->getComponent(componentId)); nw4r::lyt::Pane* pane = component->getPane(); @@ -3299,239 +3143,238 @@ extern "C" void onEventDerived__Q33ipl5scene11AddressEditFUlUlPCQ33ipl10controll if (!controller->downTrg(0x100800)) { return; } - void* button = ipl::System::getScene(5); + ipl::scene::Button* button = static_cast(ipl::System::getScene(5)); ipl::System::getScene(0x14); if (strcmp(paneName, smButtonName__Q33ipl5scene6Button[5]) == 0) { - switch (self->mState) { + switch (mState) { case 0: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - reserveText__Q33ipl5scene6ButtonFiUl(button, 0, 0x23); - reserveText__Q33ipl5scene6ButtonFiUl(button, 1, 0x29); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - ipl::layout::Animator* frame = self->mpCodeLayout->getAnim(0x1e); + button->reserveAnm(0x1b); + button->reserveAnm(0xc); + button->reserveText(0, 0x23); + button->reserveText(1, 0x29); + button->reserveAnm(0xf); + ipl::layout::Animator* frame = mpCodeLayout->getAnim(0x1e); frame->initFrame(); frame->restart(); - self->mSubState = 5; + mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - (self->mpBalloon)->fadeoutForce(); - self->mState = 0x30; + (mpBalloon)->fadeoutForce(); + mState = 0x30; break; } case 0xd: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); - if (self->mString.mbNameNotEmpty != 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + button->reserveAnm(0x1b); + if (mString.mbNameNotEmpty != 0) { + button->reserveAnm(0x10); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + button->reserveAnm(0xc); } - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(9); + button->reserveAnm(0xb); + ipl::layout::Animator* frame = mpNameLayout->getAnim(9); frame->initFrame(); frame->restart(); - frame = self->mpBackgroundLayout->getAnim(1); + frame = mpBackgroundLayout->getAnim(1); frame->initFrame(); frame->restart(); - get_friendinfo__Q33ipl5scene11AddressEditFv(self); + get_friendinfo(); ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - self->mState = 0xf; + mState = 0xf; break; } case 0x11: { - self->requestSceneChange(self->getPreviousScene(), NULL); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); - if (self->mString.mbValidMail != 0 && + requestSceneChange(getPreviousScene(), NULL); + button->reserveAnm(0x1b); + if (mString.mbValidMail != 0 && isDupCode__Q43ipl5scene11AddressEdit6StringCFv( - &self->mString) == 0 && + &mString) == 0 && isMyCode__Q43ipl5scene11AddressEdit6StringCFv( - &self->mString) == 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); + &mString) == 0) { + button->reserveAnm(0x10); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); + button->reserveAnm(0xc); } ipl::layout::Animator* frame; - if (self->mString.mValue[0] != 0) { - frame = self->mpNameLayout->getAnim(6); + if (mString.mValue[0] != 0) { + frame = mpNameLayout->getAnim(6); frame->initFrame(); frame->restart(); } else { - frame = self->mpNameLayout->getAnim(7); + frame = mpNameLayout->getAnim(7); frame->initFrame(); frame->restart(); } - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - frame = self->mpNameLayout->getAnim(9); + button->reserveAnm(0xb); + frame = mpNameLayout->getAnim(9); frame->initFrame(); frame->restart(); - frame = self->mpNameLayout->getAnim(5); + frame = mpNameLayout->getAnim(5); frame->initFrame(); frame->restart(); - self->mSubState = 5; + mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - self->mState = 0x30; + mState = 0x30; break; } case 0x19: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); - if (self->mString.mbNameNotEmpty != 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(6); + button->reserveAnm(0x1b); + if (mString.mbNameNotEmpty != 0) { + button->reserveAnm(0x10); + ipl::layout::Animator* frame = mpNameLayout->getAnim(6); frame->initFrame(); frame->restart(); } else { - u16 nameLength = self->mString.mName[0]; + u16 nameLength = mString.mName[0]; if (nameLength != 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(6); + button->reserveAnm(0xc); + ipl::layout::Animator* frame = mpNameLayout->getAnim(6); frame->initFrame(); frame->restart(); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xc); - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(7); + button->reserveAnm(0xc); + ipl::layout::Animator* frame = mpNameLayout->getAnim(7); frame->initFrame(); frame->restart(); } } - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(5); + button->reserveAnm(0xf); + ipl::layout::Animator* frame = mpNameLayout->getAnim(5); frame->initFrame(); frame->restart(); - self->mSubState = 5; + mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - self->mState = 0x1b; + mState = 0x1b; break; } case 0x1d: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(5); + button->reserveAnm(0x1b); + button->reserveAnm(0x10); + button->reserveAnm(0xf); + ipl::layout::Animator* frame = mpNameLayout->getAnim(5); frame->initFrame(); frame->restart(); - frame = self->mpNameLayout->getAnim(8); + frame = mpNameLayout->getAnim(8); frame->initFrame(); frame->restart(); - self->mSubState = 5; + mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - self->mState = 0x20; - (self->mpBalloon)->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); + mState = 0x20; + (mpBalloon)->fadeoutForce(); + reset_gui(); break; } case 0x22: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1b); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - ipl::layout::Animator* frame = self->mpCodeLayout->getAnim(0x1e); + button->reserveAnm(0x1b); + button->reserveAnm(0x10); + button->reserveAnm(0xf); + ipl::layout::Animator* frame = mpCodeLayout->getAnim(0x1e); frame->initFrame(); frame->restart(); - self->mSubState = 5; + mSubState = 5; ipl::snd::getSystem()->startSE("WIPL_SE_CANCEL"); - self->mState = 0x23; - (self->mpBalloon)->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); + mState = 0x23; + (mpBalloon)->fadeoutForce(); + reset_gui(); break; } } } else if (strcmp(paneName, smButtonName__Q33ipl5scene6Button[7]) == 0) { - switch (self->mState) { + switch (mState) { case 0xd: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); - ipl::layout::Object* layout = self->mpCodeLayout; + button->reserveAnm(0x1d); + button->reserveAnm(0x10); + button->reserveAnm(0xb); + ipl::layout::Object* layout = mpCodeLayout; nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName( "T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, pane, self->mString.mName); - self->mSubState = 7; - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(9); + set_textbox(pane, mString.mName); + mSubState = 7; + ipl::layout::Animator* frame = mpNameLayout->getAnim(9); frame->initFrame(); frame->restart(); - frame = self->mpBackgroundLayout->getAnim(1); + frame = mpBackgroundLayout->getAnim(1); frame->initFrame(); frame->restart(); - self->update_friendinfo(); + update_friendinfo(); ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0xf; + mState = 0xf; break; } case 0x11: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - if (self->mString.mbNameNotEmpty != 0) { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); + button->reserveAnm(0x1d); + button->reserveAnm(0x10); + if (mString.mbNameNotEmpty != 0) { + button->reserveAnm(0xf); } else { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xb); + button->reserveAnm(0xb); } - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(5); + ipl::layout::Animator* frame = mpNameLayout->getAnim(5); frame->initFrame(); frame->restart(); - frame = self->mpNameLayout->getAnim(6); + frame = mpNameLayout->getAnim(6); frame->initFrame(); frame->restart(); - self->mSubState = 7; + mSubState = 7; ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0x17; + mState = 0x17; break; } case 0x19: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(5); + button->reserveAnm(0x1d); + button->reserveAnm(0x10); + button->reserveAnm(0xf); + ipl::layout::Animator* frame = mpNameLayout->getAnim(5); frame->initFrame(); frame->restart(); - frame = self->mpNameLayout->getAnim(6); + frame = mpNameLayout->getAnim(6); frame->initFrame(); frame->restart(); - self->mSubState = 7; + mSubState = 7; ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0x1b; - reset_gui__Q33ipl5scene11AddressEditFv(self); + mState = 0x1b; + reset_gui(); break; } case 0x1d: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0xf); - ipl::layout::Animator* frame = self->mpNameLayout->getAnim(9); + button->reserveAnm(0x1d); + button->reserveAnm(0x10); + button->reserveAnm(0xf); + ipl::layout::Animator* frame = mpNameLayout->getAnim(9); frame->initFrame(); frame->restart(); - self->mSubState = 7; + mSubState = 7; ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0x20; - (self->mpBalloon)->fadeoutForce(); - reset_gui__Q33ipl5scene11AddressEditFv(self); + mState = 0x20; + (mpBalloon)->fadeoutForce(); + reset_gui(); break; } case 0x22: { - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x1d); - reserveAnm__Q33ipl5scene6ButtonFi(button, 0x10); - ipl::layout::Animator* frame = self->mpCodeLayout->getAnim(0x1e); + button->reserveAnm(0x1d); + button->reserveAnm(0x10); + ipl::layout::Animator* frame = mpCodeLayout->getAnim(0x1e); frame->initFrame(); frame->restart(); - self->mSubState = 7; + mSubState = 7; ipl::snd::getSystem()->startSE("WIPL_SE_DECIDE"); - self->mState = 0x23; - (self->mpBalloon)->fadeoutForce(); + mState = 0x23; + (mpBalloon)->fadeoutForce(); break; } } } } -extern "C" void start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( - ipl::scene::AddressEdit* self, const char* paneName, int channel) { +void ipl::scene::AddressEdit::start_ipt_left_event( + const char* paneName, int channel) { ipl::controller::Interface* controller = ipl::System::getControllerManager()->getYoungController(); if (controller != NULL) { if (controller->getChannel() == channel) { - switch (self->mState) { + switch (mState) { case 0x1d: { char paneNameCopy[12] = "mii_icon_00"; if (strcmp(paneNameCopy, paneName) == 0) { - (self->mpBalloon)->fadeoutForce(); + (mpBalloon)->fadeoutForce(); } break; } @@ -3540,15 +3383,14 @@ extern "C" void start_ipt_left_event__Q33ipl5scene11AddressEditFPCci( } } -extern "C" void set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( - ipl::scene::AddressEdit* self, wchar_t* outErrMsg, u32 outErrMsgLen, NWC24Err nwc24Err) { +void ipl::scene::AddressEdit::set_err_msg(wchar_t* outErrMsg, u32 outErrMsgLen, NWC24Err nwc24Err) { memset(outErrMsg, 0, outErrMsgLen * sizeof(wchar_t)); wcsncat(outErrMsg, ipl::System::getMessage(MESG_ERROR_CODE), outErrMsgLen - wcslen(outErrMsg)); wchar_t nwc24ErrStr[32]; memset(nwc24ErrStr, 0, sizeof(nwc24ErrStr)); - void* friendListCache = self->mpFriendCache; - NWC24Err errorCode = getErrCode__Q33ipl5scene15FriendListCacheCFv(friendListCache); + void* friendListCache = mpFriendCache; + NWC24Err errorCode = static_cast(mpFriendCache->getErrCode()); swprintf(nwc24ErrStr, sizeof(nwc24ErrStr) / sizeof(wchar_t), L"%06d\n", errorCode); wcsncat(outErrMsg, nwc24ErrStr, outErrMsgLen - wcslen(outErrMsg)); @@ -3573,7 +3415,7 @@ extern "C" void set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err( -extern "C" int get_button_no__Q33ipl5scene11AddressEditFPCc(void*, const char* paneName) { +int ipl::scene::AddressEdit::get_button_no(const char* paneName) { int result = -1; for (int i = 0; i < 5; i++) { if (strcmp(smButtonName__Q33ipl5scene6Button[i], paneName) == 0) { @@ -3584,33 +3426,33 @@ extern "C" int get_button_no__Q33ipl5scene11AddressEditFPCc(void*, const char* p return result; } -extern "C" void add_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { +void ipl::scene::AddressEdit::add_friendinfo() { NWC24FriendInfo info ALIGN32; memset(&info, 0, sizeof(info)); - switch (self->mMode) { + switch (mMode) { case 1: info.attr.type = 1; { - const wchar_t* name = self->mString.mName; + const wchar_t* name = mString.mName; wchar_t* storedName = reinterpret_cast(info.attr.name); wcsncpy(storedName, name, 0xa); } - info.addr.wiiId = utf16_wiiid__Q33ipl5scene11AddressEditFPCw(self->mString.mValue); - memcpy(&info.attr.fdId, &self->mCreateID, sizeof(self->mCreateID)); + info.addr.wiiId = ipl::scene::AddressEdit::utf16_wiiid(mString.mValue); + memcpy(&info.attr.fdId, &mCreateID, sizeof(mCreateID)); break; case 2: info.attr.type = 2; { - const wchar_t* name = self->mString.mName; + const wchar_t* name = mString.mName; wchar_t* storedName = reinterpret_cast(info.attr.name); wcsncpy(storedName, name, 0xa); } { - const wchar_t* value = self->mString.mValue; + const wchar_t* value = mString.mValue; u8* address = reinterpret_cast(&info.addr); - UTF16ToANSI__Q33ipl7utility13CharacterCodeFPUcPCwl(address, value, sizeof(info.addr)); + ipl::utility::CharacterCode::UTF16ToANSI(address, value, sizeof(info.addr)); } - memcpy(&info.attr.fdId, &self->mCreateID, sizeof(self->mCreateID)); + memcpy(&info.attr.fdId, &mCreateID, sizeof(mCreateID)); break; default: break; @@ -3622,46 +3464,43 @@ extern "C" void add_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressE if (index >= 100) { index = 0; for (u32 remaining = 100; remaining != 0; --remaining) { - if (!self->mpFriendCache->isThere(index)) { + if (!mpFriendCache->isThere(index)) { break; } ++index; } } - self->mpFriendCache->add(index, info); - if (self->mMode == 2) { - self->mpFriendCache->sendRegisterMail(index); + mpFriendCache->add(index, info); + if (mMode == 2) { + mpFriendCache->sendRegisterMail(index); } } -extern "C" void get_friendinfo__Q33ipl5scene11AddressEditFv(ipl::scene::AddressEdit* self) { - const NWC24FriendInfo& friendInfo = self->mpFriendCache->getInfo(self->mSelectedFriend); +void ipl::scene::AddressEdit::get_friendinfo() { + const NWC24FriendInfo& friendInfo = mpFriendCache->getInfo(mSelectedFriend); memcpy(&sFriendInfo__Q23ipl5scene, &friendInfo, sizeof(sFriendInfo__Q23ipl5scene)); - self->mString.setName(reinterpret_cast(sFriendInfo__Q23ipl5scene.attr.name)); - const wchar_t* name = self->mString.mName; + mString.setName(reinterpret_cast(sFriendInfo__Q23ipl5scene.attr.name)); + const wchar_t* name = mString.mName; nw4r::lyt::Pane* namePane = - self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, namePane, name); + mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true); + set_textbox(namePane, name); wchar_t wiiNo[0x100]; wchar_t email[0x102]; if (sFriendInfo__Q23ipl5scene.attr.type == 1) { memset(wiiNo, 0, sizeof(wiiNo)); - wiiid_utf16__Q33ipl5scene11AddressEditFUxPw(sFriendInfo__Q23ipl5scene.addr.wiiId, wiiNo); - self->mString.setWiiNo(wiiNo); + ipl::scene::AddressEdit::wiiid_utf16(sFriendInfo__Q23ipl5scene.addr.wiiId, wiiNo); + mString.setWiiNo(wiiNo); } else { memset(email, 0, sizeof(email)); - ANSIToUTF16__Q33ipl7utility13CharacterCodeFPwPCUcl( - email, reinterpret_cast(&sFriendInfo__Q23ipl5scene.addr), 0x102); - self->mString.setEMail(email); + ipl::utility::CharacterCode::ANSIToUTF16(email, reinterpret_cast(&sFriendInfo__Q23ipl5scene.addr), 0x102); + mString.setEMail(email); } - const wchar_t* displayText = self->mString.mDisplayText; + const wchar_t* displayText = mString.mDisplayText; nw4r::lyt::Pane* friendCodePane = - self->mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); - set_textbox__Q33ipl5scene11AddressEditFPQ34nw4r3lyt4PanePCw( - self, friendCodePane, displayText); - memcpy(&self->mCreateID, &sFriendInfo__Q23ipl5scene.attr.fdId, sizeof(self->mCreateID)); + mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_frnd_crd_00", true); + set_textbox(friendCodePane, displayText); + memcpy(&mCreateID, &sFriendInfo__Q23ipl5scene.attr.fdId, sizeof(mCreateID)); } void ipl::scene::AddressEdit::update_friendinfo() { @@ -3672,5 +3511,5 @@ void ipl::scene::AddressEdit::update_friendinfo() { mSelectedFriend, reinterpret_cast(sFriendInfo__Q23ipl5scene.attr.name), sFriendInfo__Q23ipl5scene.attr.fdId); - reset_friend__Q33ipl5scene7AddressFv(ipl::System::getScene(0x14)); + static_cast(ipl::System::getScene(0x14))->reset_friend(); } -- 2.49.1