Match and link Clamp_int

Former-commit-id: 55533bab76d1660114cab8a04149857fcd2c3519
This commit is contained in:
Phillip Stephens 2023-10-17 15:09:26 -07:00
parent 759f6e6b3a
commit fcf90460e9
3 changed files with 11 additions and 3 deletions

View File

@ -317,7 +317,7 @@ config.libs = [
Object(NonMatching, "MetroidPrime/CActor.cpp"),
Object(NonMatching, "MetroidPrime/CWorld.cpp"),
Object(Matching, "MetroidPrime/Tweaks/CTweakParticle.cpp"),
Object(NonMatching, "MetroidPrime/Clamp_int.cpp"),
Object(Matching, "MetroidPrime/Clamp_int.cpp"),
Object(Matching, "MetroidPrime/CArchMsgParmControllerStatus.cpp"),
Object(Matching, "MetroidPrime/CExplosion.cpp"),
Object(Matching, "MetroidPrime/CEffect.cpp"),

View File

@ -0,0 +1,7 @@
#include <Kyoto/Math/CMath.hpp>
#include <rstl/math.hpp>
template <>
const int& CMath::Clamp< int >(const int& min, const int& val, const int& max) {
return min > val ? min : max < val ? max : val;
}

View File

@ -1,9 +1,10 @@
#include <MetroidPrime/Factories/CStateMachineFactory.hpp>
#include <MetroidPrime/Enemies/CStateMachine.hpp>
#include <MetroidPrime/Factories/CStateMachineFactory.hpp>
#include <Kyoto/Streams/CInputStream.hpp>
#pragma inline_max_size(250)
CFactoryFnReturn FAiFiniteStateMachineFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& xfer) {
CFactoryFnReturn FAiFiniteStateMachineFactory(const SObjectTag& tag, CInputStream& in,
const CVParamTransfer& xfer) {
return rs_new CStateMachine(in);
}