Skip to content

Commit

Permalink
Fix ImageIO building on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
q4a committed May 12, 2018
1 parent 3823d95 commit 0bce6a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ Building: mkdir bin && cd bin && cmake ../src

Current status (Linux):
Build Failed:
[ 70%] Building CXX object Externals/NVTT/src/nvimage/CMakeFiles/nvimage.dir/ImageIO.cpp.o
In function ‘nv::FloatImage* nv::ImageIO::loadFloat(const char*)’:
xray-16/src/Externals/NVTT/src/nvimage/ImageIO.cpp:138:10: error: cannot convert ‘bool’ to ‘nv::FloatImage*’ in return
return false;
^~~~~

[ 82%] Building CXX object xrCore/CMakeFiles/xrCore.dir/clsid.cpp.o
xray-16/src/xrCore/_types.h:14:24: error: expected initializer before ?s64?
typedef signed __int64 s64;
^~~


If you find a bug or have an enhancement request, file an [Issue](https://github.com/openxray/xray-16/issues).
Expand All @@ -34,5 +32,5 @@ Pull requests appreciated! However, the following things should be taken into co
* Major changes should be discussed before implementation
* Follow the [procedures](doc/procedure)

Be advised that this project is not sanctioned by GSC Game World in any way and they remain the copyright holders
Be advised that this project is not sanctioned by GSC Game World in any way ? and they remain the copyright holders
of all the original source code.
6 changes: 3 additions & 3 deletions src/Externals/NVTT/src/nvimage/ImageIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ FloatImage * nv::ImageIO::loadFloat(const char * fileName)
StdInputStream stream(fileName);

if (stream.isError()) {
return false;
return NULL;
}

return loadFloat(fileName, stream);
Expand Down Expand Up @@ -233,7 +233,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
case TGA_TYPE_INDEXED:
if( tga.colormap_type!=1 || tga.colormap_size!=24 || tga.colormap_length>256 ) {
nvDebug( "*** ImageIO::loadTGA: Error, only 24bit paletted images are supported.\n" );
return false;
return NULL;
}
pal = true;
break;
Expand All @@ -254,7 +254,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)

default:
nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" );
return false;
return NULL;
}

const uint pixel_size = (tga.pixel_size/8);
Expand Down

0 comments on commit 0bce6a2

Please sign in to comment.