Match and link CColorElement.cpp

Former-commit-id: a326f4b8c29fd289ed6976708fb5429f49d10e24
This commit is contained in:
Phillip Stephens 2023-10-19 10:39:17 -07:00
parent 4cbeb40e28
commit 3bfdfcf1de
6 changed files with 15 additions and 35 deletions

View File

@ -18720,7 +18720,7 @@ jumptable_803ED948 = .data:0x803ED948; // type:object size:0x20 scope:local
jumptable_803ED968 = .data:0x803ED968; // type:object size:0x2C scope:local jumptable_803ED968 = .data:0x803ED968; // type:object size:0x2C scope:local
@344 = .data:0x803ED994; // type:object size:0x2C scope:local @344 = .data:0x803ED994; // type:object size:0x2C scope:local
__vt__10IAllocator = .data:0x803ED9C0; // type:object size:0x40 scope:global __vt__10IAllocator = .data:0x803ED9C0; // type:object size:0x40 scope:global
lbl_803EDA00 = .data:0x803EDA00; // type:object size:0x10 __vt__16CCEParticleColor = .data:0x803EDA00; // type:object size:0x10
__vt__18CCEKeyframeEmitter = .data:0x803EDA10; // type:object size:0x10 scope:global __vt__18CCEKeyframeEmitter = .data:0x803EDA10; // type:object size:0x10 scope:global
__vt__8CCEPulse = .data:0x803EDA20; // type:object size:0x10 scope:global __vt__8CCEPulse = .data:0x803EDA20; // type:object size:0x10 scope:global
__vt__12CCETimeChain = .data:0x803EDA30; // type:object size:0x10 scope:global __vt__12CCETimeChain = .data:0x803EDA30; // type:object size:0x10 scope:global

View File

@ -18771,7 +18771,7 @@ lbl_803ED948 = .data:0x803EDB28; // type:object size:0x20 scope:global
lbl_803ED968 = .data:0x803EDB48; // type:object size:0x2C scope:global lbl_803ED968 = .data:0x803EDB48; // type:object size:0x2C scope:global
lbl_803ED994 = .data:0x803EDB74; // type:object size:0x2C scope:global lbl_803ED994 = .data:0x803EDB74; // type:object size:0x2C scope:global
__vt__10IAllocator = .data:0x803EDBA0; // type:object size:0x40 scope:global __vt__10IAllocator = .data:0x803EDBA0; // type:object size:0x40 scope:global
lbl_803EDA00 = .data:0x803EDBE0; // type:object size:0x10 scope:global __vt__16CCEParticleColor = .data:0x803EDBE0; // type:object size:0x10 scope:global
__vt__18CCEKeyframeEmitter = .data:0x803EDBF0; // type:object size:0x10 scope:global __vt__18CCEKeyframeEmitter = .data:0x803EDBF0; // type:object size:0x10 scope:global
__vt__8CCEPulse = .data:0x803EDC00; // type:object size:0x10 scope:global __vt__8CCEPulse = .data:0x803EDC00; // type:object size:0x10 scope:global
__vt__12CCETimeChain = .data:0x803EDC10; // type:object size:0x10 scope:global __vt__12CCETimeChain = .data:0x803EDC10; // type:object size:0x10 scope:global

View File

@ -855,7 +855,7 @@ config.libs = [
Object(Matching, "Kyoto/Alloc/IAllocator.cpp"), Object(Matching, "Kyoto/Alloc/IAllocator.cpp"),
Object(NonMatching, "Kyoto/PVS/CPVSVisOctree.cpp"), Object(NonMatching, "Kyoto/PVS/CPVSVisOctree.cpp"),
Object(NonMatching, "Kyoto/PVS/CPVSVisSet.cpp"), Object(NonMatching, "Kyoto/PVS/CPVSVisSet.cpp"),
Object(NonMatching, "Kyoto/Particles/CColorElement.cpp"), Object(Matching, "Kyoto/Particles/CColorElement.cpp"),
Object(NonMatching, "Kyoto/Particles/CElementGen.cpp"), Object(NonMatching, "Kyoto/Particles/CElementGen.cpp"),
Object(Matching, "Kyoto/Particles/CIntElement.cpp"), Object(Matching, "Kyoto/Particles/CIntElement.cpp"),
Object(NonMatching, "Kyoto/Particles/CModVectorElement.cpp"), Object(NonMatching, "Kyoto/Particles/CModVectorElement.cpp"),

View File

@ -16,17 +16,17 @@ class CInputStream;
class CColor { class CColor {
public: public:
CColor() { Set(255, 0, 255); } CColor() { Set(255, 0, 255); }
CColor(uint col) { Set(col); } CColor(const uint col) { Set(col); }
CColor(CInputStream& in); CColor(CInputStream& in);
CColor(float r, float g, float b, float a = 1.f); CColor(const float r, const float g, const float b, const float a = 1.f);
CColor(uchar r, uchar g, uchar b, uchar a = 255) { CColor(const uchar r, const uchar g, const uchar b, const uchar a = 255) {
mR = r; mR = r;
mG = g; mG = g;
mB = b; mB = b;
mA = a; mA = a;
} }
void Set(float r, float g, float b, float a); void Set(const float r, const float g, const float b, const float a);
void Set(uchar r, uchar g, uchar b, uchar a = 255) { void Set(uchar r, uchar g, uchar b, uchar a = 255) {
mR = r; mR = r;
mG = g; mG = g;

View File

@ -6,8 +6,8 @@ public:
CDummyFactory(IFactory& factory) : mFactory(factory){}; CDummyFactory(IFactory& factory) : mFactory(factory){};
CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer) { return CToken(); } CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer) { return CToken(); }
CToken GetObj(const SObjectTag& tag) { return CToken(); }; CToken GetObj(const SObjectTag& tag) { return CToken(); };
CToken GetObj(const char* name){}; CToken GetObj(const char* name) { return CToken(); };
CToken GetObj(const char* name, CVParamTransfer xfer){}; CToken GetObj(const char* name, CVParamTransfer xfer) { return CToken(); };
bool HasObject(const SObjectTag& tag) { return false; } bool HasObject(const SObjectTag& tag) { return false; }
bool ObjectIsLive(const SObjectTag& tag) { return false; } bool ObjectIsLive(const SObjectTag& tag) { return false; }
IFactory& GetFactory() { return mFactory; } IFactory& GetFactory() { return mFactory; }

View File

@ -30,32 +30,12 @@ bool CCEConstant::GetValue(int frame, CColor& colorOut) const {
return false; return false;
} }
static inline void SetClamp(CColor& color, float r, float g, float b, float a) { CCEFastConstant::CCEFastConstant(const float r, const float g, const float b, const float a) {
float cr = CMath::Clamp(0.f, r, 1.f); float cr = CMath::Clamp(0.f, r, 1.f);
float cg = CMath::Clamp(0.f, g, 1.f); float cg = CMath::Clamp(0.f, g, 1.f);
float cb = CMath::Clamp(0.f, b, 1.f); float cb = CMath::Clamp(0.f, b, 1.f);
float ca = CMath::Clamp(0.f, a, 1.f); float ca = CMath::Clamp(0.f, a, 1.f);
color.Set(cr, cg, cb, ca); x4_val.Set(cr, cg, cb, ca);
// color.Set(
// CMath::Clamp(0.f, r, 1.f),
// CMath::Clamp(0.f, g, 1.f),
// CMath::Clamp(0.f, b, 1.f),
// CMath::Clamp(0.f, a, 1.f)
// );
}
CCEFastConstant::CCEFastConstant(float r, float g, float b, float a) {
SetClamp(x4_val, r, g, b, a);
// float cr = CMath::Clamp(0.f, r, 1.f);
// float cg = CMath::Clamp(0.f, g, 1.f);
// float cb = CMath::Clamp(0.f, b, 1.f);
// float ca = CMath::Clamp(0.f, a, 1.f);
// x4_val.Set(cr, cg, cb, ca
// // CMath::Clamp(0.f, r, 1.f),
// // CMath::Clamp(0.f, g, 1.f),
// // CMath::Clamp(0.f, b, 1.f),
// // CMath::Clamp(0.f, a, 1.f)
// );
} }
CCEFastConstant::~CCEFastConstant() {} CCEFastConstant::~CCEFastConstant() {}