Commit Graph

118 Commits

Author SHA1 Message Date
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
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
Max Horn
c92f154b90 Fix warnings in CINE
svn-id: r33202
2008-07-22 14:38:54 +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
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
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
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
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
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
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
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
Eugene Sandulenko
f2d72d9473 Patch #1969189: "CinE renderer rewrite"
svn-id: r32257
2008-05-24 22:11:41 +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
Eugene Sandulenko
732774fd8d Patch #1913862: "CinE Script system"
svn-id: r31444
2008-04-07 20:24:40 +00:00
Jordi Vilalta Prat
d6c34bdc4b Fixed the spaces before tabs.
svn-id: r30667
2008-01-28 00:14:17 +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
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
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
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
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
c271093fbb simplified gfxConvertSpriteToRaw, some renaming
svn-id: r29758
2007-12-08 09:10:08 +00:00
Filippos Karapetis
e905723b1e Cleanup and simplification
svn-id: r29755
2007-12-08 02:38:04 +00:00
Gregory Montoir
126f55fd0e backported some changes for OS
- added parsing of VOL.CNF to get the (filename,bundle) mapping (should be more efficient than testing every bundle file)
- delphineUnpack allows "inplace unpacking", use this instead of allocating temporary buffers
- relation script run count should be set in _localVars[0]
- added comments for some "special" script variables

svn-id: r29749
2007-12-07 20:45:51 +00:00
Eugene Sandulenko
77eea722af Modified patch #1738058: "Action recorder".
svn-id: r28968
2007-09-19 13:55:05 +00:00
Nicola Mettifogo
258901bab9 Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
2007-09-19 08:40:12 +00:00
Neil Millstone
c43f68e554 Fix bug where an object was accessed after it was deleted in cine engine
svn-id: r27870
2007-07-02 22:42:35 +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
54d668ac13 Changed more code to use Common::KEYCODE_ enum
svn-id: r27624
2007-06-22 21:10:57 +00:00
Torbjörn Andersson
059ba7326c Fixed some Valgrind warnings (overlapping source and destination in strcpy()).
svn-id: r27207
2007-06-08 19:29:48 +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