Compare commits
5 Commits
cleanup/ch
...
cleanup/cd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
201c182666 | ||
|
|
22dd088277 | ||
|
|
1bbc40cb3b | ||
|
|
e6bf9cc669 | ||
|
|
ffd9cc4a69 |
@@ -15968,21 +15968,21 @@ s_time_num__Q23ipl5scene = .data:0x8164E1D8; // type:object size:0x28 scope:loca
|
||||
@10797 = .data:0x8164E251; // type:object size:0x1A scope:local data:string
|
||||
@10804 = .data:0x8164E26B; // type:object size:0x19 scope:local data:string
|
||||
@10848 = .data:0x8164E284; // type:object size:0xA scope:local data:string
|
||||
lbl_8164E290 = .data:0x8164E290; // type:object size:0x9 data:string
|
||||
scCursur_a = .data:0x8164E290; // type:object size:0x9 data:string
|
||||
lbl_8164E299 = .data:0x8164E299; // type:object size:0x1B data:string
|
||||
lbl_8164E2B4 = .data:0x8164E2B4; // type:object size:0x1A data:string
|
||||
lbl_8164E2CE = .data:0x8164E2CE; // type:object size:0x19 data:string
|
||||
lbl_8164E2E8 = .data:0x8164E2E8; // type:object size:0xC
|
||||
lbl_8164E2F4 = .data:0x8164E2F4; // type:object size:0xA data:string
|
||||
lbl_8164E300 = .data:0x8164E300; // type:object size:0x28
|
||||
lbl_8164E328 = .data:0x8164E328; // type:object size:0x387
|
||||
lbl_8164E6AF = .data:0x8164E6AF; // type:object size:0x20
|
||||
lbl_8164E6CF = .data:0x8164E6CF; // type:object size:0x12 data:string
|
||||
lbl_8164E6E1 = .data:0x8164E6E1; // type:object size:0x12 data:string
|
||||
lbl_8164E6F3 = .data:0x8164E6F3; // type:object size:0x12 data:string
|
||||
lbl_8164E705 = .data:0x8164E705; // type:object size:0x19 data:string
|
||||
lbl_8164E71E = .data:0x8164E71E; // type:object size:0x26 data:string
|
||||
lbl_8164E744 = .data:0x8164E744; // type:object size:0x1F data:string
|
||||
scModuleData = .data:0x8164E328; // type:object size:0x387
|
||||
scBrlan_RsoFmt = .data:0x8164E6AF; // type:object size:0x20
|
||||
scBrlyt_my_IplTop_b = .data:0x8164E6CF; // type:object size:0x12 data:string
|
||||
scBrlan_my_IplTop_b = .data:0x8164E6E1; // type:object size:0x12 data:string
|
||||
scBrlyt_my_IplTop_d = .data:0x8164E6F3; // type:object size:0x12 data:string
|
||||
scBrlyt_my_IplTopBalloon_a = .data:0x8164E705; // type:object size:0x19 data:string
|
||||
scBrlan_BalloonInOut = .data:0x8164E71E; // type:object size:0x26 data:string
|
||||
scSE_BALLOON = .data:0x8164E744; // type:object size:0x1F data:string
|
||||
scGroup_G_FocusBtnA = .data:0x8164E768; // type:object size:0xC data:string
|
||||
scGroup_G_FocusBtnB = .data:0x8164E774; // type:object size:0xC data:string
|
||||
scGroup_G_SelectBtnA = .data:0x8164E780; // type:object size:0xD data:string
|
||||
@@ -18235,13 +18235,13 @@ jumptable_8166B3D0 = .data:0x8166B3D0; // type:object size:0x30 scope:local
|
||||
@1137 = .data:0x8166B450; // type:object size:0x22 scope:local data:string
|
||||
jumptable_8166B478 = .data:0x8166B478; // type:object size:0x30 scope:local
|
||||
lbl_8166B4B8 = .data:0x8166B4B8; // type:object size:0x70
|
||||
lbl_8166B528 = .data:0x8166B528; // type:object size:0x25 data:string
|
||||
lbl_8166B550 = .data:0x8166B550; // type:object size:0x29 data:string
|
||||
lbl_8166B57C = .data:0x8166B57C; // type:object size:0x2B data:string
|
||||
lbl_8166B5A8 = .data:0x8166B5A8; // type:object size:0xD data:string
|
||||
lbl_8166B5B8 = .data:0x8166B5B8; // type:object size:0x15 data:string
|
||||
lbl_8166B5D0 = .data:0x8166B5D0; // type:object size:0x46 data:string
|
||||
lbl_8166B618 = .data:0x8166B618; // type:object size:0x48 data:string
|
||||
scCdbMsg_DatabaseClosed = .data:0x8166B528; // type:object size:0x25 data:string
|
||||
scCdbMsg_CantCreateRecordClosed = .data:0x8166B550; // type:object size:0x29 data:string
|
||||
scCdbMsg_CantCreateRecordReadonly = .data:0x8166B57C; // type:object size:0x2B data:string
|
||||
scCdbMsg_InvalidKey = .data:0x8166B5A8; // type:object size:0xD data:string
|
||||
scCdbMsg_FileNotFound = .data:0x8166B5B8; // type:object size:0x15 data:string
|
||||
scCdbMsg_CantCleanupDirsClosed = .data:0x8166B5D0; // type:object size:0x46 data:string
|
||||
scCdbMsg_CantCleanupDirsReadonly = .data:0x8166B618; // type:object size:0x48 data:string
|
||||
@1360 = .data:0x8166B660; // type:object size:0x12 scope:local data:string
|
||||
...data.0 = .data:0x8166B660; // type:label scope:local
|
||||
@1362 = .data:0x8166B674; // type:object size:0x1C scope:local data:string
|
||||
@@ -18453,7 +18453,7 @@ __FUNCTION__$1195 = .data:0x8166E0FC; // type:object size:0x1C scope:local data:
|
||||
__FUNCTION__$1217 = .data:0x8166E118; // type:object size:0x1C scope:local data:string
|
||||
__FUNCTION__$1255 = .data:0x8166E134; // type:object size:0x14 scope:local data:string
|
||||
__FUNCTION__$1287 = .data:0x8166E148; // type:object size:0x18 scope:local data:string
|
||||
lbl_8166E160 = .data:0x8166E160; // type:object size:0x1A data:string
|
||||
scNwc24FlPath = .data:0x8166E160; // type:object size:0x1A data:string
|
||||
@583 = .data:0x8166E180; // type:object size:0x1B scope:local data:string
|
||||
__FUNCTION__$1123 = .data:0x8166E1A0; // type:object size:0x18 scope:local data:string
|
||||
@1300 = .data:0x8166E1B8; // type:object size:0x11 scope:local data:string
|
||||
@@ -21858,11 +21858,11 @@ lbl_816968F5 = .sdata:0x816968F5; // type:object size:0x4 data:string
|
||||
@10922 = .sdata:0x81696992; // type:object size:0x3 scope:local data:string
|
||||
@10923 = .sdata:0x81696995; // type:object size:0x3 scope:local data:string
|
||||
lbl_81696998 = .sdata:0x81696998; // type:object size:0x4 data:4byte
|
||||
lbl_8169699C = .sdata:0x8169699C; // type:object size:0x4 data:4byte
|
||||
scPaneName_T_Balloon = .sdata:0x8169699C; // type:object size:0x4 data:4byte
|
||||
lbl_816969A0 = .sdata:0x816969A0; // type:object size:0x7 data:string
|
||||
lbl_816969A8 = .sdata:0x816969A8; // type:object size:0x4 data:4byte
|
||||
scPaneName_W_Base = .sdata:0x816969A8; // type:object size:0x4 data:4byte
|
||||
lbl_816969AC = .sdata:0x816969AC; // type:object size:0x8 data:string
|
||||
lbl_816969B4 = .sdata:0x816969B4; // type:object size:0x4 data:4byte
|
||||
scPaneName_W_Shade = .sdata:0x816969B4; // type:object size:0x4 data:4byte
|
||||
lbl_816969B8 = .sdata:0x816969B8; // type:object size:0x4 data:string
|
||||
lbl_816969BC = .sdata:0x816969BC; // type:object size:0x4 data:string
|
||||
lbl_816969C0 = .sdata:0x816969C0; // type:object size:0x4 data:string
|
||||
@@ -21872,9 +21872,9 @@ lbl_816969CC = .sdata:0x816969CC; // type:object size:0x4 data:string
|
||||
lbl_816969D0 = .sdata:0x816969D0; // type:object size:0x4 data:string
|
||||
lbl_816969D4 = .sdata:0x816969D4; // type:object size:0x4 data:string
|
||||
lbl_816969D8 = .sdata:0x816969D8; // type:object size:0x4 data:string
|
||||
lbl_816969DC = .sdata:0x816969DC; // type:object size:0x5 data:string
|
||||
lbl_816969E1 = .sdata:0x816969E1; // type:object size:0x7 data:string
|
||||
lbl_816969E8 = .sdata:0x816969E8; // type:object size:0x4 data:string
|
||||
scExport_Calc = .sdata:0x816969DC; // type:object size:0x5 data:string
|
||||
scExport_Create = .sdata:0x816969E1; // type:object size:0x7 data:string
|
||||
scArc = .sdata:0x816969E8; // type:object size:0x4 data:string
|
||||
lbl_816969EC = .sdata:0x816969EC; // type:object size:0x6 data:string
|
||||
lbl_816969F2 = .sdata:0x816969F2; // type:object size:0x5 data:string
|
||||
lbl_816969F7 = .sdata:0x816969F7; // type:object size:0x4 data:string
|
||||
|
||||
@@ -79,13 +79,13 @@ typedef struct {
|
||||
} CDBSearchWork;
|
||||
|
||||
extern CDBSearchWork* CDBDatabaseWorkBuf;
|
||||
extern char lbl_8166B528[];
|
||||
extern char lbl_8166B550[];
|
||||
extern char lbl_8166B57C[];
|
||||
extern char lbl_8166B5A8[];
|
||||
extern char lbl_8166B5B8[];
|
||||
extern char lbl_8166B5D0[];
|
||||
extern char lbl_8166B618[];
|
||||
extern char scCdbMsg_DatabaseClosed[];
|
||||
extern char scCdbMsg_CantCreateRecordClosed[];
|
||||
extern char scCdbMsg_CantCreateRecordReadonly[];
|
||||
extern char scCdbMsg_InvalidKey[];
|
||||
extern char scCdbMsg_FileNotFound[];
|
||||
extern char scCdbMsg_CantCleanupDirsClosed[];
|
||||
extern char scCdbMsg_CantCleanupDirsReadonly[];
|
||||
|
||||
extern CDBErr CDBDatabaseInit();
|
||||
extern CDBErr CDBDatabaseOpen();
|
||||
@@ -165,7 +165,7 @@ CDBErr CDBDatabaseClose(CDBDatabase* database) {
|
||||
CDBLock();
|
||||
instance = database->instance;
|
||||
if (instance == NULL || instance->flags == 0) {
|
||||
CDBReportError(lbl_8166B528);
|
||||
CDBReportError(scCdbMsg_DatabaseClosed);
|
||||
result = CDB_ERROR_27;
|
||||
} else {
|
||||
status = CDBDatabaseFree(database);
|
||||
@@ -403,17 +403,17 @@ CDBErr CDBDatabaseCreateRecordImAtOnce_(CDBDatabase* database, CDBRecord* record
|
||||
|
||||
instance = database->instance;
|
||||
if (instance == NULL) {
|
||||
CDBReportError(lbl_8166B550);
|
||||
CDBReportError(scCdbMsg_CantCreateRecordClosed);
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
|
||||
flags = instance->flags;
|
||||
if ((flags & 2) == 0) {
|
||||
if (flags == 0) {
|
||||
CDBReportError(lbl_8166B550);
|
||||
CDBReportError(scCdbMsg_CantCreateRecordClosed);
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
CDBReportError(lbl_8166B57C);
|
||||
CDBReportError(scCdbMsg_CantCreateRecordReadonly);
|
||||
return CDB_ERROR_26;
|
||||
}
|
||||
|
||||
@@ -427,12 +427,12 @@ CDBErr CDBDatabaseFindByKey(CDBDatabase* database, CDBRecord* record, CDBRecordK
|
||||
|
||||
CDBLock();
|
||||
if (!CDBRecordKeyIsValid(recordKey)) {
|
||||
CDBReportError(lbl_8166B5A8);
|
||||
CDBReportError(scCdbMsg_InvalidKey);
|
||||
result = CDB_ERROR_5;
|
||||
} else {
|
||||
CDBRecordInitDescriptor(record, database, recordKey);
|
||||
if (!CDBRecordIsExistFile(record)) {
|
||||
CDBReportError(lbl_8166B5B8, recordKey->keyString);
|
||||
CDBReportError(scCdbMsg_FileNotFound, recordKey->keyString);
|
||||
result = CDB_ERROR_CANNOT_OPEN_FILE;
|
||||
} else {
|
||||
result = CDB_ERROR_OK;
|
||||
@@ -2608,11 +2608,11 @@ CDBErr CDBDatabaseCleanUpEmptyDirectories(CDBDatabase* database, CDBRecordLocati
|
||||
CDBUnlock();
|
||||
|
||||
if (flags == 0) {
|
||||
CDBReportError(lbl_8166B5D0);
|
||||
CDBReportError(scCdbMsg_CantCleanupDirsClosed);
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
if (flags == 1) {
|
||||
CDBReportError(lbl_8166B618);
|
||||
CDBReportError(scCdbMsg_CantCleanupDirsReadonly);
|
||||
return CDB_ERROR_26;
|
||||
}
|
||||
|
||||
@@ -2663,16 +2663,16 @@ CDBErr CDBDatabaseCleanUpEmptyDirectories(CDBDatabase* database, CDBRecordLocati
|
||||
|
||||
#pragma section data_type ".data"
|
||||
#pragma align 8
|
||||
extern char lbl_8166B528[] = "CDBDatabaseClose database is closed\n";
|
||||
extern char scCdbMsg_DatabaseClosed[] = "CDBDatabaseClose database is closed\n";
|
||||
#pragma align 8
|
||||
extern char lbl_8166B550[] = "can't create record; database is closed\n";
|
||||
extern char scCdbMsg_CantCreateRecordClosed[] = "can't create record; database is closed\n";
|
||||
#pragma align 8
|
||||
extern char lbl_8166B57C[] = "can't create record; database is readonly\n";
|
||||
extern char scCdbMsg_CantCreateRecordReadonly[] = "can't create record; database is readonly\n";
|
||||
#pragma align 8
|
||||
extern char lbl_8166B5A8[] = "invalid key\n";
|
||||
extern char scCdbMsg_InvalidKey[] = "invalid key\n";
|
||||
#pragma align 8
|
||||
extern char lbl_8166B5B8[] = "file not found : %s\n";
|
||||
extern char scCdbMsg_FileNotFound[] = "file not found : %s\n";
|
||||
#pragma align 8
|
||||
extern char lbl_8166B5D0[] = "can't execute CDBDatabaseCleanUpEmptyDirectories; database is closed\n";
|
||||
extern char scCdbMsg_CantCleanupDirsClosed[] = "can't execute CDBDatabaseCleanUpEmptyDirectories; database is closed\n";
|
||||
#pragma align 8
|
||||
extern char lbl_8166B618[] = "can't execute CDBDatabaseCleanUpEmptyDirectories; database is readonly\n";
|
||||
extern char scCdbMsg_CantCleanupDirsReadonly[] = "can't execute CDBDatabaseCleanUpEmptyDirectories; database is readonly\n";
|
||||
|
||||
@@ -18,10 +18,8 @@ enum {
|
||||
#define FRIEND_LIST_MAGIC 'WcFl'
|
||||
#define FRIEND_LIST_VERSION 2
|
||||
|
||||
const char lbl_8166E160[26] __attribute__((section(".data"), aligned(8))) = "/shared2/wc24/nwc24fl.bin";
|
||||
void* const lbl_8166E160_pad __attribute__((section(".data"))) = (void*)0;
|
||||
static const char* FLFilePath = lbl_8166E160;
|
||||
const u32 FLFilePath_pad __attribute__((section(".sdata"), aligned(1))) = 0;
|
||||
char scNwc24FlPath[] = "/shared2/wc24/nwc24fl.bin";
|
||||
static const char* FLFilePath = scNwc24FlPath;
|
||||
|
||||
const char g_SpecialsChars[16] = { '(', ')', '<', '>', '[', ']', ':', ';', '\\', ',', '"' };
|
||||
|
||||
|
||||
@@ -198,8 +198,10 @@ int SOShutdown(int socket, int how) {
|
||||
}
|
||||
|
||||
int SOPoll(SOPollFD* fds, unsigned int count, s64 timeout) {
|
||||
s32 size;
|
||||
s32 bytes;
|
||||
s32 result;
|
||||
s32 rm;
|
||||
s32 result,bytes,size;
|
||||
PollRequest* request;
|
||||
SOPollFD* reply;
|
||||
if((result=SOiPrepare(NULL,&rm))==0) {
|
||||
|
||||
@@ -312,7 +312,7 @@ namespace ipl {
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata2"
|
||||
extern "C" const f32 lbl_816948EC = 0.0f;
|
||||
extern "C" const f32 scDateZeroF = 0.0f;
|
||||
extern "C" const f32 lbl_816948F0;
|
||||
#pragma pop
|
||||
} // namespace scene
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
// clang-format off
|
||||
extern "C" char lbl_8164E290[] = "Cursur_a";
|
||||
extern "C" char scCursur_a[] = "Cursur_a";
|
||||
|
||||
static const char* scCursur = lbl_8164E290;
|
||||
static const char* scCursur = scCursur_a;
|
||||
|
||||
static const char* scCursorAnims[] = {
|
||||
"my_IplTop_d_FocusOff.brlan",
|
||||
@@ -20,10 +20,10 @@ namespace ipl {
|
||||
"my_IplTop_d_Select.brlan",
|
||||
};
|
||||
|
||||
extern "C" const char* lbl_8169699C = "T_Balloon";
|
||||
extern "C" const char* scPaneName_T_Balloon = "T_Balloon";
|
||||
|
||||
extern "C" const char* lbl_816969A8 = "W_Base";
|
||||
extern "C" const char* lbl_816969B4 = "W_Shade";
|
||||
extern "C" const char* scPaneName_W_Base = "W_Base";
|
||||
extern "C" const char* scPaneName_W_Shade = "W_Shade";
|
||||
|
||||
static const char* scLangGroups[] = {
|
||||
"JPN",
|
||||
@@ -38,8 +38,8 @@ namespace ipl {
|
||||
"KOR",
|
||||
};
|
||||
|
||||
extern "C" char lbl_816969DC[] = "Calc";
|
||||
extern "C" char lbl_816969E1[] = "Create";
|
||||
extern "C" char scExport_Calc[] = "Calc";
|
||||
extern "C" char scExport_Create[] = "Create";
|
||||
|
||||
#pragma pack(1)
|
||||
struct ModuleData {
|
||||
@@ -53,7 +53,7 @@ namespace ipl {
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
extern "C" ModuleData lbl_8164E328 = {
|
||||
extern "C" ModuleData scModuleData = {
|
||||
{
|
||||
{
|
||||
"JPN",
|
||||
@@ -112,9 +112,9 @@ namespace ipl {
|
||||
"icon_Whole.brlan",
|
||||
};
|
||||
|
||||
extern "C" char lbl_8164E6AF[] = "%s_Rso%d.brlan";
|
||||
extern "C" char lbl_8164E6C0[] = "icon_Start.brlan";
|
||||
extern "C" char lbl_816969E8[] = "arc";
|
||||
extern "C" char scBrlan_RsoFmt[] = "%s_Rso%d.brlan";
|
||||
extern "C" char scBrlan_icon_Start[] = "icon_Start.brlan";
|
||||
extern "C" char scArc[] = "arc";
|
||||
|
||||
static const u32 scLangLookup[SC_PRODUCT_AREA_MAX][16] = {
|
||||
// Japan
|
||||
@@ -296,7 +296,7 @@ namespace ipl {
|
||||
|
||||
int ChannelObj::calcExtModule(EGG::ExpHeap* expHeap, bool unk0, bool onSceneChange) {
|
||||
int result = EXT_MODULE_RESULT_WAIT;
|
||||
const char* dataBase = lbl_8164E290;
|
||||
const char* dataBase = scCursur_a;
|
||||
|
||||
if (mExtModuleState == EXT_MODULE_STATE_UNAVAILABLE) {
|
||||
return EXT_MODULE_RESULT_UNAVAILABLE;
|
||||
@@ -354,7 +354,7 @@ namespace ipl {
|
||||
|
||||
// Import `int Calc(int)`
|
||||
// This is during ChannelObj's loop.
|
||||
mpRSOCalc = (channel::CalcFunc)RSOFindExportSymbolAddr(mpRSOHeader, lbl_816969DC);
|
||||
mpRSOCalc = (channel::CalcFunc)RSOFindExportSymbolAddr(mpRSOHeader, scExport_Calc);
|
||||
|
||||
// Import `void ThreadCalc()`
|
||||
// This is executed on a seperate thread.
|
||||
@@ -364,7 +364,7 @@ namespace ipl {
|
||||
|
||||
// Import `void Create(nw4r::lyt::Layout*)`
|
||||
// This is the initialization of the module.
|
||||
channel::CreateFunc createFunc = (channel::CreateFunc)RSOFindExportSymbolAddr(mpRSOHeader, lbl_816969E1);
|
||||
channel::CreateFunc createFunc = (channel::CreateFunc)RSOFindExportSymbolAddr(mpRSOHeader, scExport_Create);
|
||||
if (createFunc != NULL) {
|
||||
createFunc(mpThumbLayout->getNW4RLyt());
|
||||
}
|
||||
@@ -501,8 +501,8 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void ChannelObj::createDiskLayout(void* data) {
|
||||
const ModuleData* moduleData = reinterpret_cast<const ModuleData*>(lbl_8164E290 + 0x98);
|
||||
mpDiskLayout = layout::Object::create(mpDiskHeap, 0x19000, data, lbl_816969E8, moduleData->iconBrlyt);
|
||||
const ModuleData* moduleData = reinterpret_cast<const ModuleData*>(scCursur_a + 0x98);
|
||||
mpDiskLayout = layout::Object::create(mpDiskHeap, 0x19000, data, scArc, moduleData->iconBrlyt);
|
||||
setLangPane(mpDiskLayout);
|
||||
|
||||
if (mpDiskLayout->searchFile(moduleData->iconBrlan)) {
|
||||
@@ -638,33 +638,33 @@ namespace ipl {
|
||||
void ChannelObj::setLangPane(const layout::Object* layout) {
|
||||
int lang = System::getLanguage();
|
||||
const char* langGroup = scLangGroups[lang];
|
||||
char local_50[40] = "";
|
||||
char langCodeBuf[40] = "";
|
||||
|
||||
bool foundLangGroup = false;
|
||||
bool bVar4 = false;
|
||||
|
||||
for (nw4r::lyt::GroupList::Iterator it = layout->GetGroupList().GetBeginIter(); it != layout->GetGroupList().GetEndIter(); it++) {
|
||||
if (strcmp(it->GetName(), langGroup) == 0) {
|
||||
foundLangGroup = true;
|
||||
bVar4 = true;
|
||||
} else {
|
||||
bool isNonRsoGroup = true;
|
||||
bool bVar3 = true;
|
||||
for (int i = 0; i < channel::MAX_ANIMS; i++) {
|
||||
char name[6];
|
||||
sprintf(name, "Rso%d", i);
|
||||
if (strncmp(it->GetName(), name, 5) == 0) {
|
||||
isNonRsoGroup = false;
|
||||
bVar3 = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isNonRsoGroup) {
|
||||
if (bVar3) {
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it2 = it->GetPaneList().GetBeginIter(); it2 != it->GetPaneList().GetEndIter(); it2++) {
|
||||
it2->mTarget->SetVisible(false);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
if (strncmp(it->GetName(), scLangGroups[i], 3) == 0) {
|
||||
memcpy(&local_50[i], it->GetName(), 3);
|
||||
local_50[i + 3] = 0;
|
||||
memcpy(&langCodeBuf[i], it->GetName(), 3);
|
||||
langCodeBuf[i + 3] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -672,7 +672,7 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
if (foundLangGroup) {
|
||||
if (bVar4) {
|
||||
nw4r::lyt::Group* group = layout->FindGroupByName(langGroup);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter(); it++) {
|
||||
it->mTarget->SetVisible(true);
|
||||
@@ -680,10 +680,10 @@ namespace ipl {
|
||||
} else {
|
||||
s32 region = System::getRegion();
|
||||
for (int i = 0; i < channel::MAX_ANIMS; i++) {
|
||||
char* groupName = (char*)lbl_8164E328.langGroupLookup[region][i];
|
||||
char* groupName = (char*)scModuleData.langGroupLookup[region][i];
|
||||
|
||||
if (groupName != NULL) {
|
||||
if (strcmp(groupName, &local_50[scLangLookup[region][i]]) == 0) {
|
||||
if (strcmp(groupName, &langCodeBuf[scLangLookup[region][i]]) == 0) {
|
||||
nw4r::lyt::Group* group = layout->FindGroupByName(groupName);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter();
|
||||
it++) {
|
||||
@@ -698,7 +698,7 @@ namespace ipl {
|
||||
void ChannelObj::bindRsoAnm(layout::Object* layout, layout::Animator** anims, const char* layoutFile) {
|
||||
for (int i = 0; i < channel::MAX_ANIMS; i++) {
|
||||
char fileName[20];
|
||||
sprintf(fileName, lbl_8164E6AF, layoutFile, i);
|
||||
sprintf(fileName, scBrlan_RsoFmt, layoutFile, i);
|
||||
|
||||
if (layout->searchFile(fileName)) {
|
||||
char groupName[8];
|
||||
@@ -730,7 +730,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void ChannelObj::createThumbnail() {
|
||||
bool shouldAdjustHeap = false;
|
||||
bool bVar1 = false;
|
||||
|
||||
if (mpBalloonLayout == NULL && System::getChannelManager()->isLoaded(mChanPage, mChanIndex)) {
|
||||
initBalloon();
|
||||
@@ -746,12 +746,12 @@ namespace ipl {
|
||||
frame = createWadThumbnail();
|
||||
} else {
|
||||
frame = createWrongThumbnail();
|
||||
shouldAdjustHeap = true;
|
||||
bVar1 = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
frame = createEmptyThumbnail();
|
||||
shouldAdjustHeap = true;
|
||||
bVar1 = true;
|
||||
}
|
||||
|
||||
calcNormal();
|
||||
@@ -764,7 +764,7 @@ namespace ipl {
|
||||
mpThumbAnim->setCurrentFrame(frame);
|
||||
}
|
||||
|
||||
if (shouldAdjustHeap) {
|
||||
if (bVar1) {
|
||||
mpThumbLayout->adjustHeap();
|
||||
}
|
||||
}
|
||||
@@ -772,10 +772,10 @@ namespace ipl {
|
||||
f32 ChannelObj::createWadThumbnail() {
|
||||
f32 frame = 0.0f;
|
||||
|
||||
mpThumbLayout = layout::Object::create(mpMainHeap, 0x8000, mpThumbFile->getBuffer(), lbl_816969E8, lbl_8164E290 + 0x3F8);
|
||||
mpThumbLayout = layout::Object::create(mpMainHeap, 0x8000, mpThumbFile->getBuffer(), scArc, scCursur_a + 0x3F8);
|
||||
setLangPane(mpThumbLayout);
|
||||
|
||||
const char* dataBase = lbl_8164E290;
|
||||
const char* dataBase = scCursur_a;
|
||||
u32 rsoIdx = System::getChannelManager()->getIconRSOIdx(mChanPage, mChanIndex);
|
||||
u32 csIdx = System::getChannelManager()->getIconCSIdx(mChanPage, mChanIndex);
|
||||
|
||||
@@ -826,11 +826,11 @@ namespace ipl {
|
||||
return frame;
|
||||
}
|
||||
|
||||
extern "C" char lbl_8164E6CF[] = "my_IplTop_b.brlyt";
|
||||
extern "C" char lbl_8164E6E1[] = "my_IplTop_b.brlan";
|
||||
extern "C" char scBrlyt_my_IplTop_b[] = "my_IplTop_b.brlyt";
|
||||
extern "C" char scBrlan_my_IplTop_b[] = "my_IplTop_b.brlan";
|
||||
|
||||
f32 ChannelObj::createWrongThumbnail() {
|
||||
mpThumbLayout = layout::Object::create(mpMainHeap, 0x8000, mpSysLayoutFile, lbl_816969E8, lbl_8164E6CF);
|
||||
mpThumbLayout = layout::Object::create(mpMainHeap, 0x8000, mpSysLayoutFile, scArc, scBrlyt_my_IplTop_b);
|
||||
|
||||
mpThumbLayout->FindPaneByName("Ch0")->SetVisible(false);
|
||||
mpThumbLayout->FindPaneByName("Ch1")->GetMaterial()->SetTevColor(0, (GXColorS10){0, 0, 0, 255});
|
||||
@@ -841,8 +841,8 @@ namespace ipl {
|
||||
}
|
||||
|
||||
f32 ChannelObj::createEmptyThumbnail() {
|
||||
mpThumbLayout = layout::Object::create(mpMainHeap, 0x8000, mpSysLayoutFile, lbl_816969E8, lbl_8164E6CF);
|
||||
mpThumbAnim = mpThumbLayout->bind(lbl_8164E6E1);
|
||||
mpThumbLayout = layout::Object::create(mpMainHeap, 0x8000, mpSysLayoutFile, scArc, scBrlyt_my_IplTop_b);
|
||||
mpThumbAnim = mpThumbLayout->bind(scBrlan_my_IplTop_b);
|
||||
|
||||
return System::getRndm()->get_u16() % 2000;
|
||||
}
|
||||
@@ -871,12 +871,12 @@ namespace ipl {
|
||||
calcBalloon(pos);
|
||||
}
|
||||
|
||||
extern "C" char lbl_8164E6F3[] = "my_IplTop_d.brlyt";
|
||||
extern "C" char lbl_8164E705[] = "my_IplTopBalloon_a.brlyt";
|
||||
extern "C" char lbl_8164E71E[] = "my_IplTopBalloon_a_BalloonInOut.brlan";
|
||||
extern "C" char scBrlyt_my_IplTop_d[] = "my_IplTop_d.brlyt";
|
||||
extern "C" char scBrlyt_my_IplTopBalloon_a[] = "my_IplTopBalloon_a.brlyt";
|
||||
extern "C" char scBrlan_BalloonInOut[] = "my_IplTopBalloon_a_BalloonInOut.brlan";
|
||||
|
||||
void ChannelObj::initCursor() {
|
||||
mpCursorLayout = new (mpCursorHeap, 4) layout::Object(mpCursorHeap, mpSysLayoutFile, lbl_816969E8, lbl_8164E6F3);
|
||||
mpCursorLayout = new (mpCursorHeap, 4) layout::Object(mpCursorHeap, mpSysLayoutFile, scArc, scBrlyt_my_IplTop_d);
|
||||
|
||||
for (int i = 0; i < ANIM_CURSOR_MAX; i++) {
|
||||
mpCursorAnims[i] = mpCursorLayout->bind(scCursorAnims[i], scCursur, false);
|
||||
@@ -1001,19 +1001,19 @@ namespace ipl {
|
||||
mpBalloonLayout = NULL;
|
||||
return;
|
||||
}
|
||||
mpBalloonLayout = new (mpBalloonHeap, 4) layout::Object(mpBalloonHeap, mpSysLayoutFile, lbl_816969E8, lbl_8164E705);
|
||||
mpBalloonLayout = new (mpBalloonHeap, 4) layout::Object(mpBalloonHeap, mpSysLayoutFile, scArc, scBrlyt_my_IplTopBalloon_a);
|
||||
|
||||
setBalloonText((wchar_t*)System::getChannelManager()->getTitleName(mChanPage, mChanIndex, 0));
|
||||
|
||||
mpBalloonAnim = mpBalloonLayout->bind(lbl_8164E71E);
|
||||
mpBalloonAnim = mpBalloonLayout->bind(scBrlan_BalloonInOut);
|
||||
setBalloonAnim(0);
|
||||
mpBalloonLayout->finishBinding();
|
||||
}
|
||||
|
||||
extern "C" char lbl_8164E744[] = "WIPL_SE_BALLOON";
|
||||
extern "C" char scSE_BALLOON[] = "WIPL_SE_BALLOON";
|
||||
|
||||
void ChannelObj::setBalloonText(const wchar_t* text) {
|
||||
nw4r::lyt::TextBox* textPane = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpBalloonLayout->FindPaneByName(lbl_8169699C));
|
||||
nw4r::lyt::TextBox* textPane = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpBalloonLayout->FindPaneByName(scPaneName_T_Balloon));
|
||||
|
||||
wchar_t fullStr[channel::META_CHANNEL_NAME_LENGTH + 3] = L"";
|
||||
u32 strLen;
|
||||
@@ -1052,22 +1052,22 @@ namespace ipl {
|
||||
|
||||
nw4r::ut::Rect textRect = textPane->GetTextDrawRect(*mpBalloonLayout->getDrawInfo());
|
||||
|
||||
nw4r::lyt::Size newSize(mpBalloonLayout->FindPaneByName(lbl_816969A8)->GetSize());
|
||||
nw4r::lyt::Size newSize(mpBalloonLayout->FindPaneByName(scPaneName_W_Base)->GetSize());
|
||||
newSize.width = textRect.right - textRect.left + 40.0f;
|
||||
|
||||
if (newSize.width < mLocationAdjust * 160.0f) {
|
||||
newSize.width = mLocationAdjust * 160.0f;
|
||||
}
|
||||
|
||||
mpBalloonLayout->FindPaneByName(lbl_816969B4)->SetSize(newSize);
|
||||
mpBalloonLayout->FindPaneByName(lbl_816969A8)->SetSize(newSize);
|
||||
mpBalloonLayout->FindPaneByName(scPaneName_W_Shade)->SetSize(newSize);
|
||||
mpBalloonLayout->FindPaneByName(scPaneName_W_Base)->SetSize(newSize);
|
||||
}
|
||||
|
||||
void ChannelObj::calcBalloon(const nw4r::math::VEC3& vec) {
|
||||
if (mpBalloonLayout != NULL) {
|
||||
nw4r::lyt::Size size;
|
||||
|
||||
size = mpBalloonLayout->FindPaneByName(lbl_816969A8)->GetSize();
|
||||
size = mpBalloonLayout->FindPaneByName(scPaneName_W_Base)->GetSize();
|
||||
|
||||
f32 val = -2.0f + ((size.height / 2) + mThumbHeight);
|
||||
val *= -1.0f;
|
||||
@@ -1117,7 +1117,7 @@ namespace ipl {
|
||||
mpBalloonLayout->GetRootPane()->SetVisible(true);
|
||||
mpBalloonLayout->setAnmType(ANIM_TYPE_FORWARD);
|
||||
mpBalloonLayout->start();
|
||||
snd::getSystem()->startSE(lbl_8164E744);
|
||||
snd::getSystem()->startSE(scSE_BALLOON);
|
||||
} else if (unk == 4) {
|
||||
unk_0x68 = 0;
|
||||
}
|
||||
@@ -1229,7 +1229,7 @@ namespace ipl {
|
||||
if (group != NULL) {
|
||||
mpNwc24NewGroup = group;
|
||||
} else {
|
||||
lookup = (char**)lbl_8164E328.langGroupLookup[System::getRegion()];
|
||||
lookup = (char**)scModuleData.langGroupLookup[System::getRegion()];
|
||||
|
||||
for (int i = 0; lookup[i] != NULL; i++) {
|
||||
sprintf(grpName, "New_%s", lookup[i]);
|
||||
|
||||
Reference in New Issue
Block a user