More stubs

This commit is contained in:
Phillip Stephens 2016-02-11 22:06:17 -08:00
parent 43a818d1a3
commit bd57eea5cd
9 changed files with 256 additions and 16 deletions

View File

@ -1,4 +1,4 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ./../Runtime)
add_subdirectory(locale) add_subdirectory(locale)
add_subdirectory(icons) add_subdirectory(icons)
@ -52,6 +52,7 @@ target_link_libraries(urde
UrdeIcons UrdeIcons
RuntimeCommonCharacter RuntimeCommonCharacter
RuntimeCommonInput RuntimeCommonInput
RuntimeCommonParticle
RuntimeCommon RuntimeCommon
DNAMP3 DNAMP2 DNAMP1 DNAMP3 DNAMP2 DNAMP1
DNACommon Specter SpecterFonts freetype ${DATA_SPEC_LIBS} DNACommon Specter SpecterFonts freetype ${DATA_SPEC_LIBS}

View File

@ -5,6 +5,7 @@
#include <Runtime/CGameAllocator.hpp> #include <Runtime/CGameAllocator.hpp>
#include <functional> #include <functional>
#include "ViewManager.hpp" #include "ViewManager.hpp"
#include <Runtime/Particle/CElementGen.hpp>
namespace URDE namespace URDE
{ {
@ -23,6 +24,7 @@ struct Application : boo::IApplicationCallback
int appMain(boo::IApplication* app) int appMain(boo::IApplication* app)
{ {
Retro::CElementGen::Initialize();
m_viewManager.init(app); m_viewManager.init(app);
while (m_running) while (m_running)
{ {

View File

@ -150,4 +150,10 @@ bool CCEPulse::GetValue(int frame, Zeus::CColor& valOut) const
return false; return false;
} }
bool CCEParticleColor::GetValue(int frame, Zeus::CColor& colorOut) const
{
/* TODO: Do */
return false
}
} }

View File

@ -87,6 +87,11 @@ public:
bool GetValue(int frame, Zeus::CColor& colorOut) const; bool GetValue(int frame, Zeus::CColor& colorOut) const;
}; };
class CCEParticleColor : public CColorElement
{
public:
bool GetValue(int frame, Zeus::CColor& colorOut) const;
};
} }
#endif // __RETRO_CCOLORELEMENT_HPP__ #endif // __RETRO_CCOLORELEMENT_HPP__

View File

@ -177,6 +177,10 @@ CColorElement* CParticleDataFactory::GetColorElement(CInputStream& in)
CColorElement* d = GetColorElement(in); CColorElement* d = GetColorElement(in);
return new CCEPulse(a, b, c, d); return new CCEPulse(a, b, c, d);
} }
case SBIG('PCOL'):
{
return new CCEParticleColor();
}
default: break; default: break;
} }
return nullptr; return nullptr;
@ -449,13 +453,27 @@ CVectorElement* CParticleDataFactory::GetVectorElement(CInputStream& in)
{ {
return new CVEPLOC; return new CVEPLOC;
} }
case SBIG('PSOF'):
{
return new CVEPSOF;
}
case SBIG('PSOU'):
{
return new CVEPSOU;
}
case SBIG('PSOR'): case SBIG('PSOR'):
{ {
return new CVEPSOR; return new CVEPSOR;
} }
case SBIG('PSOF'): case SBIG('PSTR'):
{ {
return new CVEPSOF; return new CVEPSTR;
}
case SBIG('SUB_'):
{
CVectorElement* a = GetVectorElement(in);
CVectorElement* b = GetVectorElement(in);
return new CVESubtract(a, b);
} }
default: break; default: break;
} }
@ -515,6 +533,12 @@ CRealElement* CParticleDataFactory::GetRealElement(CInputStream& in)
CRealElement* b = GetRealElement(in); CRealElement* b = GetRealElement(in);
return new CRERandom(a, b); return new CRERandom(a, b);
} }
case SBIG('DOTP'):
{
CVectorElement* a = GetVectorElement(in);
CVectorElement* b = GetVectorElement(in);
return new CREDotProduct(a, b);
}
case SBIG('MULT'): case SBIG('MULT'):
{ {
CRealElement* a = GetRealElement(in); CRealElement* a = GetRealElement(in);
@ -645,6 +669,35 @@ CRealElement* CParticleDataFactory::GetRealElement(CInputStream& in)
CRealElement* b = GetRealElement(in); CRealElement* b = GetRealElement(in);
return new CREIntTimesReal(a, b); return new CREIntTimesReal(a, b);
} }
case SBIG('CRNG'):
{
CRealElement* a = GetRealElement(in);
CRealElement* b = GetRealElement(in);
CRealElement* c = GetRealElement(in);
CRealElement* d = GetRealElement(in);
CRealElement* e = GetRealElement(in);
return new CREConstantRange(a, b, c, d, e);
}
case SBIG('GTCR'):
{
CColorElement* a = GetColorElement(in);
return new CREGetComponentRed(a);
}
case SBIG('GTCG'):
{
CColorElement* a = GetColorElement(in);
return new CREGetComponentGreen(a);
}
case SBIG('GTCB'):
{
CColorElement* a = GetColorElement(in);
return new CREGetComponentBlue(a);
}
case SBIG('GTCA'):
{
CColorElement* a = GetColorElement(in);
return new CREGetComponentAlpha(a);
}
default: break; default: break;
} }
return nullptr; return nullptr;

View File

@ -92,7 +92,7 @@ bool CREAdd::GetValue(int frame, float& valOut) const
return false; return false;
} }
bool CREClamp::GetValue(int frame, float &valOut) const bool CREClamp::GetValue(int frame,float& valOut) const
{ {
float a, b; float a, b;
x4_min->GetValue(frame, a); x4_min->GetValue(frame, a);
@ -115,6 +115,25 @@ bool CRERandom::GetValue(int frame, float& valOut) const
return false; return false;
} }
bool CREDotProduct::GetValue(int frame, float& valOut) const
{
Zeus::CVector3f a, b;
x4_a->GetValue(frame, a);
x8_b->GetValue(frame, b);
valOut = a.dot(b);
return false;
}
bool CREMultiply::GetValue(int frame, float& valOut) const
{
float a, b;
x4_a->GetValue(frame, a);
x8_b->GetValue(frame, b);
valOut = a * b;
return false;
}
bool CREPulse::GetValue(int frame, float& valOut) const bool CREPulse::GetValue(int frame, float& valOut) const
{ {
int a, b; int a, b;
@ -316,4 +335,51 @@ bool CREIntTimesReal::GetValue(int frame, float& valOut) const
return false; return false;
} }
bool CREConstantRange::GetValue(int frame, float& valOut) const
{
float val, min, max;
x4_val->GetValue(frame, val);
x8_min->GetValue(frame, min);
xc_max->GetValue(frame, max);
if (val > min && val < max)
x10_inRange->GetValue(Frame, valOut);
else
x14_outOfRange->GetValue(frame, valOut);
return false;
}
bool CREGetComponentRed::GetValue(int frame, float& valOut) const
{
Zeus::CColor a = Zeus::CColor::skBlack;
x4_a->GetValue(frame, a);
valOut = a.r;
return false;
}
bool CREGetComponentGreen::GetValue(int frame, float& valOut) const
{
Zeus::CColor a = Zeus::CColor::skBlack;
x4_a->GetValue(frame, a);
valOut = a.g;
return false;
}
bool CREGetComponentBlue::GetValue(int frame, float& valOut) const
{
Zeus::CColor a = Zeus::CColor::skBlack;
x4_a->GetValue(frame, a);
valOut = a.b;
return false;
}
bool CREGetComponentAlpha::GetValue(int frame, float& valOut) const
{
Zeus::CColor a = Zeus::CColor::skBlack;
x4_a->GetValue(frame, a);
valOut = a.a;
return false;
}
} }

View File

@ -92,6 +92,16 @@ public:
bool GetValue(int frame, float& valOut) const; bool GetValue(int frame, float& valOut) const;
}; };
class CREDotProduct : public CRealElement
{
std::unique_ptr<CVectorElement> x4_a;
std::unique_ptr<CVectorElement> x8_b;
public:
CREDotProduct(CVectorElement* a, CVectorElement* b)
: x4_a(a), x8_b(b) {}
bool GetValue(int frame, float& valOut) const;
};
class CREMultiply : public CRealElement class CREMultiply : public CRealElement
{ {
std::unique_ptr<CRealElement> x4_a; std::unique_ptr<CRealElement> x4_a;
@ -302,6 +312,59 @@ public:
bool GetValue(int frame, float& valOut) const; bool GetValue(int frame, float& valOut) const;
}; };
class CREConstantRange : public CRealElement
{
std::unique_ptr<CRealElement> x4_val;
std::unique_ptr<CRealElement> x8_min;
std::unique_ptr<CRealElement> xc_max;
std::unique_ptr<CRealElement> x10_inRange;
std::unique_ptr<CRealElement> x14_outOfRange;
public:
CREConstantRange(CRealElement* a, CRealElement* b, CRealElement* c, CRealElement* d, CRealElement* e)
: x4_val(a), x8_min(b), xc_max(c), x10_inRange(d), x14_outOfRange(e) {}
bool GetValue(int frame, float& valOut) const;
};
class CREGetComponentRed : public CRealElement
{
std::unique_ptr<CColorElement> x4_a;
public:
CREGetComponentRed(CColorElement* a)
: x4_a(a) {}
bool GetValue(int frame, float& valOut) const;
};
class CREGetComponentGreen : public CRealElement
{
std::unique_ptr<CColorElement> x4_a;
public:
CREGetComponentGreen(CColorElement* a)
: x4_a(a) {}
bool GetValue(int frame, float& valOut) const;
};
class CREGetComponentBlue : public CRealElement
{
std::unique_ptr<CColorElement> x4_a;
public:
CREGetComponentBlue(CColorElement* a)
: x4_a(a) {}
bool GetValue(int frame, float& valOut) const;
};
class CREGetComponentAlpha : public CRealElement
{
std::unique_ptr<CColorElement> x4_a;
public:
CREGetComponentAlpha(CColorElement* a)
: x4_a(a) {}
bool GetValue(int frame, float& valOut) const;
};
} }
#endif // __RETRO_CREALELEMENT_HPP__ #endif // __RETRO_CREALELEMENT_HPP__

View File

@ -285,16 +285,37 @@ bool CVEPLOC::GetValue(int frame, Zeus::CVector3f& valOut) const
return false; return false;
} }
bool CVEPSOR::GetValue(int frame, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
return false;
}
bool CVEPSOF::GetValue(int frame, Zeus::CVector3f& valOut) const bool CVEPSOF::GetValue(int frame, Zeus::CVector3f& valOut) const
{ {
/* TODO: Do */ /* TODO: Do */
return false; return false;
} }
bool CVEPSOU::GetValue(int frame, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
return false;
}
bool CVEPSOR::GetValue(int frame, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
return false;
}
bool CVEPSTR::GetValue(int frame, Zeus::CVector3f& valOut) const
{
/* TODO: Do */
return false;
}
bool CVESubtract::GetValue(int frame, Zeus::CVector3f& valOut) const
{
Zeus::CVector3f a, b;
x4_a->GetValue(frame, a);
x8_b->GetValue(frame, b);
valOut = a - b;
return false;
}
} }

View File

@ -168,18 +168,41 @@ public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const; bool GetValue(int frame, Zeus::CVector3f& valOut) const;
}; };
class CVEPSOR : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEPSOF : public CVectorElement class CVEPSOF : public CVectorElement
{ {
public: public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const; bool GetValue(int frame, Zeus::CVector3f& valOut) const;
}; };
class CVEPSOU : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEPSOR : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEPSTR : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVESubtract : public CVectorElement
{
std::unique_ptr<CVectorElement> x4_a;
std::unique_ptr<CVectorElement> x8_b;
public:
CVESubtract(CVectorElement* a, CVectorElement* b)
: x4_a(a), x8_b(b)
{}
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
} }
#endif // __RETRO_CVECTORELEMENT_HPP__ #endif // __RETRO_CVECTORELEMENT_HPP__