| 1 | #pragma once |
| 2 | |
| 3 | #include <gfx/seadColor.h> |
| 4 | #include <math/seadMatrix.h> |
| 5 | #include <math/seadVector.h> |
| 6 | |
| 7 | namespace al { |
| 8 | struct ActorInitInfo; |
| 9 | class AreaInitInfo; |
| 10 | class PlacementInfo; |
| 11 | class PlacementId; |
| 12 | |
| 13 | bool isValidInfo(const PlacementInfo& placementInfo); |
| 14 | bool isPlaced(const ActorInitInfo& initInfo); |
| 15 | |
| 16 | void getObjectName(const char** name, const ActorInitInfo& initInfo); |
| 17 | void getObjectName(const char** name, const PlacementInfo& placementInfo); |
| 18 | bool tryGetObjectName(const char** name, const ActorInitInfo& initInfo); |
| 19 | bool tryGetObjectName(const char** name, const PlacementInfo& placementInfo); |
| 20 | bool isObjectName(const ActorInitInfo& initInfo, const char* name); |
| 21 | bool isObjectName(const PlacementInfo& placementInfo, const char* name); |
| 22 | bool isObjectNameSubStr(const ActorInitInfo& initInfo, const char* name); |
| 23 | bool isObjectNameSubStr(const PlacementInfo& placementInfo, const char* name); |
| 24 | |
| 25 | void getClassName(const char** name, const ActorInitInfo& initInfo); |
| 26 | void getClassName(const char** name, const PlacementInfo& placementInfo); |
| 27 | bool tryGetClassName(const char** name, const ActorInitInfo& initInfo); |
| 28 | bool tryGetClassName(const char** name, const PlacementInfo& placementInfo); |
| 29 | bool isClassName(const ActorInitInfo& initInfo, const char* name); |
| 30 | bool isClassName(const PlacementInfo& placementInfo, const char* name); |
| 31 | |
| 32 | void getDisplayName(const char** name, const ActorInitInfo& initInfo); |
| 33 | void getDisplayName(const char** name, const PlacementInfo& placementInfo); |
| 34 | bool tryGetDisplayName(const char** name, const ActorInitInfo& initInfo); |
| 35 | bool tryGetDisplayName(const char** name, const PlacementInfo& placementInfo); |
| 36 | |
| 37 | void getPlacementTargetFile(const char** targetFile, const PlacementInfo& placementInfo); |
| 38 | |
| 39 | void getTrans(sead::Vector3f* trans, const ActorInitInfo& initInfo); |
| 40 | void getTrans(sead::Vector3f* trans, const PlacementInfo& placementInfo); |
| 41 | void multZoneMtx(sead::Vector3f* trans, const PlacementInfo& placementInfo); |
| 42 | bool tryGetTrans(sead::Vector3f* trans, const ActorInitInfo& initInfo); |
| 43 | bool tryGetTrans(sead::Vector3f* trans, const PlacementInfo& placementInfo); |
| 44 | |
| 45 | void getRotate(sead::Vector3f* rotate, const PlacementInfo& placementInfo); |
| 46 | bool tryGetRotate(sead::Vector3f* rotate, const ActorInitInfo& initInfo); |
| 47 | bool tryGetRotate(sead::Vector3f* rotate, const PlacementInfo& placementInfo); |
| 48 | bool tryGetZoneMatrixTR(sead::Matrix34f* matrix, const PlacementInfo& placementInfo); |
| 49 | |
| 50 | void getQuat(sead::Quatf* quat, const ActorInitInfo& initInfo); |
| 51 | void getQuat(sead::Quatf* quat, const PlacementInfo& placementInfo); |
| 52 | bool tryGetQuat(sead::Quatf* quat, const ActorInitInfo& initInfo); |
| 53 | bool tryGetQuat(sead::Quatf* quat, const PlacementInfo& placementInfo); |
| 54 | |
| 55 | void getScale(sead::Vector3f* scale, const PlacementInfo& placementInfo); |
| 56 | void getScale(f32* x, f32* y, f32* z, const PlacementInfo& placementInfo); |
| 57 | bool tryGetScale(sead::Vector3f* scale, const ActorInitInfo& initInfo); |
| 58 | bool tryGetScale(sead::Vector3f* scale, const PlacementInfo& placementInfo); |
| 59 | |
| 60 | void getSide(sead::Vector3f* side, const ActorInitInfo& initInfo); |
| 61 | void getSide(sead::Vector3f* side, const PlacementInfo& placementInfo); |
| 62 | bool tryGetSide(sead::Vector3f* side, const ActorInitInfo& initInfo); |
| 63 | bool tryGetSide(sead::Vector3f* side, const PlacementInfo& placementInfo); |
| 64 | |
| 65 | void getUp(sead::Vector3f* up, const ActorInitInfo& initInfo); |
| 66 | void getUp(sead::Vector3f* up, const PlacementInfo& placementInfo); |
| 67 | bool tryGetUp(sead::Vector3f* up, const ActorInitInfo& initInfo); |
| 68 | bool tryGetUp(sead::Vector3f* up, const PlacementInfo& placementInfo); |
| 69 | |
| 70 | void getFront(sead::Vector3f* front, const ActorInitInfo& initInfo); |
| 71 | void getFront(sead::Vector3f* front, const PlacementInfo& placementInfo); |
| 72 | bool tryGetFront(sead::Vector3f* front, const ActorInitInfo& initInfo); |
| 73 | bool tryGetFront(sead::Vector3f* front, const PlacementInfo& placementInfo); |
| 74 | |
| 75 | bool tryGetLocalAxis(sead::Vector3f* dir, const ActorInitInfo& initInfo, s32 axis); |
| 76 | bool tryGetLocalAxis(sead::Vector3f* dir, const PlacementInfo& placementInfo, s32 axis); |
| 77 | bool tryGetLocalSignAxis(sead::Vector3f* dir, const ActorInitInfo& initInfo, s32 axis); |
| 78 | bool tryGetLocalSignAxis(sead::Vector3f* dir, const PlacementInfo& placementInfo, s32 axis); |
| 79 | |
| 80 | bool tryGetMatrixTR(sead::Matrix34f* matrix, const ActorInitInfo& initInfo); |
| 81 | bool tryGetMatrixTR(sead::Matrix34f* matrix, const PlacementInfo& placementInfo); |
| 82 | bool tryGetMatrixTRS(sead::Matrix34f* matrix, const ActorInitInfo& initInfo); |
| 83 | bool tryGetMatrixTRS(sead::Matrix34f* matrix, const PlacementInfo& placementInfo); |
| 84 | bool tryGetInvertMatrixTR(sead::Matrix34f* matrix, const ActorInitInfo& initInfo); |
| 85 | bool tryGetInvertMatrixTR(sead::Matrix34f* matrix, const PlacementInfo& placementInfo); |
| 86 | |
| 87 | void calcMatrixMultParent(sead::Matrix34f* matrix, const ActorInitInfo& initInfo1, |
| 88 | const ActorInitInfo& initInfo2); |
| 89 | void calcMatrixMultParent(sead::Matrix34f* matrix, const PlacementInfo& placementInfo1, |
| 90 | const PlacementInfo& placementInfo2); |
| 91 | |
| 92 | void getArg(s32* arg, const ActorInitInfo& initInfo, const char* key); |
| 93 | void getArg(s32* arg, const PlacementInfo& placementInfo, const char* key); |
| 94 | bool tryGetArg(s32* arg, const ActorInitInfo& initInfo, const char* key); |
| 95 | bool tryGetArg(s32* arg, const PlacementInfo& placementInfo, const char* key); |
| 96 | void getArg(f32* arg, const ActorInitInfo& initInfo, const char* key); |
| 97 | void getArg(f32* arg, const PlacementInfo& placementInfo, const char* key); |
| 98 | bool tryGetArg(f32* arg, const ActorInitInfo& initInfo, const char* key); |
| 99 | bool tryGetArg(f32* arg, const PlacementInfo& placementInfo, const char* key); |
| 100 | void getArg(bool* arg, const ActorInitInfo& initInfo, const char* key); |
| 101 | void getArg(bool* arg, const PlacementInfo& placementInfo, const char* key); |
| 102 | bool tryGetArg(bool* arg, const ActorInitInfo& initInfo, const char* key); |
| 103 | bool tryGetArg(bool* arg, const PlacementInfo& placementInfo, const char* key); |
| 104 | |
| 105 | s32 getArgS32(const ActorInitInfo& actorInitInfo, const char* key); |
| 106 | f32 getArgF32(const ActorInitInfo& actorInitInfo, const char* key); |
| 107 | void getArgV3f(sead::Vector3f* arg, const ActorInitInfo& actorInitInfo, const char* key); |
| 108 | void getArgV3f(sead::Vector3f* arg, const PlacementInfo& placementInfo, const char* key); |
| 109 | bool tryGetArgV3f(sead::Vector3f* arg, const ActorInitInfo& actorInitInfo, const char* key); |
| 110 | bool tryGetArgV3f(sead::Vector3f* arg, const PlacementInfo& placementInfo, const char* key); |
| 111 | |
| 112 | bool isArgBool(const ActorInitInfo& initInfo, const char* key); |
| 113 | bool isArgBool(const PlacementInfo& placementInfo, const char* key); |
| 114 | bool isArgString(const ActorInitInfo& initInfo, const char* key, const char* arg); |
| 115 | bool isArgString(const PlacementInfo& placementInfo, const char* key, const char* arg); |
| 116 | |
| 117 | void getStringArg(const char** arg, const ActorInitInfo& initInfo, const char* key); |
| 118 | void getStringArg(const char** arg, const PlacementInfo& placementInfo, const char* key); |
| 119 | void getStringArg(const char** arg, const AreaInitInfo& initInfo, const char* key); |
| 120 | const char* getStringArg(const ActorInitInfo& initInfo, const char* key); |
| 121 | const char* getStringArg(const PlacementInfo& placementInfo, const char* key); |
| 122 | const char* getStringArg(const AreaInitInfo& initInfo, const char* key); |
| 123 | bool tryGetStringArg(const char** arg, const ActorInitInfo& initInfo, const char* key); |
| 124 | bool tryGetStringArg(const char** arg, const PlacementInfo& initInfo, const char* key); |
| 125 | bool tryGetStringArg(const char** arg, const AreaInitInfo& initInfo, const char* key); |
| 126 | bool tryGetArgV2f(sead::Vector2f* arg, const ActorInitInfo& initInfo, const char* key); |
| 127 | bool tryGetArgV2f(sead::Vector2f* arg, const PlacementInfo& initInfo, const char* key); |
| 128 | bool tryGetArgColor(sead::Color4f* arg, const ActorInitInfo& initInfo, const char* key); |
| 129 | bool tryGetArgColor(sead::Color4f* arg, const PlacementInfo& initInfo, const char* key); |
| 130 | |
| 131 | void getLayerConfigName(const char** name, const ActorInitInfo& initInfo); |
| 132 | void getLayerConfigName(const char** name, const PlacementInfo& initInfo); |
| 133 | bool tryGetZoneNameIfExist(const char** name, const PlacementInfo& placementInfo); |
| 134 | void getPlacementId(PlacementId* placementId, const PlacementInfo& placementInfo); |
| 135 | |
| 136 | bool tryGetBoolArgOrFalse(const ActorInitInfo& initInfo, const char* key); |
| 137 | s32 getCountPlacementInfo(const PlacementInfo& placementInfo); |
| 138 | void getPlacementInfoByKey(PlacementInfo* outPlacementInfo, const PlacementInfo& placementInfo, |
| 139 | const char* key); |
| 140 | bool tryGetPlacementInfoByKey(PlacementInfo* outPlacementInfo, const PlacementInfo& placementInfo, |
| 141 | const char* key); |
| 142 | void getPlacementInfoByIndex(PlacementInfo* outPlacementInfo, const PlacementInfo& placementInfo, |
| 143 | s32 index); |
| 144 | bool tryGetPlacementInfoByIndex(PlacementInfo* outPlacementInfo, const PlacementInfo& placementInfo, |
| 145 | s32 index); |
| 146 | void getPlacementInfoAndKeyNameByIndex(PlacementInfo* outPlacementInfo, const char** outKey, |
| 147 | const PlacementInfo&, s32 index); |
| 148 | bool tryGetPlacementInfoAndKeyNameByIndex(PlacementInfo* outPlacementInfo, const char** outKey, |
| 149 | const PlacementInfo&, s32 index); |
| 150 | |
| 151 | PlacementId* createPlacementId(const ActorInitInfo& initInfo); |
| 152 | PlacementId* createPlacementId(const PlacementInfo& placementInfo); |
| 153 | bool tryGetPlacementId(PlacementId* placementId, const ActorInitInfo& initInfo); |
| 154 | bool tryGetPlacementId(PlacementId* placementId, const PlacementInfo& placementInfo); |
| 155 | void getPlacementId(PlacementId* placementId, const ActorInitInfo& initInfo); |
| 156 | bool isEqualPlacementId(const PlacementId& placementId, const PlacementId& otherPlacementId); |
| 157 | bool isEqualPlacementId(const PlacementInfo& placementInfo, |
| 158 | const PlacementInfo& otherPlacementInfo); |
| 159 | |
| 160 | bool isExistRail(const ActorInitInfo& initInfo, const char* linkName); |
| 161 | |
| 162 | bool tryGetRailIter(PlacementInfo* railPlacementInfo, const PlacementInfo& placementInfo, |
| 163 | const char* linkName); |
| 164 | bool tryGetLinksInfo(PlacementInfo* railPlacementInfo, const PlacementInfo& placementInfo, |
| 165 | const char* linkName); |
| 166 | bool tryGetMoveParameterRailIter(PlacementInfo* railPlacementInfo, |
| 167 | const PlacementInfo& placementInfo); |
| 168 | bool tryGetRailPointPos(sead::Vector3f* railPoint, const PlacementInfo& placementInfo); |
| 169 | void getRailPointHandlePrev(sead::Vector3f* railPoint, const PlacementInfo& placementInfo); |
| 170 | bool tryGetRailPointHandlePrev(sead::Vector3f* railPoint, const PlacementInfo& placementInfo); |
| 171 | void getRailPointHandleNext(sead::Vector3f* railPoint, const PlacementInfo& placementInfo); |
| 172 | bool tryGetRailPointHandleNext(sead::Vector3f* railPoint, const PlacementInfo& placementInfo); |
| 173 | |
| 174 | bool isExistGraphRider(const ActorInitInfo& initInfo); |
| 175 | |
| 176 | s32 calcLinkChildNum(const ActorInitInfo& initInfo, const char* linkName); |
| 177 | s32 calcLinkChildNum(const PlacementInfo& placementInfo, const char* linkName); |
| 178 | |
| 179 | bool isExistLinkChild(const ActorInitInfo& initInfo, const char* linkName, s32 index); |
| 180 | bool isExistLinkChild(const PlacementInfo& placementInfo, const char* linkName, s32 index); |
| 181 | bool isExistLinkChild(const AreaInitInfo& initInfo, const char* linkName, s32 index); |
| 182 | |
| 183 | s32 calcLinkNestNum(const ActorInitInfo& initInfo, const char* linkName); |
| 184 | s32 calcLinkNestNum(const PlacementInfo& placementInfo, const char* linkName); |
| 185 | |
| 186 | void getLinksInfo(PlacementInfo* linkPlacementInfo, const PlacementInfo& placementInfo, |
| 187 | const char* linkName); |
| 188 | void getLinksInfoByIndex(PlacementInfo* linkPlacementInfo, const PlacementInfo& placementInfo, |
| 189 | const char* linkName, s32 index); |
| 190 | void getLinksInfo(PlacementInfo* linkPlacementInfo, const ActorInitInfo& initInfo, |
| 191 | const char* linkName); |
| 192 | void getLinksInfoByIndex(PlacementInfo* linkPlacementInfo, const ActorInitInfo& initInfo, |
| 193 | const char* linkName, s32 index); |
| 194 | bool tryGetLinksInfo(PlacementInfo* linkPlacementInfo, const ActorInitInfo& initInfo, |
| 195 | const char* linkName); |
| 196 | |
| 197 | void getLinksMatrix(sead::Matrix34f* matrix, const ActorInitInfo& initInfo, const char* linkName); |
| 198 | void getLinksMatrixByIndex(sead::Matrix34f* matrix, const ActorInitInfo& initInfo, |
| 199 | const char* linkName, s32 index); |
| 200 | void getLinkTR(sead::Vector3f* trans, sead::Vector3f* rotate, const PlacementInfo& placementInfo, |
| 201 | const char* linkName); |
| 202 | void getLinkTR(sead::Vector3f* trans, sead::Vector3f* rotate, const ActorInitInfo& initInfo, |
| 203 | const char* linkName); |
| 204 | void getLinkTR(sead::Vector3f* trans, sead::Vector3f* rotate, const AreaInitInfo& initInfo, |
| 205 | const char* linkName); |
| 206 | void getLinksQT(sead::Quatf* quat, sead::Vector3f* trans, const ActorInitInfo& initInfo, |
| 207 | const char* linkName); |
| 208 | void getLinksQT(sead::Quatf* quat, sead::Vector3f* trans, const PlacementInfo& placementInfo, |
| 209 | const char* linkName); |
| 210 | |
| 211 | bool tryGetLinksQT(sead::Quatf*, sead::Vector3f*, const ActorInitInfo& initInfo, |
| 212 | const char* linkName); |
| 213 | bool tryGetLinksQTS(sead::Quatf*, sead::Vector3f*, sead::Vector3f*, const ActorInitInfo& initInfo, |
| 214 | const char* linkName); |
| 215 | bool tryGetLinksMatrixTR(sead::Matrix34f* matrix, const ActorInitInfo& initInfo, |
| 216 | const char* linkName); |
| 217 | bool tryGetLinksMatrixTR(sead::Matrix34f* matrix, const AreaInitInfo& initInfo, |
| 218 | const char* linkName); |
| 219 | bool tryGetLinksMatrixTRS(sead::Matrix34f* matrix, const ActorInitInfo& initInfo, |
| 220 | const char* linkName); |
| 221 | bool tryGetLinksTrans(sead::Vector3f* trans, const ActorInitInfo& initInfo, const char* linkName); |
| 222 | bool tryGetLinksTrans(sead::Vector3f* trans, const PlacementInfo& placementInfo, |
| 223 | const char* linkName); |
| 224 | bool tryGetLinksQuat(sead::Quatf* quat, const ActorInitInfo& initInfo, const char* linkName); |
| 225 | bool tryGetLinksTR(sead::Vector3f* trans, sead::Vector3f* rotate, const ActorInitInfo& initInfo, |
| 226 | const char* linkName); |
| 227 | |
| 228 | void getChildTrans(sead::Vector3f* trans, const PlacementInfo& placementInfo, const char* linkName); |
| 229 | void getChildTrans(sead::Vector3f* trans, const ActorInitInfo& initInfo, const char* linkName); |
| 230 | void getChildTrans(sead::Vector3f* trans, const AreaInitInfo& initInfo, const char* linkName); |
| 231 | void getChildLinkT(sead::Vector3f* trans, const ActorInitInfo& initInfo, const char* linkName, |
| 232 | s32 index); |
| 233 | void getChildLinkTR(sead::Vector3f* trans, sead::Vector3f* rotate, const ActorInitInfo& initInfo, |
| 234 | const char* linkName, s32 index); |
| 235 | |
| 236 | s32 calcMatchNameLinkCount(const PlacementInfo& placementInfo, const char* matchName); |
| 237 | s32 calcLinkCountClassName(const PlacementInfo& placementInfo, const char* className); |
| 238 | |
| 239 | bool tryGetZoneMatrixTR(sead::Matrix34f* matrix, const ActorInitInfo& initInfo); |
| 240 | bool tryGetDisplayOffset(sead::Vector3f* offset, const ActorInitInfo& initInfo); |
| 241 | bool tryGetDisplayOffset(sead::Vector3f* offset, const PlacementInfo& placementInfo); |
| 242 | bool tryGetChildDisplayOffset(sead::Vector3f* offset, const ActorInitInfo& initInfo, |
| 243 | const char* linkName); |
| 244 | bool tryGetDisplayRotate(sead::Vector3f* rotate, const ActorInitInfo& initInfo); |
| 245 | bool tryGetDisplayScale(sead::Vector3f* scale, const ActorInitInfo& initInfo); |
| 246 | |
| 247 | } // namespace al |
| 248 | |
| 249 | namespace alPlacementFunction { |
| 250 | |
| 251 | s32 getCameraId(const al::ActorInitInfo& initInfo); |
| 252 | bool getLinkGroupId(al::PlacementId* groupId, const al::ActorInitInfo& initInfo, |
| 253 | const char* linkName); |
| 254 | bool isEnableLinkGroupId(const al::ActorInitInfo& initInfo, const char* linkName); |
| 255 | bool isEnableGroupClipping(const al::ActorInitInfo& initInfo); |
| 256 | bool getClippingGroupId(al::PlacementId* groupId, const al::ActorInitInfo& initInfo); |
| 257 | al::PlacementId* createClippingViewId(const al::PlacementInfo& placementInfo); |
| 258 | bool getClippingViewId(al::PlacementId* viewId, const al::PlacementInfo& placementInfo); |
| 259 | bool getClippingViewId(al::PlacementId* viewId, const al::ActorInitInfo& initInfo); |
| 260 | void getModelName(const char** modelName, const al::ActorInitInfo& initInfo); |
| 261 | void getModelName(const char** modelName, const al::PlacementInfo& placementInfo); |
| 262 | bool tryGetModelName(const char** modelName, const al::PlacementInfo& placementInfo); |
| 263 | bool tryGetModelName(const char** modelName, const al::ActorInitInfo& initInfo); |
| 264 | |
| 265 | } // namespace alPlacementFunction |
| 266 | |