Compare commits

..

1 Commits

Author SHA1 Message Date
coah
5bd34f7bd5 Match HomeButton base unit
Name the HBMAllocMem result so create's pane manager web colors like the original, replace the lbl_ float externs with literals, move the unused HomeButton int constants to in-class initializers, and emit calc_battery before calc_letter. HBMBase.cpp is now Matching.
2026-09-28 04:31:42 +00:00
6 changed files with 63 additions and 80 deletions

View File

@@ -20,22 +20,6 @@ force_active:
- padding__Q23ipl5scene
- lbl_81695063
- lbl_81695067
- __vt__Q49textinput6extend4memo19NigaoeEventObserver
# textinput::toolbar::csPaneToAnimation points one past the end of csAninationFile.
block_relocations:
- source: .data:0x8165E15C
- source: .data:0x8165E19C
add_relocations:
- source: .data:0x8165E15C
type: abs
target: csAninationFile__Q29textinput7toolbar
addend: 0x1DC
- source: .data:0x8165E19C
type: abs
target: csAninationFile__Q29textinput7toolbar
addend: 0x1DC
quick_analysis: true
fill_gaps: false

View File

@@ -13938,7 +13938,7 @@ pppURLCheck = .rodata:0x816152A8; // type:object size:0x28 scope:local
lbl_816152D0 = .rodata:0x816152D0; // type:object size:0x10 scope:local data:4byte
csAninationFile__Q29textinput12candidatebox = .rodata:0x816152E0; // type:object size:0x378 scope:local
lbl_81615658 = .rodata:0x81615658; // type:object size:0xA0 scope:local data:4byte
csAninationFile__Q29textinput7toolbar = .rodata:0x816156F8; // type:object size:0x1DC scope:local data:4byte
csAninationFile__Q29textinput7toolbar = .rodata:0x816156F8; // type:object size:0x1E0 scope:local data:4byte
csAninationFile__Q29textinput11predictlang = .rodata:0x816158D8; // type:object size:0x268 scope:local
csAninationFileForSign__Q39textinput8keyboard10signwindow = .rodata:0x81615B40; // type:object size:0x268 scope:local
csPaneNameToControlKey__Q39textinput8keyboard10signwindow = .rodata:0x81615DA8; // type:object size:0x48 scope:local
@@ -17535,20 +17535,20 @@ __vt__Q39textinput12candidatebox4Base = .data:0x8165DFA8; // type:object size:0x
__vt__Q39textinput12candidatebox18CandidateBoxCaller = .data:0x8165DFFC; // type:object size:0x1C
__vt__Q39textinput11nw4rmanager11AnmObserver = .data:0x8165E018; // type:object size:0x4C
__vt__Q39textinput4util12AnimObserver = .data:0x8165E064; // type:object size:0xC
@6142 = .data:0x8165E070; // type:object size:0xC scope:local data:string
@6143 = .data:0x8165E080; // type:object size:0x10 scope:local data:string
@6144 = .data:0x8165E090; // type:object size:0xD scope:local data:string
@6145 = .data:0x8165E0A0; // type:object size:0xC scope:local data:string
lbl_8165E070 = .data:0x8165E070; // type:object size:0xC data:string
lbl_8165E080 = .data:0x8165E080; // type:object size:0x10 data:string
lbl_8165E090 = .data:0x8165E090; // type:object size:0xD data:string
lbl_8165E0A0 = .data:0x8165E0A0; // type:object size:0xC data:string
csPaneToAnimation__Q29textinput7toolbar = .data:0x8165E0B0; // type:object size:0x100
@6802 = .data:0x8165E1B0; // type:object size:0xD scope:local data:string
@6805 = .data:0x8165E1C0; // type:object size:0xC scope:local data:string
@6808 = .data:0x8165E1CC; // type:object size:0xD scope:local data:string
@6812 = .data:0x8165E1DC; // type:object size:0xC scope:local data:string
@6816 = .data:0x8165E1E8; // type:object size:0xC scope:local data:string
@6817 = .data:0x8165E1F8; // type:object size:0x10 scope:local data:string
@6837 = .data:0x8165E208; // type:object size:0x30 scope:local
@6894 = .data:0x8165E238; // type:object size:0xC scope:local data:string
@6937 = .data:0x8165E244; // type:object size:0x1C scope:local
lbl_8165E1B0 = .data:0x8165E1B0; // type:object size:0xD data:string
lbl_8165E1C0 = .data:0x8165E1C0; // type:object size:0xC data:string
lbl_8165E1CC = .data:0x8165E1CC; // type:object size:0xD data:string
lbl_8165E1DC = .data:0x8165E1DC; // type:object size:0xC data:string
lbl_8165E1E8 = .data:0x8165E1E8; // type:object size:0xC data:string
lbl_8165E1F8 = .data:0x8165E1F8; // type:object size:0x10 data:string
jumptable_8165E208 = .data:0x8165E208; // type:object size:0x30 scope:local
lbl_8165E238 = .data:0x8165E238; // type:object size:0xC data:string
jumptable_8165E244 = .data:0x8165E244; // type:object size:0x1C scope:local
__vt__Q39textinput7toolbar19ToggleButtonAnmPane = .data:0x8165E260; // type:object size:0x2C
__vt__Q39textinput7toolbar19NormalButtonAnmPane = .data:0x8165E28C; // type:object size:0x2C
__vt__Q39textinput7toolbar7AnmPane = .data:0x8165E2B8; // type:object size:0x2C
@@ -22266,10 +22266,10 @@ lbl_816973C4 = .sdata:0x816973C4; // type:object size:0x4 data:4byte
lbl_816973C8 = .sdata:0x816973C8; // type:object size:0x8
lbl_816973D0 = .sdata:0x816973D0; // type:object size:0x8 data:string
lbl_816973D8 = .sdata:0x816973D8; // type:object size:0x8 data:string
COMMON_BUTTON_ANIM__Q29textinput7toolbar = .sdata:0x816973E0; // type:object size:0x4 scope:local data:4byte
COMMON_CHG_ANIM__Q29textinput7toolbar = .sdata:0x816973E4; // type:object size:0x4 scope:local data:4byte
@6901 = .sdata:0x816973E8; // type:object size:0x5 scope:local data:string
@6908 = .sdata:0x816973F0; // type:object size:0x7 scope:local data:string
lbl_816973E0 = .sdata:0x816973E0; // type:object size:0x4 data:4byte
lbl_816973E4 = .sdata:0x816973E4; // type:object size:0x4 data:4byte
lbl_816973E8 = .sdata:0x816973E8; // type:object size:0x5 data:string
lbl_816973F0 = .sdata:0x816973F0; // type:object size:0x7 data:string
lbl_816973F8 = .sdata:0x816973F8; // type:object size:0x4 data:4byte
lbl_81697400 = .sdata:0x81697400; // type:object size:0x4 data:4byte
lbl_81697404 = .sdata:0x81697404; // type:object size:0x4 data:4byte

View File

@@ -788,7 +788,7 @@ config.libs = [
]
),
IPLSection("letterWriter", [
Object(Matching, "scene/letterWriter/iplLetterWriter.cpp"),
Object(Equivalent, "scene/letterWriter/iplLetterWriter.cpp"),
]
),
IPLSection("limitOver", [
@@ -911,7 +911,7 @@ config.libs = [
Object(NonMatching, "keyboard/tiCellPhone.cpp", extra_cflags=["-O4,p"]),
Object(NonMatching, "keyboard/tiInputForm.cpp", extra_cflags=["-O4,p"]),
Object(NonMatching, "keyboard/tiCandidateBox.cpp", extra_cflags=["-O4,p"]),
Object(Matching, "keyboard/tiToolBar.cpp", extra_cflags=["-O4,p"]),
Object(NonMatching, "keyboard/tiToolBar.cpp", extra_cflags=["-O4,p"]),
Object(NonMatching, "keyboard/tiPredictLang.cpp", extra_cflags=["-O4,p"]),
Object(NonMatching, "keyboard/tiSignWindow.cpp", extra_cflags=["-O4,p"]),
Object(NonMatching, "keyboard/tiString.cpp", extra_cflags=["-O4,p"]),

View File

@@ -10,10 +10,6 @@ namespace textinput {
namespace toolbar {
class Base {
public:
#ifdef TI_TOOLBAR_SAMPLE_CLASS
Base(Manager* manager) : mQwerty(true), meLanguage(USA), mpAllocator(NULL), mpManager(manager) {}
#endif
virtual void create(MEMAllocator* allocator) { mpAllocator = allocator; }
virtual void init() {}
virtual bool isQwerty() const { return mQwerty; }
@@ -35,12 +31,6 @@ namespace textinput {
class LayoutByNW4R : public Base, public nw4rmanager::Layout {
public:
#ifdef TI_TOOLBAR_SAMPLE_CLASS
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
: Base(manager), nw4rmanager::Layout(resAccessor, "fs_VK_toolbar_a.brlyt", observer), mpEventHandler(NULL),
mbIsEnableQwertyChg(false) {}
#endif
virtual ~LayoutByNW4R();
virtual void create(MEMAllocator* allocator) override;
virtual void init() override;
@@ -117,16 +107,7 @@ namespace textinput {
KeyType meKeyType; // 0x30
};
#ifdef TI_TOOLBAR_SAMPLE_CLASS
class Sample : public LayoutByNW4R {
public:
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
: LayoutByNW4R(manager, resAccessor, observer) {}
virtual ~Sample() {}
};
#else
class Sample {};
#endif
class NormalButtonAnmPane : public AnmPane {
public:

View File

@@ -1,6 +1,4 @@
#define TI_TOOLBAR_SAMPLE_CLASS
#include "keyboard/tiToolBar.h"
#undef TI_TOOLBAR_SAMPLE_CLASS
#include "keyboard/tiHKBManager.h"
#include "keyboard/tiLanguageIndependentData.h"
@@ -184,7 +182,7 @@ namespace textinput {
}
break;
}
case ANM_08:
case ANM_07:
case ANM_11: {
pane->changeAnimation(ANM_09);
break;

View File

@@ -18,6 +18,8 @@ namespace ipl {
return caption;
}
extern "C" char lbl_81650380[0x19] = "my_IplTopBalloon_a.brlyt";
LetterWriter::LetterWriter(EGG::Heap* heap, int type)
: TextWriter(heap), mbToFriend(false), mLetterState(LETTER_STATE_NORMAL), mLetterType((textinput::extend::letter::InputForm::Type)type),
mpTextSubjectWork(NULL), mpCaptionString(NULL), mpCaptionAllocator(NULL), mNwc24ErrCountdown2(0) {
@@ -89,7 +91,7 @@ namespace ipl {
f32 f0 = 30.0f;
f32 f1 = 120.0f;
mpNigaoeBalloon =
new TextBalloon(getSceneHeap(), mpBalloonFile, "arc", "my_IplTopBalloon_a.brlyt",
new TextBalloon(getSceneHeap(), mpBalloonFile, "arc", lbl_81650380,
math::VEC3(0.0f, (f1 = 120.0f, 0.0f), (f0 = 30.0f, 0.0f)), f1, f0);
// Scroller
@@ -291,10 +293,6 @@ namespace ipl {
System::getKeyboard()->endMgr();
}
FaderSceneCommand LetterWriter::calcFadeout() {
return TextWriter::calcFadeout();
}
void LetterWriter::onEventDerived(u32 compId, u32 event, const controller::Interface* con) {
if (mState != STATE_SEL_FACE) {
if (getMemoManager()->getState()->getStateType() != textinput::extend::memo::Manager::ST_Appearing) {
@@ -380,10 +378,30 @@ namespace ipl {
}
}
FaderSceneCommand LetterWriter::calcFadeout() {
return TextWriter::calcFadeout();
}
extern "C" char lbl_816503BF[] = "WIPL_SE_DECIDE";
extern "C" char lbl_816503CE[0x12A] =
"\x91\x97\x90\x4D\x8E\xB8\x94\x73\n\0"
"NWC24InitMsgObj err\n\0"
"NWC24SetMsgToId err\n\0"
"[to]: %016llu\n\0"
"NWC24SetMsgText err\n\0"
"RFLSetOfficial2NWC24Msg err = %d\n\0"
"NWC24SetMsgMBNoReply err\n\0"
"setMsgCommand err\n\0"
"NWC24SetMsgAttached err\n\0"
"NWC24CommitMsg err\n\0"
"NWC24SetMsgToAddr err\n\0"
"[LetterWriter]: send to %s\n\0"
"setMsgSubjectAndTextPublic err\n\0";
void LetterWriter::onSend() {
Button* button = getButton();
snd::getSystem()->startSE("WIPL_SE_DECIDE");
snd::getSystem()->startSE(lbl_816503BF);
unk_0x7D = false;
@@ -399,7 +417,7 @@ namespace ipl {
}
if (sendMessageByNWC24(myUserId, mWCString) != 0) {
OSReport("送信失敗\n"); // "Send failure"
OSReport(lbl_816503CE);
} else {
PlayTimeLog::sendMsgLog((wchar_t*)mFriendInfo.attr.name);
getBoard()->reopen_log();
@@ -470,26 +488,27 @@ namespace ipl {
int LetterWriter::sendToWii(NWC24UserId userId, const wchar_t* wcString) {
NWC24MsgObj msgObj;
const char* report = lbl_81650380;
// Create message object
if (!System::getNwc24Manager()->initMsgObj(&msgObj, NWC24_MSGTYPE_WII_MENU)) {
OSReport("NWC24InitMsgObj err\n");
OSReport(report + 0x58);
return SEND_ERR_NWC24;
}
// Set message to ID (in this case, my user ID)
if (!System::getNwc24Manager()->setMsgToId(&msgObj, userId)) {
OSReport("NWC24SetMsgToId err\n");
OSReport(report + 0x6D);
return SEND_ERR_NWC24;
}
OSReport("[to]: %016llu\n", userId);
OSReport(report + 0x82, userId);
// Set letter contents
if (*wcString != 0) {
if (!System::getNwc24Manager()->setMsgText(&msgObj, (char*)wcString, wcslen(wcString) * sizeof(wchar_t), NWC24_UTF_16BE,
NWC24_ENC_BASE64)) {
OSReport("NWC24SetMsgText err\n");
OSReport(report + 0x91);
return SEND_ERR_NWC24;
}
} else {
@@ -499,7 +518,7 @@ namespace ipl {
if (!System::getNwc24Manager()->setMsgText(&msgObj, (char*)blank, wcslen(blank) * sizeof(wchar_t), NWC24_UTF_16BE,
NWC24_ENC_BASE64)) {
OSReport("NWC24SetMsgText err\n");
OSReport(report + 0x91);
return SEND_ERR_NWC24;
}
}
@@ -509,19 +528,19 @@ namespace ipl {
RFLCharData data;
RFLErrcode err = RFLiSetOfficial2NWC24Msg(&msgObj, &data, mSelectedFaceId);
if (err != RFLErrcode_Success) {
OSReport("RFLSetOfficial2NWC24Msg err = %d\n", err);
OSReport(report + 0xA6, err);
return SEND_ERR_RFL;
}
}
// Do not reply
if (!System::getNwc24Manager()->setMsgMBNoReply(&msgObj, false)) {
OSReport("NWC24SetMsgMBNoReply err\n");
OSReport(report + 0xC8);
return SEND_ERR_NWC24;
}
if (!System::getNwc24Manager()->setLedPattern(&msgObj)) {
OSReport("setMsgCommand err\n");
OSReport(report + 0xE2);
return SEND_ERR_NWC24;
}
@@ -530,14 +549,14 @@ namespace ipl {
u32 picLength = 0;
const void* picData = board->getPicture(&picLength);
if (NWC24SetMsgAttached(&msgObj, picData, picLength, NWC24_X_WII_PICTURE) != NWC24_OK) {
OSReport("NWC24SetMsgAttached err\n");
OSReport(report + 0xF5);
return SEND_ERR_NWC24;
}
}
// Send!
if (!System::getNwc24Manager()->commitMsg(&msgObj)) {
OSReport("NWC24CommitMsg err\n");
OSReport(report + 0x10E);
return SEND_ERR_NWC24;
}
@@ -546,32 +565,33 @@ namespace ipl {
int LetterWriter::sendToPC(NWC24UserId userId, const wchar_t* wcString) {
NWC24MsgObj msgObj;
const char* report = lbl_816503CE + 0x4E;
// Create message object
if (!System::getNwc24Manager()->initMsgObj(&msgObj, NWC24_MSGTYPE_PUBLIC)) {
OSReport("NWC24InitMsgObj err\n");
OSReport(report + 0xA);
return SEND_ERR_NWC24;
}
// Set message to ID (in this case, my user ID)
if (!System::getNwc24Manager()->setMsgToAddr(&msgObj, mFriendInfo.addr.mailAddr, strlen(mFriendInfo.addr.mailAddr))) {
OSReport("NWC24SetMsgToAddr err\n");
OSReport(report + 0xD4);
return SEND_ERR_NWC24;
}
OSReport("[LetterWriter]: send to %s\n", mFriendInfo.addr.mailAddr);
OSReport(report + 0xEB, mFriendInfo.addr.mailAddr);
// Set letter contents
const wchar_t* subject = System::getMessage(MESG_LETTERWRITER_EMAIL_SUBJECT);
if (!System::getNwc24Manager()->setMsgSubjectAndTextPublic(&msgObj, (u16*)subject, wcslen(subject), (u16*)wcString, wcslen(wcString),
mpTextSubjectWork, mTextSubjectWorkSize)) {
OSReport("setMsgSubjectAndTextPublic err\n");
OSReport(report + 0x107);
return SEND_ERR_NWC24;
}
// Send!
if (!System::getNwc24Manager()->commitMsg(&msgObj)) {
OSReport("NWC24CommitMsg err\n");
OSReport(report + 0xC0);
return SEND_ERR_NWC24;
}