Commit Graph

65 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
e74d01a59a Fix for bathroom door opening crash in Operation Stealth's start.
svn-id: r32951
2008-07-07 22:02:01 +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
Filippos Karapetis
7ced1215d4 Fixed a crash that occurs when OS starts
svn-id: r32366
2008-05-29 17:58:56 +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
Eugene Sandulenko
732774fd8d Patch #1913862: "CinE Script system"
svn-id: r31444
2008-04-07 20:24:40 +00:00
Gregory Montoir
bb30d560b2 renamed several structures, variables and functions
svn-id: r29860
2007-12-14 19:21:19 +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
2f7539e865 Cleanup
svn-id: r29843
2007-12-13 11:11:38 +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
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
Gregory Montoir
3afd0d9557 removed 4 unused offscreen buffers ; also changed several 64k buffers to be dynamically allocated.
svn-id: r26879
2007-05-19 21:12:10 +00:00
Gregory Montoir
93e41222b5 added debug code to display sprite masks
svn-id: r26865
2007-05-18 09:19:35 +00:00
Gregory Montoir
e16e11fdf2 added missing MIN() calls
svn-id: r26864
2007-05-18 09:14:27 +00:00
Gregory Montoir
1b3458e429 moved gfx related functions from various.cpp/.h to gfx.cpp/.h and fixed indentation of previous commit
svn-id: r26863
2007-05-17 22:26:05 +00:00
Gregory Montoir
e9827d0884 added code for gfxSpriteFunc1 and gfxSpriteFunc2, which are used for sprite masking (see also bug #1624797)
svn-id: r26861
2007-05-17 22:13:31 +00:00
Torbjörn Andersson
3bc0661065 Merged the "palette manager" into the cursor manager. It was only used to
manage *cursor* palettes, so the name was misleading.

svn-id: r25500
2007-02-12 00:04:56 +00:00
Eugene Sandulenko
207ef00754 et up cursor palette. This fixes Amiga/Atari versions and makes cursor more
visible in most cases.

svn-id: r24766
2006-11-23 06:45:21 +00:00
Eugene Sandulenko
c558018bd9 Implement o1_fadeToBlack()
svn-id: r24738
2006-11-18 20:57:37 +00:00
Eugene Sandulenko
95749148cf Add proper game detection to CinE engine.
svn-id: r24320
2006-10-15 01:06:44 +00:00