Commit Graph
211 Commits
Author SHA1 Message Date
Le Philousophe b75ecadf56 CINE: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
Le Philousophe c618b7fe91 CINE: Don't use unsafe strcat and strcpy 2022-10-23 22:46:19 +02:00
Donovan Watteau 27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh 0b818ad3f6 CINE: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Kari Salminen 294ed169f9 CINE: OS: Fix space missing in verb line
Fixes #11687
2021-09-04 23:14:18 +02:00
Cameron Cawley 74129492ba CINE: Avoid using static objects with destructors 2021-09-02 21:41:14 +03:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Kari Salminen 70d16a3689 CINE: FW: Fix command line updating
In Future Wars the command line was not always updated and thus failed
sometimes to be up to date (i.e. showing wrong text, e.g. "EXAMINE" only
when it should have read "EXAMINE scaffolding" because the mouse cursor
was on the scaffolding).

Now we just always update the command line for both Future Wars and
Operation Stealth which seems to fix the command line updating.

I think this probably was a regression caused by adding support for
Operation Stealth (i.e. pull request #2365) and the efforts made in it
to make the user interface responsive.
2020-09-10 00:34:32 +01:00
Kari Salminen 1ce7db5572 CINE: Fix using F3 for INVENTORY and F4 for USE.
Previously the inventory could be summoned multiple times by pressing
F3 or F4. Fix that by keeping track when the inventory has been opened
and not allowing multiple use of it simultaneously.
2020-09-10 00:34:32 +01:00
Kari Salminen 7b3b07eb37 CINE: Fix mouse responsiveness after player death
After player has died it was hard to get the system menu to appear by
pressing the left and right mouse buttons simultaneously or the middle
mouse button. Fix that by using the maximum values of the mouse button
states for the polling period (Around 110ms at default play speed).
2020-09-10 00:34:32 +01:00
Kari Salminen e9b585df4e CINE: OS: Fix MT-32/AdLib SFX & loading savegames
In Operation Stealth DOS and Atari ST versions, but not Amiga or
demo versions, sound effects are loaded in AUTO00.PRC using a
combination of o2_loadAbs and o2_playSample(1, ...) before
o1_freePartRange(0, 200). This is a better heuristic for ending the
script at the correct position than checking whether global variable
255 is compared to 0. In the original game AUTO00.PRC was run when
starting or restarting the game and one could not load a savegame
before passing the copy protection. Thus, we try to emulate that
behaviour by running at least part of AUTO00.PRC before loading a
savegame.
2020-09-04 10:31:33 +02:00
Kari Salminen c27ae2758d CINE: Support 100 savegames also with original UI
This raises the maximum number of savegames from 20 to 100.
The original UI could only show 20 on a screen at once so an
intermediate selection menu for selecting the group of 20 savegames
to be accessed is added in this commit:

0-19
20-39
40-59
60-79
80-99

Those are the values that are shown when selecting
"Restore game" or "Save game".

After selecting the group of savegames to be accessed that particular
group is only shown as those 20 can fit on the screen using the
original save/load UI.

At least partially if not fully fixes bug #11625.
2020-08-30 21:54:54 +01:00
Kari Salminen 0af1bfc1f9 CINE: Throttle safe controls to max 4Hz (#11621).
This throttles the safe controls in Operation Stealth in the
presidential palace after the first labyrinth arcade sequence.

The problem was that the safe controls were a bit too fast i.e. by
pressing on a single button you might easily get the numbers to change
by more than a single digit. This throttles the pressing of safe
control buttons in this particular scene to a maximum rate of 4Hz
(i.e. at least 250ms has to have passed before a click is registered
again).

Fixes bug #11621.
2020-08-30 21:54:42 +01:00
Eugene Sandulenko 956b33a411 CINE: Fix warnings 2020-08-26 01:32:55 +02:00
Kari Salminen 2ca52fc007 CINE: Add support for Operation Stealth.
Add support for Operation Stealth PC 16 and 256 color versions with
AdLib and Roland MT-32 sound. Add support for 20 extended savegames
(Thumbnails, playtime etc) for both Future Wars and Operation Stealth
(20 because it fits on screen using the original save/load interface).

Details:
 - Add versioning to Future Wars and Operation Stealth savegames.
 - Add fade in effect to both Future Wars and Operation Stealth.
 - Add mouse wheel support and keyboard support to moving in menus.
 - Map middle mouse button to pressing both left and right buttons.
 - Make interface more responsive (See manageEvents() and drawFrame()).
 - Amiga versions should be completable but sound may or may not work.
 - Atari ST versions completely untested.

Game options currently supported:
 - Using original save/load interface
 - Using transparent dialog boxes in 16 color scenes (Also for PC)

Console commands currently supported:
 - labyrinthCheat (For cheating in Operation Stealth's labyrinths)
 - disableLabyrinthCheat (Disabling labyrinth cheat)
 - disableHacks (Disabling hacks, useful for testing)
 - enableHacks (Enabling hacks, useful for testing. On by default)
2020-07-25 00:33:42 +02:00
D G Turner f7593adb3e CINE: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-17 00:47:34 +01:00
Eugene Sandulenko c76e2666f5 JANITORIAL: Fix GCC 7 fall through warning 2017-08-11 20:40:37 +02:00
Ori Avtalion d8045c6727 JANITORIAL: Fix clang printf warnings 2016-01-07 14:55:32 +02:00
Johannes Schickel c9bda09bc0 CINE: Prevent buffer overruns in scummVMSaveLoadDialog. 2015-12-28 00:36:24 +01:00
Filippos Karapetis e52cf3e7aa CINE: Add support for ScummVM save/load menus 2015-12-28 00:31:50 +02:00
Strangerke 9dcb559488 CINE: Add a safeguard, split makeCommandLine() per game type 2014-03-22 11:42:06 +01:00
Johannes Schickel 4ad7c5b40d CINE: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Eugene Sandulenko 9b8aa5e135 CINE: Null terminate string. CID 1003886 2013-04-26 08:04:38 +03:00
Johannes Schickel 5d84f2df43 CINE: A little bit enforcement of our formatting guidelines.
Powered by astyle & manual fixup afterwards.
2012-09-07 04:12:18 +01:00
Vincent Hamm 92df76fbb3 CINE: Fix system menu sometimes not appearing in OS 2012-08-13 23:58:32 -07:00
Torbjörn Andersson e6fbc4fb88 CINE: Remove unused variable 'di'
As far as I can tell, it converted the selection back to Y coordinate
for no apparent reason.
2011-10-09 10:16:04 +02:00
eriktorbjorn 5dd8f2575b JANITORIAL: Silence a couple of "variable set but not used" warnings. 2011-06-30 23:47:10 +02:00
Max Horn 88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
D G Turner 0d379b3783 CINE: Replace snprintf() usage with Common::String::format()
Safer and less portability issues.
2011-06-02 03:44:31 +01:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn 2d1c8a3533 ALL: Fix whitespaces / indention
svn-id: r55818
2011-02-07 23:01:06 +00:00
Eugene Sandulenko 327d30d719 CINE: eliminate global variables
svn-id: r51937
2010-08-09 11:38:01 +00:00
Max Horn 587f3cf958 CINE: Get rid of g_saveFileMan
svn-id: r50944
2010-07-16 21:56:30 +00:00
Eugene Sandulenko 15c533d2c2 Implement FR #2841445: FW: Restart doesn't work
svn-id: r49096
2010-05-19 12:34:10 +00:00
Eugene Sandulenko 2be9bb3d5f Implement FR #2841494: FW: Pause doesn't work
svn-id: r49095
2010-05-19 12:17:59 +00:00
Eugene Sandulenko 0078818549 Patch #2987340: GSoC: CINE: Hide cursor when viewing inventory
svn-id: r48994
2010-05-09 21:15:58 +00:00
Max Horn 37b7be4519 CINE: Change Doxygen commands to match our CFC
svn-id: r48764
2010-04-21 21:22:43 +00:00
Kari Salminen 5d62e682cc Cine: Fix regression in executePlayerInput (Caused slowness when clicking when moving).
The regression was caused by r47505.

svn-id: r48373
2010-03-23 22:54:32 +00:00
Max Horn cac0ac66e2 COMMON: Get rid of Common::StringList
svn-id: r48287
2010-03-18 15:54:40 +00:00
Johannes Schickel aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Kari Salminen 69e6b2a27a Cine: executePlayerInput: Operation Stealth: Fix target object name not disappearing when passing over an empty area with a verb already chosen.
svn-id: r47519
2010-01-24 20:23:09 +00:00
Kari Salminen 710dd33592 Cine: executePlayerInput: Fix broken Y-movement in Operation Stealth (D'oh! Copy-pasted X to where Y was meant :-P).
- Hopefully NOW things should work without r33872!

svn-id: r47518
2010-01-24 20:16:16 +00:00
Kari Salminen bd7b9400a6 Cine: executePlayerInput: Add TODO about investigating why some buttons don't work currently.
svn-id: r47517
2010-01-24 19:57:23 +00:00
Kari Salminen ab730891ad Cine: executePlayerInput: Revert r33872 as things should work without it now.
With the latest changes to executePlayerInput we
should now be able to free the girl at the bottom of the
ocean without the r33872.

The commit log from r33872 was:

"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: r47516
2010-01-24 19:52:11 +00:00
Kari Salminen c19afec75a Cine: executePlayerInput: Add makeActionMenu-part to keyboard handling and a couple of TODOs for Operation Stealth.
- NOTE: This doesn't seem to work correctly yet.
   My current guess is that it has to do with how
   some keyboard events are handled in cine/main_loop.cpp's
   processEvent-function and some in cine/various.cpp's
   executePlayerInput.

svn-id: r47515
2010-01-24 19:47:53 +00:00
Kari Salminen f2882cc2df Cine: executePlayerInput: Implement moving using keyboard for Operation Stealth.
svn-id: r47513
2010-01-24 19:14:09 +00:00
Kari Salminen d8cb07251e Cine: executePlayerInput: Implement 'A player command is given, left mouse button is down, right mouse button is up'-case for Operation Stealth.
- Also changed a do-while -loop into a
   while-loop as it should be for both
   FW and OS according to disassembly.

svn-id: r47512
2010-01-24 18:58:57 +00:00
Kari Salminen 865b176b15 Cine: executePlayerInput: Fix 'No player command is given, left mouse button is down, right mouse button is up'-case for Operation Stealth.
svn-id: r47510
2010-01-24 18:40:29 +00:00