Skip to content

Commit 0bce6a2

Browse files
committed
Fix ImageIO building on Linux
1 parent 3823d95 commit 0bce6a2

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ Building: mkdir bin && cd bin && cmake ../src
1818

1919
Current status (Linux):
2020
Build Failed:
21-
[ 70%] Building CXX object Externals/NVTT/src/nvimage/CMakeFiles/nvimage.dir/ImageIO.cpp.o
22-
In function ‘nv::FloatImage* nv::ImageIO::loadFloat(const char*)’:
23-
xray-16/src/Externals/NVTT/src/nvimage/ImageIO.cpp:138:10: error: cannot convert ‘bool’ to ‘nv::FloatImage*’ in return
24-
return false;
25-
^~~~~
26-
21+
[ 82%] Building CXX object xrCore/CMakeFiles/xrCore.dir/clsid.cpp.o
22+
xray-16/src/xrCore/_types.h:14:24: error: expected initializer before ?s64?
23+
typedef signed __int64 s64;
24+
^~~
2725

2826

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

37-
Be advised that this project is not sanctioned by GSC Game World in any way and they remain the copyright holders
35+
Be advised that this project is not sanctioned by GSC Game World in any way ? and they remain the copyright holders
3836
of all the original source code.

src/Externals/NVTT/src/nvimage/ImageIO.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ FloatImage * nv::ImageIO::loadFloat(const char * fileName)
135135
StdInputStream stream(fileName);
136136

137137
if (stream.isError()) {
138-
return false;
138+
return NULL;
139139
}
140140

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

255255
default:
256256
nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" );
257-
return false;
257+
return NULL;
258258
}
259259

260260
const uint pixel_size = (tga.pixel_size/8);

0 commit comments

Comments
 (0)