mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 05:45:38 +00:00
color flag
This commit is contained in:
parent
74e7ff3d7d
commit
09e27e3082
|
@ -913,9 +913,16 @@ void CNew3D::CacheModel(Model *m, const UINT32 *data)
|
||||||
p.v[j].color[2] = shade;
|
p.v[j].color[2] = shade;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
p.v[j].color[0] = (ph.header[4] >> 24);
|
if (ph.ColorDisabled()) { // no colours were set
|
||||||
p.v[j].color[1] = (ph.header[4] >> 16) & 0xFF;
|
p.v[j].color[0] = 255;
|
||||||
p.v[j].color[2] = (ph.header[4] >> 8) & 0xFF;
|
p.v[j].color[1] = 255;
|
||||||
|
p.v[j].color[2] = 255;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
p.v[j].color[0] = (ph.header[4] >> 24);
|
||||||
|
p.v[j].color[1] = (ph.header[4] >> 16) & 0xFF;
|
||||||
|
p.v[j].color[2] = (ph.header[4] >> 8) & 0xFF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ph.header[6] & 0x00800000)) { // if set, polygon is opaque
|
if ((ph.header[6] & 0x00800000)) { // if set, polygon is opaque
|
||||||
|
|
|
@ -181,6 +181,11 @@ void PolyHeader::Color(UINT8& r, UINT8& g, UINT8& b)
|
||||||
b = (header[4] >> 8) & 0xFF;
|
b = (header[4] >> 8) & 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PolyHeader::ColorDisabled()
|
||||||
|
{
|
||||||
|
return (header[4] & 0x80) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
int PolyHeader::Page()
|
int PolyHeader::Page()
|
||||||
{
|
{
|
||||||
return (header[4] & 0x40) >> 6;
|
return (header[4] & 0x40) >> 6;
|
||||||
|
@ -262,7 +267,7 @@ bool PolyHeader::PolyAlpha()
|
||||||
|
|
||||||
bool PolyHeader::TextureAlpha()
|
bool PolyHeader::TextureAlpha()
|
||||||
{
|
{
|
||||||
return (header[6] & 0x1);
|
return (header[6] & 0x3) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PolyHeader::StencilPoly()
|
bool PolyHeader::StencilPoly()
|
||||||
|
|
|
@ -39,10 +39,10 @@ xxxxxxxx xxxxxxxx xxxxxxxx -------- Polygon normal Z coordinate(2.22 fixed poin
|
||||||
|
|
||||||
0x04:
|
0x04:
|
||||||
xxxxxxxx xxxxxxxx xxxxxxxx -------- Color(RGB888)
|
xxxxxxxx xxxxxxxx xxxxxxxx -------- Color(RGB888)
|
||||||
|
-------- -------- -------- x------- Color disabled
|
||||||
-------- -------- -------- -x------ Texture page
|
-------- -------- -------- -x------ Texture page
|
||||||
-------- -------- -------- ---xxxxx Upper 5 bits of texture U coordinate
|
|
||||||
-------- -------- -------- x------- ?
|
|
||||||
-------- -------- -------- --x----- ?
|
-------- -------- -------- --x----- ?
|
||||||
|
-------- -------- -------- ---xxxxx Upper 5 bits of texture U coordinate
|
||||||
|
|
||||||
0x05 :
|
0x05 :
|
||||||
xxxxxxxx xxxxxxxx xxxxxxxx -------- Specular color ?
|
xxxxxxxx xxxxxxxx xxxxxxxx -------- Specular color ?
|
||||||
|
@ -105,6 +105,7 @@ public:
|
||||||
|
|
||||||
//header 4
|
//header 4
|
||||||
void Color(UINT8& r, UINT8& g, UINT8& b);
|
void Color(UINT8& r, UINT8& g, UINT8& b);
|
||||||
|
bool ColorDisabled();
|
||||||
int Page();
|
int Page();
|
||||||
|
|
||||||
// header 5
|
// header 5
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..\Src;..\Src\OSD;..\Src\OSD\SDL;..\Src\OSD\Windows;..\Libraries\zlib-1.2.4;..\Libraries\SDL-1.2.14\include;$(DXSDK_DIR)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\Src;..\Src\OSD;..\Src\OSD\SDL;..\Src\OSD\Windows;..\Libraries\zlib-1.2.4;..\Libraries\SDL-1.2.14\include;$(DXSDK_DIR)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>SUPERMODEL_WIN32;INLINE=static __inline;_MBCS;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;DEBUG</PreprocessorDefinitions>
|
<PreprocessorDefinitions>SUPERMODEL_WIN32;INLINE=static __inline;_MBCS;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
|
Loading…
Reference in a new issue