Commit Graph
12675 Commits
Author SHA1 Message Date
Glenn Maynard 614dfefd49 make buffering optional, to avoid accumulative overhead 2004-12-11 02:53:22 +00:00
Glenn Maynard a946c220bc whitespace cleanups (prefer tabs over spaces) 2004-12-11 02:30:24 +00:00
Glenn Maynard ae92b86b34 RageFileBasic 2004-12-11 02:25:38 +00:00
Glenn Maynard 31f477b1b8 RageBasicFile -> RageFileBasic (sorts better), move it and RageFileObj (probably to be renamed) into a separate file since they're no longer "file driver"-specific 2004-12-11 02:21:56 +00:00
Glenn Maynard 7bb2cec302 simplify RageFileObjZipStored 2004-12-11 01:18:27 +00:00
Glenn Maynard 47994102b3 vc fix? 2004-12-10 13:13:14 +00:00
Glenn Maynard 8915e3944a simplify; use RageBasicFile instead of RageFileObj 2004-12-10 10:04:32 +00:00
Glenn Maynard 2474150aeb allow passing a file directly to IniFile 2004-12-10 09:46:09 +00:00
Glenn Maynard 57c218dd6e add copy ctor, GetString 2004-12-10 09:27:11 +00:00
Glenn Maynard 2607397fde move RageFileObjMem definition into header 2004-12-10 09:13:03 +00:00
Glenn Maynard 46ce532f18 simplify reference handling 2004-12-10 09:10:14 +00:00
Glenn Maynard bcba89a2c9 cleanup 2004-12-10 08:53:52 +00:00
Glenn Maynard 287a150db7 Move buffering logic from RageFile into RageFileObj.
Common file interface class, RageBasicFile, shared by RageFile
and RageFileObj.  This makes most uses of these objects interchangeable.
RageFile is now just a simple wrapper for RageFileObj, to create
files in FILEMAN's namespace; file objects can also be created
independently.  This means that, for example, IniFile can be used
to write a file to a CString, without having to jump through hoops,
and without having to use a separate file access wrapper; just do
something like:

RageFileObjMem string_file;
ini.WriteFile( string );
const CString &sString = string_file.GetString();
2004-12-10 08:48:18 +00:00
Glenn Maynard 4feb167b6e It's fine to call Close() on a file which isn't open. 2004-12-10 06:35:17 +00:00
Glenn Maynard a526d09e3a seek fix 2004-12-10 03:25:28 +00:00
Glenn Maynard e2ea72dbac internalize RageFileObj implementation functions 2004-12-10 03:14:01 +00:00
Glenn Maynard 2bf27c582c cleanup 2004-12-09 11:52:49 +00:00
Glenn Maynard ec22ffec62 stop passing ugly back-references to the RageFile to RageFileObj 2004-12-09 11:47:20 +00:00
Glenn Maynard b38e2e25f1 remove parent 2004-12-09 11:31:23 +00:00
Glenn Maynard bb94a3aaa1 cleanup: avoid parent access 2004-12-09 11:28:24 +00:00
Glenn Maynard a2f9bf586d propagate file driver errors normally 2004-12-09 11:17:57 +00:00
Glenn Maynard b2c7aec818 Remove ugly, brute-force Seek and GetFileSize implementations. Nothing uses them, and nothing ever should. 2004-12-09 11:10:27 +00:00
Glenn Maynard 269f0be457 cleanup 2004-12-09 10:48:57 +00:00
Glenn Maynard 6761eb7a51 remove Rewind() 2004-12-09 10:44:07 +00:00
Glenn Maynard c87fd69606 no, reomve Rewind() 2004-12-09 10:42:03 +00:00
Glenn Maynard cae7809e1c make Rewind() optional 2004-12-09 10:40:18 +00:00
Glenn Maynard ea820c77b2 Avoid RageFileObj::Seek; handle rewinds in Seek(). 2004-12-09 10:38:42 +00:00
Glenn Maynard 7ae0ad1533 remove RageFile::Rewind 2004-12-09 10:22:47 +00:00
Chris Danford 12d556c759 allow multiple, simultaneous prepared screens 2004-12-09 09:41:06 +00:00
Glenn Maynard 7085d480ec Remove RageFile::Rewind() calls. The original notion was that rewinding is
often simpler than seeking; that some drivers may only support rewinding;
and that, if supported, rewinding should never fail.  However, there's really
no reason for it to be a separate API call.
2004-12-09 08:59:24 +00:00
Glenn Maynard 335e8149d0 remove RageFileObj::SeekCur 2004-12-09 08:51:28 +00:00
Glenn Maynard fd7e23fce8 remove SeekCur 2004-12-09 08:47:24 +00:00
Glenn Maynard 6904cccf16 SeekCur 2004-12-09 08:46:18 +00:00
Glenn Maynard 00befb1c00 test set fix 2004-12-09 08:45:39 +00:00
Glenn Maynard fa2719a2c1 Remove RageFile::SeekCur(). It's just as easy to call Seek(Tell()), and
separating "seek from current position" doesn't do anything useful for
file drivers.
2004-12-09 08:36:08 +00:00
Chris Danford b6d711b3c1 Remove backgrounds on screens. Have one shared background that persists across screens. 2004-12-09 08:16:18 +00:00
Chris Danford 08964e340b remove ScreenGameOver code, replace with ScreenAttract 2004-12-09 04:20:09 +00:00
Glenn Maynard 6558f6f7de This comment is incorrect. deflateReset() doesn't leak; it resets the
object to a just-initialized state.  deflateEnd() is correct (no comment
needed for that; it's obvious, I don't know why I used deflateReset to
begin with).

zlib doesn't appear to do anything special with allocations; running
the following:

#include <zlib.h>
main()
{
	z_stream z; z.zalloc = NULL; z.zfree = NULL;
	inflateInit2( &z, -MAX_WBITS ); inflateReset( &z );
}

under Valgrind shows:

==17033== 7080 bytes in 1 blocks are possibly lost in loss record 1 of 1
==17033==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==17033==    by 0x1B91D4B4: zcalloc (in /usr/lib/libz.so.1.2.1.2)
==17033==    by 0x1B91D608: inflateInit2_ (in /usr/lib/libz.so.1.2.1.2)
==17033==    by 0x80485A4: main (in /home/glenn/a.out)
2004-12-09 04:07:14 +00:00
Charles Lohr 9a93860c6a Major memory leak fix regarding packages.
The reason that only some people were experiencing a major memory leak
was that it had to do with packages, a lot of devs don't use packages.

This leak could not be found through conventional methods, as zlib's ram
seems to be allocated from the global ram.
2004-12-09 02:09:32 +00:00
Josh Allen 0292eb99c1 Don't limit max players for net evaluation to 32. 2004-12-08 05:35:03 +00:00
Glenn Maynard 268dafa582 update option names that are now identical to their StepMania.ini name 2004-12-07 10:06:44 +00:00
Glenn Maynard 8d0bf6039c simpler mechanism: doesn't require a separate function for each preference;
requires only one line in ScreenOptionsMasterPrefs, not two (still needs
appropriate metrics); doesn't require that the metric is in PrefsManager
2004-12-07 10:05:14 +00:00
Glenn Maynard 607c22fef9 add PrefsManager::GetPreferenceByName 2004-12-07 10:04:19 +00:00
Glenn Maynard 823eac2631 make g_ConfOptions a vector 2004-12-07 09:49:03 +00:00
Glenn Maynard dbb52c70d7 real fix for options 2004-12-07 09:22:38 +00:00
Glenn Maynard f7bb6ef29e grr, not quite 2004-12-07 08:32:29 +00:00
Glenn Maynard 8e57c4ca76 This should fix options menu crashes. Adding casts to the MOVE() macros
didn't make it work, since there was no cast overload to bool&, etc; it
just forced the (non-POD) type to that type, which resulted in the struct
being clobbered.
2004-12-07 08:28:24 +00:00
Charles Lohr 295ae2d961 Oops. 2004-12-07 06:06:01 +00:00
Charles Lohr 9e8cbeb8df Verify that we won't call a method on a non-existant element.
This seems to be the root of a handfull of crashes.
2004-12-07 05:53:03 +00:00
Charles Lohr c3f154dd27 Hmm.. Maybe this'll fix it. 2004-12-07 03:24:14 +00:00