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
Oystein Eftevaag
dabfcbf10c
Moving the MacOS bundle file checking to another function, it was getting called redundantly.
...
svn-id: r21309
2006-03-15 09:41:22 +00:00
Oystein Eftevaag
58eed3830b
* 'make bundle' now copies the default theme files into the bundle.
...
* Common::File will now look inside the application bundle on MacOS X for a file if
it can't find it anywhere else (so it'll find default-theme.ini and .zip)
* Cleaned up some #ifs.
svn-id: r21308
2006-03-15 07:43:44 +00:00
Travis Howell
ff676b0b54
Correct GCC_PACK define for non-GCC
...
svn-id: r21160
2006-03-09 09:51:42 +00:00
Travis Howell
47f66f80b9
Revert GCC_PACK removal, which broke compile
...
svn-id: r21159
2006-03-09 09:40:07 +00:00
Travis Howell
f848dd1d99
Revert GCC_PACK removal, which broke compile
...
svn-id: r21158
2006-03-09 09:36:09 +00:00
Max Horn
c59ca20ce6
Check format string in calls of debug/error (adapted from patch #1445422 )
...
svn-id: r21139
2006-03-08 10:00:12 +00:00
Eugene Sandulenko
1eff73cb41
GUI widget positions:
...
o Add 'true' and 'false' constants
o add .visible widget property
o allow dots to be part of section and key names in configs
svn-id: r21123
2006-03-07 13:41:36 +00:00
Eugene Sandulenko
4c16b73bd1
o Properly react to end-of-file is loadFromStream()
...
o Add types SectionList and SectionKeyList
o Implement getKeys() method
svn-id: r21114
2006-03-07 02:23:37 +00:00
Paweł Kołodziejski
95116f2098
define int types for msvc to allow compile mpeg2 library. msvc does not fully conform C99
...
svn-id: r21073
2006-03-04 15:26:26 +00:00
Max Horn
1c93f7bcea
Removed the obsolete MKID macro; added some doxygen comments, in particular for MKID_BE
...
svn-id: r20873
2006-02-25 11:45:56 +00:00
Max Horn
6931478e91
Removed the (useless and confusing) PROTO_MKID_BE macro
...
svn-id: r20860
2006-02-25 01:24:10 +00:00
Max Horn
7335d348ba
Moved common/scaler* to graphics/
...
svn-id: r20797
2006-02-20 20:29:02 +00:00
Max Horn
188cdf937d
Clarified that OSystem::setWindowCaption currently only supports ASCII captions
...
svn-id: r20780
2006-02-20 13:09:39 +00:00
Travis Howell
54babe81ce
Fix mistake in last commit
...
svn-id: r20716
2006-02-16 05:33:27 +00:00