mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
add interface for sun clamp
This commit is contained in:
parent
266c911133
commit
2786d95795
|
@ -18,6 +18,7 @@ public:
|
||||||
virtual void AttachMemory(const uint32_t *cullingRAMLoPtr, const uint32_t *cullingRAMHiPtr, const uint32_t *polyRAMPtr, const uint32_t *vromPtr, const uint16_t *textureRAMPtr) = 0;
|
virtual void AttachMemory(const uint32_t *cullingRAMLoPtr, const uint32_t *cullingRAMHiPtr, const uint32_t *polyRAMPtr, const uint32_t *vromPtr, const uint16_t *textureRAMPtr) = 0;
|
||||||
virtual void SetStepping(int stepping) = 0;
|
virtual void SetStepping(int stepping) = 0;
|
||||||
virtual bool Init(unsigned xOffset, unsigned yOffset, unsigned xRes, unsigned yRes, unsigned totalXRes, unsigned totalYRes) = 0;
|
virtual bool Init(unsigned xOffset, unsigned yOffset, unsigned xRes, unsigned yRes, unsigned totalXRes, unsigned totalYRes) = 0;
|
||||||
|
virtual void SetSunClamp(bool enable) = 0;
|
||||||
|
|
||||||
virtual ~IRender3D()
|
virtual ~IRender3D()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1297,6 +1297,10 @@ bool CLegacy3D::Init(unsigned xOffset, unsigned yOffset, unsigned xRes, unsigned
|
||||||
return OKAY;
|
return OKAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CLegacy3D::SetSunClamp(bool enable)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
CLegacy3D::CLegacy3D(const Util::Config::Node &config)
|
CLegacy3D::CLegacy3D(const Util::Config::Node &config)
|
||||||
: m_config(config)
|
: m_config(config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -327,6 +327,16 @@ public:
|
||||||
* destructor is called. Prints own error messages.
|
* destructor is called. Prints own error messages.
|
||||||
*/
|
*/
|
||||||
bool Init(unsigned xOffset, unsigned yOffset, unsigned xRes, unsigned yRes, unsigned totalXRes, unsigned totalYRes);
|
bool Init(unsigned xOffset, unsigned yOffset, unsigned xRes, unsigned yRes, unsigned totalXRes, unsigned totalYRes);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SetSunClamp(bool enable);
|
||||||
|
*
|
||||||
|
* Sets or unsets the clamped light model
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* enable Set clamp mode
|
||||||
|
*/
|
||||||
|
void SetSunClamp(bool enable);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CLegacy3D(void):
|
* CLegacy3D(void):
|
||||||
|
|
|
@ -24,6 +24,7 @@ CNew3D::CNew3D(const Util::Config::Node &config, std::string gameName)
|
||||||
m_polyRAM = nullptr;
|
m_polyRAM = nullptr;
|
||||||
m_vrom = nullptr;
|
m_vrom = nullptr;
|
||||||
m_textureRAM = nullptr;
|
m_textureRAM = nullptr;
|
||||||
|
m_sunClamp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
CNew3D::~CNew3D()
|
CNew3D::~CNew3D()
|
||||||
|
@ -791,12 +792,13 @@ void CNew3D::RenderViewport(UINT32 addr)
|
||||||
m_gameName == "von2" ||
|
m_gameName == "von2" ||
|
||||||
m_gameName == "von254g" ||
|
m_gameName == "von254g" ||
|
||||||
m_gameName == "von2a") {
|
m_gameName == "von2a") {
|
||||||
vp->sunClamp = false;
|
m_sunClamp = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
vp->sunClamp = true;
|
m_sunClamp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vp->sunClamp = m_sunClamp;
|
||||||
vp->intensityClamp = (m_step == 0x10); // just step 1.0 ?
|
vp->intensityClamp = (m_step == 0x10); // just step 1.0 ?
|
||||||
vp->hardwareStep = m_step;
|
vp->hardwareStep = m_step;
|
||||||
|
|
||||||
|
@ -1608,5 +1610,10 @@ void CNew3D::CalcViewport(Viewport* vp, float near, float far)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CNew3D::SetSunClamp(bool enable)
|
||||||
|
{
|
||||||
|
m_sunClamp = enable;
|
||||||
|
}
|
||||||
|
|
||||||
} // New3D
|
} // New3D
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,16 @@ public:
|
||||||
*/
|
*/
|
||||||
bool Init(unsigned xOffset, unsigned yOffset, unsigned xRes, unsigned yRes, unsigned totalXRes, unsigned totalYRes);
|
bool Init(unsigned xOffset, unsigned yOffset, unsigned xRes, unsigned yRes, unsigned totalXRes, unsigned totalYRes);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SetSunClamp(bool enable);
|
||||||
|
*
|
||||||
|
* Sets or unsets the clamped light model
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* enable Set clamp mode
|
||||||
|
*/
|
||||||
|
void SetSunClamp(bool enable);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CRender3D(config):
|
* CRender3D(config):
|
||||||
* ~CRender3D(void):
|
* ~CRender3D(void):
|
||||||
|
@ -193,6 +203,7 @@ private:
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
std::string m_gameName;
|
std::string m_gameName;
|
||||||
|
bool m_sunClamp;
|
||||||
|
|
||||||
// Stepping
|
// Stepping
|
||||||
int m_step;
|
int m_step;
|
||||||
|
|
Loading…
Reference in a new issue