mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11:16 +00:00
Merge branch 'master' into long-fix
This commit is contained in:
commit
086316f9f6
@ -11,10 +11,13 @@ void ConvertHSVToRGB(float h, float s, float v, float *r_out, float *b_out, floa
|
|||||||
double v9;
|
double v9;
|
||||||
double v12;
|
double v12;
|
||||||
double v13;
|
double v13;
|
||||||
|
|
||||||
|
double s_dbl = s;
|
||||||
|
|
||||||
if (s > 0.5f)
|
if (s > 0.5f)
|
||||||
calc = (1.0f - v) * s + v;
|
calc = (1.0f - v) * s + v;
|
||||||
else
|
else
|
||||||
calc = (v + 1.0) * s;
|
calc = (v + 1.0) * s_dbl;
|
||||||
if (calc <= 0.0)
|
if (calc <= 0.0)
|
||||||
{
|
{
|
||||||
*g_out = 0.0f;
|
*g_out = 0.0f;
|
||||||
@ -22,7 +25,7 @@ void ConvertHSVToRGB(float h, float s, float v, float *r_out, float *b_out, floa
|
|||||||
*r_out = 0.0f;
|
*r_out = 0.0f;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
p = s * 2.0 - calc;
|
p = s * 2.0f - calc;
|
||||||
hue_index = h * 6.0;
|
hue_index = h * 6.0;
|
||||||
v9 = (h * 6.0 - (float)hue_index) * ((calc - p) / calc) * calc;
|
v9 = (h * 6.0 - (float)hue_index) * ((calc - p) / calc) * calc;
|
||||||
v12 = p + v9;
|
v12 = p + v9;
|
||||||
|
|||||||
@ -23,16 +23,15 @@ MxDSFile::~MxDSFile()
|
|||||||
// OFFSET: LEGO1 0x100cc590
|
// OFFSET: LEGO1 0x100cc590
|
||||||
MxLong MxDSFile::Open(MxULong uStyle)
|
MxLong MxDSFile::Open(MxULong uStyle)
|
||||||
{
|
{
|
||||||
// No idea what's stopping this one matching, but I'm pretty
|
MXIOINFO& io = m_io;
|
||||||
// confident it has the correct behavior.
|
|
||||||
MxLong longResult = 1;
|
MxLong longResult = 1;
|
||||||
memset(&m_io, 0, sizeof(MXIOINFO));
|
memset(&io, 0, sizeof(MXIOINFO));
|
||||||
|
|
||||||
if (m_io.Open(m_filename.GetData(), uStyle) != 0) {
|
if (io.Open(m_filename.GetData(), uStyle) != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_io.SetBuffer(NULL, 0, 0);
|
io.SetBuffer(NULL, 0, 0);
|
||||||
m_position = 0;
|
m_position = 0;
|
||||||
|
|
||||||
if (m_skipReadingChunks == 0) {
|
if (m_skipReadingChunks == 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user