ResourceLoader SteamChecker now return a ternary

Former-commit-id: 2ee274ebb2b61f39e93f6ff2306b5a326b158594
This commit is contained in:
Lynix
2013-04-27 11:51:42 +02:00
parent 226d291ea6
commit 6699ce328f
16 changed files with 111 additions and 72 deletions

View File

@@ -44,15 +44,18 @@ namespace
return (extension == "pcx");
}
bool Check(NzInputStream& stream, const NzImageParams& parameters)
nzTernary Check(NzInputStream& stream, const NzImageParams& parameters)
{
NazaraUnused(parameters);
nzUInt8 manufacturer;
if (stream.Read(&manufacturer, 1) != 1)
return false;
if (stream.Read(&manufacturer, 1) == 1)
{
if (manufacturer == 0x0a)
return nzTernary_True;
}
return manufacturer == 0x0a;
return nzTernary_False;
}
bool Load(NzImage* image, NzInputStream& stream, const NzImageParams& parameters)