diff options
author | Eugene Sandulenko | 2004-12-15 00:24:12 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-12-15 00:24:12 +0000 |
commit | 502b279d243d79f46bb8a151ae610949d30bf757 (patch) | |
tree | 7f17defd563f74aa4944c7f8c6da0bc9ffc81c1a /saga/stream.h | |
parent | 58eabb6a5fdafed605fcb0cd8f56dbcea8723d46 (diff) | |
download | scummvm-rg350-502b279d243d79f46bb8a151ae610949d30bf757.tar.gz scummvm-rg350-502b279d243d79f46bb8a151ae610949d30bf757.tar.bz2 scummvm-rg350-502b279d243d79f46bb8a151ae610949d30bf757.zip |
Patch #1081904 ITE: MAC demo support
o Endianness-aware resource loading
o Removed ys_dl_list in favor of our object implementation
o Cleanup in actor code
o Partial support for ITE Mac rereleased demo
svn-id: r16051
Diffstat (limited to 'saga/stream.h')
-rw-r--r-- | saga/stream.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/saga/stream.h b/saga/stream.h new file mode 100644 index 0000000000..2ac45c79c5 --- /dev/null +++ b/saga/stream.h @@ -0,0 +1,56 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2004 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header$ + * + */ + +#ifndef SAGA_STREAM_H__ +#define SAGA_STREAM_H__ + +#include "common/stream.h" + +namespace Saga { + +using Common::MemoryReadStream; + +class MemoryReadStreamEndian : public Common::MemoryReadStream { +private: +public: + bool _bigEndian; + MemoryReadStreamEndian(const byte *buf, uint32 len, bool bigEndian = false) : MemoryReadStream(buf, len), _bigEndian(bigEndian) {} + + uint16 readUint16() { + return (_bigEndian) ? readUint16BE(): readUint16LE(); + } + + uint32 readUint32() { + return (_bigEndian) ? readUint32BE(): readUint32LE(); + } + + inline int16 readSint16() { + return (int16)readUint16(); + } + + + inline int32 readSint32() { + return (int32)readUint32(); + } +}; + +} // End of namespace Saga +#endif |