Eugene Sandulenko
18ce381060
Got rid of ARRAYSIZE in advanceDetector calls
...
svn-id: r24881
2006-12-19 03:52:04 +00:00
Stuart George
6c46f3ba26
Added Apple IIgs as machine type for AGI engine
...
svn-id: r24876
2006-12-19 01:06:45 +00:00
Willem Jan Palenstijn
9543231685
replace ensureCapacity(_len-1) by ensureCapacity(_len) (fixes bug #1617410 )
...
svn-id: r24865
2006-12-17 19:41:41 +00:00
Gregory Montoir
b2fb23a134
Changed the way String::_storage is initialised, to help GCC 2.95 (see tracker item #1602879 )
...
svn-id: r24793
2006-11-27 00:51:14 +00:00
Max Horn
5c8de9b3b0
Replaced #ifdef hack in the HashMap code by a much nicer and cleaner 'friend class' statement (a similar change might be possible in class List)
...
svn-id: r24791
2006-11-26 22:39:34 +00:00
Eugene Sandulenko
cfb29dcb51
Fix MSVC2005 warnings. Please, review the changes.
...
svn-id: r24760
2006-11-22 15:50:30 +00:00
Eugene Sandulenko
cad15161a5
Disable yet another MSVC warning
...
svn-id: r24758
2006-11-22 13:40:32 +00:00
Travis Howell
cc8653604e
Fix compile
...
svn-id: r24716
2006-11-13 22:42:24 +00:00
Max Horn
cce7cba3b4
Patch #1583931 : (Seekable)SubReadStream
...
svn-id: r24713
2006-11-13 20:58:21 +00:00
Max Horn
86d988132c
Prepend the Engine::errorString to debug messages, too (it should probably be renamed to reflect this...)
...
svn-id: r24712
2006-11-13 20:56:11 +00:00
Eugene Sandulenko
3e6414a55f
Slighty modified Patch #1571787 : "Support for Mac Broken Sword 1". sword1macdemo
...
target was commented out until existence of the demo is confirmed.
svn-id: r24697
2006-11-12 19:05:51 +00:00
Max Horn
1f26cb8965
Reworked code in the advanced game detector (getting rid of much of the evil #define hell it consisted of previously)
...
svn-id: r24685
2006-11-12 03:23:29 +00:00
Eugene Sandulenko
3c7cb08db5
Fix regression in AGOS engine detector
...
svn-id: r24671
2006-11-10 23:16:23 +00:00
Eugene Sandulenko
a977988058
Next step in AdvancedDetector unification. Moved all common functions to
...
macroses. Now typical usage is just list of macros with parameters and
array of game details.
svn-id: r24670
2006-11-10 22:43:10 +00:00
Gregory Montoir
c71e6599bc
added translation method to Common::Rect
...
svn-id: r24591
2006-11-03 21:04:10 +00:00
Gregory Montoir
f9cf368a67
got rid of two memory leaks
...
svn-id: r24589
2006-11-03 21:01:49 +00:00
Chris Apers
8ad806535a
Not required anymore
...
svn-id: r24561
2006-10-28 14:40:43 +00:00
Max Horn
7889783cac
const correctness
...
svn-id: r24488
2006-10-24 09:44:20 +00:00
Max Horn
07f7761479
Backend modularization: Create timer manager, savefile manager and audio mixer in the backends for increased flexibility
...
svn-id: r24443
2006-10-22 15:42:29 +00:00
Max Horn
f95f5ed133
Added OSystem::getTimerManager and OSystem::getMixer methods (wip)
...
svn-id: r24405
2006-10-21 12:03:43 +00:00
Max Horn
1a086279b2
Added Point::sqrDist method to (safely) compute the square of the distance between two points
...
svn-id: r24370
2006-10-18 14:48:51 +00:00
Travis Howell
3559fcba43
Revert
...
svn-id: r24303
2006-10-14 03:15:35 +00:00
Travis Howell
05baf18ad6
Fix introduction of WW
...
svn-id: r24302
2006-10-14 03:14:47 +00:00
Johannes Schickel
d65e7826fd
Fixes compiling for me with g++ (GCC) 4.1.2 20061007 (prerelease) (Debian 4.1.1-16) on amd64.
...
svn-id: r24298
2006-10-13 20:18:27 +00:00
Kostas Nakos
4524b49872
Initial commit of the wince-gcc re-port
...
svn-id: r24212
2006-10-08 18:15:18 +00:00
Max Horn
dca237598b
Added a const qualifier inside struct ADGameDescription (rule of thumb: Make as many pointers and members const as possible, it helps prevent bugs, and potentially helps the optimizer)
...
svn-id: r24181
2006-10-08 00:20:44 +00:00
Eugene Sandulenko
3d84f11046
Patch #1432376 : "Very basic GP2X Backend"
...
svn-id: r24144
2006-10-06 19:01:39 +00:00
Max Horn
20d46ab409
typo
...
svn-id: r24093
2006-10-03 11:33:06 +00:00
Eugene Sandulenko
107a9f3bef
Moved unrelated fields out of ADGameDescription structure.
...
svn-id: r24090
2006-10-02 23:31:14 +00:00
Max Horn
756ede94aa
Doxygen compliance fix
...
svn-id: r24087
2006-10-02 22:34:39 +00:00
Eugene Sandulenko
988ddf2b36
Unify SAGA/AGOS detection code so other engines could also reuse it
...
without further code duplication.
svn-id: r24083
2006-10-02 22:21:57 +00:00
Max Horn
51010bd038
Remove BaseNodeType (it is not used anymore, we can readd it, should we ever have need for it again)
...
svn-id: r24079
2006-10-02 20:13:48 +00:00
Torbjörn Andersson
d7b786ea41
Implemented "iconify window" opcode. This, of course, needs support in the
...
backend to work, and so far it's only done in the SDL backend. See the new
kFeatureIconifyWindow flag. (This is patch #1568775.)
svn-id: r24060
2006-10-02 04:46:50 +00:00
Max Horn
a6c3257c5e
Rewrote class String to use an internal (stack based) storage for small strings, thus avoiding a couple ten thousand heap allocations
...
svn-id: r24043
2006-09-30 18:55:38 +00:00
Travis Howell
ab6d6056fe
Remove malloc include, which was only used by checkHeap()
...
svn-id: r23982
2006-09-23 11:55:52 +00:00
Travis Howell
a0e6154340
Re-order platform order, to avoid exclusions
...
svn-id: r23981
2006-09-23 11:44:05 +00:00
Travis Howell
be4628ffca
Remove defines, which were only used by checkHeap()
...
svn-id: r23980
2006-09-23 11:37:05 +00:00
Max Horn
d02e4d7f7c
Removed CHECK_HEAP
...
svn-id: r23979
2006-09-23 11:29:32 +00:00
Travis Howell
847c145810
Whitepsace changes
...
svn-id: r23978
2006-09-23 01:16:32 +00:00
Travis Howell
1e4dc7f5b6
Remove duplicate and left over _WIN32_WCE checks
...
svn-id: r23977
2006-09-23 01:08:39 +00:00
Travis Howell
17d4f41a88
Fix mingw compile
...
svn-id: r23976
2006-09-23 01:05:30 +00:00
Max Horn
f0ac3d1c9e
Moved error/warning/checkHeap from engines/engine.cpp to common/util.cpp
...
svn-id: r23975
2006-09-23 00:51:30 +00:00
Max Horn
4c14cf6d1a
Moved base/engine.cpp and .h to engines/ (main motivation: helps untangle the linker dependency graph). Porters will have to update project files
...
svn-id: r23974
2006-09-23 00:42:35 +00:00
Max Horn
919092e5fc
Overhaul of the debugger code
...
* Moved Common::Debuggger to GUI::Debugger (mainly to satisfy linker
restrictions)
* Change the base Debugger class to *not* be a template class anymore;
instead, a thin (template based) wrapper class is used to hook up
debugger commands
* Removed duplicate Cmd_Exit and Cmd_Help methods in favor of a single
version of each in GUI::Debugger
* New Cmd_Help doesn't word wrap after 39/78 chars, but rather queries
the console to determine when to wrap
* Debugger::preEnter and postEnter aren't pure virtual anymore
svn-id: r23890
2006-09-16 16:58:27 +00:00
Eugene Sandulenko
c870d057a4
Change Brazilian Portuguese acronym from "pt" to "br" in case there will
...
be pure Portuguese games and to make use of brazilian flag. No detection stuff
is dependent on this, though BASS and Sword1 make use of it. However no
autoupgrade option is implemented, should it be?
svn-id: r23710
2006-08-15 19:54:41 +00:00
Max Horn
4ee581adb5
Fixed some broken #include's (the PS2 and Symbian may need more fixed, though)
...
svn-id: r23666
2006-08-04 17:47:57 +00:00
Max Horn
ca7880df6c
Added new method OSystem::getScreenChangeID(), which can be used by code to track screen changes even without getting all EVENT_SCREEN_CHANGED events
...
svn-id: r23661
2006-08-04 13:10:28 +00:00
Max Horn
53f73eac85
Added explicit string equals/hash functors to a new header common/hash-str.h; removed Hash functor specialization for String and char pointers; changed all code using hashmaps with string keys to explicitly specify whether they honor or ignore case
...
svn-id: r23634
2006-07-30 12:21:54 +00:00
Max Horn
bd49091afd
Added new equals(IgnoreCase) and compareTo(IgnoreCase) methods to class String
...
svn-id: r23633
2006-07-30 12:17:51 +00:00
Max Horn
b3a66e817f
Rename BaseNodeFunc to BaseNodeType
...
svn-id: r23627
2006-07-30 10:48:44 +00:00
Johannes Schickel
f464830a17
Documenting Common::File a bit.
...
svn-id: r23588
2006-07-24 12:10:32 +00:00
Max Horn
4fcdbb9349
String class usage cleanup
...
svn-id: r23582
2006-07-23 15:08:48 +00:00
Max Horn
2859b64702
Fix struct packing issues (macros are not resolve in #pragma params, at least for GCC)
...
svn-id: r23569
2006-07-22 17:28:48 +00:00
Johannes Schickel
1ffd496043
Added some warnings if md5_file is used on an illegal FilesystemNode.
...
svn-id: r23568
2006-07-22 17:06:14 +00:00
Johannes Schickel
63aec29edb
Added isValid to FilesystemNode and AbstractFilesystemNode. See my mail to -devel for more information.
...
svn-id: r23567
2006-07-22 17:01:50 +00:00
Max Horn
c59e7ece0a
Part of the FreeMiNT patch
...
svn-id: r23566
2006-07-22 17:00:36 +00:00
Johannes Schickel
8116b6aab3
Using FilesystemNode::name instead of FilesystemNode::displayName in the fileclass too, then again this doesn't *have* to work. (check FilesystemNode documentation)
...
svn-id: r23562
2006-07-22 15:21:40 +00:00
Johannes Schickel
3f81726437
Return false for directories on md5_file with a FSNode as param.
...
svn-id: r23560
2006-07-22 15:05:59 +00:00
Johannes Schickel
4ae5cef491
- let md5_file accept a FilesystemNode too
...
- changes some engine detectors to use it
svn-id: r23559
2006-07-22 14:59:44 +00:00
Max Horn
6ed00cd055
Added FilesystemNode::name method
...
svn-id: r23553
2006-07-22 14:14:16 +00:00
Max Horn
f59cf1fcdc
Removing GCC_PACK, we fully rely on START_PACK_STRUCTS / END_PACK_STRUCTS now (hiya eriktorbjorn, this one is for you *ggg*)
...
svn-id: r23547
2006-07-21 21:25:17 +00:00
Torbjörn Andersson
6358547a43
More whitespace changes.
...
svn-id: r23496
2006-07-14 13:33:58 +00:00
Travis Howell
175c951e8e
Add cyx's patch for #1497725 - GUI: trying to enter empty CD drive
...
svn-id: r23475
2006-07-10 11:12:11 +00:00
Travis Howell
53aa4f054a
Change default config file location to 'Application Data\ScummVM' directory of the user's profile, when using Windows NT4/2000/XP/Vista
...
svn-id: r23465
2006-07-10 01:25:52 +00:00
Max Horn
f35f4a4d1c
Use START_PACK_STRUCTS / END_PACK_STRUCTS when available, instead of checking for GCC / not GCC
...
svn-id: r23458
2006-07-09 13:01:15 +00:00
Max Horn
7df2f26b34
Changed the default value of START_PACK_STRUCTS / END_PACK_STRUCTS; cleanup
...
svn-id: r23456
2006-07-09 12:45:50 +00:00
Max Horn
bea72e9514
Patch #1519399 : DS Backend
...
svn-id: r23452
2006-07-09 11:47:17 +00:00
Max Horn
eaff9344a4
Added OSystem::setFocusRectangle (first part of Nintendo DS patch)
...
svn-id: r23449
2006-07-09 09:40:44 +00:00
Torbjörn Andersson
07ffde9270
Fixed typo in comment.
...
svn-id: r23435
2006-07-08 20:20:07 +00:00
Joost Peters
240acc427a
make grabRawScreen() pure virtual, since it's now _required_ to be implemented by backends for certain SCUMM games to function properly.
...
This happened when ScummEngine::moveScreen() was changed in revision 23215 and causes Indy4 to fail the assert(_system->grabRawScreen(...)) on PSP (and Symbian?), where this function was not implemented.
svn-id: r23383
2006-07-07 09:00:18 +00:00
Max Horn
87d3e4fb0e
Moved savefile.cpp to backends, to work around link error
...
svn-id: r23361
2006-06-30 22:06:45 +00:00
Max Horn
d67f9623cc
Typo, and stress that getSavePath() is not to be used for storing savegames via Common::File
...
svn-id: r23286
2006-06-24 10:46:47 +00:00
Max Horn
6a588f8399
Moved savefile code to new 'saves' backend module (work in progress)
...
svn-id: r23282
2006-06-24 10:08:43 +00:00
Max Horn
c9fd9c4878
Added 'timer' backend module, based on the existing TimerManager code (work in progress)
...
svn-id: r23279
2006-06-24 09:53:45 +00:00
Max Horn
75628fe9d7
Renamed class Timer to TimerManager (the old name was somewhat incorrect/confusing)
...
svn-id: r23278
2006-06-24 09:34:49 +00:00
Max Horn
9a955180a4
* Renamed config.mak to config.mk
...
* Renamed common.rules to rules.mk
* Removed explicit declaration of MODULE_DIRS in various spots (instead we let rules.mk compute it)
svn-id: r23275
2006-06-24 08:48:11 +00:00
Max Horn
d210b19aec
Move backends/fs/fs.h and .cpp to common/fs/fs.h and .cpp
...
Rationale: backend implementations belong to backends/, but portable APIs meant to be used by high level code is for common / sound / graphics / ... (compare also with backends/midi vs. sound/mididrv.h)
svn-id: r23274
2006-06-24 08:07:48 +00:00
Lars Persson
7675b3546d
Remove _name.clear(); from Close since same File instance is re-opened by Symbian using that filename.
...
svn-id: r23152
2006-06-16 22:20:07 +00:00
Oystein Eftevaag
0aa06392f8
Applied the patch included in bug rep [ 1503716 ] Leak in File::Open (on OS X) and unzOpen (on all)
...
svn-id: r23019
2006-06-11 02:23:17 +00:00
Kostas Nakos
f29a09a35f
fixes ps2 stuff I broke
...
svn-id: r23013
2006-06-10 17:36:57 +00:00
Kostas Nakos
92ad46734c
added CE port definitions section
...
svn-id: r23008
2006-06-10 11:26:47 +00:00
Eugene Sandulenko
5b1aaf4ea0
Patch #1503718 : "Strange results from Common::computeCapacity"
...
svn-id: r22998
2006-06-10 07:56:09 +00:00
Robert Göffringmann
cd24b1d91c
fixed ps2 types.
...
svn-id: r22985
2006-06-08 08:18:55 +00:00
Robert Göffringmann
7e65543482
cleanup, made osystem for .ini on different devices.
...
svn-id: r22984
2006-06-08 06:53:00 +00:00
Max Horn
6d0a06463a
Lazily allocate _refCount in class String
...
svn-id: r22935
2006-06-05 17:36:08 +00:00
Torbjörn Andersson
2e071b59d6
When ensureCapacity() does not have an old string to copy, make sure the newly
...
allocated one is terminated. Hopefully this will keep the SCUMM save dialog
from randomly adding garbage to my savegame names.
svn-id: r22908
2006-06-04 09:14:07 +00:00
Max Horn
cbe66f3360
Allocate and grow Common::String objects in multiples of 32, and leave at least 16 spare bytes at the end, in case the string grows a little bit.
...
svn-id: r22896
2006-06-03 16:33:42 +00:00
Marcus Comstedt
2f935da61f
Don't try to save settings on the Dreamcast, CD-ROM:s are read only...
...
svn-id: r22890
2006-06-03 15:34:48 +00:00
Max Horn
5d1e4d7f09
Removed unnecessary typedef
...
svn-id: r22875
2006-06-03 13:56:50 +00:00
Max Horn
0e174a8adc
Really remove HashMap::find(char *)
...
svn-id: r22874
2006-06-03 13:39:39 +00:00
Max Horn
5a1eaabceb
Replaced the bogus find(const String &key) method with the proper find(const Key &key) one. Also removed the bogus find(const char *key) (which not only doesn't work correctly for non-string keys, but also usually will be *less* efficient)
...
svn-id: r22871
2006-06-03 13:32:53 +00:00
Eugene Sandulenko
061905c524
Plug memory leak
...
svn-id: r22842
2006-06-02 17:57:45 +00:00
Eugene Sandulenko
180f6c87ad
Remove slipped in debug output.
...
svn-id: r22840
2006-06-02 16:07:40 +00:00
Eugene Sandulenko
3348c32de0
Added possibility to use (char *) as ashMap keys. For some reason it does not
...
work as expected. When I try to switch _aliasmap in eval.h to it, I get
crash in String constructor on dereferencing.
svn-id: r22838
2006-06-02 15:41:48 +00:00
Travis Howell
179f097202
Fix mingw compile
...
svn-id: r22835
2006-06-02 13:34:41 +00:00
Eugene Sandulenko
8c7abdf024
Allocate minimum 16 bytes on String(str) call. Reduces 2.500 malloc() calls
...
on startup
svn-id: r22834
2006-06-02 13:00:27 +00:00
Willem Jan Palenstijn
20c4be47a3
add functions for reverse iteration of Common::List
...
svn-id: r22665
2006-05-26 17:18:23 +00:00
Andrew Kurushin
36957a2c50
fix VC & SDL 1.2.10 compilation error
...
svn-id: r22585
2006-05-23 16:49:46 +00:00
Max Horn
4d1f4ffb50
Make the copy constructor / assignment operator of class File private to prevent accidental copying of File objects
...
svn-id: r22549
2006-05-20 15:10:04 +00:00
Eugene Sandulenko
14ec3f45fa
- Heavily modified patch #1214784 : "Disable overlay scaling"
...
- Eriktorbjorn's patch from same tracker item for scaling sword1/2 cutscenes
is applied as is. It lacks resolution switch on-the-fly.
- GUI widgets are repositioned on the fly and use most space, even aspect
ratio corrected screen is used without scaling
- Heavy tesing is required, but works for me in all cases except for bug
#1483272 : "GUI: SCUMM pause dialog breaks upon scaler switch" which needs more
work.
- I probavly broke some backend or two
svn-id: r22505
2006-05-17 23:52:45 +00:00
Max Horn
4743820e30
Fix for bug #1483213
...
svn-id: r22461
2006-05-13 18:14:23 +00:00
Max Horn
ae50315fa0
Added a default implementation of the OSystem CD API (which simply does nothing)
...
svn-id: r22370
2006-05-06 18:10:38 +00:00
Max Horn
5d5c02d66c
Moved GameDetector::setTarget & findGame to the new namespace Base; moved their declaration to base/game.h, their implementation to base/main.cpp (both until we can come up with a better location). Also moved detectMain into main.cpp, where it now is a local static function
...
svn-id: r22346
2006-05-04 23:24:09 +00:00
Max Horn
05f6adbbd9
Removed FilesystemNode::isValid (leaving it up to the porters to decide whether to remove their isValid code or not)
...
svn-id: r22317
2006-05-03 20:49:33 +00:00
Max Horn
d016c353c5
Changed FilesystemNode::listDir to return a bool indicating its success (or failure)
...
svn-id: r22315
2006-05-03 20:43:26 +00:00
Travis Howell
01c92cf6f5
Add support for reading/writing config files through saveGameManager and use for config files in HE games
...
svn-id: r22273
2006-05-02 03:23:03 +00:00
Max Horn
7e3df42510
Add a variant of File::addDefaultDirectory(Recursive) which takes a FilesystemNode instead of a string object
...
svn-id: r22265
2006-05-01 21:06:34 +00:00
Max Horn
13e4fc74e0
Add a File::open variant that takes a FilesystemNode as parameter
...
svn-id: r22251
2006-04-30 23:08:37 +00:00
Max Horn
fd9e73d1f0
Avoid 'unused variable' warning when using DISABLE_MD5
...
svn-id: r22250
2006-04-30 22:58:44 +00:00
Travis Howell
e163be131c
Revert kListAllNoRoot addition to listdir(), the uninitialized _isPseudoRoot in windows filesys backend was real cause of problem.
...
svn-id: r22194
2006-04-27 23:14:54 +00:00
Max Horn
a4338aeb19
Use File::size to determine the size of a file, instead of doing a seek(0, SEEK_END)
...
svn-id: r22184
2006-04-26 14:35:53 +00:00
Max Horn
cd528083f9
Removed 'directory' parameter of File::open
...
svn-id: r22183
2006-04-26 14:05:34 +00:00
Torbjörn Andersson
c4c09fd8f1
Use the joined filename for savegames, otherwise saves will be stored in the
...
current working directory instead of the save directory.
svn-id: r22181
2006-04-26 13:12:33 +00:00
Max Horn
0aaa04899c
Changed InSaveFile (part of the save file system) to inherit from SeekableReadStream, meaning that savegames opened for reading now are seekable (DC, PS2, Palm ports will have to be updated accordingly)
...
svn-id: r22180
2006-04-26 11:15:13 +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
8bb9ae92ad
Yet another revision of File::exists. I now believe the function really is 'wrong' right now (it has to fulfill too many roles right now). Need to correctly fix this later
...
svn-id: r22171
2006-04-26 08:29:32 +00:00
Max Horn
f42bb14ea3
Commited *correct* File::exists reimplementation (compared to my incomplete previous commit. Aargh)
...
svn-id: r22170
2006-04-26 08:13:25 +00:00
Max Horn
d5224d87bb
Properly re-implemented File::exists to FilesystemNode (this should fix bug #1476651 , at least partially)
...
svn-id: r22169
2006-04-26 08:05:40 +00:00
Max Horn
62dce81acc
HashMap::size does not modify the state of the hashmap, so it can be declared const (allowing it to be used on const hashmaps, too)
...
svn-id: r22156
2006-04-25 19:20:57 +00:00
Max Horn
d11f5724f9
Small tweak to allow turning off MD5 computation for debugging
...
svn-id: r22109
2006-04-23 17:18:54 +00:00
Max Horn
15ecef5b39
Remove superfluous exclamation mark
...
svn-id: r22108
2006-04-23 17:02:39 +00:00
Max Horn
f26b55c7a3
Modified some error calls to explicitly name the function they occured in (this helps debugging)
...
svn-id: r22093
2006-04-23 11:15:43 +00:00
Eugene Sandulenko
7b1e93b596
Implement CLIP() routine used to put arbitrary value in specified range.
...
svn-id: r22079
2006-04-22 02:49:27 +00:00
Lars Persson
5b776e3e28
Return of void value is not valid for all platforms. Changed to call function and then plain return;
...
svn-id: r22075
2006-04-21 20:59:05 +00:00
Max Horn
bbac9e43ee
Actually, 3-4 alpha bits are fine, too :)
...
svn-id: r21965
2006-04-17 09:45:18 +00:00
Max Horn
4683b427ee
Clarify that kFeatureOverlaySupportsAlpha should only be set if at least a few bits of alpha are present
...
svn-id: r21963
2006-04-17 09:31:13 +00:00
Max Horn
eb60d6abfe
Document how the alpha color component is to be interpreted
...
svn-id: r21962
2006-04-17 09:23:51 +00:00
Max Horn
74edd90aba
Fix for bug #1471383 : Instead of overloading ConfigManager::set, we now have new setInt and setBool methods (matching getInt/getBool), which avoids strange quirks & bugs caused by (char *) being implicitly cast to int (ouch)
...
svn-id: r21951
2006-04-16 19:23:14 +00:00
Max Horn
555a568e59
Fixed some breakage in the 'Add Game' code I recently introduced; added a FIXME comment regarding the 'description' config file key
...
svn-id: r21943
2006-04-16 13:58:11 +00:00
Max Horn
206fdf0528
Fixed broken svn:keywords values
...
svn-id: r21939
2006-04-16 13:01:41 +00:00
Max Horn
ba1b25305e
Removed the directory parameter from md5_file
...
svn-id: r21937
2006-04-16 12:50:39 +00:00
Max Horn
1f07432927
Fixed evil longstanding bug in String::toLowercase & toUppercase: Before modifying the string content, make sure we do not share it with any other string). This should help (hopefully fix) bug #1470892
...
svn-id: r21931
2006-04-16 09:12:27 +00:00
Max Horn
68450b31e3
cleanup
...
svn-id: r21919
2006-04-15 21:22:33 +00:00
Max Horn
68cb7f52c8
- Renamed ConfigManager::getActiveDomain to getActiveDomainName, and added a new getActiveDomain method that returns a pointer to the actual active *domain*
...
- Added Engine::_targetName whose value is computed from the name of the active domain
- Removed GameDetector::_targetName, instead code now uses either Engine::_targetName or the name of the active domain
- This in turn allowed for removing usage of GameDetector in many places
svn-id: r21916
2006-04-15 20:36:41 +00:00
Max Horn
ebea155b8e
Always use base 0 in strtol when parsing integer command line options / config file entries (this makes it possible to optionally use hex values)
...
svn-id: r21911
2006-04-15 13:58:01 +00:00
Max Horn
aa4214f940
Properly init _activeDomain to 0
...
svn-id: r21908
2006-04-15 13:34:02 +00:00
Max Horn
3628629007
- Replaced ConfigManager::_globalDomains by _appDomain (we don't support multiple global domains anymore)
...
- Restructured parts of the ConfigManager to be more consistent and a bit easier to understand
- Introduced ConfigManager::getDomain, potentially useful for code that needs to edit a specific domain (like the option dialogs)
- Allow passing an empty string to ConfigManager::setActiveDomain(), to reset the active domain
- Discard all transient config options (i.e. mostly command line settings) when entering the launcher, and after an engine exits
- Introduced various hidden easter bugs. Happy easter, and have fun searching!
svn-id: r21906
2006-04-15 13:12:03 +00:00
Max Horn
eb1459334f
Tiny optimization for empty strings, which avoids allocating a single byte just to store an empty string (we pass around empty strings in lots of places)
...
svn-id: r21892
2006-04-14 22:29:51 +00:00
Max Horn
1470dadb1d
Changed File::open to take a Common::String as file name parameter
...
svn-id: r21867
2006-04-14 01:48:51 +00:00
Max Horn
8dcf6ed006
Fix crash in fopenNoCase triggered by filenames/paths that exceeded ~ 512 bytes (see bug #1109687 )
...
svn-id: r21858
2006-04-14 00:36:54 +00:00
Max Horn
2ca3831777
Fixing the workaround for bug #1458388 (should have added trailing dot, but didn't)
...
svn-id: r21822
2006-04-12 08:10:49 +00:00
Max Horn
2044ee1c0d
Don't hardcode specific values for our language enums, as nothing should depend on them -- any code that is broken by this change was wrong to start with and must be fixed accordingly
...
svn-id: r21812
2006-04-11 22:31:47 +00:00
Max Horn
0c75d7d1c0
Removed the PalmOS specific hack in file.cpp in favor for code that should work everywhere (and hopefully will help the GP32 port, too).
...
svn-id: r21811
2006-04-11 22:29:51 +00:00
Chris Apers
37ecf6bc0a
Bad hack to make the file class work agaain with PalmOS ARM version - read the comment for more details
...
svn-id: r21806
2006-04-11 18:25:04 +00:00
Chris Apers
a8e772fa54
Fixed line ending
...
svn-id: r21804
2006-04-11 18:16:53 +00:00
Chris Apers
89ed8e8891
Not needed
...
svn-id: r21803
2006-04-11 18:16:12 +00:00
Chris Apers
f0d03fb52f
PalmOS too
...
svn-id: r21802
2006-04-11 18:14:26 +00:00
Eugene Sandulenko
c09fef73c0
Add comments explaining what does EN_ANY mean
...
svn-id: r21703
2006-04-08 23:20:15 +00:00
Eugene Sandulenko
5a2ad04a9e
Introduced language EN_ANY used for general English game entries. EN_USA and
...
EN_GRB should be used for games which have both variants. Currently it is
MM NES and BASS. All other are switched to EN_ANY.
svn-id: r21702
2006-04-08 23:12:56 +00:00
Max Horn
453e69b6c2
Change check for MIN/MAX macros: Always undef those so that our templates are used (which are safer, consider MIN(a++, b++))
...
svn-id: r21692
2006-04-08 12:41:02 +00:00
Max Horn
4a8c9c323d
AmigaOS4 changes from tracker #1416370
...
svn-id: r21691
2006-04-08 12:39:27 +00:00
Max Horn
dc77d02c7e
Removed common/map.h with the Common::Map template class (it was a very bad implementation, and our HashMap is simply better).
...
svn-id: r21688
2006-04-08 11:38:41 +00:00
Won Star
7cd565f884
Fix compile with GP32 by overriding datatypes.
...
svn-id: r21664
2006-04-07 10:40:08 +00:00
Lars Persson
c409c60096
Added comments to Symbians data types.
...
svn-id: r21631
2006-04-05 14:10:13 +00:00
Lars Persson
25e19148bd
Updated datatypes for Symbian OS
...
svn-id: r21628
2006-04-05 07:09:47 +00:00
Max Horn
2a528657ad
Added SCUMMVM_DONT_DEFINE_TYPES so that (a) porters can still override our typedefs if they must, and (b) my image of evil-scummsys.h-changer is strengthened
...
svn-id: r21624
2006-04-05 00:54:10 +00:00
Max Horn
d7dd5ad9d9
Re-fix sort by renaming min to minElem (avoid conflicts with certain system headers that #define min)
...
svn-id: r21618
2006-04-04 23:57:56 +00:00
Max Horn
bec09d3094
Turned FSList::sort into a generic function which can be applied to anything which implements comparable iterators (like Array, List, or plain C arrays)
...
svn-id: r21617
2006-04-04 23:55:47 +00:00
Eugene Sandulenko
8fa9bd6728
Removed extra exclamation marks in warning() calls as well.
...
svn-id: r21608
2006-04-04 22:21:10 +00:00
Lars Persson
595a48a87e
Small updates to intiate variable and member visibility.
...
svn-id: r21604
2006-04-04 21:32:19 +00:00
Max Horn
935ed2dadb
Added const qualifier
...
svn-id: r21603
2006-04-04 21:18:58 +00:00
Max Horn
db8715fffd
We don't need wchar_t -> removing this to improve portability
...
svn-id: r21595
2006-04-04 20:13:59 +00:00
Marcus Comstedt
7242dc169c
Remove SCUMMVM_USE_LONG_INT from DC port.
...
svn-id: r21594
2006-04-04 19:05:50 +00:00
Max Horn
9217472f0e
With this change, backends are now responsible for instantiating their OSystem class before calling scummvm_main (Note: PalmOS and Symbian are not yet converted, and won't work currently)
...
svn-id: r21557
2006-04-02 14:16:31 +00:00
Max Horn
32de344111
Move gDebugLevel to common/util.cpp (where most other debug() related stuff already is)
...
svn-id: r21551
2006-04-02 09:31:06 +00:00
Max Horn
8a8bdcd1f8
Moved all debug functions to from main.cpp to util.cpp
...
svn-id: r21545
2006-04-02 00:56:53 +00:00
Max Horn
587431f8e8
Fully and officially renamed our main function to scummvm_main, thus making
...
various backend specific hacks unnecessary. As a consequence, it is now the
responsibility of the backend to define main. Hence I adapted the SDL backend
accordingly.
svn-id: r21542
2006-04-02 00:08:22 +00:00
Max Horn
8b1c432bac
Switch ConfigManager to use HashMap (seems to work fine over here, but an older version killed my scummvm.ini, so use at your own risk (not that you really have a choice. I just like being evil *g*))
...
svn-id: r21539
2006-04-01 22:31:45 +00:00
Max Horn
9ed2d26db5
Simplified the File::addDefaultDirectory(Recursive) code; avoid scanning directory multiple times
...
svn-id: r21527
2006-04-01 17:36:43 +00:00
Eugene Sandulenko
8272591c8d
Add size() methods to Map and HashMap classes
...
svn-id: r21520
2006-03-31 23:49:08 +00:00
Max Horn
e947bd5e27
Updated ConfigFile/ConfigManager classes, that work with the updated Map class, and optionally support HashMap (disabled for now)
...
svn-id: r21519
2006-03-31 23:10:24 +00:00
Max Horn
05b0ed007e
Disable DEBUG_HASH_COLLISIONS again (accidentally got enabled in my previous commit)
...
svn-id: r21518
2006-03-31 22:38:27 +00:00
Max Horn
c50bfd9d34
Modify HashMap to allow client code to override the equality/hash functionality via functors that are specified as template paramaters (emulating the hash_map class which many STL implementations provide) -> this is necessary to allow e.g. HashMaps that use case insensitive strings as keys
...
svn-id: r21517
2006-03-31 22:19:39 +00:00
Max Horn
661128b2b4
Modified our Map class to use a 'Less' function instead of a 'strcmp'-like comparator functor, to match the STL map template
...
svn-id: r21516
2006-03-31 22:17:06 +00:00
Max Horn
088b0afad5
Modified the List postfix ++/-- operators to simply invoke their prefix counterparts; also removed Symbian/Palm specific hack
...
svn-id: r21515
2006-03-31 22:15:42 +00:00
Max Horn
a23fba7a42
Avoid using Map::merge
...
svn-id: r21511
2006-03-31 07:30:43 +00:00
Max Horn
e0b3e777cf
Added some functor objects (for comparision and hash computations), similar to those present in the STL
...
svn-id: r21510
2006-03-31 07:22:49 +00:00
Max Horn
8cdee5a931
Do not #include endian.h in scummsys.h (cuts down deps on endian.h from ~400 to ~250). Many greetings to eriktorbjorn, and have fun recompiling.
...
svn-id: r21500
2006-03-29 15:59:37 +00:00
Max Horn
76cfaca23d
- Added some explanatory comments (everybody feel free to extend them)
...
- Unified the various typedefs
- Added a couple FIXME comments (which porters may want to resolve)
- Some cleanup
svn-id: r21498
2006-03-29 12:47:35 +00:00
Max Horn
70040aed47
cleanup
...
svn-id: r21496
2006-03-29 12:09:15 +00:00
Max Horn
f38d89f327
Set correct load factor for hashmap (just wanted to check if anybody is paying attention to those commit messages *cough* ;-)
...
svn-id: r21482
2006-03-28 16:19:18 +00:00
Max Horn
62da4eec26
Get rid of Map::addKey
...
svn-id: r21480
2006-03-28 15:15:45 +00:00
Max Horn
37c79be740
- Renamed Map::remove to Map::erase (matching the STL and HashMap)
...
- Added Map::find() (see also HashMap), and made the ConfigManager use it
svn-id: r21477
2006-03-28 12:35:50 +00:00
Max Horn
41991f88a9
Added iterator support to hashmap, as well as erase & find methods (all currently needs more testing and may be buggy)
...
svn-id: r21476
2006-03-28 12:34:34 +00:00
Max Horn
92437ce549
Reduce the differences between Map and HashMap some more (in the end, we should be able to easily switch between the two, e.g. in the ConfigManager class)
...
svn-id: r21475
2006-03-28 11:21:13 +00:00
Max Horn
dae92b83f2
Increase the load factor for our hashmaps from 50% to 75%, to be slightly nicer regarding memory consumption
...
svn-id: r21474
2006-03-28 10:54:02 +00:00
Max Horn
f4339ff6c4
- Renamed class AssocArray to HashMap to match our existing class Map (note also
...
that many STL implementations have a class hash_map next to class map, too)
- Changed some static File class member vars to be normal static variables, in
yet another attempt to reduce header dependencies (in this case on hashmap.h)
svn-id: r21473
2006-03-28 10:05:25 +00:00
Max Horn
9f93e5bb81
Renamed various container isEmpty() methods to empty() to match STL conventions
...
svn-id: r21472
2006-03-28 09:42:54 +00:00
Eugene Sandulenko
dd505ff6ae
Fixing bug #1458388 : "SIMON1: Game Detection fails".
...
Sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot)
svn-id: r21455
2006-03-25 21:17:38 +00:00
Eugene Sandulenko
e373c9b7b5
- Revert my last change with moving addDefaultDirectory() from TheneNew.cpp
...
- Removed locking of further directory adds because it did not work for themes.
svn-id: r21452
2006-03-25 19:30:10 +00:00
Travis Howell
a98aea6efd
Add kListAllNoRoot type to listDir() to handle recent file class changes, on file system backends which use _isPseudoRoot
...
svn-id: r21449
2006-03-25 10:39:05 +00:00
Eugene Sandulenko
22042bc637
- Implemented case insensitive file reading. Left old system as a fallback
...
in case some engine writer decide to do something unwise
- Removed used of ConfMan.getKey("path") in file-related cases, because
now File class handles that
- Fixed bug in ScummEngine_v80he::o80_getFileSize() where path delimiters
weren't translated
svn-id: r21443
2006-03-25 04:17:17 +00:00
Max Horn
1c061dea4b
Changed the DEBUG_HASH_COLLISIONS feature: Now measures the ratio between lookup collisions and total number of lookups
...
svn-id: r21432
2006-03-24 17:13:24 +00:00
Max Horn
9dc07c11cd
- replaced the hash table size heuristic with a table of hard coded table sizes
...
(taken from the GNU ISO C++ Library), which are all prime
- replaced the string hash function by one that works slightly better & faster
- changed various types to unsigned
- added code to help debug the number of hash collisions (off by default)
svn-id: r21431
2006-03-24 16:53:32 +00:00
Max Horn
7307c4cb3d
- moved type aa_ref_t into AssocArray, improving code readability a bit
...
- added new "operator[] const" method, useful when accessing const instances
- removed the default value (if you access an entry without first checking that
it is actually there, it's your own fault)
- replaced 'index' with 'key' which seems more logical and avoids troubles with
certain systems that #define index in their system headers
svn-id: r21430
2006-03-24 15:39:07 +00:00
Max Horn
1f9566129c
Some more cleanup in AssocArray
...
svn-id: r21429
2006-03-24 15:22:17 +00:00
Max Horn
ae0cf6e88d
Cleanup for the AssocArray template: int->book, put common code into a new lookup() method, and some other tweaks
...
svn-id: r21428
2006-03-24 14:30:33 +00:00
Max Horn
1805f42eea
Oops, accidentally commited the wrong patch (had these lines commented out for testing)
...
svn-id: r21427
2006-03-24 14:17:47 +00:00
Max Horn
58b14bab3c
Using NULL as a default value is not working in general (e.g. for Common::String) -- force explicit definition of a default value
...
svn-id: r21424
2006-03-24 14:14:29 +00:00
Eugene Sandulenko
5d1b4d8f78
Implementation of AssociativeArray. Transferred GUI to it. Now it is much
...
faster.
svn-id: r21419
2006-03-23 22:59:38 +00:00