mirror of https://github.com/PrimeDecomp/prime.git
Match and link CColorElement.cpp
Former-commit-id: a326f4b8c29fd289ed6976708fb5429f49d10e24
This commit is contained in:
parent
4cbeb40e28
commit
3bfdfcf1de
|
@ -18720,7 +18720,7 @@ jumptable_803ED948 = .data:0x803ED948; // type:object size:0x20 scope:local
|
|||
jumptable_803ED968 = .data:0x803ED968; // 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
|
||||
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__8CCEPulse = .data:0x803EDA20; // type:object size:0x10 scope:global
|
||||
__vt__12CCETimeChain = .data:0x803EDA30; // type:object size:0x10 scope:global
|
||||
|
|
|
@ -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_803ED994 = .data:0x803EDB74; // type:object size:0x2C 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__8CCEPulse = .data:0x803EDC00; // type:object size:0x10 scope:global
|
||||
__vt__12CCETimeChain = .data:0x803EDC10; // type:object size:0x10 scope:global
|
||||
|
|
|
@ -855,7 +855,7 @@ config.libs = [
|
|||
Object(Matching, "Kyoto/Alloc/IAllocator.cpp"),
|
||||
Object(NonMatching, "Kyoto/PVS/CPVSVisOctree.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(Matching, "Kyoto/Particles/CIntElement.cpp"),
|
||||
Object(NonMatching, "Kyoto/Particles/CModVectorElement.cpp"),
|
||||
|
|
|
@ -16,17 +16,17 @@ class CInputStream;
|
|||
class CColor {
|
||||
public:
|
||||
CColor() { Set(255, 0, 255); }
|
||||
CColor(uint col) { Set(col); }
|
||||
CColor(const uint col) { Set(col); }
|
||||
CColor(CInputStream& in);
|
||||
CColor(float r, float g, float b, float a = 1.f);
|
||||
CColor(uchar r, uchar g, uchar b, uchar a = 255) {
|
||||
CColor(const float r, const float g, const float b, const float a = 1.f);
|
||||
CColor(const uchar r, const uchar g, const uchar b, const uchar a = 255) {
|
||||
mR = r;
|
||||
mG = g;
|
||||
mB = b;
|
||||
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) {
|
||||
mR = r;
|
||||
mG = g;
|
||||
|
|
|
@ -6,8 +6,8 @@ public:
|
|||
CDummyFactory(IFactory& factory) : mFactory(factory){};
|
||||
CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer) { return CToken(); }
|
||||
CToken GetObj(const SObjectTag& tag) { return CToken(); };
|
||||
CToken GetObj(const char* name){};
|
||||
CToken GetObj(const char* name, CVParamTransfer xfer){};
|
||||
CToken GetObj(const char* name) { return CToken(); };
|
||||
CToken GetObj(const char* name, CVParamTransfer xfer) { return CToken(); };
|
||||
bool HasObject(const SObjectTag& tag) { return false; }
|
||||
bool ObjectIsLive(const SObjectTag& tag) { return false; }
|
||||
IFactory& GetFactory() { return mFactory; }
|
||||
|
|
|
@ -30,32 +30,12 @@ bool CCEConstant::GetValue(int frame, CColor& colorOut) const {
|
|||
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 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);
|
||||
color.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)
|
||||
// );
|
||||
x4_val.Set(cr, cg, cb, ca);
|
||||
}
|
||||
|
||||
CCEFastConstant::~CCEFastConstant() {}
|
||||
|
|
Loading…
Reference in New Issue