Max Horn
65b5d31814
COMMON: Removed Stream::ioFailed() and clearIOFailed(), as they are deprecated; however, retained ioFailed in SeekableReadStream and File for now (so for now this mainly affects WriteStream subclasses)
...
svn-id: r40725
2009-05-19 11:42:14 +00:00
Torbjörn Andersson
7d4618d165
Fixed typo.
...
svn-id: r40121
2009-04-24 17:19:20 +00:00
Max Horn
9cbed926cd
Moved Tinsel::Serializer to Common::Serializer, so that I can use it in the SCI engine
...
svn-id: r39428
2009-03-15 20:30:57 +00:00
Jordi Vilalta Prat
b1999a2a16
Fixed indentation and removed whitespaces at the end of line
...
svn-id: r35481
2008-12-22 11:22:15 +00:00
Max Horn
abae99d645
Get rid of readLine_OLD for good
...
svn-id: r35229
2008-12-03 22:55:30 +00:00
Max Horn
15959faf3e
Fix SubReadStream by initing _eos to false in the constructor (spotted thanks to our unit tests)
...
svn-id: r34555
2008-09-15 10:05:36 +00:00
Willem Jan Palenstijn
c8eeae8d4d
Big patch changing semantics of ReadStream::eos():
...
eos() now only returns true _after_ trying to read past the end of the stream.
This has a large potential for regressions. Please test!
svn-id: r34549
2008-09-14 22:28:53 +00:00
Max Horn
6574b2ad18
Fixed a typo & clarified a comment
...
svn-id: r34541
2008-09-14 21:26:59 +00:00
Max Horn
655ce26b3f
Big patch changing the signature of various Stream methods (some ports may need to be slightly tweaked to fix overloading errors/warnings)
...
svn-id: r34514
2008-09-13 16:51:46 +00:00
Max Horn
6cb09e311a
Added some unit tests for Stream::readLine_NEW, and clarified that readLine_NEW is essentially fgets in disguise
...
svn-id: r34384
2008-09-06 16:46:28 +00:00
Max Horn
57e724bfc3
Renamed SeekableReadStream::readLine to SeekableReadStream::readLine_OLD; added a new alternate SeekableReadStream::readLine() instead
...
svn-id: r34315
2008-09-03 17:53:25 +00:00
Max Horn
99f546caad
Moved the OutSaveFile::finalize method to WriteStream; implemented DumpFile::flush()
...
svn-id: r33604
2008-08-04 11:30:47 +00:00
Nicola Mettifogo
aa2ffe047b
Reordered initialization order to kill a ton of warnings.
...
svn-id: r33452
2008-07-30 15:01:15 +00:00
Max Horn
1e2988b7f7
Changed BufferedReadStream to not permanently decrease its buffer size at the end of a stream (this would fail when using BufferedSeekableReadStream and then seeking back from the end); this also fixes a bug which let you seek back beyond the start of a stream (not that we currently support that in other streams)
...
svn-id: r33436
2008-07-30 07:39:41 +00:00
Max Horn
aaa4d104f7
Added two new classes, BufferedReadStream & BufferedSeekableReadStream, as proposed on scummvm-devel
...
svn-id: r33419
2008-07-29 17:42:19 +00:00
Max Horn
f7ec115f08
New SeekableReadStream::readLine_NEW() method, closely modelled after fgets, w/o the line length limitations of the old eekableReadStream::readLine() (which it will replace, after the feature freeze has been lifted)
...
svn-id: r33139
2008-07-20 16:47:52 +00:00
Filippos Karapetis
8cc1539315
Added eriktorbjorn's MemoryWriteStreamDynamic class - a stream that grows as it's written to
...
svn-id: r31498
2008-04-13 23:46:55 +00:00
Johannes Schickel
ff2ba585b3
Implemented SeekableSubReadStreamEndian moddeled after MemoryReadStreamEndian.
...
svn-id: r31270
2008-03-27 20:53:52 +00:00
Johannes Schickel
6412c82bf7
Added some inlines to MemoryReadStreamEndian.
...
svn-id: r31248
2008-03-26 21:16:16 +00:00
Eugene Sandulenko
9a9e9d21a8
Moved MemoryStreamEndian from Saga to Common.
...
svn-id: r29038
2007-09-23 09:59:10 +00:00
Nicola Mettifogo
258901bab9
Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
...
svn-id: r28966
2007-09-19 08:40:12 +00:00
Max Horn
218e132e37
Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
...
svn-id: r27024
2007-05-30 21:56:52 +00:00
Max Horn
8a80e2284a
Removing _ptrOrig (hi Torbjorn, have fun recompiling)
...
svn-id: r25980
2007-03-04 16:25:27 +00:00
Max Horn
2cbe50c5ec
Typo
...
svn-id: r25861
2007-02-25 19:08:57 +00:00
Max Horn
198f32ea8e
Add some doxygen comments to Common::Stream
...
svn-id: r25859
2007-02-25 18:35:51 +00:00
Max Horn
42f11e9e49
Added new ReadStream::readStream method which can be used to read a portion of an arbitrary ReadStream into a memory buffer wrapped by a MemoryReadStream
...
svn-id: r25754
2007-02-20 21:41:01 +00:00
Max Horn
fb9c08f101
Removed XORReadStream (it was unused); enhanced MemoryReadStream to be able to dispose the memory block it wraps (simplifies memory management)
...
svn-id: r25748
2007-02-20 17:52:02 +00:00
Max Horn
7290d1b18c
Enhance (Seekable)SubReadStream so be able to (optionally) dispose the parent stream after it's been used (simplifies memory management for client code)
...
svn-id: r25732
2007-02-19 21:11:13 +00:00
Max Horn
cce7cba3b4
Patch #1583931 : (Seekable)SubReadStream
...
svn-id: r24713
2006-11-13 20:58:21 +00:00
Max Horn
7383f81d2f
Added a 'skip' method to SeekableReadStream (just an alias for seek(X, SEEK_CUR))
...
svn-id: r22178
2006-04-26 10:54:32 +00:00
Max Horn
36934b611d
Change CVS keywords to SVN keywords
...
svn-id: r20510
2006-02-11 09:53:53 +00:00
Eugene Sandulenko
ea42bad781
Update copyright notice
...
svn-id: r20088
2006-01-18 17:39:49 +00:00
Eugene Sandulenko
b36677af71
Update FSF address. Eek. Actually that took place on May 1, 2005
...
svn-id: r19142
2005-10-18 01:30:26 +00:00
Marcus Comstedt
57e1c6451d
Improved savefile error handling:
...
* New flush() method in WriteStream class to flush pending I/O, in order
to detect any I/O errors
* Use of flush() and ioFailed() added to scumm engine save function
* Dreamcast backend extended to support the new checks
svn-id: r19066
2005-10-13 18:50:53 +00:00
Eugene Sandulenko
6b4484472b
Remove trailing whitespaces.
...
svn-id: r18604
2005-07-30 21:11:48 +00:00
Torbjörn Andersson
1d39f986c9
Whitespace changes.
...
svn-id: r18449
2005-06-24 16:08:31 +00:00
Max Horn
8b1d7b9166
When including files from common/, explicitly use the common/ prefix
...
svn-id: r18444
2005-06-24 15:23:51 +00:00
Max Horn
096e04ef05
Added virtual destructor, to silence a few more GCC 4 warnings
...
svn-id: r18419
2005-06-20 17:59:00 +00:00
Max Horn
d00117ec4b
Fixed some doxygen warnings
...
svn-id: r17923
2005-05-05 15:59:24 +00:00
Max Horn
b515dd1333
Moved Stream::eos() to ReadStream::eos()
...
svn-id: r17853
2005-04-28 20:59:19 +00:00
Max Horn
969ef3dac9
* Added new virtual base class 'Stream', ReadStream and
...
WriteStream are now subclasses of it.
* Added new methods eos(), ioFailed(), clearIOFailed() to
all streams. This allows better error checking.
* SaveFile classes take advantage of these new standard
stream APIS
* Removed File::gets()
* Added SeekableReadStream::readLine() (replaces File::gets)
* Added WriteStream::writeString, for convenience
svn-id: r17752
2005-04-22 17:40:09 +00:00
Eugene Sandulenko
9c772ce7d8
Forgot to init _encbyte in MemoryReadStream.
...
svn-id: r17301
2005-03-30 22:01:17 +00:00
Eugene Sandulenko
7ae3da082e
Support for direct reading from NES ROM:
...
o extend MemoryReadStream with XOR facility
o implement MemoryWriteStream
o _fileHandle now is a reference to BaseScummFile class and is created on the fly
o implement ScummNESFile class which is basically extract_mm_nes utility
o update NES MM md5's due to above changes
NOTE: to run MM NES now you need to remove *.LFL files and (probably) rename
ROM to standard conventional name 'Maniac Mansion (XXX).nes'
svn-id: r17300
2005-03-30 21:59:12 +00:00
Max Horn
0423866e0a
Ensure these headers match the rest of ScummVM
...
svn-id: r16505
2005-01-09 16:07:53 +00:00
Max Horn
bc44b5ec15
Added new interface SeekableReadStream
...
svn-id: r16493
2005-01-09 01:41:43 +00:00
Max Horn
47280d9433
Updated copyright
...
svn-id: r16398
2005-01-01 16:09:25 +00:00
Max Horn
41a7e6674c
Remove the 24 bit read/write methods -- we don't use them anymore and they are weird anyway ;-)
...
svn-id: r16037
2004-12-11 23:50:39 +00:00
Max Horn
369e31a41c
Modified version of patch #1082777 (common/stream optimization)
...
svn-id: r16034
2004-12-11 23:16:36 +00:00
Bertrand Augereau
52701d581b
Changed order of initialisation in XORReadStream::XORReadStream() to match order of declaration, to avoid a pedantic warning
...
svn-id: r14273
2004-07-19 10:20:00 +00:00
Max Horn
a1b82d8e13
Cleanup for MemoryReadStream; made it match the File-class interface
...
svn-id: r14086
2004-06-27 21:30:33 +00:00