mirror of
https://github.com/zeldaret/botw
synced 2026-07-04 04:30:43 -04:00
ksys/gdt: Implement more TriggerParam functions and StageInfo
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "KingSystem/ActorSystem/actActorUtil.h"
|
||||
#include <container/seadSafeArray.h>
|
||||
#include <math/seadMathCalcCommon.h>
|
||||
#include "KingSystem/ActorSystem/Profiles/actRopeBase.h"
|
||||
#include "KingSystem/ActorSystem/actActor.h"
|
||||
#include "KingSystem/ActorSystem/actActorConstDataAccess.h"
|
||||
@@ -525,6 +526,30 @@ bool isAirOctaWoodPlatformDlc(const sead::SafeString& name) {
|
||||
name == "FldObj_DLC_FlyShield_Wood_A_Snow_02";
|
||||
}
|
||||
|
||||
void getRevivalGridPosition(const sead::Vector3f& pos, int* col1, int* row1, int* col2, int* row2) {
|
||||
const int col = sead::clamp((int(pos.x) + 5000) / 1000, 0, 9);
|
||||
const int row = sead::clamp((int(pos.z) + 4000) / 1000, 0, 7);
|
||||
|
||||
const auto x = (float(col) + 0.5f) * 1000.0f - 5000.0f;
|
||||
const auto z = (float(row) + 0.5f) * 1000.0f - 4000.0f;
|
||||
|
||||
if (x < pos.x) {
|
||||
*col1 = col;
|
||||
*col2 = col + 1;
|
||||
} else {
|
||||
*col1 = col - 1;
|
||||
*col2 = col;
|
||||
}
|
||||
|
||||
if (z < pos.z) {
|
||||
*row1 = row;
|
||||
*row2 = row + 1;
|
||||
} else {
|
||||
*row1 = row - 1;
|
||||
*row2 = row;
|
||||
}
|
||||
}
|
||||
|
||||
bool getSameGroupActorName(sead::SafeString* name, BaseProcLink* link) {
|
||||
return getAccessor(link).getSameGroupActorName(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user