Comments (1)
Not a proper fix, and totally untested, but it seems it does fully build with that patch:
diff --git a/source/libsmackerdec/src/FileStream.cpp b/source/libsmackerdec/src/FileStream.cpp
index da3b12f..febd8c7 100644
--- a/source/libsmackerdec/src/FileStream.cpp
+++ b/source/libsmackerdec/src/FileStream.cpp
@@ -19,6 +19,7 @@
#include "FileStream.h"
#include <stdlib.h>
+#include <byteswap.h>
namespace SmackerCommon {
@@ -47,10 +48,10 @@ void FileStream::Close()
int32_t FileStream::ReadBytes(uint8_t *data, uint32_t nBytes)
{
- int32_t nCount = kread(file, data, static_cast<int32_t>(nBytes));
+ uint32_t nCount = (uint32_t) kread(file, data, static_cast<int32_t>(nBytes));
- if (nCount != nBytes)
- return 0;
+ if (nCount != nBytes)
+ return 0;
return nCount;
}
@@ -65,8 +66,8 @@ uint32_t FileStream::ReadUint32LE()
uint32_t FileStream::ReadUint32BE()
{
uint32_t value;
- kread(file, &value, 4);
- return _byteswap_ulong(value);
+ kread(file, &value, 4);
+ return bswap_32(value);
}
uint16_t FileStream::ReadUint16LE()
@@ -79,8 +80,8 @@ uint16_t FileStream::ReadUint16LE()
uint16_t FileStream::ReadUint16BE()
{
uint16_t value;
- kread(file, &value, 2);
- return _byteswap_ushort(value);
+ kread(file, &value, 2);
+ return bswap_16(value);
}
uint8_t FileStream::ReadByte()
from nblood.
Related Issues (20)
- NBlood: Monolith FMV cuts off early HOT 1
- [PCExhumed] Small Feature Request - Add Option to Skip Intro Screens and Pharoah's Laugh and Go Straight to Main Menu HOT 2
- Shareware/Demos not working HOT 2
- [Pcexhumed]Garbled textures HOT 1
- macOS artifacts/release files? HOT 1
- [NBlood] Saved games won't load when game is started with -game_dir HOT 1
- Eviction Episode 2 crashes without errors
- Voxels not transparent in Classsic (software) renderer
- [Nblood] Feature request Toggle Crouch and Disable Vertical Axis on mouse / Bug report r_upscalefactor not applying after restart. HOT 3
- Save games are not being loaded HOT 11
- error: parameter 'XXX" is undefined when launching Liquidator 3D HOT 1
- Force Joystick input?
- HUD - Show Messages Option Resets Itself Every Launch HOT 1
- [Nblood] Cryptic Passage as an episode HOT 1
- [PCExhumed] Mouse in menus
- Nblood weapon switch animation problem
- [PCExhumed] -mh command line parameter doesn't work HOT 1
- [Question] Extinguished faster than normal? HOT 1
- [NBlood] Enemy death sounds randomly cut out HOT 4
- [QUESTION] Nuked-SC-55 support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nblood.