This commit is contained in:
MonsterDruide1 2025-06-16 02:47:38 +02:00
parent 708ae141e8
commit 4060a2b387
16 changed files with 60704 additions and 519 deletions

File diff suppressed because it is too large Load diff

View file

@ -56,7 +56,7 @@ void CameraPoserFix::start(const CameraStartInfo& startInfo) {
}
void CameraPoserFix::update() {
mCameraUp.set(sead::Vector3f::ez);
mCameraUp.set(sead::Vector3f::ey);
mTargetTrans.set(mLookAtPos);
mTargetTrans *= mViewMtx;

View file

@ -21,7 +21,7 @@ CameraResourceHolder::CameraResourceHolder(const char* stageName, s32 maxResourc
// stack ordering to match original assembly
__attribute__((always_inline)) void getStageName(StringTmp<128>* stageName,
const char* archiveName) {
sead::FixedSafeString<256> safeArchiveName;
StringTmp<256> safeArchiveName;
safeArchiveName.format("%s", archiveName);
if (safeArchiveName.endsWith("Map"))
stageName->copy(safeArchiveName, safeArchiveName.calcLength() - 3);

View file

@ -23,7 +23,7 @@ void getUserName(sead::BufferedSafeString* userName) {
}
void makeUniqueTemporaryFilename(sead::BufferedSafeString* out, const char* fileName) {
sead::FixedSafeString<128> computerName;
StringTmp<128> computerName;
getComputerName(&computerName);
nn::os::Tick time = nn::os::GetSystemTick();
@ -38,8 +38,8 @@ void expandEnvironmentString(sead::BufferedSafeString* out, const sead::SafeStri
// void FUN_710086f65c(sead::BufferedSafeString* out, const sead::SafeString& envStr) {}
sead::FixedSafeString<128> makeTmpExpandEnvironmentString(const sead::SafeString& envStr) {
sead::FixedSafeString<128> tmp;
StringTmp<128> makeTmpExpandEnvironmentString(const sead::SafeString& envStr) {
StringTmp<128> tmp;
expandEnvironmentString(&tmp, envStr);

View file

@ -12,7 +12,7 @@ void makeUniqueTemporaryFilename(sead::BufferedSafeString* out, const char* file
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> makeTmpExpandEnvironmentString(const sead::SafeString& envStr);
StringTmp<128> makeTmpFileFullPath(const char* fileName);
const char* getALCommon();
} // namespace al

View file

@ -315,7 +315,7 @@ __attribute__((always_inline)) void initActorCollision(LiveActor* actor,
const char* name = nullptr;
initCollision.tryGetStringByKey(&name, "Name");
sead::FixedSafeString<256> unused;
StringTmp<256> unused;
if (name == nullptr)
name = getBaseName(modelRes->getArchiveName());
@ -638,6 +638,8 @@ LiveActor* createChildLinkMapPartsActor(const char* actorName, const char* linkN
return actor;
}
// NON_MATCHING: should use `al::StringTmp` instead, which causes major mismatches
// (https://decomp.me/scratch/XDRZ2)
void initMapPartsActor(LiveActor* actor, const ActorInitInfo& initInfo, const char* suffix) {
const char* modelName;
sead::FixedSafeString<256> fileName;

View file

@ -238,7 +238,7 @@ SubActorKeeper* SubActorKeeper::create(LiveActor* rootActor) {
SubActorKeeper* SubActorKeeper::tryCreate(LiveActor* rootActor, const char* suffix,
s32 maxSubActors) {
sead::FixedSafeString<0x80> actorInitFileName;
StringTmp<0x80> actorInitFileName;
if (!isExistModelResource(rootActor) ||
!tryGetActorInitFileName(&actorInitFileName, rootActor, "InitSubActor", suffix))

View file

@ -1,5 +1,6 @@
#include "Library/MapObj/RollingCubeMapParts.h"
#include "Library/Base/StringUtil.h"
#include "Library/Effect/EffectSystemInfo.h"
#include "Library/LiveActor/ActorActionFunction.h"
#include "Library/LiveActor/ActorClippingFunction.h"
@ -59,8 +60,8 @@ void RollingCubeMapParts::init(const ActorInitInfo& info) {
mMoveLimitMtx->makeQT(mInitialPoseQuat, mInitialPoseTrans);
mMoveLimitPartsModel = new PartsModel("");
sead::FixedSafeString<256> model;
sead::FixedSafeString<256> archive;
StringTmp<256> model;
StringTmp<256> archive;
makeMapPartsModelName(&model, &archive, info);
mMoveLimitPartsModel->initPartsSuffix(this, info, model.cstr(), "MoveLimit", mMoveLimitMtx,
false);

View file

@ -15,7 +15,7 @@ public:
private:
sead::Quatf mQuat = sead::Quatf::unit;
sead::Vector3f mSide = sead::Vector3f::ey;
sead::Vector3f mSide = sead::Vector3f::ex;
sead::Vector3f mFront = sead::Vector3f::ez;
f32 mRotateDegree = 0.0f;
f32 mRotateSpeed = 0.0f;

View file

@ -90,7 +90,7 @@ void PartsModel::initPartsFixFileNoRegister(LiveActor* parent, const ActorInitIn
initChildActorWithArchiveNameNoPlacementInfo(this, initInfo, arcName, arcSuffix);
invalidateClipping(this);
sead::FixedSafeString<0x80> initArcName;
StringTmp<0x80> initArcName;
createFileNameBySuffix(&initArcName, "InitPartsFixInfo", suffix);
if (!isExistModelResourceYaml(mParentModel, initArcName.cstr(), nullptr))

View file

@ -84,8 +84,9 @@ StageResourceList::StageResourceList(const char* stageName, s32 scenarioNo,
mStageResources.pushBack(
new StageInfo(resource, iter, subPlacementInfo.getPlacementIter()));
sead::Vector3f rotation = sead::Vector3f::zero;
sead::Vector3f scale = sead::Vector3f::ones;
// BUG: Somebody messed up their ones and zero here - resulting in scale = 0,0,0 and rotation = 1,1,1
sead::Vector3f rotation = sead::Vector3f::ones;
sead::Vector3f scale = sead::Vector3f::zero;
tryGetRotate(&rotation, subPlacementInfo);
tryGetScale(&scale, subPlacementInfo);
}

View file

@ -12,7 +12,7 @@ ActionFlagCtrl* ActionFlagCtrl::tryCreate(LiveActor* actor, const char* name) {
if (!isExistModelResource(actor))
return nullptr;
sead::FixedSafeString<128> initFileName;
StringTmp<128> initFileName;
if (!tryGetActorInitFileName(&initFileName, actor, "ActionFlagCtrl", name))
createFileNameBySuffix(&initFileName, "ActionFlagCtrl", name);

View file

@ -17,7 +17,7 @@ NERVE_ACTION_IMPL(BarrierField, AppearBreedaMoonWorld);
NERVE_ACTION_IMPL(BarrierField, Hide);
NERVE_ACTION_IMPL(BarrierField, Disappear);
NERVE_ACTIONS_MAKE_STRUCT(BarrierField, Appear, AppearBreedaMoonWorld, Hide, Disappear);
NERVE_ACTIONS_MAKE_STRUCT(BarrierField, Hide, Appear, AppearBreedaMoonWorld, Disappear);
} // namespace

View file

@ -2,6 +2,7 @@
#include <basis/seadTypes.h>
#include "Library/Base/StringUtil.h"
#include "Library/LiveActor/ActorClippingFunction.h"
#include "Library/LiveActor/ActorInitFunction.h"
#include "Library/LiveActor/ActorInitInfo.h"
@ -69,7 +70,7 @@ void RouletteSwitch::control() {
}
bool isAnySwitchOn = false;
for (s32 i = 0; i < mButtons.size(); i++) {
sead::FixedSafeString<0x100> string;
al::StringTmp<0x100> string;
string.format("SwitchButton%dOn", i + 1);
if (!mButtons[i]->isOn()) {
al::offStageSwitch(this, string.cstr());

View file

@ -63,7 +63,7 @@ bool ShineTowerBackDoor::receiveMsg(const al::SensorMsg* message, al::HitSensor*
if (al::isMsgBindInit(message)) {
al::invalidateClipping(this);
mPlayerPuppet = rs::startPuppet(self, other);
rs::setPuppetVelocity(mPlayerPuppet, sead::Vector3f::ex * -45.0f);
rs::setPuppetVelocity(mPlayerPuppet, sead::Vector3f::ey * -45.0f);
rs::invalidatePuppetCollider(mPlayerPuppet);
rs::hidePuppetSilhouette(mPlayerPuppet);
al::setNerve(this, &NrvShineTowerBackDoor.Enter);
@ -118,7 +118,7 @@ void ShineTowerBackDoor::exeEnter() {
al::startHitReaction(this, "入る");
}
rs::setPuppetVelocity(mPlayerPuppet, sead::Vector3f::ex * -45.0f);
rs::setPuppetVelocity(mPlayerPuppet, sead::Vector3f::ey * -45.0f);
sead::Vector3f puppetTrans = rs::getPuppetTrans(mPlayerPuppet);
sead::Vector3f trans = al::getTrans(this);
trans.y = puppetTrans.y;

View file

@ -2,6 +2,7 @@
#include <prim/seadSafeString.h>
#include "Library/Base/StringUtil.h"
#include "Library/LiveActor/ActorInitUtil.h"
#include "Library/LiveActor/ActorModelFunction.h"
#include "Library/LiveActor/ActorMovementFunction.h"
@ -65,7 +66,7 @@ void ShineTowerNpc::startBalloon() {
void ShineTowerNpc::exeWait() {
if (al::isFirstStep(this)) {
sead::FixedSafeString<0x40> string;
al::StringTmp<0x40> string;
string.format("RestShineNum");
rs::startEventFlow(mEventFlowExecutor, string.cstr());
}