Commit Graph

19 Commits

Author SHA1 Message Date
Kari Salminen
c501ef1450 Cleanup (Removed an extra 'return 0').
svn-id: r34826
2008-10-19 08:52:04 +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
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
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
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
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
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
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
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
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
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
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
Eugene Sandulenko
f2d72d9473 Patch #1969189: "CinE renderer rewrite"
svn-id: r32257
2008-05-24 22:11:41 +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