Compare commits

...

10 Commits

Author SHA1 Message Date
coah
b16f07287c cleanup(AOSSLink): name sleep/IP helpers and NCD config BSS
- AOSS_813FD17C → AOSSi_SleepAlarmHandler
- AOSS_813FD18C → AOSSi_SleepMs
- AOSS_813FD25C → AOSSi_StoreIpv4Octets
- AOSS_810BD4A8 → AOSSi_NcdIfConfig
- AOSS_810BD608 → AOSSi_NcdIpConfig

DOL sha1 unchanged.
2026-10-01 18:44:34 -05:00
coah
df48bc9f76 Restore SD title switch block emission order (#656) 2026-10-01 18:43:05 -05:00
coah
3bd814f042 cleanup(SDMemory): rename iplSDMemory_813EE358 to containsTitleId (#655)
Helper scans a title-id list for a match; unused SDMemory* param kept.
Verified ok + sha1 26116613f624061ba99c8d1a299aaa6efa85670d.
2026-10-01 18:42:39 -05:00
coah
51b78ed7da cleanup(iplBalloon): name fade/align/margin fields (#654)
Rename TextBalloon unk_ members and ctor/setPos params.

Co-authored-by: coah <coah80@users.noreply.github.com>
2026-10-01 18:40:27 -05:00
coah
3eb5d8faee cleanup(iplAOSSThread): name stack sentinel like RakuStack (#653)
Replace *(u32*)(mpStackBuffer + 0x3FC0) with AOSSStack::sentinel.

Co-authored-by: coah <coah80@users.noreply.github.com>
2026-10-01 18:40:21 -05:00
coah
d99950fc88 cleanup(tiCandidateBox): drop unused sdata2 float decls (#652)
Removed seven bare extern lbl_81694D* decls that were never referenced.
Verified ok + sha1 26116613f624061ba99c8d1a299aaa6efa85670d.
2026-10-01 18:38:09 -05:00
coah
98d03059bd cleanup(iplBoardObject): rename Cos/Sin Ghidra locals (#651)
dVar2 → cosF, dVar3 → sinF in BoardObject::stt_stand.

Co-authored-by: coah <coah80@users.noreply.github.com>
2026-10-01 18:37:42 -05:00
coah
830e2f3920 cleanup(iplSound): name pitch/volume sdata2 float constants (#650)
lbl_816946A8 → scSoundTwoF (2.0f), lbl_816946AC → scSoundOneF (1.0f),
lbl_816946B0 → scSoundThirtyF (30.0f), lbl_816946B4 → scSoundSixtyF (60.0f).
2026-10-01 18:37:35 -05:00
coah
c1b00d8a14 cleanup(Date): drop unused lbl_816948F0 sdata2 decl (#649)
Bare extern was never referenced; scDateZeroF remains.
Verified ok + sha1 26116613f624061ba99c8d1a299aaa6efa85670d.
2026-10-01 18:37:29 -05:00
coah
9acdd7f8dc cleanup(WDScan): name OUI sdata/sdata2 padding bytes (#648)
Rename leftover lbl_* pad bytes that sit between the RSN/WPA OUI
triples (and after scWpaFindOui*) so force_active and locals match
the existing sc* naming.
2026-10-01 18:37:02 -05:00
13 changed files with 99 additions and 102 deletions

View File

@@ -29,8 +29,8 @@ force_active:
- strspn
- strcspn
- padding__Q23ipl5scene
- lbl_81695063
- lbl_81695067
- scRsnOuiPad
- scWpaOuiPad
- __vt__Q49textinput6extend4memo19NigaoeEventObserver
# textinput::toolbar::csPaneToAnimation points one past the end of csAninationFile.

View File

@@ -81,8 +81,8 @@ usbapStack = .bss:0x810BC460; // type:object size:0x1000
usbapMessageQ = .bss:0x810BD460; // type:object size:0x20
usbapNickname = .bss:0x810BD480; // type:object size:0x18
m_allocator__Q23ipl5scene = .bss:0x810BD498; // type:object size:0x10
AOSS_810BD4A8 = .bss:0x810BD4A8; // type:object size:0x160 data:byte
AOSS_810BD608 = .bss:0x810BD608; // type:object size:0x7C8 data:4byte
AOSSi_NcdIfConfig = .bss:0x810BD4A8; // type:object size:0x160 data:byte
AOSSi_NcdIpConfig = .bss:0x810BD608; // type:object size:0x7C8 data:4byte
RakuRakuThread_810BDDD0 = .bss:0x810BDDD0; // type:object size:0x10
RakuRakuThread_810BDDE0 = .bss:0x810BDDE0; // type:object size:0xF4 data:4byte
RakuRakuThread_810BDED4 = .bss:0x810BDED4; // type:object size:0x24
@@ -4866,7 +4866,7 @@ onDialogState9__Q33ipl5scene8SDMemoryFv = .text:0x813EDF04; // type:function siz
onDialogState10__Q33ipl5scene8SDMemoryFv = .text:0x813EDFA8; // type:function size:0x130
onDialogState11__Q33ipl5scene8SDMemoryFv = .text:0x813EE0D8; // type:function size:0xE0
onDialogState12__Q33ipl5scene8SDMemoryFv = .text:0x813EE1B8; // type:function size:0x1A0
iplSDMemory_813EE358 = .text:0x813EE358; // type:function size:0x44
iplSDMemory_containsTitleId = .text:0x813EE358; // type:function size:0x44
onDialogState13__Q33ipl5scene8SDMemoryFv = .text:0x813EE39C; // type:function size:0xEC
onDialogState14__Q33ipl5scene8SDMemoryFv = .text:0x813EE488; // type:function size:0x1C4
onDialogState15__Q33ipl5scene8SDMemoryFv = .text:0x813EE64C; // type:function size:0x12C
@@ -5133,11 +5133,11 @@ cancel__Q33ipl5scene10AOSSThreadFv = .text:0x813FCE20; // type:function size:0x5
finish__Q33ipl5scene10AOSSThreadFP13NCDAossConfigPi = .text:0x813FCE70; // type:function size:0x2FC
printInfo__Q33ipl5scene10AOSSThreadFv = .text:0x813FD16C; // type:function size:0x4
AOSSi_Cancel = .text:0x813FD170; // type:function size:0xC
AOSS_813FD17C = .text:0x813FD17C; // type:function size:0x10
AOSS_813FD18C = .text:0x813FD18C; // type:function size:0x88
AOSSi_SleepAlarmHandler = .text:0x813FD17C; // type:function size:0x10
AOSSi_SleepMs = .text:0x813FD18C; // type:function size:0x88
AOSSi_Alloc = .text:0x813FD214; // type:function size:0x24
AOSSi_Free = .text:0x813FD238; // type:function size:0x24
AOSS_813FD25C = .text:0x813FD25C; // type:function size:0x2C
AOSSi_StoreIpv4Octets = .text:0x813FD25C; // type:function size:0x2C
AOSSi_SetNCDIPAddr = .text:0x813FD288; // type:function size:0x7C
AOSSi_InitLocal = .text:0x813FD304; // type:function size:0x68
AOSSi_EndLocal = .text:0x813FD36C; // type:function size:0x34
@@ -20244,10 +20244,10 @@ lbl_81694654 = .sdata2:0x81694654; // type:object size:0x4 align:4 data:float
@10044 = .sdata2:0x8169469C; // type:object size:0x4 scope:local align:4 data:float
lbl_816946A0 = .sdata2:0x816946A0; // type:object size:0x4 align:4 data:float
scSoundZeroF = .sdata2:0x816946A4; // type:object size:0x4 align:4 data:float
lbl_816946A8 = .sdata2:0x816946A8; // type:object size:0x4 align:4 data:float
lbl_816946AC = .sdata2:0x816946AC; // type:object size:0x4 align:4 data:float
lbl_816946B0 = .sdata2:0x816946B0; // type:object size:0x4 align:4 data:float
lbl_816946B4 = .sdata2:0x816946B4; // type:object size:0x4 align:4 data:float
scSoundTwoF = .sdata2:0x816946A8; // type:object size:0x4 align:4 data:float
scSoundOneF = .sdata2:0x816946AC; // type:object size:0x4 align:4 data:float
scSoundThirtyF = .sdata2:0x816946B0; // type:object size:0x4 align:4 data:float
scSoundSixtyF = .sdata2:0x816946B4; // type:object size:0x4 align:4 data:float
lbl_816946B8 = .sdata2:0x816946B8; // type:object size:0x8 align:8 data:double
lbl_816946C0 = .sdata2:0x816946C0; // type:object size:0x8 align:8 data:double
lbl_816946C8 = .sdata2:0x816946C8; // type:object size:0x8 align:8 data:double

View File

@@ -14,8 +14,8 @@ namespace ipl {
WAIT_UNTIL_FADE_IN = 15
};
TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const ipl::math::VEC3& unk2,
f32 unk3 = 120.0f, f32 unk4 = 30.0f);
TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const ipl::math::VEC3& initialPos,
f32 margin16x9 = 120.0f, f32 margin4x3 = 30.0f);
~TextBalloon();
void calc();
@@ -31,7 +31,7 @@ namespace ipl {
void fadeout();
void fadeoutForce();
void setPos(const math::VEC3& pos, bool unk0, int unk1);
void setPos(const math::VEC3& pos, bool use16x9X, int hAlign);
void updatePos(const math::VEC3& pos);
void set_translate(const math::VEC3& trans);
@@ -50,7 +50,7 @@ namespace ipl {
undefined4 unk_0x00;
undefined4 unk_0x04;
BOOL unk_0x08;
BOOL mbWaitingFadeIn; // 0x08
layout::Object* mpLayout; // 0x0C
@@ -60,10 +60,10 @@ namespace ipl {
u32 mTextLen; // 0x18
math::VEC3 mBalloonPos; // 0x1C
undefined4 unk_0x28;
undefined unk_0x2C;
f32 unk_0x30;
f32 unk_0x34;
undefined4 mHAlign; // 0x28
undefined mbUse16x9X; // 0x2C
f32 mMargin16x9; // 0x30
f32 mMargin4x3; // 0x34
int mWaitUntilFadeIn; // 0x38

View File

@@ -13,22 +13,22 @@
const u8 scRsnOui0 = 0;
const u8 scRsnOui1 = 0x0F;
const u8 scRsnOui2 = 0xAC;
const u8 lbl_81695063 = 0;
const u8 scRsnOuiPad = 0;
const u8 scWpaOui0 = 0;
const u8 scWpaOui1 = 0x50;
const u8 scWpaOui2 = 0xF2;
const u8 lbl_81695067 = 0;
const u8 scWpaOuiPad = 0;
#pragma pop
#pragma push
#pragma section sconst_type ".sdata"
const u8 scWpaFindOui0 = 0;
const u8 scWpaFindOui1 = 0x50;
const u8 scWpaFindOui2 = 0xF2;
const u8 lbl_81697D73 = 0;
const u8 lbl_81697D74 = 0;
const u8 lbl_81697D75 = 0;
const u8 lbl_81697D76 = 0;
const u8 lbl_81697D77 = 0;
const u8 scWpaFindOuiPad0 = 0;
const u8 scWpaFindOuiPad1 = 0;
const u8 scWpaFindOuiPad2 = 0;
const u8 scWpaFindOuiPad3 = 0;
const u8 scWpaFindOuiPad4 = 0;
#pragma pop
#define scRsnOui0 (*((volatile const u8*)&scRsnOui0))

View File

@@ -5,13 +5,6 @@
#include <new>
extern "C" const f32 lbl_81694D90;
extern "C" const f32 lbl_81694DA8;
extern "C" const f32 lbl_81694DAC;
extern "C" const f32 lbl_81694DB0;
extern "C" const f32 lbl_81694DB4;
extern "C" const f32 lbl_81694DBC;
extern "C" const double lbl_81694DC8;
extern "C" void _savegpr_24();
extern "C" void _restgpr_24();
extern "C" void GetFont__Q34nw4r3lyt8TextBoxCFv();

View File

@@ -486,12 +486,12 @@ namespace ipl {
void BoardObject::stt_stand() {
f32 degrees = mStandData.unk_0x0C * 30.0f + 30.0f;
f32 dVar2 = nw4r::math::CosFIdx(degrees * 0.7111111f);
f32 cosF = nw4r::math::CosFIdx(degrees * 0.7111111f);
degrees = mStandData.unk_0x0C * 30.0f + 30.0f;
f32 dVar3 = nw4r::math::SinFIdx(degrees * 0.7111111f);
f32 sinF = nw4r::math::SinFIdx(degrees * 0.7111111f);
math::VEC2 standPos;
__ct__Q33ipl4math4VEC2Fff(&standPos, dVar3 * 160.0f, dVar2 * 160.0f);
__ct__Q33ipl4math4VEC2Fff(&standPos, sinF * 160.0f, cosF * 160.0f);
mBoardPos = (((mStandData.pos * (f32)(10 - mStandData.unk_0x08)) + (standPos * mStandData.unk_0x08)) / 10.0f);
if ((mStandData.unk_0x08 += 1) > 10) {

View File

@@ -313,7 +313,6 @@ namespace ipl {
#pragma push
#pragma section sconst_type ".sdata2"
extern "C" const f32 scDateZeroF = 0.0f;
extern "C" const f32 lbl_816948F0;
#pragma pop
} // namespace scene
} // namespace ipl

View File

@@ -934,7 +934,7 @@ namespace ipl {
}
}
extern "C" bool iplSDMemory_813EE358(const SDMemory* memory,
extern "C" bool iplSDMemory_containsTitleId(const SDMemory* memory,
ESTitleId titleId,
const ESTitleId* titleIds, u32 titleCount) {
for (u32 i = 0; i < titleCount; i++) {
@@ -951,7 +951,7 @@ namespace ipl {
s32 result = mpSDChannelSelect->getWorker()->get_async_result();
if (result == 0) {
ESTitleId titleId = mTitleIds[mCurrentTitle];
if (iplSDMemory_813EE358(this, titleId,
if (iplSDMemory_containsTitleId(this, titleId,
mNandTitleIds, mNandTitleCount)) {
mDialogState = 17;
} else {
@@ -984,8 +984,8 @@ namespace ipl {
swprintf(mCurrentTitleName, 0x107f, L"%ls\n%ls", titleName, message);
System::getDialog()->setTitleForSDMemory(mCurrentTitleName);
if (iplSDMemory_813EE358(this, mTitleIds[mCurrentTitle], mSDTitleIds, mTitleNameCount) ||
iplSDMemory_813EE358(this, mTitleIds[mCurrentTitle], mNandTitleIds, mNandTitleCount)) {
if (iplSDMemory_containsTitleId(this, mTitleIds[mCurrentTitle], mSDTitleIds, mTitleNameCount) ||
iplSDMemory_containsTitleId(this, mTitleIds[mCurrentTitle], mNandTitleIds, mNandTitleCount)) {
ESTitleId titleId = mTitleIds[mCurrentTitle];
if (iplSDChannelSelect_813DB478(mpSDChannelSelect, titleId)) {
mDialogState = 14;
@@ -1064,7 +1064,7 @@ namespace ipl {
mCurrentTitle++;
if (mTitleCount > mCurrentTitle) {
ESTitleId nextTitleId = mTitleIds[mCurrentTitle];
if (iplSDMemory_813EE358(this, nextTitleId,
if (iplSDMemory_containsTitleId(this, nextTitleId,
mNandTitleIds, mNandTitleCount)) {
mDialogState = 17;
} else {

View File

@@ -311,9 +311,9 @@ FaderSceneCommand SDChannelTitle::calcNormal() {
case 18: if (SCCheckStatus() != 1) { mState = 21; } break;
case 19: iplSDChannelTitle_startCopyProgress(this); break;
case 20: iplSDChannelTitle_updateCopyPrepare(this); break;
case 23: iplSDChannelTitle_updateMemoryCalc(this); break;
case 21: iplSDChannelTitle_updateEnqueueNotice(this); break;
case 22: iplSDChannelTitle_updateCopyProgress(this); break;
case 23: iplSDChannelTitle_updateMemoryCalc(this); break;
case 24: iplSDChannelTitle_loadTitleBanner(this); break;
case 25: iplSDChannelTitle_updateBannerLoad(this); break;
case 26: iplSDChannelTitle_showCopyError(this); break;

View File

@@ -12,8 +12,8 @@ static u8 secondaryDns[4];
static void* (*allocateMemory)(u32, s32);
static void (*releaseMemory)(u32, void*, s32);
static void (*statusCallback)(void);
static NCDIfConfig AOSS_810BD4A8;
static NCDIpConfig AOSS_810BD608;
static NCDIfConfig AOSSi_NcdIfConfig;
static NCDIpConfig AOSSi_NcdIpConfig;
struct AOSSRate {
u16 mask;
@@ -60,11 +60,11 @@ void AOSSi_Cancel(void) {
AOSSi_cancel_flag = 1;
}
void AOSS_813FD17C(OSAlarm* alarm, OSContext* context) {
void AOSSi_SleepAlarmHandler(OSAlarm* alarm, OSContext* context) {
OSSendMessage((OSMessageQueue*)alarm->tag, NULL, 0);
}
void AOSS_813FD18C(u32 milliseconds) {
void AOSSi_SleepMs(u32 milliseconds) {
OSMessage storage;
OSMessage message;
OSMessageQueue queue;
@@ -72,7 +72,7 @@ void AOSS_813FD18C(u32 milliseconds) {
OSInitMessageQueue(&queue, &storage, 1);
OSCreateAlarm(&alarm);
OSSetAlarmTag(&alarm, (u32)&queue);
OSSetAlarm(&alarm, (u32)(milliseconds * (OS_TIMER_CLOCK / 1000)), AOSS_813FD17C);
OSSetAlarm(&alarm, (u32)(milliseconds * (OS_TIMER_CLOCK / 1000)), AOSSi_SleepAlarmHandler);
OSReceiveMessage(&queue, &message, 1);
}
@@ -89,7 +89,7 @@ void AOSSi_Free(void* block) {
}
}
void AOSS_813FD25C(u8* destination, u32 address) {
void AOSSi_StoreIpv4Octets(u8* destination, u32 address) {
int index;
for (index = 0; index < 4; ++index) {
*destination++ = address >> ((3 - index) * 8);
@@ -97,11 +97,11 @@ void AOSS_813FD25C(u8* destination, u32 address) {
}
int AOSSi_SetNCDIPAddr(u32 address, u32 netmask, u32 gateway, u32 dns1, u32 dns2) {
AOSS_813FD25C(ipAddress, address);
AOSS_813FD25C(ipNetmask, netmask);
AOSS_813FD25C(ipGateway, gateway);
AOSS_813FD25C(primaryDns, dns1);
AOSS_813FD25C(secondaryDns, dns2);
AOSSi_StoreIpv4Octets(ipAddress, address);
AOSSi_StoreIpv4Octets(ipNetmask, netmask);
AOSSi_StoreIpv4Octets(ipGateway, gateway);
AOSSi_StoreIpv4Octets(primaryDns, dns1);
AOSSi_StoreIpv4Octets(secondaryDns, dns2);
return 0;
}
@@ -150,7 +150,7 @@ startup:
goto unlock;
}
++startupRetries;
AOSS_813FD18C(10);
AOSSi_SleepMs(10);
goto startup;
}
if (WD_GetInfo(&info) == 0) {
@@ -231,7 +231,7 @@ startup:
*output = list;
break;
}
AOSS_813FD18C(100);
AOSSi_SleepMs(100);
}
AOSSi_Free(buffer);
}
@@ -242,7 +242,7 @@ cleanup:
goto unlock;
}
++cleanupRetries;
AOSS_813FD18C(10);
AOSSi_SleepMs(10);
goto cleanup;
}
unlock:
@@ -252,7 +252,7 @@ unlock:
return -1;
}
++unlockRetries;
AOSS_813FD18C(10);
AOSSi_SleepMs(10);
goto unlock;
}
return result;
@@ -262,7 +262,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
int retries = 0;
int result = 0;
WD_Info info ATTRIBUTE_ALIGN(32);
NCDIfConfig* interfaceConfig = &AOSS_810BD4A8;
NCDIfConfig* interfaceConfig = &AOSSi_NcdIfConfig;
NCDIpConfig* ipConfig;
memset(interfaceConfig, 0, sizeof(*interfaceConfig));
interfaceConfig->selectedMedia = 1;
@@ -288,7 +288,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
}
interfaceConfig->netif.wireless.config.manual.ssidLength = (u8)connection->ssidLength;
memcpy(interfaceConfig->netif.wireless.config.manual.ssid, connection->ssid, connection->ssidLength);
ipConfig = &AOSS_810BD608;
ipConfig = &AOSSi_NcdIpConfig;
memset(ipConfig, 0, sizeof(*ipConfig));
ipConfig->adjust.maxTransferUnit = 1300;
ipConfig->adjust.tcpRetransTimeout = 100;
@@ -303,7 +303,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
if (NCDSetIpConfig(ipConfig) != 0) {
result = -1;
}
if (result == 0 && NCDSetIfConfig(&AOSS_810BD4A8) != 0) {
if (result == 0 && NCDSetIfConfig(&AOSSi_NcdIfConfig) != 0) {
result = -1;
}
if (result == 0) {
@@ -317,7 +317,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
break;
}
++retries;
AOSS_813FD18C(10);
AOSSi_SleepMs(10);
}
}
if (result == 0) {
@@ -335,7 +335,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
}
void AOSSi_Sleep(u32 milliseconds) {
AOSS_813FD18C(milliseconds);
AOSSi_SleepMs(milliseconds);
}
int AOSSi_Status(void) {

View File

@@ -64,6 +64,11 @@ namespace ipl {
static s32 sAOSSState;
static s32 sAOSSUnk;
struct AOSSStack {
u32 storage[4080];
u32 sentinel;
};
class AOSSThread : public utility::ut_thread {
public:
AOSSThread(EGG::Heap* heap);
@@ -84,7 +89,7 @@ namespace ipl {
private:
s32 mState; // 0x32C
s32 mThreadPriority; // 0x330
u8* mpStackBuffer; // 0x334
AOSSStack* mpStack; // 0x334
u8* mpHeapBuffer; // 0x338
MEMHeapHandle mpExpHeap; // 0x33C
AOSSConfig mAoss; // 0x340
@@ -94,7 +99,7 @@ namespace ipl {
mpExpHeap = NULL;
sAOSSState = 0;
mpHeapBuffer = (u8*)heap->alloc(0x40000, 0x20);
mpStackBuffer = (u8*)heap->alloc(0x1000, 0x20);
mpStack = (AOSSStack*)heap->alloc(0x1000, 0x20);
}
void AOSSThread::destroy(int flag) {
@@ -137,8 +142,8 @@ namespace ipl {
mThreadPriority = OSGetThreadPriority(OSGetCurrentThread()) - 2;
sAOSSState = 1;
SOInit(&config);
memset(mpStackBuffer, 0, 4);
Create(mpStackBuffer, 0x1000, mThreadPriority, TRUE);
memset(mpStack, 0, 4);
Create(mpStack, 0x1000, mThreadPriority, TRUE);
OSRestoreInterrupts(level);
return 1;
@@ -178,7 +183,7 @@ namespace ipl {
mAoss.unk_0x04 = 4;
NETGetWirelessMacAddress(mAoss.mac);
*(u32*)(mpStackBuffer + 0x3FC0) = 0x97654321;
mpStack->sentinel = 0x97654321;
mState = AOSSi_Init(&mAoss);
AOSSi_EndLocal();

View File

@@ -10,9 +10,9 @@
namespace ipl {
namespace scene {
TextBalloon::TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const math::VEC3& unk2,
f32 unk3, f32 unk4)
: unk_0x08(FALSE), mpText(NULL), mTextLen(0), mBalloonPos(unk2), unk_0x28(0), unk_0x2C(1), unk_0x30(unk3), unk_0x34(unk4),
TextBalloon::TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const math::VEC3& initialPos,
f32 margin16x9, f32 margin4x3)
: mbWaitingFadeIn(FALSE), mpText(NULL), mTextLen(0), mBalloonPos(initialPos), mHAlign(0), mbUse16x9X(1), mMargin16x9(margin16x9), mMargin4x3(margin4x3),
mWaitUntilFadeIn(0) {
mpLayout = new (heap, 4) layout::Object(heap, layoutFile, directory, fileName);
mpLayout->bind("my_IplTopBalloon_a_BalloonInOut.brlan");
@@ -31,7 +31,7 @@ namespace ipl {
void TextBalloon::calc() {
mpLayout->calc();
switch (unk_0x08) {
switch (mbWaitingFadeIn) {
case TRUE: {
break;
}
@@ -73,7 +73,7 @@ namespace ipl {
balloonPane->SetVisible(false);
unk_0x08 = FALSE;
mbWaitingFadeIn = FALSE;
}
void TextBalloon::fadein() {
@@ -81,7 +81,7 @@ namespace ipl {
mpLayout->FindPaneByName("N_Balloon")->SetVisible(false);
mWaitUntilFadeIn = 0;
unk_0x08 = TRUE;
mbWaitingFadeIn = TRUE;
set_textbox(mpText);
set_translate(mBalloonPos);
@@ -91,17 +91,17 @@ namespace ipl {
void TextBalloon::fadeinNoSetTextbox() {
if (mpText != NULL) {
mWaitUntilFadeIn = 0;
unk_0x08 = TRUE;
mbWaitingFadeIn = TRUE;
set_translate(mBalloonPos);
}
}
void TextBalloon::setPos(const math::VEC3& pos, bool unk0, int unk1) {
void TextBalloon::setPos(const math::VEC3& pos, bool use16x9X, int hAlign) {
mBalloonPos = pos;
unk_0x28 = unk1;
unk_0x2C = unk0;
mHAlign = hAlign;
mbUse16x9X = use16x9X;
nw4r::ut::Rect proj16x9;
nw4r::ut::Rect proj4x3;
@@ -109,7 +109,7 @@ namespace ipl {
System::getProjectionRect(&proj16x9);
System::getProjectionRect4x3(&proj4x3);
if (unk_0x2C == 0) {
if (mbUse16x9X == 0) {
mBalloonPos.x *= proj4x3.GetWidth() / proj16x9.GetWidth();
}
}
@@ -122,7 +122,7 @@ namespace ipl {
System::getProjectionRect(&proj16x9);
System::getProjectionRect4x3(&proj4x3);
if (unk_0x2C == 0) {
if (mbUse16x9X == 0) {
mBalloonPos.x *= proj4x3.GetWidth() / proj16x9.GetWidth();
}
@@ -133,27 +133,27 @@ namespace ipl {
if (mWaitUntilFadeIn++ > WAIT_UNTIL_FADE_IN) {
anm_fadein();
snd::getSystem()->startSE("WIPL_SE_BALLOON");
unk_0x08 = FALSE;
mbWaitingFadeIn = FALSE;
}
}
void TextBalloon::fadeout() {
if (!unk_0x08) {
if (!mbWaitingFadeIn) {
mpLayout->setAnmType(ANIM_TYPE_BACKWARD);
mpLayout->start();
}
unk_0x08 = FALSE;
mbWaitingFadeIn = FALSE;
}
void TextBalloon::fadeoutForce() {
if (!unk_0x08) {
if (!mbWaitingFadeIn) {
if (mpLayout->getAnim()->getAnmType() == ANIM_TYPE_FORWARD) {
mpLayout->getAnim()->setAnmType(ANIM_TYPE_BACKWARD);
mpLayout->getAnim()->restart();
}
} else if (unk_0x08 == TRUE) {
} else if (mbWaitingFadeIn == TRUE) {
mWaitUntilFadeIn = 0;
unk_0x08 = FALSE;
mbWaitingFadeIn = FALSE;
}
}
@@ -167,9 +167,9 @@ namespace ipl {
f32 temp0;
if (SCGetAspectRatio() == SC_ASPECT_RATIO_16x9) {
temp0 = unk_0x30;
temp0 = mMargin16x9;
} else {
temp0 = unk_0x34;
temp0 = mMargin4x3;
}
nw4r::lyt::Pane* balloonPane = mpLayout->FindPaneByName("N_Balloon");
@@ -181,7 +181,7 @@ namespace ipl {
System::getProjectionRect(&proj16x9);
System::getProjectionRect4x3(&proj4x3);
switch (unk_0x28) {
switch (mHAlign) {
case 1: {
temp1 = get_size("W_Base")->width / 2;
break;
@@ -192,7 +192,7 @@ namespace ipl {
}
}
if (unk_0x2C == 0) {
if (mbUse16x9X == 0) {
temp1 *= proj4x3.GetWidth() / proj16x9.GetWidth();
}

View File

@@ -20,10 +20,10 @@ extern "C" {
extern "C" void _seBlk__Q23ipl3snd();
extern "C" nw4r::snd::SoundHandle* _mainBGMHandle__Q23ipl3snd;
extern "C" const f32 scSoundZeroF;
extern "C" const f32 lbl_816946AC;
extern "C" const f32 lbl_816946A8;
extern "C" const f32 lbl_816946B0;
extern "C" const f32 lbl_816946B4;
extern "C" const f32 scSoundOneF;
extern "C" const f32 scSoundTwoF;
extern "C" const f32 scSoundThirtyF;
extern "C" const f32 scSoundSixtyF;
extern "C" {
void _savegpr_29();
void pauseOffSE__Q33ipl3snd6SystemFv();
@@ -500,21 +500,21 @@ namespace snd {
if (block->handle.detail_GetAttachedSound() != NULL) {
block->handle.detail_GetAttachedSound()->SetPan(pan);
}
f32 pitch = lbl_816946A8 * y / rect.right;
if (lbl_816946AC < pitch) {
pitch = lbl_816946AC;
f32 pitch = scSoundTwoF * y / rect.right;
if (scSoundOneF < pitch) {
pitch = scSoundOneF;
}
if (block->handle.detail_GetAttachedSound() != NULL) {
block->handle.detail_GetAttachedSound()->SetVolume(pitch, 0);
}
if (lbl_816946B0 < y) {
f32 pitch2 = y / lbl_816946B0;
if (scSoundThirtyF < y) {
f32 pitch2 = y / scSoundThirtyF;
if (block->handle.detail_GetAttachedSound() != NULL) {
block->handle.detail_GetAttachedSound()->SetPitch(pitch2);
}
} else if (lbl_816946B4 < y) {
} else if (scSoundSixtyF < y) {
if (block->handle.detail_GetAttachedSound() != NULL) {
block->handle.detail_GetAttachedSound()->SetPitch(lbl_816946A8);
block->handle.detail_GetAttachedSound()->SetPitch(scSoundTwoF);
}
}
return (int)block;