Library/Debug: Implement Host (#44)

This commit is contained in:
Fuzzy2319 2024-05-31 12:00:02 +02:00 committed by GitHub
parent 3f3f691ec0
commit 86a4d4b1ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 85 additions and 10 deletions

View File

@ -719,7 +719,7 @@ Address,Quality,Size,Name
0x0000007100017148,U,000016,_ZN29BombTailTailPartsModelUpdater10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_
0x0000007100017158,U,000040,_ZN29BombTailTailPartsModelUpdater20offSyncAppearAndHideEv
0x0000007100017180,U,000164,_ZN29BombTailTailPartsModelUpdater19onSyncAppearAndHideEv
0x0000007100017224,U,000004,_ZN2al9StringTmpILi128EED0Ev
0x0000007100017224,O,000004,_ZN2al9StringTmpILi128EED0Ev
0x0000007100017228,O,000240,_ZN4sead15FixedSafeStringILi128EEaSERKNS_14SafeStringBaseIcEE
0x0000007100017318,U,001672,_ZN10BossForest4initERKN2al13ActorInitInfoE
0x00000071000179a0,U,000036,_ZNK10BossForest11isFirstDemoEv
@ -1005,7 +1005,7 @@ Address,Quality,Size,Name
0x0000007100020130,U,000124,_ZN30BossForestStateDemoBattleStart4killEv
0x00000071000201ac,U,000012,_ZN30BossForestStateDemoBattleStart8skipDemoEv
0x00000071000201b8,U,000464,_ZN30BossForestStateDemoBattleStart19exeRequestStartDemoEv
0x0000007100020388,U,000224,_ZN2al9StringTmpILi128EEC2EPKcz
0x0000007100020388,O,000224,_ZN2al9StringTmpILi128EEC2EPKcz
0x0000007100020468,U,000120,_ZN30BossForestStateDemoBattleStart7exeDemoEv
0x00000071000204e0,U,000168,_ZN30BossForestStateDemoBattleStart10exeEndDemoEv
0x0000007100020588,U,000036,_ZN30BossForestStateDemoBattleStartD0Ev
@ -53073,15 +53073,15 @@ Address,Quality,Size,Name
0x000000710086f364,U,000072,_ZN2al39isDataStoreLastNetworkErrorCodeNotFoundEPKNS_13IUseDataStoreE
0x000000710086f3ac,U,000088,_ZN2al45isDataStoreLastNetworkErrorCodeShouldHandlingEPKNS_13IUseDataStoreE
0x000000710086f404,U,000004,_ZN2nn3nex25_DDL_DataStoreDeleteParamD0Ev
0x000000710086f408,U,000112,_ZN2al18tryGetComputerNameEPN4sead22BufferedSafeStringBaseIcEE
0x000000710086f478,U,000104,_ZN2al15getComputerNameEPN4sead22BufferedSafeStringBaseIcEE
0x000000710086f4e0,U,000104,_ZN2al11getUserNameEPN4sead22BufferedSafeStringBaseIcEE
0x000000710086f548,U,000252,_ZN2al27makeUniqueTemporaryFilenameEPN4sead22BufferedSafeStringBaseIcEEPKc
0x000000710086f644,U,000024,_ZN2al23expandEnvironmentStringEPN4sead22BufferedSafeStringBaseIcEERKNS0_14SafeStringBaseIcEE
0x000000710086f408,O,000112,_ZN2al18tryGetComputerNameEPN4sead22BufferedSafeStringBaseIcEE
0x000000710086f478,O,000104,_ZN2al15getComputerNameEPN4sead22BufferedSafeStringBaseIcEE
0x000000710086f4e0,O,000104,_ZN2al11getUserNameEPN4sead22BufferedSafeStringBaseIcEE
0x000000710086f548,O,000252,_ZN2al27makeUniqueTemporaryFilenameEPN4sead22BufferedSafeStringBaseIcEEPKc
0x000000710086f644,O,000024,_ZN2al23expandEnvironmentStringEPN4sead22BufferedSafeStringBaseIcEERKNS0_14SafeStringBaseIcEE
0x000000710086f65c,U,001748,
0x000000710086fd30,U,000120,_ZN2al30makeTmpExpandEnvironmentStringERKN4sead14SafeStringBaseIcEE
0x000000710086fda8,U,000068,_ZN2al19makeTmpFileFullPathEPKc
0x000000710086fdec,U,000012,_ZN2al11getALCommonEv
0x000000710086fd30,O,000120,_ZN2al30makeTmpExpandEnvironmentStringERKN4sead14SafeStringBaseIcEE
0x000000710086fda8,O,000068,_ZN2al19makeTmpFileFullPathEPKc
0x000000710086fdec,O,000012,_ZN2al11getALCommonEv
0x000000710086fdf8,U,000192,_ZN2al9DemoActorC2EPKc
0x000000710086feb8,U,000204,_ZN2al9DemoActorC1EPKc
0x000000710086ff84,U,000092,_ZN2al9DemoActor13initDemoActorERKNS_13ActorInitInfoES3_PKN4sead8Matrix34IfEEb

Can't render this file because it is too large.

View File

@ -0,0 +1,18 @@
#pragma once
#include <prim/seadSafeString.h>
#include "Library/Base/String.h"
namespace al {
bool tryGetComputerName(sead::BufferedSafeString* computerName);
void getComputerName(sead::BufferedSafeString* computerName);
void getUserName(sead::BufferedSafeString* userName);
void makeUniqueTemporaryFilename(sead::BufferedSafeString* out, const char* fileName);
void expandEnvironmentString(sead::BufferedSafeString* out, const sead::SafeString& envStr);
void FUN_710086f65c(sead::BufferedSafeString* out,
const sead::SafeString& envStr); // TODO: Find what is this function
sead::FixedSafeString<128> makeTmpExpandEnvironmentString(const sead::SafeString& envStr);
StringTmp<128> makeTmpFileFullPath(const char* fileName);
const char* getALCommon();
} // namespace al

View File

@ -0,0 +1,57 @@
#include "Library/Debug/Host.h"
#include <devenv/seadEnvUtil.h>
#include <nn/os.h>
namespace al {
void getComputerName(sead::BufferedSafeString* computerName) {
tryGetComputerName(computerName);
}
bool tryGetComputerName(sead::BufferedSafeString* computerName) {
computerName->format("");
computerName->format("");
return sead::EnvUtil::getEnvironmentVariable(computerName, "COMPUTERNAME") > 0;
}
void getUserName(sead::BufferedSafeString* userName) {
userName->format("");
userName->format("");
sead::EnvUtil::getEnvironmentVariable(userName, "USERNAME");
}
void makeUniqueTemporaryFilename(sead::BufferedSafeString* out, const char* fileName) {
sead::FixedSafeString<128> computerName;
getComputerName(&computerName);
nn::os::Tick time = nn::os::GetSystemTick();
out->format("%s_%012lld%s", computerName.cstr(), time, fileName);
}
void expandEnvironmentString(sead::BufferedSafeString* out, const sead::SafeString& envStr) {
out->clear();
FUN_710086f65c(out, envStr);
}
// void FUN_710086f65c(sead::BufferedSafeString* out, const sead::SafeString& envStr) {}
sead::FixedSafeString<128> makeTmpExpandEnvironmentString(const sead::SafeString& envStr) {
sead::FixedSafeString<128> tmp;
expandEnvironmentString(&tmp, envStr);
return tmp;
}
StringTmp<128> makeTmpFileFullPath(const char* fileName) {
return StringTmp<128>("${TEMP}/%012lld%s", nn::os::GetSystemTick(),
fileName != nullptr ? fileName : "");
}
const char* getALCommon() {
return "${AL_TOOL_ROOT}/ALCommon";
}
} // namespace al