diff options
author | Eugene Sandulenko | 2016-10-13 23:48:50 +0200 |
---|---|---|
committer | GitHub | 2016-10-13 23:48:50 +0200 |
commit | e89c76f63c25e4703a44489d987f1ce481e6d1cf (patch) | |
tree | da4da5c0983098dfcdc2d5e8da21e6b05fa95727 /common | |
parent | 72c4e0cd7af1ba08229e8c9ada68664847c59047 (diff) | |
parent | 577c3b56a528cd58e26882b8924b2a8b9d56148a (diff) | |
download | scummvm-rg350-e89c76f63c25e4703a44489d987f1ce481e6d1cf.tar.gz scummvm-rg350-e89c76f63c25e4703a44489d987f1ce481e6d1cf.tar.bz2 scummvm-rg350-e89c76f63c25e4703a44489d987f1ce481e6d1cf.zip |
Merge pull request #836 from peterkohaut/bladerunner
BLADERUNNER: added basic support for blade runner game
Diffstat (limited to 'common')
-rw-r--r-- | common/stream.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/stream.h b/common/stream.h index c6c300fa97..e0ffc47d7f 100644 --- a/common/stream.h +++ b/common/stream.h @@ -402,6 +402,22 @@ public: #endif /** + * Read a 32-bit floating point value stored in little endian (LSB first) + * order from the stream and return it. + * Performs no error checking. The return value is undefined + * if a read error occurred (for which client code can check by + * calling err() and eos() ). + */ + FORCEINLINE float readFloatLE() { + uint32 n = readUint32LE(); + float f; + + memcpy(&f, &n, 4); + + return f; + } + + /** * Read the specified amount of data into a malloc'ed buffer * which then is wrapped into a MemoryReadStream. * The returned stream might contain less data than requested, |