Commit Graph

88 Commits

Author SHA1 Message Date
Torbjörn Andersson
31f83ff233 Implemented FW inventory. This is basically a copy of makeMenuChoice(), minus
the ability to select menu items. There will be cleanups later, but for now we
try to match the original.

svn-id: r22395
2006-05-08 19:49:52 +00:00
Torbjörn Andersson
cab89a6f32 Another small update/cleanup to the French messages from Nicolas Joly.
svn-id: r22264
2006-05-01 20:10:29 +00:00
Torbjörn Andersson
72f0c9a5d7 Applied patch from Nicolas Joly to fix the French default messages in Future
Wars. (I had originally left them as question marks because I didn't know what
characters they were supposed to be.)

svn-id: r22259
2006-05-01 14:14:24 +00:00
Max Horn
27307acd7c Moved the AudioCDManager as well as class AudioStream and its (standard) subclasses to namespace Audio
svn-id: r22231
2006-04-29 22:33:31 +00:00
Max Horn
bf73598811 * Changed the createEngine() factory function of our plugins to return an error code (the engine is now passed indirectly via a double pointer)
* Removed Engine_Empty (obsolete now that engines can return actual error codes)

svn-id: r22199
2006-04-29 00:27:20 +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
Torbjörn Andersson
c9555a5d54 Added TODO about some extra data files that Operation Stealth has to load.
svn-id: r21844
2006-04-13 15:42:52 +00:00
Torbjörn Andersson
4ee82b0caf Work around crash in drawSpriteRaw(). In Future Wars, when going to the future,
I walked back to the room where I first arrived. At that point, maskPtr was
NULL for reasons yet unknown.

svn-id: r21839
2006-04-13 09:53:51 +00:00
Torbjörn Andersson
f5ab0e5578 Fixed potential crash in drawDialogueMessage(): The function should terminate
if, for some reason, messagePtr is NULL.

svn-id: r21833
2006-04-12 22:07:41 +00:00
Torbjörn Andersson
19a1cdfe85 Actions that do not have any custom response now print one of the default
responses. (Before, nothing would happen.)

svn-id: r21832
2006-04-12 22:06:30 +00:00
Torbjörn Andersson
cdcf44d3f3 Stubbed addPlayerCommandMessage(). I think it may have something to do with
printing default responses to commands.

svn-id: r21829
2006-04-12 16:34:23 +00:00
Torbjörn Andersson
151b38a6e5 This assertion shouldn't be needed. At least not here.
svn-id: r21826
2006-04-12 11:29:00 +00:00
Torbjörn Andersson
9dfc4b5f69 Fixed serious bug in removeOverlayElement() that would cause it to fail. This
caused getObjectUnderCursor() select the wrong object because the object list
was no longer guaranteed to be sorted on priority ("mask").

In Future Wars, this made it difficult (impossible?) to pick up the tunic,
because the game would pick the bushes instead, even though the tunic had a
higher priority.

svn-id: r21825
2006-04-12 11:27:45 +00:00
Eugene Sandulenko
7082e19ff2 Fix script dumping
svn-id: r21820
2006-04-12 03:45:54 +00:00
Eugene Sandulenko
8679083991 cleanup
svn-id: r21819
2006-04-12 03:12:56 +00:00
Eugene Sandulenko
75fec17d7e DEBUG_SCRIPT -> debugC
svn-id: r21816
2006-04-12 01:48:15 +00:00
Eugene Sandulenko
83d75e119f Add F1-F10 keymappings like in original engine.
svn-id: r21815
2006-04-11 23:31:03 +00:00
Torbjörn Andersson
a677541ac8 Added TODO comment about refreshAnimData[] and why it's not (yet) a field in
the AnimData struct.

svn-id: r21809
2006-04-11 21:39:09 +00:00
Torbjörn Andersson
62a163bc43 Might as well clear ptr1 and ptr2 in animDataTable[] when loading a savegame.
The previous commit should ensure that the elements that need to be loaded are.

svn-id: r21774
2006-04-10 23:48:22 +00:00
Torbjörn Andersson
badb5218fa If I understand things correctly, cinE used to dump the entire animDataTable
element to the savefile, including data pointers. After reading the savefile,
it would then test if ptr1 was NULL, to see if it should load the object.

I've extended the savefile format with a byte to indicate whether or not ptr1
was non-NULL. This seems to fix the problems I had with with loading savegames,
but of course any old savegame is now even more broken than before.

I still can't seem to get out of the room with the machine, though. Another
regression when migrating the code from cinE, or just my ability to get past
this annoying, timed puzzle?

svn-id: r21772
2006-04-10 23:22:26 +00:00
Torbjörn Andersson
9c15dc06eb Use our standard save file manager class to read and write the save games,
instead of putting them in the current working directory.

svn-id: r21741
2006-04-10 05:37:31 +00:00
Max Horn
66cdbaf1b5 Moved GameSettings to namespace Cine; moved savePath to various.cpp
svn-id: r21733
2006-04-09 19:44:40 +00:00
Torbjörn Andersson
8e7e503979 Casting an array of integers to a pointer to a struct seems like a pretty hacky
thing to do. This replacement hopefully works as intended.

svn-id: r21724
2006-04-09 12:04:33 +00:00
Torbjörn Andersson
324209e11f Minor cleanup, but savegames still don't work as well as I had hoped...
svn-id: r21720
2006-04-09 10:54:41 +00:00
Torbjörn Andersson
c4015860ac Fixed savegame saving/loading. I haven't done anything about the user
interface, so it's still even worse than in the original interpreter (just like
in cinE, presumably), but at least it no longer crashes when loading the saved
game, and hopefully the correct palette is saved.

svn-id: r21718
2006-04-09 09:08:45 +00:00
Torbjörn Andersson
fbe311ce6c Some more Operation Stealth changes. Mostly stubs.
svn-id: r21699
2006-04-08 19:26:15 +00:00
Torbjörn Andersson
2167c56cb3 This is probably what o1_removeLabel() should do. Is it used anywhere?
svn-id: r21698
2006-04-08 17:51:20 +00:00
Torbjörn Andersson
69e2ce1d4a Made the "gotoIf" opcodes slightly easier to read.
svn-id: r21697
2006-04-08 17:19:07 +00:00
Torbjörn Andersson
eac6dc09aa Make the warning message for undefined opcodes slightly clearer.
svn-id: r21696
2006-04-08 14:26:36 +00:00
Torbjörn Andersson
37d1248bd0 Fixed two Operation Stealth regressions:
* When I introduced the getNext* helper functions I accidentally used
  getNextWord() instead of getNextByte() in one case.

* When splitting the opcodes into separate functions, I noticed that Operation
  Stealth has no opcode 0x40, yet it's used. So for now we only warn when
  trying to execute an undefined opcode.

svn-id: r21695
2006-04-08 14:23:33 +00:00
Torbjörn Andersson
a81964c3c2 Renamed some local variables for consistency.
svn-id: r21694
2006-04-08 14:03:14 +00:00
Torbjörn Andersson
986dce3a7d Split the opcodes into individual functions. This could easily cause
regressions, but hopefully not too many. While doing this, I noticed I had
gotten at least one of the stubs I added recently wrong. That's hopefully
fixed now.

svn-id: r21693
2006-04-08 13:20:40 +00:00
Max Horn
e7a8bb6abf Modified the REGISTER_PLUGIN macro so that it allows (and requires) a trailing semicolon (this helps certain tools to parse our code better)
svn-id: r21689
2006-04-08 12:06:07 +00:00
Max Horn
8cf8acfd63 Renamed various *GameSettings to GameSettings (our namespaces are enough to distinguish them)
svn-id: r21686
2006-04-08 11:21:04 +00:00
Torbjörn Andersson
54b99891cb Cleanup.
svn-id: r21683
2006-04-08 08:04:23 +00:00
Torbjörn Andersson
f3ede2bf38 Began collecting hard-coded language-specific strings in a new initLanguage()
function. It's now possible to choose between English and French menus, and the
command string preposition in English is "on", not "sur".

There are still plenty of hard-coded French messages to do with savegame
handling. I haven't done anything about them.

svn-id: r21682
2006-04-08 07:50:47 +00:00
Torbjörn Andersson
812dd72207 Cleanup.
svn-id: r21681
2006-04-08 07:16:14 +00:00
Torbjörn Andersson
fce6bf5142 Added helper functions getNextByte(), getNextWord() and getNextString() to make
the opcode decoder a bit easier to read. The same change could be made to
decompileScript() as well, but I have a feeling that this function should be
made a standalone tool instead. Particularly considering how much memory it
currently uses.

svn-id: r21679
2006-04-08 06:47:58 +00:00
Torbjörn Andersson
26587faff7 This may look like a less good way of transforming three bits of colour into
eight bits. Perhaps it is. But it seems to match the output from DOSbox when
running Future Wars, and I tend to trust DOSbox in such matters.

svn-id: r21658
2006-04-07 02:02:06 +00:00
Torbjörn Andersson
15cc2e628d Small cleanup.
svn-id: r21655
2006-04-07 01:04:09 +00:00
Torbjörn Andersson
997c023095 Added opcode comments and stubs based on information sev provided me with. All
stubs should print a warning, though I may have missed some.

svn-id: r21654
2006-04-06 22:33:23 +00:00
Torbjörn Andersson
0f3aeb09ed Fixed another "worked in cinE, broken in ScummVM" bug that made it impossible
to interact with the objects in the second room. We were passing the wrong
pointer to gfxConvertSpriteToRaw() in loadCt(), causing page3Raw (which I
believe is an "image" mapping screen coordinates to objects) to be wrong.

svn-id: r21646
2006-04-06 20:57:58 +00:00
Torbjörn Andersson
c07f186502 We don't need to convert mono data to stereo: Simply tell the mixer that we're
generating mono data, and let it worry about how to handle it.

svn-id: r21645
2006-04-06 18:55:39 +00:00
Torbjörn Andersson
95eb460417 Use English strings for the system and confirm menus, to be consistent with the
command menu. There are still some other hard-coded French messages in the code,
though.

svn-id: r21634
2006-04-05 21:20:04 +00:00
Torbjörn Andersson
738aecd57e Fixed bug in loadObject() where the data pointer was only advanced for the
objects that were actually loaded from the file, not the ones that were
skipped. This bug was introduced when porting cinE to the ScummVM framework,
and would cause Future Wars to crash after the copy protection screen. Quite
possibly other bugs, as well.

svn-id: r21632
2006-04-05 20:11:00 +00:00
Torbjörn Andersson
48c46eed6b I don't think assert(0) is a particularly helpful error message...
svn-id: r21630
2006-04-05 13:06:03 +00:00
Eugene Sandulenko
58c7f8d6b1 Fix character spacing in text blurbs.
svn-id: r21629
2006-04-05 11:44:46 +00:00
Max Horn
8f691e51fa Removed superfluous addDefaultDirectory call, as well as two unused bad member vars
svn-id: r21532
2006-04-01 21:31:27 +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
Eugene Sandulenko
bc8f634834 Match game speed with original
svn-id: r21415
2006-03-23 03:55:00 +00:00