Skip to content

Commit

Permalink
Merge pull request #836 from peterkohaut/bladerunner
Browse files Browse the repository at this point in the history
BLADERUNNER: added basic support for blade runner game
  • Loading branch information
sev- committed Oct 13, 2016
2 parents 72c4e0c + 577c3b5 commit e89c76f
Show file tree
Hide file tree
Showing 229 changed files with 54,159 additions and 0 deletions.
16 changes: 16 additions & 0 deletions common/stream.h
Expand Up @@ -401,6 +401,22 @@ class ReadStream : virtual public Stream {
}
#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.
Expand Down

0 comments on commit e89c76f

Please sign in to comment.