Commit Graph

1399 Commits

Author SHA1 Message Date
Johannes Schickel
2ed777d641 Fixes Common::File::exists. Please see the added FIXME comment about the real problem.
svn-id: r28952
2007-09-18 23:07:27 +00:00
Max Horn
ab8997f64d Fix linker issues when doing a plugin build, and (hopefully) also on Windows
svn-id: r28950
2007-09-18 21:34:57 +00:00
Max Horn
162460d18a Must include stdafx.h before scummsys.h
svn-id: r28949
2007-09-18 21:23:22 +00:00
Max Horn
90399fbf9c Fix some warnings
svn-id: r28947
2007-09-18 20:46:22 +00:00
Max Horn
3abc11611e Code formatting fixes
svn-id: r28945
2007-09-18 20:16:33 +00:00
Max Horn
c3d3aebe87 Patch #1768757: Merge fsnode-gsoc into trunk (MAJOR change, will break compilation on some ports)
svn-id: r28944
2007-09-18 20:02:04 +00:00
Johannes Schickel
fd6ca3b7ac - added PC-98 platform entry
- added Kyrandia 1 PC-98 detection entries

svn-id: r28907
2007-09-15 14:53:21 +00:00
Eugene Sandulenko
fece7cc1bb Make debug level 11 magic. It turns on all special debug level messages.
svn-id: r28858
2007-09-05 20:30:27 +00:00
Chris Apers
500481c4ec Cleanup: remove obsolete code (PalmOS 68K version not supported anymore)
svn-id: r28803
2007-09-01 19:13:04 +00:00
David Corrales
1dc13a641d Merged some of the changes from the trunk patch back in to the GSoC fsnode branch.
svn-id: r28649
2007-08-18 05:24:18 +00:00
Eugene Sandulenko
7dcb8503a3 Add possibility to serve engines with complex Engine class instantiation
svn-id: r28582
2007-08-13 08:58:04 +00:00
Max Horn
a03119c5f5 Changed OSystem (A)RGBToColor and colorTo(A)RGB methods to use ColorMasks templates; clarified some OSystem comments
svn-id: r28517
2007-08-11 08:05:03 +00:00
David Corrales
6856535010 Merged fsnode with trunk: r27971:28460
svn-id: r28462
2007-08-05 19:34:20 +00:00
David Corrales
1400d28bfb Initial commit of the new BaseFile implementation. It provides a common ground for file objects across platforms and divides responsibilities between the Common::File class and a base file implementation.
Also rearranged the factories into a new directory for clarity.

Note 1: The posix-file.h and cpp files are for testing only. Only the ds, ps2 and symbian architecture will use special BaseFile based objects.

Note 2: The current code does not yet make use of this new structure, since the Common::File remains intact.

svn-id: r28395
2007-08-01 22:07:50 +00:00
Eugene Sandulenko
6505686c5a Renamed some typedefs to avoid clashes with sky engine
svn-id: r28321
2007-07-30 10:18:25 +00:00
David Corrales
9752c75f40 Add a removeSavefile() to the default savefile manager based on the new Common::File::remove().
svn-id: r28282
2007-07-29 01:36:59 +00:00
Torbjörn Andersson
c2516db9ac Early in the morning, strrev() looks like a more difficult problem than it
really is. It's actually quite simple. In fact, the only magical thing about
Bob's version was the way it swapped variables without using any temporary
variable. Rewrote the function to use our SWAP() instead, since that actually
makes it readable. Moved it to util.cpp (outside the Common namespace, for
consistency with scumm_stricmp()) since Kirben knew of other places where it
could be used.

svn-id: r28231
2007-07-27 05:15:24 +00:00
David Corrales
f42108e633 Added a remove() function to the Common::File class. Also changed the exists() function to account for new capabilities in the FSNode layer.
svn-id: r28150
2007-07-20 19:42:38 +00:00
David Corrales
21f352b2df Added error codes to the SaveFileManager via the SFMError enum. Also, solved TODO's in the default-saves implementation.
svn-id: r28140
2007-07-18 20:51:26 +00:00
David Corrales
720c974faf Changed SaveFileManager::listSavegames() function to be engine agnostic. It now returns a list will the full paths of existing files that match a given regex.
Additionally, modified the 5 engines which use the default manager (Agos, Queen, Saga, Scumm and Touche) to parse the filename list and mark the available saves bool array correctly.

svn-id: r28046
2007-07-12 17:58:15 +00:00
David Corrales
9bfe5d5354 Merged the FSNode branch with trunk r27681:27969
svn-id: r27970
2007-07-08 16:58:54 +00:00
Max Horn
41c68ac3e4 Removed various obsolete methods from OSystem (screenToOverlayX/Y, overlayToScreenX/Y)
svn-id: r27961
2007-07-08 12:02:38 +00:00
Max Horn
9f6922ddd2 Patch #1595026: engine init/shutdown OSystem methods
svn-id: r27837
2007-07-01 20:28:57 +00:00
Max Horn
e1bcd70436 Re-added __attribute__(packed)
svn-id: r27830
2007-07-01 18:18:43 +00:00
Max Horn
f058edf860 Switched Paula (Amiga MOD) code to use fixed point math instead of doubles (caveat: this only works for samples < 32k right now; if this ever turns out to be a problem, I can fix it, though)
svn-id: r27767
2007-06-28 22:21:32 +00:00
Max Horn
d35861fc4a Changed GOB to use common/frac.h
svn-id: r27763
2007-06-28 20:09:58 +00:00
Max Horn
6dfa44dbd5 Moved some fixed point code to its own header file; simplified the LinearRateConverter code a bit; corrected some comments; split makeRateConverter into two funcs (one of them being a template func), for easier maintenance
svn-id: r27760
2007-06-28 19:35:48 +00:00
David Corrales
7091babe4d Missed some files in the branch/trunk merge.
svn-id: r27682
2007-06-23 19:04:15 +00:00
David Corrales
cacd7a28fd Merged the FSNode branch with trunk r27031:27680
svn-id: r27681
2007-06-23 18:51:33 +00:00
Max Horn
2bbe67afdf Added more flexible KeyState constructor; updated comment in gui/Key.h
svn-id: r27654
2007-06-23 10:06:39 +00:00
Max Horn
d9718b0684 Do not use SCUMMVM_USE_LONG_INT on _MSC_VER anymore (if it *is* needed after all, speak up -- that FIXME has been in there for far too long, however)
svn-id: r27641
2007-06-22 23:27:32 +00:00
Max Horn
e7a58d9369 Moved keyboard stuff to a separate header file
svn-id: r27640
2007-06-22 23:20:50 +00:00
Max Horn
c690cad67f Added constructor & reset() method to Common::KeyState
svn-id: r27634
2007-06-22 22:18:15 +00:00
Max Horn
753eee6d0c Promoted the struct inside Common::Event which captures the keystate to a full-blown independent struct named KeyState (makes it easier for engines to capture the full keystate, instead of only the keycode or only the ascii/unicode value)
svn-id: r27626
2007-06-22 21:32:49 +00:00
Max Horn
2fa0a5c457 Cleaning up after myself (I blame it on, err, uhh... the Vogons?)
svn-id: r27625
2007-06-22 21:16:07 +00:00
Max Horn
85bf0f6d6b Added Common::KEYCODE_INALID
svn-id: r27622
2007-06-22 20:51:13 +00:00
Max Horn
8a658e0187 Added 'ASCII_' enum values for certain standard keys, and update comment
svn-id: r27619
2007-06-22 20:33:51 +00:00
Max Horn
17a75e7bd3 Replace tabs by spaces in keycode enum, to ensure proper indention
svn-id: r27618
2007-06-22 20:30:52 +00:00
Max Horn
2b23374468 Converted lots of code to use Common::ASCII_* and COMMON::KEYCODE_* constants. This also revealed the evil mixing of keycodes and ascii we do in many places :-/
svn-id: r27616
2007-06-22 20:04:44 +00:00
Max Horn
55f93678b8 Heavily modified/reduced version of patch #1741454 (EVENTS: ASCII enum)
svn-id: r27612
2007-06-22 17:51:51 +00:00
Max Horn
bd9ba26109 Modified version of patch #1740493 (EVENTS: Event Key Codes)
svn-id: r27592
2007-06-21 18:35:15 +00:00
Matthew Hoops
218a2da5d4 typo - (returh => return) -- jvprat
svn-id: r27558
2007-06-20 17:52:24 +00:00
David Corrales
0ac96302fe Initial implementation of the lookupFile() function. It's meant to search recursively for given
filename within a set of directories.

svn-id: r27551
2007-06-20 00:28:04 +00:00
Max Horn
b51f2f3212 Implemented the OSystem framebuffer API, as discussed on scummvm-devel. All changes are just fine, and won't cause any compile problems or regressions, despite the fact that I can't test most of the non-SDL backend changes, at an improbability level of two to the power of two hundred and seventy-six thousand to one against - possibly much higher. Anything you still can't cope with is therefore your own problem. Please relax.
svn-id: r27548
2007-06-19 22:39:59 +00:00
David Corrales
8ebf479bc5 Added a new parameter to the getChildren function, which allows including hidden files in the results.
svn-id: r27514
2007-06-17 17:17:38 +00:00
David Corrales
fe4ee4740d Small bugfix. Wrong logical operator.
svn-id: r27474
2007-06-16 17:41:31 +00:00
David Corrales
f7ea7e666d Removed the isValid operation from the FilesystemNode class in favor of the much richer combinations possible with the new operations (exists, isReadable and isWritable).
The work on the Common::File class is far from complete. Only the necessary was updated.

svn-id: r27473
2007-06-16 17:31:36 +00:00
Max Horn
0a7bb215d9 Added a FIXME comment to the adv. detector code regarding (not) using FSNode/FSList
svn-id: r27425
2007-06-15 17:37:28 +00:00
Max Horn
d6e47d5fd3 ADV detector: Refactored findGameID() a bit, making it possible to use it outside the AdvancedDetector framework; also made it generate somewhat more user friendly desc for obsolete game IDs
svn-id: r27424
2007-06-15 17:36:41 +00:00
Eugene Sandulenko
6e5b70f5e9 Patch #1733764: "Fallback detection patch". GSoC student.
svn-id: r27375
2007-06-12 12:22:25 +00:00
Eugene Sandulenko
add3243e5e Fix for bug #1719463: "DETECTOR: Launching undefined target adds launcher entry"
svn-id: r27352
2007-06-11 08:38:23 +00:00
Max Horn
9e651592ec Adv detector: Merged upgradeTargetIfNecessary() into detectGameForEngineCreation()
svn-id: r27144
2007-06-06 18:35:37 +00:00
David Corrales
3b96c7fad5 Renamed methods in the FilesystemNode class to match the AbstractFSNode implementations.
Also exposed the new methods (exists, isReadable and isWritable) in FilesystemNode.

svn-id: r27113
2007-06-05 21:02:35 +00:00
David Corrales
716bcd0b2b Expose new fs backend methods in the FilesystemNode class.
svn-id: r27089
2007-06-04 22:16:17 +00:00
Kostas Nakos
5df28554ac Adding the new kFeatureDisableKeyFiltering OSystem feature.
This feature is used by agi's prediction dialog and is a hint to the backend
to temporarily switch off any keyboard mapping, used in devices with limited
keyboard input. Also, supply some comments to the newly added event & feature.

svn-id: r27069
2007-06-03 18:44:03 +00:00
Max Horn
95ba2986d3 Enhanced Common::String by adding char constructor and operator+ for chars
svn-id: r27051
2007-06-02 12:42:40 +00:00
David Corrales
0cab5b7791 Merged the fs branch with trunk. r26949:27031
svn-id: r27032
2007-05-31 23:44:43 +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
5006dbd932 AdvDetector changes: made upgradeTargetIfNecessary internal; cleanup to findGameID
svn-id: r27020
2007-05-30 18:39:35 +00:00
Max Horn
04ee67bd71 Hash<T> is an UnaryFunction (very pedantic and effectively effectless change *g*)
svn-id: r27013
2007-05-30 16:42:19 +00:00
Kostas Nakos
f66fb12718 added EVENT_PREDICTIVE_DIALOG event to bring up the predictive dialog on demand by the backends
svn-id: r27005
2007-05-29 20:07:19 +00:00
Max Horn
3144ab58a6 Paranoia changes (shouldn't have any real effect, though...)
svn-id: r26972
2007-05-27 12:43:06 +00:00
Johannes Schickel
86104e0bf0 Reverted r26922.
svn-id: r26967
2007-05-27 11:40:03 +00:00
David Corrales
3646c968c9 Merged the fs branch with trunk. r26472:26948
svn-id: r26949
2007-05-26 20:23:24 +00:00
Johannes Schickel
ad03c72bdb Commit of patch #1715313 ("CORE: STL like algorithm implementation").
svn-id: r26929
2007-05-23 12:02:31 +00:00
Johannes Schickel
8ff17142c5 Simpilified Singleton implementation and usage.
svn-id: r26922
2007-05-22 14:17:44 +00:00
David Corrales
d1f56d93f9 Use common/singleton.h in the concrete fs factories.
svn-id: r26814
2007-05-12 20:00:52 +00:00
David Corrales
86324f00bc Renamed files and minor tweaks. Thanks LordHoto :)
svn-id: r26810
2007-05-12 18:17:40 +00:00
David Corrales
c459f054b4 Use abstract factories to initialize FilesystemNode objects.
svn-id: r26739
2007-05-03 02:39:33 +00:00
Nicola Mettifogo
ae18ce3e4a Fix compilation (step 2).
svn-id: r26721
2007-05-01 15:47:49 +00:00
Nicola Mettifogo
008042ac25 Implemented a IFF (Interchange File Format) parser and added subclasses to parse graphics (ILBM, PBM) and audio (8SVX), thus replacing old decoding routines. SAGA and Parallaction have been adjusted to work with the new code.
svn-id: r26719
2007-05-01 15:39:40 +00:00
Kostas Nakos
424b738d5b also dump debug to stdout in ce
svn-id: r26711
2007-05-01 13:13:40 +00:00
Chris Apers
e0a77867cc Cleanup, remove PalmOS dependencies from the ScummVM core
svn-id: r26690
2007-05-01 09:37:40 +00:00
Max Horn
7ca6b29f35 Double-invert the logic on some big/little endian checks (the idea is that we want to fallback to safe code unless we definitely know no endian/alignment issues are in the way; this way it will work even if the endianess is unknown)
svn-id: r26649
2007-04-28 10:40:00 +00:00
Max Horn
ff2ed4b0a9 More cleanup
svn-id: r26602
2007-04-26 20:40:28 +00:00
Max Horn
672ad9928a cleanup
svn-id: r26601
2007-04-26 20:36:52 +00:00
Max Horn
02fd340b8c Patch #1697907: Small patches for AdvancedDetector
svn-id: r26600
2007-04-26 20:35:10 +00:00
Max Horn
e9f8035b53 Remove bogus use of tstr2 (which is empty at this point anyway)
svn-id: r26599
2007-04-26 20:26:49 +00:00
Max Horn
d4660cce55 Removing more semicola
svn-id: r26597
2007-04-26 19:08:53 +00:00
Max Horn
00b9bc7b36 Removing lots of superfluous semicola (see mail by David Weinehall on scummvm-devel)
svn-id: r26594
2007-04-25 19:31:23 +00:00
Eugene Sandulenko
de9e72bc76 Patch #1706179: "GUI: Sort languages list"
svn-id: r26587
2007-04-24 06:31:04 +00:00
Max Horn
aecd100f93 Added Common::String::contains() method
svn-id: r26514
2007-04-15 18:27:10 +00:00
Kostas Nakos
258753e82c also copy debug output to the (redirected) log files
svn-id: r26439
2007-04-09 18:00:22 +00:00
Eugene Sandulenko
c2b2880287 Improve report of unknown MD5, to ease copy-pasting to detection code
svn-id: r26433
2007-04-09 11:29:44 +00:00
Neil Millstone
c6d41c0755 Updating DS port for changes in main codebase. Code changes for DevkitArm r20 and latest libnds.
svn-id: r26394
2007-04-06 18:34:53 +00:00
Johannes Schickel
7909c312bd Corrected some c&p error in the documentation.
svn-id: r26298
2007-03-24 23:35:48 +00:00
Max Horn
ed54ea9155 Moved Event/EventType/keyboard enum from common/system.h (part of class OSystem) to common/events.h (part of namespace Common). Porters may have to make minor changes to their backends to get them to compile again
svn-id: r26180
2007-03-17 19:02:05 +00:00
Robert Göffringmann
4a11e7299a fixed MSVC compiler warning because winnt.h defines its own ARRAYSIZE #define
svn-id: r26171
2007-03-17 15:45:05 +00:00
Torbjörn Andersson
53624376b4 Applied my re-revised patch #1487149 ("Simplified keyboard repeat"), with
Fingolfin's blessings. Keyboard repeat is now handled by the event manager,
rather than by individual engines.

Since this can cause problems with some engines (see the AGI engine), the extra
"key down" events are marked as "synthetic", so that they can be ignored if
necessary.

svn-id: r26170
2007-03-17 15:44:26 +00:00
Max Horn
9751421434 Added class NonCopyable, and made various things derive from it
svn-id: r26163
2007-03-17 10:36:14 +00:00
Max Horn
15d9bc42ea Force all code to use EventManager::pollEvent instead of OSystem::pollEvent
svn-id: r26156
2007-03-17 00:53:21 +00:00
Max Horn
8fc8c4847d Implemented a simple EventManager class
svn-id: r26154
2007-03-17 00:07:34 +00:00
Max Horn
30e975f9db Protect Array<> and HashMap<> instances against self assignments
svn-id: r26115
2007-03-12 22:34:29 +00:00
Lars Persson
e8c941c128 Added shared filed support using native file APIs.
svn-id: r26087
2007-03-11 14:28:03 +00:00
Eugene Sandulenko
477372de61 Shut useless MSVC8 warning. We use pack-start.h and pack-end.h and it
complained that alignment state changed after #include. I.e. exactly what
we wanted to do.

svn-id: r26061
2007-03-10 15:00:56 +00:00
Max Horn
728d01cb17 Removing some unnecessary #includes
svn-id: r26044
2007-03-09 23:46:45 +00:00
Max Horn
6d9cb5498f Avoid double frees in HashMap::erase
svn-id: r26040
2007-03-09 16:19:50 +00:00
Nicola Mettifogo
1e985051a9 reduced dependency from windows-specific header files
svn-id: r26034
2007-03-09 00:13:07 +00:00
Gregory Montoir
801771db87 removed kADFlagFilebasedFallback, this flag is never used (and filename based detection is done if fileBasedFallback is non-0 anyway)
svn-id: r26032
2007-03-08 21:40:47 +00:00
Max Horn
fa6a35f9b1 cleaned up stdafx.h, removing various unnecessary #includes (there are still some windows ones which look fishy, though)
svn-id: r26031
2007-03-08 21:40:21 +00:00
Gregory Montoir
ee664dc62d added a flag to enable/disable printing a warning when filename based detection find a match, also updated some comments.
svn-id: r26029
2007-03-08 21:33:55 +00:00
Max Horn
a63c1cf3bd Moved the printf #define for the NDS into scummsys.h (not sure if that suits your needs Neil, feel free to change it again if necessary)
svn-id: r26024
2007-03-08 17:38:11 +00:00
Max Horn
d19adc0514 common/util.cpp needs fprintf; various std I/O functions are not used by anything in our code, so there is no need to emulate them -- mark these; my previous commits likely broke compilation of the DS backend, try to reduce the brokeness a bit
svn-id: r26023
2007-03-08 17:36:52 +00:00
Max Horn
47bc9aae19 Moving Nintendo DS std C I/O emulation wrappers to common/file.cpp; also add a FIXME comment (why is assert redefined in ds-fs.h ?)
svn-id: r26020
2007-03-08 16:57:14 +00:00
Max Horn
743698da6e Changed File::_handle to be of type void* instead of FILE* (to ease porting); moved PS2 std C I/O defines to file.cpp (no code other than the file & savegame code should use fopen etc. directly)
svn-id: r26017
2007-03-08 16:46:02 +00:00
Max Horn
33a4f8c378 Changed ConfigManager to use class File instead of std C I/O to write the config file
svn-id: r26016
2007-03-08 16:43:33 +00:00
Max Horn
f02802531e Turning FilesystemNode comment into a doxygen comment
svn-id: r26015
2007-03-08 15:02:13 +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
43cd428355 Some HashMap cleanup:
* Removed the odd return value of method erase()
* Stopped erase() from leaking (oops!)
* Added a (paranoia) consistency check to assign()

svn-id: r25967
2007-03-04 09:58:04 +00:00
Max Horn
b25c7933a5 Paranoia: a hashmap node must never ever change its key after its creation
svn-id: r25965
2007-03-04 09:27:28 +00:00
Travis Howell
b0fea397ab Allow PC Engine version of Loom to at least start up.
svn-id: r25951
2007-03-03 12:59:48 +00:00
Max Horn
4efda86d7a Removed File::incRef and decRef
svn-id: r25920
2007-03-01 17:25:49 +00:00
Max Horn
dea688d0f5 Fix spelling
svn-id: r25908
2007-02-28 14:07:47 +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
7287ce2a4c Typo
svn-id: r25858
2007-02-25 18:26:33 +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
e0a7c6d7a7 Made it possible to init a Stack<T> with an Array<T>; removed hack in Stack<T>::top
svn-id: r25696
2007-02-18 18:08:38 +00:00
Max Horn
348b72e107 Improved (I hope) the 'Unknown MD5' messages in our detectors a little bit
svn-id: r25695
2007-02-18 18:07:32 +00:00
Chris Apers
5b214090f7 Renamed crc32 which conflicts with Tapwave system function
svn-id: r25692
2007-02-18 17:47:24 +00:00
Max Horn
e326f482c9 Get rid of Common::SaveFile
svn-id: r25666
2007-02-17 22:11:00 +00:00
Max Horn
b8aeefaffb Added finalize() method to Common::OutSaveFile (which by default just flushes the stream), changed engines to call that before deleting OutSaveFile instances (instead of just flushing)
svn-id: r25660
2007-02-17 18:55:51 +00:00
Max Horn
ec27c53491 AdvancedDetector: revamped the file based fallback code
svn-id: r25599
2007-02-14 23:46:39 +00:00
Max Horn
62bd2a1544 Make use of md5_file_string
svn-id: r25593
2007-02-14 21:59:57 +00:00
Max Horn
80f799a2b2 Extended MD5 API a bit: added a variant of md5_file which takes an arbitrary ReadStream; and added md5_file_string methods which directly produce a human readable md5 string (instead of a binary digest)
svn-id: r25592
2007-02-14 21:43:21 +00:00
Max Horn
42631d21b1 Some more cleanup, and that's it for tonight
svn-id: r25580
2007-02-14 00:52:12 +00:00
Max Horn
6b2ff5616b Minor cleanup
svn-id: r25579
2007-02-14 00:38:45 +00:00
Max Horn
265deaffff Added some comments and performed some cleanup in the file based fallback code of the AdvancedDetector
svn-id: r25578
2007-02-14 00:37:02 +00:00
Max Horn
75ae7cdb73 Properly implemented the AD fallback callback
svn-id: r25576
2007-02-14 00:21:53 +00:00
Max Horn
59b1526e5a Since detectBestMatchingGame now returns a ADGameDescription pointer, we can change detectGame to return a ADGameDescList
svn-id: r25575
2007-02-13 23:47:41 +00:00
Max Horn
7572d2b4f2 Changed detectBestMatchingGame to return a pointer to a ADGameDescription (or a subclass of it); added a (currently fake) fallback callback entry in ADParams
svn-id: r25574
2007-02-13 23:37:44 +00:00
Max Horn
2e567f1cc9 Some more AdvancedDetector cleanup: Removed kADFlagFilebasedFallback flag (just check whether a fileBasedFallback has been provided); moved some internal definitions, added some doxygen coments, etc.
svn-id: r25570
2007-02-13 22:25:25 +00:00
Gregory Montoir
1ce912e106 made rtrim() and ltrim() global functions, to reduce code duplication (it seems parallaction/parser.cpp code re-use them too
svn-id: r25564
2007-02-13 21:06:57 +00:00
Eugene Sandulenko
151be65ca3 Kill MSVC warning:
warning C4245: 'initializing' : conversion from 'Common::ADGameFlags' to 'uint32', signed/unsigned mismatch

svn-id: r25557
2007-02-13 20:34:17 +00:00
Max Horn
433e7d69ac Thanks to the previous changes, we can now cleanup detectGameForEngineCreation somewhat
svn-id: r25548
2007-02-13 15:03:43 +00:00
Max Horn
4968e912ce AdvancedDetector changes:
* Renamed genGameList to gameIDList to make it match the corresponding
  plugin API function name
* removed the detectFunc param from detectGameForEngineCreation,
  as it *always* pointed to a straight wrapper around AdvancedDetector::detectAllGames
* as a consequence, removed the various GAME_detectGames functions from the
  engines, and removed the detectFunc param from ADVANCED_DETECTOR_DEFINE_PLUGIN

svn-id: r25547
2007-02-13 14:55:11 +00:00
Eugene Sandulenko
da7d8c9f35 Rename Common::GF_XXX to Common::ADGF_XXX
svn-id: r25545
2007-02-13 13:42:28 +00:00
Max Horn
731f1017c1 Renamed generateComplexID to generatePreferredTarget to match my previous commit
svn-id: r25544
2007-02-13 13:19:43 +00:00
Max Horn
2afe07992f Renamed kADFlagComplexID to kADFlagAugmentPreferredTarget, document it, and add it for AGOS, too
svn-id: r25543
2007-02-13 13:17:46 +00:00
Max Horn
287e21d36e Moved detectGameForEngineCreation next to detectBestMatchingGame (somebody should explain the difference between the two...)
svn-id: r25542
2007-02-13 13:04:51 +00:00
Max Horn
55e132ca7d Use GF_DEMO flag in the AdvancedDetector to augment the preferredtarget name
svn-id: r25541
2007-02-13 13:00:18 +00:00
Max Horn
55adc889e7 (re)added flags field to ADGameDescription, with currently only one value (GF_DEMO) -- this flag value is not yet used by anything (also, GF_DEMO hasn't been correctly set for AGI games yet)
svn-id: r25539
2007-02-13 01:28:18 +00:00
Max Horn
16a2940808 cleanup
svn-id: r25452
2007-02-09 17:57:49 +00:00
Sven Hesse
193349fd60 Only do the file based fallback when no matches by MD5s were found
svn-id: r25394
2007-02-05 14:22:10 +00:00
Max Horn
4e9e88ac1c Added Common::getEnabledSpecialDebugLevels
svn-id: r25383
2007-02-04 13:28:17 +00:00
Eugene Sandulenko
7b6bdd231d AdvancedDetector now has built-in fallback detection based on file lists.
Currently only gob engine benefits from it.

svn-id: r25374
2007-02-04 03:10:27 +00:00
Max Horn
73c3625f1f Fixing various doxygen warnings
svn-id: r25362
2007-02-03 21:37:52 +00:00
Gregory Montoir
7e5a0b05b5 warnings
svn-id: r25284
2007-01-30 20:20:05 +00:00
Eugene Sandulenko
9833a65d4c - Fixed bug with single ID detection
- Added more debug output

svn-id: r25273
2007-01-30 02:02:10 +00:00
Eugene Sandulenko
adcfd2cc5f Now AdvancedDetector could use single ID per engine. Also it can suggest
more complex game IDs with platform and language specified.

AGI engine benefits most from that.
Also turned Cine, Parallaction and SAGA to single ID, autoupgrading old ID.

svn-id: r25269
2007-01-29 23:25:51 +00:00
Johannes Schickel
7da1a56387 Gregory's patch for bug #1645653 ("MSVC71 BUILD: Latest SVN doesn't compile").
svn-id: r25251
2007-01-28 23:24:16 +00:00
Max Horn
8b7fdca4ac Return a default value in the const-variant of HashMap::getVal, instead of asserting out -- this way, we get less unexpected asserts, and both getVal variants behave comparably diff. The drawback is that now all HashMap instances carry one extra Value object around with them.
svn-id: r25245
2007-01-28 13:30:26 +00:00
Eugene Sandulenko
93687d376b Add more paramteres to AdvancedDetector. Not used yet.
svn-id: r25241
2007-01-28 07:31:26 +00:00
Eugene Sandulenko
4c83151404 Fix typo spotted by clone2727
svn-id: r25236
2007-01-27 23:50:09 +00:00
Max Horn
d70c83bd4b Lots of cleanup in the AdvancedDetector
svn-id: r25194
2007-01-25 21:16:57 +00:00
Max Horn
85dc27db2f cleanup
svn-id: r25179
2007-01-25 01:07:59 +00:00
Max Horn
0314bfdb94 Removed getDescription() function
svn-id: r25177
2007-01-25 01:01:01 +00:00
Max Horn
521c7a0d09 At this time, ADVANCED_DETECTOR_DEFINE_PLUGIN doesn't take a factory function, but rather only a simple class name (one of the reasons it can't be used by the Kyra code right now)
svn-id: r25176
2007-01-25 00:51:32 +00:00
Eugene Sandulenko
c92f2ec212 Print out file size for unmatched files. Also alter output slighty.
svn-id: r25175
2007-01-25 00:47:35 +00:00
Max Horn
9dada67e5a Removed class AdvancedDetector
svn-id: r25174
2007-01-25 00:43:35 +00:00
Eugene Sandulenko
5f91f6d1e5 Mention that some fields in ADGameFileDescription are optional.
In fact we really need to write some documentation for it.

svn-id: r25173
2007-01-25 00:38:36 +00:00
Eugene Sandulenko
6eb9f41e68 Use file sizes in detection too.
svn-id: r25172
2007-01-25 00:37:12 +00:00
Max Horn
6a004d6b3c Correcting doc comment
svn-id: r25168
2007-01-24 23:28:03 +00:00
Max Horn
3a74dedb57 Corrected a comment
svn-id: r25166
2007-01-24 22:57:40 +00:00
Eugene Sandulenko
318210ad96 Add optional size parameter to ADGameFileDescription. Not used now.
svn-id: r25164
2007-01-24 22:42:44 +00:00
Eugene Sandulenko
edd2422a55 Hide all AdvacedDetector parameters into a structure for easier maintenance
and extensibility

svn-id: r25163
2007-01-24 22:24:52 +00:00
Max Horn
0c148fc44e Added non-const variant of HashMap::getVal
svn-id: r25136
2007-01-21 00:11:45 +00:00
Max Horn
12476efb58 Added some new HashMap methods: lookupAndCreateIfMissing (internal only), setVal and getVal (which actually is just the old queryVal renamed for consistency)
svn-id: r25135
2007-01-21 00:06:50 +00:00
Eugene Sandulenko
cd8a5f3a98 First phase of detection-related plugins interface improvements. Now plugins
return StringMap instead of fixed list of parameters. This adds great
flexibility.

Current patch should not alter any functionality, i.e. if there are regressions,
submit a report. Phase 2 will benefit from these changes and will come later.

svn-id: r25134
2007-01-20 21:27:57 +00:00
Max Horn
d1b97e6786 Added copy constructor and assignment operator to class HashMap
svn-id: r25125
2007-01-19 21:55:45 +00:00
Paweł Kołodziejski
964b95ccf0 keep warnings off like this ones:
- warning C4610: struct 'Agi::AGIGameDescription' can never be instantiated - user defined constructor required
- warning C4510: 'Saga::SAGAGameDescription' : default constructor could not be generated

Can someone help me how to fix this ?

svn-id: r25088
2007-01-15 08:21:20 +00:00
Chris Apers
efe466040a Still doesn't work with PalmOS compiler
svn-id: r25079
2007-01-14 11:06:34 +00:00
Eugene Sandulenko
c01839bbe9 Make ADGameFileDescription is built in directly into ADGameDescription.
svn-id: r24947
2006-12-29 00:03:03 +00:00
Max Horn
f54b935500 Tweaked the FixedStack class a bit
svn-id: r24926
2006-12-25 23:13:13 +00:00
Max Horn
6eef02245c Stripped some more real_ prefixes from function names; also added a new FIXME comment to Kyra's setupGameFlags, and did some more cleanup
svn-id: r24899
2006-12-20 00:08:51 +00:00
Max Horn
e0ee3fd06d Properly walk through lists of (extended) ADGameDescriptions -- we previously only checked the first byte, which 'often' worked fine on little endian machines, but almost never worked correct on big endian ones
svn-id: r24897
2006-12-19 23:58:45 +00:00
Max Horn
559f2b62eb Renamed real_ADVANCED_DETECTOR_DETECT_GAMES_FUNCTION to ADVANCED_DETECTOR_DETECT_GAMES_FUNCTION, and real_ADVANCED_DETECTOR_DETECT_INIT_GAME to ADVANCED_DETECTOR_DETECT_INIT_GAME
svn-id: r24896
2006-12-19 23:57:04 +00:00
Max Horn
07c6fa980f Further AdvancedDetector cleanup (in particular, renamed ADGameDescription::name to the more suitable ADGameDescription::gameid)
svn-id: r24895
2006-12-19 23:37:03 +00:00
Max Horn
2969144120 * Simplified code in AdvancedDetector::detectGame
* Removed AdvancedDetector::setFileMD5Bytes, now AdvancedDetector::detectGame
  simply takes the MD5 byte limit as an extra parameter

svn-id: r24894
2006-12-19 23:14:15 +00:00
Max Horn
865d8717a3 * Change the GameList typedef to a proper class with an additional
constructor which takes a PlainGameDescriptor 'list'
* Replaced real_ADVANCED_DETECTOR_GAMEID_LIST by this new constructor
* Removed ADVANCED_DETECTOR_GAMEID_LIST and ADVANCED_DETECTOR_FIND_GAMEID
* Some minor cleanup

svn-id: r24893
2006-12-19 22:43:15 +00:00
Max Horn
0d1f78e4be Fix compiler warning (in general, NULL is deprecated in C++ -- just use 0 instead)
svn-id: r24885
2006-12-19 12:21:23 +00:00
Eugene Sandulenko
457ebfea3c Get rif od ARRAYSIZE in ADGameDescription
svn-id: r24882
2006-12-19 04:35:08 +00:00
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