Commit Graph

650 Commits

Author SHA1 Message Date
Kari Salminen
739a31db12 Add endianness handling to Cine::Palette's load and save functions.
svn-id: r39452
2009-03-16 20:24:28 +00:00
Kari Salminen
814f27a72e Cine::Palette revamp part 2: Fix save-function, add Cine-palette formats etc.
- Removed excess convenience functions, made the used palette formats
  publicly available instead (Cine::kLowPalFormat, Cine::kHighPalFormat etc)
- Fixed output conversion i.e. save-functions.. Hopefully they work ;-)
- Renamed some parameters for unification (colors -> buf, numBytes -> size)
- Added some documentation, e.g. for the load- & save-functions.

svn-id: r39405
2009-03-14 22:36:05 +00:00
Kari Salminen
5fd0b88ffe Fix assertion (Doh! That was supposed to be the other way).
svn-id: r39344
2009-03-11 22:50:36 +00:00
Kari Salminen
bac7bd00be Cine::Palette: Move color format setting to setColorFormat-method.
svn-id: r39339
2009-03-11 21:11:52 +00:00
Kari Salminen
e01e4d6dbe Formatting.
svn-id: r39338
2009-03-11 21:05:21 +00:00
Kari Salminen
c676786146 Add saving in original palette format and the OSystem's palette format to Cine::Palette.
svn-id: r39337
2009-03-11 21:03:09 +00:00
Kari Salminen
4cbd3678f8 Add saving functions to Cine::Palette (Now one can output the palette in other formats too).
svn-id: r39336
2009-03-11 20:44:16 +00:00
Kari Salminen
6ccf016127 Fix assertions in palette loading function to really test that each color component fits inside a single byte (Easier to parse that way).
svn-id: r39333
2009-03-11 20:04:08 +00:00
Johannes Schickel
333d2c8e34 - Fix warnings
- Formatting

svn-id: r39317
2009-03-10 22:09:10 +00:00
Travis Howell
e6d0a83bb1 Fix compile of CINE engine.
svn-id: r39312
2009-03-10 21:47:53 +00:00
Kari Salminen
24e6587b16 Palette-class for Cine-engine, WIP: Take 2. Testing, using and documentation still TODO.
svn-id: r39310
2009-03-10 20:37:54 +00:00
Jordi Vilalta Prat
047f116515 Renamed MetaEngine::getCopyright() to getOriginalCopyright() to better match the meaning of the returned string, as discussed some time ago in scummvm-devel
svn-id: r39132
2009-03-05 12:04:58 +00:00
Max Horn
dd98126423 Engines: Fused several init&go methods into a single run method
svn-id: r39003
2009-03-01 04:42:46 +00:00
Max Horn
3fcbda829a Merged Engine::go() and ::init() into a new run() method (currently implemented by calling the existing init&go methods; to be cleaned up by engine authors
svn-id: r39002
2009-03-01 04:30:55 +00:00
Johannes Schickel
da3516248c Fixed compilation (along with it const correctness).
svn-id: r38287
2009-02-15 20:19:06 +00:00
Chris Apers
3ceb1482db Quick dirty hack to make the engine run again on PalmOS
svn-id: r38278
2009-02-15 18:53:27 +00:00
Max Horn
341bc64aaf do not include common/debug.h from common/util.h
svn-id: r36143
2009-01-30 05:25:17 +00:00
Max Horn
7cb437b56f Renamed SpecialDebugLevel to DebugChannel
svn-id: r36142
2009-01-30 05:10:24 +00:00
Max Horn
28cf213605 Moved AdvancedDetector from common/ to engines/
svn-id: r36132
2009-01-29 22:13:01 +00:00
Max Horn
ac59693be2 A ton of code formatting fixes; also fixed warnings about single line loops like 'while(cond);' by inserting newlines
svn-id: r36127
2009-01-29 05:26:12 +00:00
Eugene Sandulenko
696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Max Horn
df20d264fd Pushing down some header deps (on common/system.h, mostly)
svn-id: r35542
2008-12-25 20:40:00 +00:00
Johannes Schickel
f4d8ecaf6a Fixed gcc warning.
svn-id: r35137
2008-11-20 22:58:22 +00:00
Kari Salminen
325b4cb492 Fix resizing of the internal color array in Palette-class.
svn-id: r35136
2008-11-20 22:22:47 +00:00
Kari Salminen
16bf8d720b Add Palette-class for handling 9-bit and 24-bit palettes. WIP!
svn-id: r35135
2008-11-20 22:16:18 +00:00
Kari Salminen
089c8b4e48 Make the 256 color transformPaletteRange-function and Future Wars's refreshPalette-function compliant with disassembly.
svn-id: r35118
2008-11-18 19:54:44 +00:00
Johannes Schickel
5a0556f09c Committed my patch #2123680 "SDL: Backend transaction / rollback support".
svn-id: r35062
2008-11-14 22:08:10 +00:00
Travis Howell
cca19671d5 Fix compile of CINE engine.
svn-id: r35039
2008-11-13 11:36:37 +00:00
Filippos Karapetis
162634cc95 Started moving Save/Load code to saveload.cpp/.h
svn-id: r35033
2008-11-13 08:59:17 +00:00
Filippos Karapetis
0ba17539ac Deleting save states via the launcher and the GMM is now supported in the cine engine
svn-id: r35032
2008-11-12 23:39:38 +00:00
Filippos Karapetis
28da377ccb Saving and loading from the GMM is now supported in the cine engine
svn-id: r35031
2008-11-12 23:21:05 +00:00
Filippos Karapetis
f5729a4a8b - The GMM save dialog is now working for all engines which support the appropriate features
- Added a new method to the MetaEngine class, getMaximumSaveSlot(), and implemented it in all engines for which the listSavefiles() method is implemented (it goes together with the listSavefiles method). It is used to fill the unused save slots in the save/load dialogs of each engine, so that the user can create new save games in empty slots
- Unified the save/load dialog list numbering in the GMM load/save screens and in the load screen of the main menu (before a game is started)

svn-id: r34963
2008-11-09 16:13:34 +00:00
Max Horn
40136f2590 Switched various Engine APIs to use Common::Error
svn-id: r34916
2008-11-06 17:05:54 +00:00
Max Horn
fe2935ad4b Got rid of the unused 'filename' attribute in SaveStateDescriptor
svn-id: r34905
2008-11-05 15:41:12 +00:00
Max Horn
61aadb378d Fixed the EngineFeature vs. MetaEngineFeature mess, clarified some EngineFeature comments
svn-id: r34896
2008-11-04 16:11:40 +00:00
Filippos Karapetis
b7a219ebc6 Renamed engine feature kSupportsDirectLoad to kSupportsLoadingDuringStartup, as discussed in patch #2122869
svn-id: r34854
2008-10-26 16:42:08 +00:00
Kari Salminen
5252f07305 Remove unnecessary function overloadings for loadBg16 and loadBg256.
svn-id: r34840
2008-10-22 20:45:25 +00:00
Kari Salminen
b9709b5793 Make incrustMask and incrustSprite only draw to the current background in Operation Stealth.
svn-id: r34838
2008-10-22 19:56:38 +00:00
Kari Salminen
c501ef1450 Cleanup (Removed an extra 'return 0').
svn-id: r34826
2008-10-19 08:52:04 +00:00
Max Horn
6a2f3dc0b9 Added new type Engine::Feature; pushed down some #include dependencies
svn-id: r34755
2008-10-06 12:48:52 +00:00
Max Horn
9b160804ab Renamed Engine::quit to Engine::shouldQuit (previously, it was easily confused with Engine::quitGame); also cleaned up engine.h a bit
svn-id: r34700
2008-09-30 12:27:38 +00:00
Max Horn
655ce26b3f Big patch changing the signature of various Stream methods (some ports may need to be slightly tweaked to fix overloading errors/warnings)
svn-id: r34514
2008-09-13 16:51:46 +00:00
Max Horn
d3642080de Moved check for shouldRTL() from engines to scummvm_main
svn-id: r34310
2008-09-03 16:56:40 +00:00
Max Horn
a41c681d9d Merging more of the GSoC 2008 RTL branch: CINE
svn-id: r34244
2008-09-01 17:47:36 +00:00
Kari Salminen
41bbdc427d Added a warning to bug #2055912's fix committed in revision 34132.
svn-id: r34146
2008-08-25 12:00:38 +00:00
Kari Salminen
81e54d0555 Fix for bug #2055912: FW: incrustSprite fails on savegame loading.
What little testing I did, this seems to work, but more testing
would be nice.

svn-id: r34132
2008-08-24 23:16:37 +00:00
Kari Salminen
d9d77fef03 Designate fix for bug #2057619 as a hack, as that's what it is.
svn-id: r34102
2008-08-22 12:11:51 +00:00
Kari Salminen
4d6101cff9 Fix typo.
svn-id: r34084
2008-08-21 14:43:03 +00:00
Kari Salminen
d976f8a0fe Fix for bug #2057619: FW: Glitches in title display of demo (regression).
This fix doesn't seem to break other Future Wars versions like r34039 did.
Some versions of TITRE.ANI use 15 for transparency color, others use 0.
Previously only one of the choices was supported, now both are recognized.

svn-id: r34081
2008-08-21 14:14:33 +00:00
Kari Salminen
d26a62effa Fix font loading:
Fixes bug #2058539: OS: Assert starting demo (regression).
May possibly also fix bug #2019344: FW: crash with Amiga Italian version (photocopy room),
but not sure about that because I couldn't reproduce the bug myself.

svn-id: r34065
2008-08-20 17:31:35 +00:00
Kari Salminen
44c24e922b Fix for bug #2057619: FW: Glitches in title display of demo (regression).
Removed incorrect transparency data used for logo. Now it's shown correctly.

svn-id: r34039
2008-08-19 14:19:28 +00:00
Kari Salminen
b7dce00942 Fix for bug #2057656: FW: Assert during demo (regression).
Future Wars's Amiga demo is trying to load collision data files
'L8_MK.NEO' and 'L23_MK.NEO' that aren't supplied with the demo.
Previous code crashed when a file couldn't be found,
now it gives a warning instead.

svn-id: r34036
2008-08-19 13:05:38 +00:00
Kari Salminen
97463309ba Fix for bug #2057637: FW: Spaceship glitches in demo (regression).
This was caused by assuming in-place decompression is ok, it wasn't,
although AFAIK the original did decompression in-place too.
Changed unpacking to be done not in-place and the glitch vanished.
Also changed the unpacker to also handle uncompressed input data.

svn-id: r34034
2008-08-19 11:55:20 +00:00
Kari Salminen
95aa2ce56f Added some documentation about how data is unpacked in gfxConvertSpriteToRaw (Learned this from trying to implement convertPI1_2 i.e. gfxConvertSpriteToRaw myself to see if that was the problem with the Operation Stealth's labyrinth arcade sequence).
svn-id: r33976
2008-08-17 20:53:18 +00:00
Kari Salminen
a32cae809b Forwardport of branch-0-12-0's r33966: Fix to Future Wars's rendering of type 0 overlays (i.e. color sprites). Objects with negative frame values are supposed to be jumped over (Verified with disassembly).
svn-id: r33967
2008-08-17 10:43:54 +00:00
Kari Salminen
cc82aeb18d Workaround for bug #2054882 (FW: Impossible to survive entering monastery (regression)):
For Future Wars o1_compareGlobalVar now compares global variable 255 to be equal to everything.
The scripts probably tested global variable 255 for equality with some value (Maybe 143?)
to see whether copy protection was properly passed.

svn-id: r33950
2008-08-16 22:15:57 +00:00
Kari Salminen
f055cf5c3e Changed AdlibRegisterSoundInstrument's member variables from unsigned 16-bit to unsigned 8-bit. Maybe this'll fix the crash in AdlibSoundDriver::setupInstrument() eriktorbjorn was getting in Future Wars when teleporting from the photocopier room to the swamp. There was a OPLWriteReg(_opl, 0x80 | car, reg->sustainRelease) call with sustainRelease = 65452. Now there shouldn't be any such calls made because the sustainRelease value is always 8-bit now. Hopefully this won't break anything.
svn-id: r33935
2008-08-16 11:38:43 +00:00
Christopher Page
086e3bb963 After merging trunk, Cine doesn't crash on RTL anymore. Awesome.
svn-id: r33926
2008-08-16 05:40:37 +00:00
Christopher Page
909b66ef54 Merged revisions 33777,33781-33788,33790,33792-33793,33795,33797,33805,33807-33812,33815-33817,33819,33822,33826,33829,33837,33839,33844,33847,33858-33861,33864,33871-33873,33875,33877-33879,33886,33889-33892,33894,33896,33900,33902-33903,33919 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r33924
2008-08-16 04:30:01 +00:00
Christopher Page
7e49b2e8a1 Fixes for Cine engine loading from launcher
svn-id: r33914
2008-08-15 19:44:17 +00:00
Christopher Page
9d3cdcb2da Defined some MetaEngineFeatures for the engines, the launcher uses these features to allow/disallow loading and deleting saves
svn-id: r33909
2008-08-15 18:15:14 +00:00
Kari Salminen
e56359eac0 Moved showing of the collision page from Alt-key to F11-key because Alt conflicted with taking screenshots using Alt-s. Great. Hopefully F11 doesn't conflict with anything useful.
svn-id: r33877
2008-08-14 22:01:56 +00:00
Kari Salminen
c2c2e940d0 Fix for bugging moving at the bottom of the ocean when trying to free the girl from the ropes and swimming to the surface. Some global variables related to mouse position weren't being updated in executePlayerInput, now they are and things seem to work. Also enables moving in the labyrinth arcade sequence at the palace.
svn-id: r33872
2008-08-14 20:49:34 +00:00
Kari Salminen
63f3169213 Added debug showing of the collision page when pressing the Alt key. Alt isn't used for anything else so one might as well use it for this.
svn-id: r33871
2008-08-14 20:18:13 +00:00
Kari Salminen
6ee8022bac Type 21 overlay comment update (Found the drawing routine in the disassembly and checked the original for how the oxygen gauge during the first arcade sequence looks like. They're some kind of sprites most likely and not just simply filled rectangles).
svn-id: r33826
2008-08-13 13:40:28 +00:00
Kari Salminen
582104752b Hopefully fixes 'Conditional jump or move depends on uninitialised value(s)' Valgrind warning at sound.cpp:611.
svn-id: r33812
2008-08-12 23:56:13 +00:00
Kari Salminen
954244d350 Fixed drawPlainBox's boundary checking (It wrote outside the screen occasionally). Now using the Common::Rect for clipping, yay! It's good.
svn-id: r33811
2008-08-12 23:44:39 +00:00
Kari Salminen
00cbedb25f Added possibility to get the read resource's size from readBundleFile. Made loadMsg handle input data that has empty strings residing just beyond the input buffer (Thanks Valgrind :-)).
svn-id: r33810
2008-08-12 22:45:38 +00:00
Joost Peters
03edc74ef6 fix typo 'baclup' -> 'backup'
svn-id: r33809
2008-08-12 21:23:40 +00:00
Kari Salminen
095fa55527 Fix for GCC warning in OSRenderer::renderOverlay: declaration of 'len' shadows a previous local.
svn-id: r33808
2008-08-12 20:58:26 +00:00
Kari Salminen
e547eeb116 Tiny comment fix.
svn-id: r33807
2008-08-12 20:27:49 +00:00
Kari Salminen
eb9633ee1e Implemented Operation Stealth's makeCommandLine.
svn-id: r33805
2008-08-12 19:33:17 +00:00
Kari Salminen
811e4b3128 Implemented Operation Stealth specific parts of processInventory and added another mouse button waiting loop into the function's end (It's in both Future Wars and Operation Stealth). Fixes inventory showing in Operation Stealth.
svn-id: r33795
2008-08-12 14:44:44 +00:00
Kari Salminen
c935a09ef5 Changed commandBuffer from a char[80] to Common::String and made FWRenderer::setCommand use a Common::String. Hopefully this might help with the command buffer overflow stuff, although this isn't a fix for the problem behind it, just a bandaid.
svn-id: r33793
2008-08-12 00:13:27 +00:00
Kari Salminen
96a1ca1709 Made Operation Stealth's action failure messages use a background color set by the opcode 0x49 'o1_setDefaultMenuBgColor'. Should fix the 'text hard to read' problems.
svn-id: r33792
2008-08-11 23:20:10 +00:00
Kari Salminen
88ec480cef Implemented drawMessage changes for Operation Stealth's timed cutscenes (Negative colors are used for timed text boxes that are totally transparent, only the text is drawn).
svn-id: r33790
2008-08-11 23:01:32 +00:00
Kari Salminen
36e0d2eab8 Moved fontParamTable inside TextHandler struct and made it a constant size as that's what it is (No need for using malloc & free anymore). Previously we would've tried to free an array that wasn't heap-allocated in freePoldatDat (Freeing fontParamTable_standard or fontParamTable_alt), that's fixed.
svn-id: r33786
2008-08-11 22:26:25 +00:00
Kari Salminen
8aaba9d38e Changed palPtr from a pointer to a Common::Array named palArray. Removed palEntriesCount variable as it's now equivalent to palArray.size().
svn-id: r33785
2008-08-11 21:45:47 +00:00
Kari Salminen
d6dde4b85f Removed textDataPtr pointer as it's not used beyond the loadTextData function. Reworked loadTextData a bit so there are no two loops for the same thing (Also renamed some of the local variables).
svn-id: r33784
2008-08-11 21:26:41 +00:00
Kari Salminen
2d5a140725 Changed partBuffer from a pointer to a Common::Array. Removed numElementInPart variable as it's now equivalent with partBuffer.size().
svn-id: r33783
2008-08-11 20:41:13 +00:00
Kari Salminen
c1462dda14 Added a safeguard to readBundleFile so it shouldn't corrupt memory even if the input says the data's unpacked size is less than its packed size (This shouldn't ever happen with non-corrupted data).
svn-id: r33782
2008-08-11 20:18:33 +00:00
Kari Salminen
02c9cb35f4 Changed readBundleFile to unpack data in-place and added debugging messages to the function.
svn-id: r33781
2008-08-11 20:09:03 +00:00
Christopher Page
fcc00f20b9 Merged revisions 33719,33721-33723,33725-33727,33729-33730,33733,33736,33742,33754,33756,33758,33761,33763,33766 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r33769
2008-08-10 21:58:18 +00:00
Kari Salminen
ef3b72d5e4 Converted zoneData and zoneQuery tables from plain array types to Common::Array. Should help catch out of bounds access errors that may cause memory corruption.
svn-id: r33727
2008-08-09 22:38:03 +00:00
Kari Salminen
983a4f21e5 Converted animDataTable from a plain array to a Common::Array. Should help to catch out of bounds access errors which may cause memory corruption.
svn-id: r33726
2008-08-09 20:55:01 +00:00
Kari Salminen
0911982954 Converted objectTable from a plain array to a Common::Array. Should help to catch out of bounds access errors that may cause memory corruption.
svn-id: r33725
2008-08-09 20:50:10 +00:00
Kari Salminen
3e5e5f5342 Made type 21 & 22 overlays not be flipped (The oxygen gauge looks actually better when it reaches zero this way although in its fully charged state it still does look a bit off. Disassembly seems to agree with not flipping the overlays so I'm going with this one for now).
svn-id: r33722
2008-08-09 19:57:46 +00:00
Kari Salminen
0f07592184 Made drawPlainBox's effective width and height always at least one.
- Makes oxygen gauge during first arcade sequence visible as it gave drawPlainBox a height of zero.
Made type 21 overlays be drawn as type 22 (Filled rectangle).
- For an example the oxygen gauge during the first arcade sequence is a type 21 overlay.
Flipped type 21 & 22 overlays as it looks correct for the oxygen gauge.
These features are quite WIP, they need testing to see if they're correct.

svn-id: r33721
2008-08-09 19:47:05 +00:00
Christopher Page
ce3d1e1a7d Merged revisions 33632-33633,33635,33637,33639-33640,33642-33645,33648,33654-33655,33664,33667-33670,33673-33674,33678,33682,33686-33691,33693,33696,33698,33700,33703,33708,33710,33712-33714,33716 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r33720
2008-08-09 19:03:29 +00:00
Kari Salminen
e02f94d392 Added preliminary version of drawing type 22 overlays (Such overlays are added with opcode 0xA4 (o2_loadMask22) and removed with opcode 0xA5 (o2_unloadMask22)). Things might be wrong so needs testing! WIP!
svn-id: r33713
2008-08-09 16:07:08 +00:00
Kari Salminen
80648431d9 Added updating of global variable var5 to Operation Stealth's renderOverlay function's type 20 overlay case (Previously var5 wasn't updated anywhere!). Also added a lower bound for var5's value into a comparison (Previously only the upper bound was tested for).
svn-id: r33712
2008-08-09 15:17:32 +00:00
Kari Salminen
36e6bb27b5 Removing moving with keys qweasdzxc for now because they messed with savegame name typing. One can move with the cursor keys anyway.
svn-id: r33710
2008-08-09 10:52:48 +00:00
Kari Salminen
8e33f1530c Small cleanup: Renamed rol to rolByte and made it handle all cases.
svn-id: r33708
2008-08-09 10:44:12 +00:00
Kari Salminen
c0701bfcb6 Added detection entry for the Sony published CD version of Future Wars.
Also added decrypting of the crypted AUTO00.PRC for this particular version.
Now this version should work but no CD audio support for it yet though.

svn-id: r33703
2008-08-08 18:28:13 +00:00
Kari Salminen
70760a77fd Partially fix Adlib volume setting in Cine (Now uses music volume for Adlib volume, previously always played with full volume. Doesn't differentiate between playing sound effects and music!).
svn-id: r33700
2008-08-08 14:46:19 +00:00
Kari Salminen
5cb08bd1e5 Added basic moving using keyboard (Only works in Operation Stealth at the moment):
- Should make it possible to complete the first arcade sequence legitimately
Renamed input variables (Their names were mixed up between Future Wars and Operation Stealth):
- Future Wars's inputVar1 -> egoMovedWithKeyboard
- Future Wars's inputVar2 -> xMoveKeyb
- Future Wars's inputVar3 -> yMoveKeyb
- Operation Stealth's inputVar0 -> xMoveKeyb
- Operation Stealth's inputVar1 -> yMoveKeyb

svn-id: r33698
2008-08-08 13:30:01 +00:00
Kari Salminen
092d7224b9 Implemented game speed changing by pressing - or + to e.g. ease testing.
svn-id: r33689
2008-08-07 21:46:56 +00:00
Kari Salminen
da84a54694 Added precautionary tests to background scrolling function in Operation Stealth to avoid possible memory corruptions.
svn-id: r33688
2008-08-07 19:46:06 +00:00
Kari Salminen
853f4dbbe0 Made drawPlainBox handle border cases so it won't corrupt memory so easily. This may help with some memory corruption issues when for an example trying to draw the player's command string out of screen.
svn-id: r33687
2008-08-07 19:31:12 +00:00
Kari Salminen
b8bfd5d04f Fix for popup boxes sometimes blocking animation when they shouldn't in Operation Stealth:
- Made waitForPlayerClick updating more like in the original.
- Moved removeMessages to after the frame drawing in main loop hoping to be more like the original.
- Added an additional test to Operation Stealth's implementation of overlay type 2 drawing.
- Added an additional parameter incrementing and testing to Operation Stealth's removeMessages.
Hopefully this won't cause any regressions in Future Wars!

svn-id: r33686
2008-08-07 19:04:19 +00:00
Kari Salminen
92eec1b905 HACK: In Operation Stealth after the first arcade sequence jump player's position to avoid getting stuck.
The player's position is changed only by *one* pixel but it helps
and makes it possible to carry on with the game (Previously the player was totally stuck).

svn-id: r33673
2008-08-06 23:12:25 +00:00
Kari Salminen
f5e9a3e185 Tiny comment update to loadCt-opcodes: Load collision table data.
svn-id: r33670
2008-08-06 20:58:02 +00:00
Kari Salminen
a10753e2a1 Renamed page3Raw to collisionPage so it's more apparent what it does.
svn-id: r33669
2008-08-06 20:54:38 +00:00
Kari Salminen
66fc0d6a25 Add 320x200 screen bounds checking to Operation Stealth's checkCollision function.
Fixes teleporting bug when getting out of the water after first arcade sequence.
The player previously got teleported to the beach near the hotel. Now it doesn't happen.
The player is still caught motionless and can't move after this fix though...

svn-id: r33668
2008-08-06 20:47:59 +00:00
Kari Salminen
a944497d75 HACK: Force oxygen to maximum during Operation Stealth's first arcade sequence.
This way the arcade sequence is completable now.
This hack should be removed later and the first
arcade sequence be made properly playable!

svn-id: r33667
2008-08-06 20:41:53 +00:00
Kari Salminen
df1246bf9f Workaround for missing player character animation when exiting the airport in Santa Paragua in at least the 256 color PC version of Operation Stealth.
svn-id: r33644
2008-08-05 21:20:11 +00:00
Kari Salminen
f3ecdaa6fe Made rest of resource loading functions used in loadResource return -1 on error.
This fixed a crash in Operation Stealth when walking out of the airport
(Some file couldn't be opened and the game crashed because of that.
Now it doesn't crash but handles the missing file gracefully).

svn-id: r33643
2008-08-05 19:30:16 +00:00
Kari Salminen
9417066641 Add detection entry for a previously unrecognized 16 color PC version of Operation Stealth (The John Glames variant).
svn-id: r33642
2008-08-05 18:17:55 +00:00
Kari Salminen
966b5eb94e Fix prompt updating regression introduced in r32257:
Previously prompt didn't get updated all the time,
like e.g. when selecting EXAMINE and moving the
cursor over to DOOR and then moving the cursor to
a place where there was no selectable object. The
prompt would've still shown "EXAMINE DOOR", now
it shows just "EXAMINE" which is correct AFAIK.

svn-id: r33637
2008-08-05 12:58:23 +00:00
Christopher Page
4198ee9623 Merged revisions 33188-33189,33191-33193,33196,33198,33202-33203,33206,33210,33212,33218-33220,33222,33224-33226,33229-33243,33246,33248-33250,33252,33258-33261,33263,33266,33270,33272-33283,33285,33287-33290,33295-33298,33321,33325-33330,33332-33335,33337-33340,33342,33345,33347,33349-33350,33352-33357,33359-33367,33369-33371,33373,33375-33377,33379-33380,33383-33385,33387-33389,33392-33394,33400-33402,33404-33405,33407-33410,33412-33416,33418-33419,33425-33427,33432,33436-33438,33444,33446,33452-33453,33455-33459,33463-33464,33466-33471,33473-33474,33478,33490,33492,33495-33496,33509-33512,33518-33519,33522-33527,33529-33530,33537,33541,33544,33546,33550,33552-33554,33556,33558,33561-33562,33565,33568,33570,33574,33576,33578-33581,33584-33587,33590,33596,33604-33611,33614-33615,33617-33618,33620-33621 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
 

svn-id: r33624
2008-08-04 22:34:07 +00:00
Kari Salminen
99addb709c Fix for misplaced objects in mouse object selection (Operation Stealth specific).
- Implemented Operation Stealth specific part of getObjectUnderCursor
  which handles negative frame values.
- Fixed a test case (Should test for ydif <= 0 although tested for ydif < 0).
- Made part-value be anded with 0x0F in a test case to comply with disassembly.
- Added comment about a test case which isn't present in the disassembly.
  Removing it makes things crash sometimes so letting it be.

svn-id: r33620
2008-08-04 19:32:52 +00:00
Kari Salminen
efd4a7a72f Made loadResourcesFromSave internally use the loadResource-function.
Fixes Operation Stealth savegame loading! HURRAH! FINALLY!

svn-id: r33530
2008-08-02 15:59:38 +00:00
Kari Salminen
6307c46604 - Combined loadAbs and loadResource into one function.
- Made resource loading functions (loadSpl, loadMsk etc)
  return the number of the animDataTable entry right after
  the loaded data.
- Made resource loading functions always load multiframe
  data into directly sequential animDataTable entries
  (Hopefully this won't break anything).

svn-id: r33529
2008-08-02 15:47:25 +00:00
Kari Salminen
81cb493158 Debug printing a couple more relevant variables in addAni.
svn-id: r33446
2008-07-30 11:36:14 +00:00
Kari Salminen
4210defa29 Added some debug aids related to addAni and the processSeqList crashing.
svn-id: r33444
2008-07-30 11:03:52 +00:00
Christopher Page
a1e3d416fe Added --list-saves support for CINE
svn-id: r33422
2008-07-29 19:01:17 +00:00
Max Horn
0be985ce83 Changed class File (and derived classes) to only support read-only access; added a new class DumpFile for writing
svn-id: r33412
2008-07-29 16:09:10 +00:00
Kari Salminen
c9051fcfbd Make sure processSeqList and purgeSeqList are only called in the main loop when running Operation Stealth. Mostly a precaution as the seqList should be totally empty when running Future Wars as it doesn't use it.
svn-id: r33410
2008-07-29 13:46:42 +00:00
Kari Salminen
d83c6d7d68 Added purgeSeqList function (Used in mainloop now). Let's see if this helps any...
Renamed functions:
* addScriptToList0 -> addScriptToGlobalScripts
* executeList0     -> executeGlobalScripts
* executeList1     -> executeObjectScripts
* purgeList1       -> purgeObjectScripts (Also added a clarifying TODO to this function)
* purgeList0       -> purgeGlobalScripts (Also added a clarifying TODO to this function)

svn-id: r33409
2008-07-29 13:44:14 +00:00
Kari Salminen
52700d59fd Added a debug message to loadTempSaveOS's to check whether we loaded the whole savefile. Made objectStruct's clearing also clear x and y member variables in resetEngine.
svn-id: r33407
2008-07-29 12:56:32 +00:00
Kari Salminen
0365c45b8c Rearranged parts of the Operation Stealth savegame loading routine.
- Emulating the Future Wars savegame loading routine and hoping for the best.
- Fixes an array out of bounds access when loading the global scripts.
Now the loading crashes in the mainloop in processSeqList!
But at least we got a bit farther this time. More fixing to come...

svn-id: r33404
2008-07-29 10:13:53 +00:00
Max Horn
09f70b6408 Fixing 'warning: comparison of unsigned expression < 0 is always false'
svn-id: r33383
2008-07-28 22:21:11 +00:00
Kari Salminen
d2639f0c84 Fixed crash when running Operation Stealth introduced in r33339 (There are actually 256 global variables although only 255 of them are saved and loaded from savegames. The last one is VAR_BYPASS_PROTECTION and it is written to in the mainLoop so that's why there was a crash).
svn-id: r33380
2008-07-28 16:46:20 +00:00
Kari Salminen
add07fceaa Added loading of temporary Operation Stealth savegames. Needs testing!
- Music related settings and adBgVar0 & adBgVar1 aren't loaded currently.
Modified resetEngine to also reset more of the Operation Stealth specific variables.
Added getter for background scrolling value.
Changed additional background indices 1 & 2 from byte to uint16.
Made savegame loading functions return !in.ioFailed() as return value instead of true as previously.

svn-id: r33379
2008-07-28 16:02:40 +00:00
Kari Salminen
b08288c1cd Added remaining load functions needed for the Operation Stealth savegame format loading (loadSeqList and loadZoneQuery). Not used yet.
svn-id: r33367
2008-07-28 10:54:53 +00:00
Kari Salminen
c23f805a7f Cut Future Wars savegame loading routine into parts that can be reused when loading the Operation Stealth savegame format.
svn-id: r33366
2008-07-28 10:44:54 +00:00
Kari Salminen
50088df80f Now detects temporary Operation Stealth savegame format and saves it. No loading yet.
svn-id: r33365
2008-07-28 10:09:00 +00:00
Kari Salminen
16fe053ab4 Made the savegame loading routine choose between loading a Future Wars or an Operation Stealth savegame format.
Added a stub for loading the Operation Stealth's temporary savegame format (Not yet implemented).
Made mouse cursor change to a disk icon when loading a savegame and back to normal after its done.

svn-id: r33362
2008-07-28 08:44:49 +00:00
Kari Salminen
06a45c49c7 Added a preliminary saving routine for Operation Stealth (Disabled by default, needs more work still. WIP!).
Added backgrounds' name saving (8 names in Operation Stealth instead of just 1 like in Future Wars).
Added 256 color palette saving and restoring (One of the palettes isn't properly handled yet though).

svn-id: r33349
2008-07-27 22:50:36 +00:00
Kari Salminen
cedbb6b2b2 Clear the confusing usage of NUM_MAX_VAR (It's 255 actually, not 256).
svn-id: r33339
2008-07-27 14:36:53 +00:00
Kari Salminen
955d0700f5 Cut savegame loading into smaller functional parts (resetEngine, loadPlainSave etc).
svn-id: r33338
2008-07-27 14:33:37 +00:00
Kari Salminen
55bf215ba4 Renamed opcodes 0x49 and 0x68:
- Opcode 0x49: setDefaultMenuColor2 -> setDefaultMenuBgColor
- Opcode 0x68: setDefaultMenuColor  -> setPlayerCommandPosY

svn-id: r33240
2008-07-23 14:19:31 +00:00
Max Horn
c92f154b90 Fix warnings in CINE
svn-id: r33202
2008-07-22 14:38:54 +00:00
Kari Salminen
a38234d6e6 Fix CineSaveGameFormat enumeration's include order (Caused problems at least with GCC).
svn-id: r33196
2008-07-22 12:17:44 +00:00
Kari Salminen
2a90435e5d Fix for bug #2019355 (FW: broken compatibility with 0.11.1 saves):
- Changed savegame loading related functions to use SeekableReadStream
  rather than InSaveFile so MemoryReadStream can be used transparently.
- Fixed loadResourcesFromSave to load multiframe animations correctly
  and to load 0.11.0/0.11.1 Future Wars savegames which used a slightly
  different format.
- Added a savegame format detector that tries to detect between the old
  Future Wars savegame format, the new one and a broken revision of the
  new one.
- Changed makeLoad to first load the savegame fully into memory and only
  then handle it (If the savegame's packed then it's unpacked first). If
  the packed savegame can't tell its unpacked size (i.e. it's using zlib
  format) then we'll try to load up to 256kB of the savegame data.
Thanks to wjp for his help with nailing this release critical bug.

svn-id: r33192
2008-07-22 10:15:58 +00:00
Christopher Page
09f4fd946e Merged revisions 33052-33053,33056-33058,33061-33064,33068,33070,33072,33075,33078-33079,33083,33086-33087,33089,33094-33096,33098-33099,33104,33108-33109,33114-33117,33120,33135-33146,33160,33162,33165,33167-33169 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r33183
2008-07-21 22:46:39 +00:00
Kari Salminen
8757326b5f Added savefile position comments to savegame loading routine (Helpful for debugging the formats).
svn-id: r33096
2008-07-18 14:01:53 +00:00
Kari Salminen
67bef188d3 Patch #2019455: Patch for reducing the BSS size of Cine engine.
svn-id: r33087
2008-07-17 07:13:41 +00:00
Kari Salminen
60357650e0 Fix for bug #2016647 (FW: crash with italian amiga version).
- Consists of a workaround for a script bug that used local
  variable 251 when it should've used global variable 251.
- Also added a fix for a crash when failing copy protection
  in Amiga or Atari ST versions of Future Wars.
NOTE: That any of the Amiga or Atari ST versions of Future Wars
haven't crashed right in the beginning before seems like plain
luck because accessing local variable 251 is out of bounds!

svn-id: r33068
2008-07-14 23:10:51 +00:00
Christopher Page
d2e8d4831e Merged revisions 32744-32745,32747,32750-32759,32762-32764,32769,32777,32783,32785-32786,32789-32791,32798-32799,32801-32807,32809-32812,32816-32817,32819-32821,32823-32830,32832-32836,32838-32844,32846-32850,32852-32854,32858-32859,32865-32868,32873-32874,32879,32883,32895,32899,32902-32904,32910-32912,32923-32924,32930-32931,32938,32940,32948-32949,32951,32960-32964,32966-32970,32972-32974,32976,32978,32983,32986-32990,32992,32994,33002-33004,33006-33007,33009-33010,33014,33017,33021-33023,33030,33033 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r33051
2008-07-14 00:10:09 +00:00
Christopher Page
1fd613afa6 Changed CINE to RTL when copy protection fails instead of Quit
svn-id: r32985
2008-07-10 05:25:52 +00:00
Christopher Page
30b1a62e81 Removed unnecessary #inlcudes
svn-id: r32984
2008-07-10 05:15:19 +00:00
Christopher Page
e808cdf7a0 Reimplemented pushEvent() and artificialEventQueue to work with Events instead of EventTypes. Reimplemented Queue as a List instead of Array. Updated AGOS, AGI, CINE, GOB, and KYRA to work with the current implementation of the GMM
svn-id: r32971
2008-07-09 02:27:05 +00:00
Christopher Page
41938b7644 CINE works with the new GMM implementation
svn-id: r32954
2008-07-07 23:47:39 +00:00
Kari Salminen
e74d01a59a Fix for bathroom door opening crash in Operation Stealth's start.
svn-id: r32951
2008-07-07 22:02:01 +00:00
Kari Salminen
18559708c6 Fully implemented processSeqListElement
- Added parts that were missing and fixed a couple of errors
-- One test was backwards and a global variable was written to when it shouldn't have been
Added global variable inputVar0 that's used in processSeqListElement
NOTE: inputVar0 isn't updated anywhere yet, so that's a TODO

svn-id: r32874
2008-07-02 04:31:50 +00:00
Max Horn
bd296a45fa Fixed unitialized variables
svn-id: r32865
2008-07-01 10:33:25 +00:00
Kari Salminen
e415a97fe5 Removed TODO from checkCollision: Updating zoneQuery each time checkCollision is called seems to be fine.
svn-id: r32852
2008-06-30 18:15:34 +00:00
Kari Salminen
2ecf8fdbb5 Fixed addAni (A test before using resetGfxEntityEntry was incorrect). Also added comments and checked that most 8-bit values used in this function are used as signed integers.
svn-id: r32850
2008-06-30 17:24:23 +00:00
Kari Salminen
ecbf8d54ad Implemented resetGfxEntityEntry and made it used where appropriate (The function wasn't very easy to reverse engineer so it may have flaws still, but let's hope it doesn't ;-)).
svn-id: r32848
2008-06-30 03:33:08 +00:00
Kari Salminen
8cd03780f6 Implemented Operation Stealth's version of addOverlay(objectIndex, overlayType).
svn-id: r32816
2008-06-26 23:30:45 +00:00
Kari Salminen
971f27beb2 Fixed opcode:
- 0x83: o2_isSeqRunning (Should it be named o2_isSeqNotRunning?)
-- Added previously missing test part
-- Negated the result (It was backwards before!)

svn-id: r32804
2008-06-26 17:29:21 +00:00
Kari Salminen
d7051a8ef7 Comments update.
svn-id: r32802
2008-06-26 15:44:26 +00:00
Kari Salminen
68c598a3f3 Comments update.
svn-id: r32801
2008-06-26 15:16:15 +00:00
Kari Salminen
1d71ab7e1f Fix for GCC warning (Warned about testing x >= 0 when x is unsigned and therefore the test is always true).
svn-id: r32791
2008-06-25 22:13:18 +00:00
Kari Salminen
1339a55389 Implemented support for zoneQuery (Operation Stealth specific).
Fixed opcodes (related to zoneQuery):
- 0x08: o1_checkCollision
- 0x9A: o2_wasZoneChecked
NOTE: Savegame support for the zoneQuery data is broken

svn-id: r32790
2008-06-25 21:57:08 +00:00
Kari Salminen
dee147eebf Added FIXME about the broken implementation of opcode 0x9A (o2_wasZoneChecked).
svn-id: r32789
2008-06-25 18:51:44 +00:00
Kari Salminen
d5d09208b4 Implemented opcode:
- 0x82: o2_modifySeqListElement (Was o2_op82)
Seeks a matching element from the seqList and modifies its values.

svn-id: r32786
2008-06-25 17:14:44 +00:00
Kari Salminen
a2e6f35310 Implemented opcode:
- 0x8D: o2_op8D (Didn't come up with a descriptive name yet)
Compares ranges of x, y and mask parameters between two objects.
Possibly some kind of an intersection testing function?

svn-id: r32785
2008-06-25 15:09:24 +00:00
Christopher Page
c14804e22f Added main menu dialog files. Gob is now using the new _quit flag
svn-id: r32771
2008-06-24 23:19:23 +00:00
Christopher Page
f878820bbe Created Global Main Menu Dialog. Made a uniform _quit flag for engines. So far agi, agos, and cine are now using the new _quit flag.
svn-id: r32770
2008-06-24 21:15:30 +00:00
Kari Salminen
f1cacafc46 Fixed opcodes:
- 0xA0: o2_addGfxElementType20 (Was o2_addGfxElementA0)
Implemented opcodes:
- 0xA1: o2_removeGfxElementType20 (Was o2_removeGfxElementA0)
- 0xA2: o2_addGfxElementType21 (Was o2_opA2)
- 0xA3: o2_removeGfxElementType21 (Was o2_opA3)
NOTE: Drawing of type 21 overlay elements isn't coded yet.

svn-id: r32769
2008-06-24 20:44:37 +00:00
Christopher Page
8ce5dcc8e8 Merged revisions 31992,32088,32094,32129,32203,32208,32219,32236,32329,32332-32333,32357,32504,32519,32525,32566,32578,32641-32642,32673,32675,32677,32679-32680,32718-32719,32721,32739 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/gsoc2008-rtl

........
  r31992 | cpage88 | 2008-05-10 18:44:46 -0500 (Sat, 10 May 2008) | 1 line
  
  Modified game loop to return to launcher, codeblocks layouts update 1.5->1.6
........
  r32088 | cpage88 | 2008-05-13 11:09:57 -0500 (Tue, 13 May 2008) | 1 line
  
  used memmove() instead of memcpy() to fix memory overlap error
........
  r32094 | cpage88 | 2008-05-13 17:59:19 -0500 (Tue, 13 May 2008) | 1 line
  
  Fixed memory leak by deallocating memory used by window->iconPtr
........
  r32129 | cpage88 | 2008-05-14 18:26:32 -0500 (Wed, 14 May 2008) | 1 line
  
  Fixed memory leak when returning to launcher in AGOS engine by properly creating and deleting midi driver pointer
........
  r32203 | cpage88 | 2008-05-20 16:40:53 -0500 (Tue, 20 May 2008) | 1 line
  
  AGOS Engine: Began implementation for a new quit event which will cleanly return to the launcher.  This replaces the old shutdown() method within delay()
........
  r32208 | cpage88 | 2008-05-21 13:52:27 -0500 (Wed, 21 May 2008) | 1 line
  
  AGOS: Fixed two memory leaks when returning to the launcher (_mouseData and _zoneBuffers)
........
  r32219 | cpage88 | 2008-05-22 18:40:36 -0500 (Thu, 22 May 2008) | 1 line
  
  AGOS: Fixed a memory leak from earlier in a better way
........
  r32236 | cpage88 | 2008-05-23 19:08:13 -0500 (Fri, 23 May 2008) | 1 line
  
  AGI: Fixed two memory leaks when returning to launcher from AGI Engine
........
  r32329 | cpage88 | 2008-05-27 15:15:36 -0500 (Tue, 27 May 2008) | 1 line
  
  AGI: Modified AGI Engine to shutdown without using system->quit
........
  r32332 | cpage88 | 2008-05-27 18:26:48 -0500 (Tue, 27 May 2008) | 1 line
  
  CINE: Fixed two memory leaks when shutting down the CINE engine
........
  r32333 | cpage88 | 2008-05-27 19:52:45 -0500 (Tue, 27 May 2008) | 1 line
  
  CINE: Initialize exitEngine to 0 in mainLoop() to allow replay after returning to the launcher
........
  r32357 | cpage88 | 2008-05-28 18:28:11 -0500 (Wed, 28 May 2008) | 1 line
  
  LURE: Fixed some memory leaks when returning to the launcher from the LURE engine
........
  r32504 | cpage88 | 2008-06-02 16:08:49 -0500 (Mon, 02 Jun 2008) | 1 line
  
  PARA: Got rid of calls to system->quit() so that the Parallaction engine can return to the launcher.  Also fixed a couple of memory leaks.
........
  r32519 | cpage88 | 2008-06-03 13:24:54 -0500 (Tue, 03 Jun 2008) | 1 line
  
  PARA: Fixed some memory leaks
........
  r32525 | cpage88 | 2008-06-04 00:21:47 -0500 (Wed, 04 Jun 2008) | 1 line
  
  QUEEN: Modified engine to use a quit flag instead of system->quit() in order to return to the launcher
........
  r32566 | cpage88 | 2008-06-05 19:34:47 -0500 (Thu, 05 Jun 2008) | 1 line
  
  TOUCHE: Fixed a memory leak
........
  r32578 | cpage88 | 2008-06-06 11:40:39 -0500 (Fri, 06 Jun 2008) | 1 line
  
  SKY: Fixed a memory leak in SKY engine
........
  r32641 | cpage88 | 2008-06-09 17:26:05 -0500 (Mon, 09 Jun 2008) | 1 line
  
  TOUCHE: Reverted some comments that were used for testing purposes
........
  r32642 | cpage88 | 2008-06-09 18:15:17 -0500 (Mon, 09 Jun 2008) | 1 line
  
  Implemented popAllCursors() in CursorManager to ensure that all unnecessary cursors are removed from the cursor stack when returning to the launcher
........
  r32673 | cpage88 | 2008-06-12 11:58:02 -0500 (Thu, 12 Jun 2008) | 1 line
  
  SAGA: Fixed memory leaks in the SAGA engine
........
  r32675 | cpage88 | 2008-06-12 13:11:09 -0500 (Thu, 12 Jun 2008) | 1 line
  
  LURE: Fixed memory leaks in the LURE engine
........
  r32677 | cpage88 | 2008-06-12 13:52:43 -0500 (Thu, 12 Jun 2008) | 1 line
  
  CINE: Fixed memory leaks in the CINE engine
........
  r32679 | cpage88 | 2008-06-12 14:34:32 -0500 (Thu, 12 Jun 2008) | 1 line
  
  AGOS: Fixed a memory leak in the AGOS engine
........
  r32680 | cpage88 | 2008-06-12 14:43:54 -0500 (Thu, 12 Jun 2008) | 1 line
  
  SCUMM: Fixed a memory leak in the SCUMM engine
........
  r32718 | cpage88 | 2008-06-16 12:34:58 -0500 (Mon, 16 Jun 2008) | 1 line
  
  AGOS: Found a system->quit(), changed to _quit=true
........
  r32719 | cpage88 | 2008-06-16 13:47:32 -0500 (Mon, 16 Jun 2008) | 1 line
  
  Fixed a problem where the function that I previously implemented, popAllCursors(), was causing the mouse cursor to disapear
........
  r32721 | cpage88 | 2008-06-16 14:55:59 -0500 (Mon, 16 Jun 2008) | 1 line
  
  Cleaned up some unnecessary comments
........
  r32739 | cpage88 | 2008-06-20 14:38:38 -0500 (Fri, 20 Jun 2008) | 1 line
  
  Reverting changes to codeblocks layouts made in revision 31992
........

svn-id: r32742
2008-06-20 20:20:46 +00:00
Christopher Page
65abece4c6 Merged revisions 32727-32728,32730-32733,32737-32738 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r32740
2008-06-20 19:42:29 +00:00
Kari Salminen
9b910eedba Fixed a small discrepancy in Delphine unpacker's command 00b's documentation (Parameter range is 1..8, not 1..9).
svn-id: r32730
2008-06-18 03:31:13 +00:00
Christopher Page
37a7a572cf Merged revisions 32668-32669,32676,32687-32689,32693,32695,32698-32701,32705 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r32720
2008-06-16 19:06:48 +00:00
Kari Salminen
2b94f21744 Small cleanup (uint16 -> uint where still applicable).
svn-id: r32689
2008-06-13 08:37:03 +00:00
Kari Salminen
1a6841c92f More documentation for CineUnpacker-class (Practically done documenting now). Also changed parameter and return value types to a more uniform style (uint16 -> uint, int -> uint where applicable etc).
svn-id: r32688
2008-06-13 08:28:14 +00:00
Kari Salminen
d7d9348243 Made CineUnpacker::unpack more robust & secure. It shouldn't crash now with any input (Before making reading or writing operations they are checked to be in bounds). Also updated some comments and added some error message(s).
svn-id: r32687
2008-06-13 05:57:07 +00:00
Christopher Page
101105315e CINE: Fixed memory leaks in the CINE engine
svn-id: r32677
2008-06-12 18:52:43 +00:00
Christopher Page
e86a422e25 Merged revisions 32564-32565,32567-32575,32577,32579-32594,32596-32603,32605-32639,32644-32646,32648-32666 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r32667
2008-06-11 17:36:21 +00:00
Kari Salminen
7186c3bd1b Documented CineUnpacker class.
svn-id: r32665
2008-06-11 11:06:07 +00:00
Max Horn
fefad79249 No need to specify CaseSensitiveString_Hash explicitly anymore
svn-id: r32663
2008-06-11 06:00:56 +00:00
Kari Salminen
efc4fd7ae0 A little Delphine unpacker documentation addition and variable renaming.
svn-id: r32660
2008-06-10 22:37:55 +00:00
Kari Salminen
009e26f813 Changed unpackHelper1(numBits, addCount) to unpackBytes(numBytes).
svn-id: r32655
2008-06-10 21:44:59 +00:00
Kari Salminen
420d29932b unpackerHelper2(numBits) -> copyRelocatesBytes(offset, numBytes) and some revising of the unpacking routine.
svn-id: r32653
2008-06-10 21:34:26 +00:00
Kari Salminen
fdf3f36bc6 Properly renamed some of the functions in the Delphine unpacker after understanding what they really do.
svn-id: r32649
2008-06-10 20:57:22 +00:00
Kari Salminen
3823a23b70 Objectified the Delphine decompression routine (i.e. delphineUnpack).
svn-id: r32646
2008-06-10 19:08:53 +00:00
Torbjörn Andersson
339874f6c0 Fixed warnings. (Mainly, GCC 4.3 doesn't want you to use "char" as an array
index. Probably because it's undefined whether or not it's signed.)

svn-id: r32637
2008-06-09 17:50:52 +00:00
Kari Salminen
e2e4c90bb3 Fixed readVolCnf() filename length detection and converted fixVolCnfFileName-function to something easier to understand.
svn-id: r32618
2008-06-08 15:22:04 +00:00
Christopher Page
0cbfc3a9d1 Merged revisions 32348-32349,32351-32356,32358-32411,32413-32441,32443-32445,32449,32453-32454,32456-32457,32459-32462,32464-32465,32467-32492,32494-32503 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r32505
2008-06-02 21:36:45 +00:00
Kari Salminen
b6b1b864be Checked that opcodes 0x71-0x73 really do nothing else but read the parameters in PC versions of Future Wars and Operation Stealth. Maybe they're used in the Amiga versions?
svn-id: r32396
2008-05-30 11:12:14 +00:00
Kari Salminen
94d1e7effb Implemented opcodes 0x04 (o1_mulObjectParam) and 0x05 (o1_divObjectParam).
svn-id: r32393
2008-05-30 10:43:21 +00:00
Kari Salminen
b7deac38b3 Added check in modifyObjectParam's start (Verified with FW & OS PC versions' disassemblies). Also removed superfluous default-case, hopefully no compiler will complain about this :).
svn-id: r32371
2008-05-29 22:07:25 +00:00
Filippos Karapetis
7ced1215d4 Fixed a crash that occurs when OS starts
svn-id: r32366
2008-05-29 17:58:56 +00:00
Kari Salminen
3f91c579fc Verified most parts of opcode 0x01 (o1_modifyObjectParam) against Future Wars's and Operation Stealth's disassembly (Only part of switch case 3 still left to do).
svn-id: r32360
2008-05-29 12:22:14 +00:00
Kari Salminen
5779261c16 Tiny comment update (Echec in French means failure).
svn-id: r32358
2008-05-29 10:15:39 +00:00
Christopher Page
8297ead267 Merged revisions 32124,32126-32128,32131,32133,32135-32144,32146-32153,32155-32163,32165-32168,32170-32173,32175-32179,32181-32191,32193-32202,32204-32205,32209-32214,32216,32218,32220-32235,32237-32266,32269-32271,32273-32290,32292-32295,32297-32317,32319-32323,32325-32328,32330-32331,32334-32338,32343-32347 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

svn-id: r32350
2008-05-28 20:30:20 +00:00
Kari Salminen
51e4e487b1 Implemented opcode 0x9A (o2_wasZoneChecked).
svn-id: r32336
2008-05-28 13:00:27 +00:00
Kari Salminen
f0195a01f6 Fix Operation Stealth's opcode 0x82's parameter list (Verified with DOS version's disassembly).
svn-id: r32335
2008-05-28 12:05:40 +00:00
Christopher Page
3c0e72bb25 CINE: Initialize exitEngine to 0 in mainLoop() to allow replay after returning to the launcher
svn-id: r32333
2008-05-28 00:52:45 +00:00
Christopher Page
17b0144402 CINE: Fixed two memory leaks when shutting down the CINE engine
svn-id: r32332
2008-05-27 23:26:48 +00:00
Kari Salminen
c0f1b7fe66 Added a few more comments about Operation Stealth's opcodes (Redundancies, Future Wars's opcodes' end point).
svn-id: r32328
2008-05-27 19:36:39 +00:00
Kari Salminen
17fd16a38e Went through Operation Stealth's opcode list and added TODOs for naming all unknown functions properly and some notes about opcode redundancies.
svn-id: r32327
2008-05-27 19:25:04 +00:00
Eugene Sandulenko
f2d72d9473 Patch #1969189: "CinE renderer rewrite"
svn-id: r32257
2008-05-24 22:11:41 +00:00
Eugene Sandulenko
51352c71c5 Proper fix for savestates. Thanks to next_ghost
svn-id: r32073
2008-05-12 21:03:26 +00:00
Jordi Vilalta Prat
38a8aa516e Allow static and dynamic plugins to be used at the same time
svn-id: r31888
2008-05-06 03:00:26 +00:00
Kari Salminen
9ba0aa01fa Cleanup & typo.
- Use sizeof(_name) instead of magic number 10 with memset
- 'usually' instead of 'ussually'
- 'delete[]' instead of 'delete []'
- Fixed parameter name discrepancy between loadResource's definition and declaration

svn-id: r31701
2008-04-24 20:04:53 +00:00
Filippos Karapetis
5cf618937f Fixed regression: CINE games crashed when a message box appeared (patch by next_ghost)
svn-id: r31696
2008-04-24 17:32:24 +00:00
Eugene Sandulenko
57a9ef3a8f Patch #1941066: "CinE sprite overlay rewrite" courtsey of next_ghost
svn-id: r31651
2008-04-21 20:51:17 +00:00
Johannes Schickel
b586235fb8 Fixed warnings for msvc9.
svn-id: r31460
2008-04-09 15:16:50 +00:00
Eugene Sandulenko
e4ddd5d5f1 Ignore pointers on save
svn-id: r31453
2008-04-08 18:12:32 +00:00
Sven Hesse
9f94a2fa8c Fix compilation on my 64-bit system...
svn-id: r31450
2008-04-08 09:59:41 +00:00
Eugene Sandulenko
732774fd8d Patch #1913862: "CinE Script system"
svn-id: r31444
2008-04-07 20:24:40 +00:00
Max Horn
29f1e6de38 Advanced detector: replaced kADFlagAugmentPreferredTarget by its inverse, kADFlagDontAugmentPreferredTarget (since all AdvDetector engines except Kyra used kADFlagAugmentPreferredTarget, it seems reasonable to assume that as default)
svn-id: r31413
2008-04-05 22:29:08 +00:00
Filippos Karapetis
1e58257791 Oops
svn-id: r31297
2008-03-28 17:46:18 +00:00
Filippos Karapetis
70e4503274 Fixed 2 off-by-one errors (thanks next_ghost for spotting them)
svn-id: r31296
2008-03-28 17:38:45 +00:00
Max Horn
6547ef6e12 Started to get rid of Common::EncapsulatedADGameDesc (using plain Common::ADGameDescription instead)
svn-id: r31121
2008-03-14 17:31:04 +00:00
Max Horn
8a9a14002e Advanced Detector: Changed fallback detector from a callback function pointer to an overrideable method of AdvancedMetaEngine
svn-id: r31119
2008-03-14 13:59:31 +00:00
Max Horn
88bb567e18 Merged lots of _mixer->isReady() warnings into a single one in Engine constructor
svn-id: r30871
2008-02-15 17:01:35 +00:00
Jordi Vilalta Prat
c103290e2b Initial support for plugin types
svn-id: r30825
2008-02-08 00:02:23 +00:00
Max Horn
8a73356a2d Revised Engine plugin API to only provide a single func which returns a MetaEngine instance. Used this to simplify the rest of the plugin system
svn-id: r30780
2008-02-03 18:56:47 +00:00
Torbjörn Andersson
e51bf80218 Changed "COMPATIBLITY" to "COMPATIBILITY".
svn-id: r30754
2008-02-03 10:15:36 +00:00
Max Horn
34b35348be Moved AdvancedMetaEngine to namespace Common
svn-id: r30736
2008-02-02 11:52:04 +00:00
Jordi Vilalta Prat
5165ff448d Converted the remaining engines to use MetaEngine
svn-id: r30728
2008-02-02 02:35:13 +00:00
Jordi Vilalta Prat
d6c34bdc4b Fixed the spaces before tabs.
svn-id: r30667
2008-01-28 00:14:17 +00:00
Jordi Vilalta Prat
66e9d4f5e8 Removed trailing spaces.
svn-id: r30664
2008-01-27 19:47:41 +00:00
Eugene Sandulenko
7aadf6c191 Slightly modified patch #1848173: "ScriptVars class implementation for CinE"
svn-id: r30125
2008-01-01 16:57:03 +00:00
Eugene Sandulenko
6b722c2f1c _Properly_ fix lock-up introduced introduced in revision 29860. A typical
c/p error.

svn-id: r29982
2007-12-24 19:49:28 +00:00
Eugene Sandulenko
fd22ebb269 Fix regressions (crashes) introduced in commit 29860
svn-id: r29981
2007-12-24 19:13:32 +00:00
Filippos Karapetis
50cf084a6b Cleanup
svn-id: r29973
2007-12-24 10:11:41 +00:00
Filippos Karapetis
8b0ae7983c Change 3 remaining free() to delete, which were not changed with commit #29841 (part of patch #1848173)
svn-id: r29972
2007-12-24 10:10:21 +00:00
Filippos Karapetis
46ee7e6791 Slight cleanup
svn-id: r29934
2007-12-21 02:43:21 +00:00
Gregory Montoir
bb30d560b2 renamed several structures, variables and functions
svn-id: r29860
2007-12-14 19:21:19 +00:00
Filippos Karapetis
57460c21b3 Added a note, switched to CLIP template for clipping, some cleanup
svn-id: r29859
2007-12-14 13:55:18 +00:00
Filippos Karapetis
729c843091 Cleanup
svn-id: r29858
2007-12-14 13:51:41 +00:00
Gregory Montoir
e1b73e47f8 use CLIP template for clipping, made an array static const and renamed MAX_OBJECTDATA to MAX_VAR
svn-id: r29853
2007-12-13 19:07:10 +00:00
Filippos Karapetis
ee56120fcf Added a proper fix for bug #1733238 - "FW: crash in copier room", taken from next_ghost's patch #1848173 - "ScriptVars class implementation for CinE"
svn-id: r29852
2007-12-13 17:53:31 +00:00
Filippos Karapetis
3240d0636a Fixed a regression from the latest cleanups
svn-id: r29851
2007-12-13 17:47:54 +00:00
Filippos Karapetis
280d634455 Fixed an incorrect copy/paste
svn-id: r29850
2007-12-13 17:03:14 +00:00
Filippos Karapetis
30be440557 Fixed regression introduced by the latest cleanups
svn-id: r29849
2007-12-13 15:10:52 +00:00
Filippos Karapetis
dd14a43cac Fixed one more regression from the latest cleanup
svn-id: r29848
2007-12-13 14:04:36 +00:00
Filippos Karapetis
2cb9ea3c10 Fixed a regression from the latest cleanup
svn-id: r29847
2007-12-13 13:51:04 +00:00
Sven Hesse
1d338096f0 Muting the compiler :P
svn-id: r29846
2007-12-13 13:26:49 +00:00
Filippos Karapetis
2991b03cc4 Cleanup and simplification
svn-id: r29845
2007-12-13 13:17:45 +00:00
Filippos Karapetis
8b7f3fae35 Cleanup
svn-id: r29844
2007-12-13 12:33:31 +00:00
Filippos Karapetis
2f7539e865 Cleanup
svn-id: r29843
2007-12-13 11:11:38 +00:00
Filippos Karapetis
a9e1f39a16 Cleanup and simplification
svn-id: r29842
2007-12-13 10:47:14 +00:00
Filippos Karapetis
8968f7e616 Changed the C style malloc/free to the C++ style new/delete
svn-id: r29841
2007-12-13 10:06:53 +00:00
Torbjörn Andersson
6589dba7f5 Fixed warning about casting away constness.
svn-id: r29839
2007-12-12 21:56:22 +00:00
Filippos Karapetis
dcf4755dc1 Cleanup, removed duplicate code
svn-id: r29838
2007-12-12 21:39:00 +00:00
Filippos Karapetis
99453537f1 Cleanup
svn-id: r29830
2007-12-11 23:16:15 +00:00
Gregory Montoir
a94fada0ae - minor screen fix for OS
- added new debug channel for sound
- updated 2 opcodes comments

svn-id: r29790
2007-12-09 13:41:59 +00:00
Gregory Montoir
6ef7e37488 reverted parts of commits #29447 and #29446 (caused regressions in ADL music playback) and properly (I hope) fixed the sound issues described in tracker item #1763053.
svn-id: r29766
2007-12-08 15:24:42 +00:00
Gregory Montoir
aae704f6cd amiga demo version of OS has a VOL.CNF file so I assume full versions of the game also use it ; enabled readVolCnf for all versions of OS.
svn-id: r29760
2007-12-08 09:51:24 +00:00
Gregory Montoir
c271093fbb simplified gfxConvertSpriteToRaw, some renaming
svn-id: r29758
2007-12-08 09:10:08 +00:00
Gregory Montoir
6b68c156ae made timing closer to the original interpreter and simplified manageEvents function (no need to recurse)
svn-id: r29757
2007-12-08 08:49:22 +00:00
Gregory Montoir
e82c2b3fb9 reverted part of commit #29749, inplace unpacking doesn't work with .ani data
svn-id: r29756
2007-12-08 08:48:31 +00:00
Filippos Karapetis
e905723b1e Cleanup and simplification
svn-id: r29755
2007-12-08 02:38:04 +00:00
Filippos Karapetis
c488384f19 Cleanup and simplification
svn-id: r29754
2007-12-08 02:24:12 +00:00