Commit Graph
212 Commits
Author SHA1 Message Date
antoniou79 1be2092c9b BLADERUNNER: Use unsigned difference for robust behavior
For the emulation of repeated key firing while holding Esc or Return keys pressed
2020-09-02 23:25:55 +03:00
antoniou79 6dfcb3e558 BLADERUNNER: Allow Esc and Return keys to fire repeatedly (emulated)
Should resolve ticket #11407

https://bugs.scummvm.org/ticket/11407
However, in our commons/events.h currently there are TODO notes about implementing support for repeated firing of keyboard keys so this could be revisited in the future to use that functionality when implemented
2020-09-01 20:13:44 +03:00
aryanrawlani28 bed05ea134 GUI: U32: Fix compilation errors across entire project
After the initial changes just to scummvm/gui for u32, this commit includes the whole project

- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor
2020-08-30 14:43:41 +02:00
Thanasis Antoniou a78efc244c BLADERUNNER: Respect the No Music ScummVM setting
This refers to the Audio tab's "Music Device" set to "No Music" setting

Default ("Auto") and any other setting will result to music. Only the explicit No Music is respected now (it wasn't before).
As I note in the comments, these two first dropdowns in the Audio tab are largely irrelevant for Blade Runner
and ideally they should not appear for it (and similar engines). Maybe they could just be replaced
with a checkbox for toggling Music as enabled/disabled (which is the logic that this fix essentially follows)
2020-06-07 13:03:23 +03:00
mataniko 581a6ec7d6 JANITORIAL: Rename kSupportsRTL to kSupportsReturnToLauncher 2020-05-12 10:36:38 +02:00
Thanasis Antoniou a772bbb3e1 BLADERUNNER: Validation of boot params and skip of KIA screen
KIA screen should be skipped when save games exist, but a valid boot param has been specified

The boot param validation uses existing code in the debugger to ensure valid combination of chapter, set and scene
2020-05-11 22:28:54 +03:00
Thanasis Antoniou 210d50c5cd BLADERUNNER: Add explanatory comment on the check of _gameJustLaunched flag 2020-05-11 15:32:41 +03:00
Thanasis Antoniou 22ee236643 BLADERUNNER: Ignore first event in gameTick() when launching game
This prevents a "hack" that was discovered by players to boot into KIA directly even when no saved games exist

We will provide in a future commit, the option to start into KIA even upon launching the game without any saved games, but that should be properly implemented to prevent bugs/ side-effects (that the current "hack" causes).
2020-05-11 00:53:11 +03:00
Thanasis Antoniou 995a44eb78 BLADERUNNER: Fix comparison between unsigned 2020-04-18 10:24:22 +03:00
Thanasis Antoniou 463cde371d BLADERUNNER: Tidy up shutdown code a bit 2020-03-05 22:28:35 +02:00
Thanasis Antoniou f07c27d172 BLADERUNNER: Fix segmentation fault when missing files
Cause was deleting _shapes without _shapes being initialized to nullptr

Error occured when Bladerunner engine exited early due to missing data files. In this case the _shapes is not yet initialized, yet its deletion was calling the Shapes destruction and the array clear function leading to a segmentaiton fault. To reproduce just remove or rename one of the required files for BladeRunner and run the game (the error might not be triggered the first time).
2020-03-05 21:26:28 +02:00
Thanasis Antoniou 11adaa4f3d BLADERUNNER: Add engine option to disable stamina drain
Allows not having to constantly click the mouse to keep McCoy from slowing down

Even though this was a bug in the original game, having this option re-creates the original experience of McCoy running quite fast (still keeping the 30 fps limit) and not slowing down when the player stops clicking.
2020-02-27 20:27:29 +02:00
Thanasis Antoniou cd076b26ae BLADERUNNER: Using preincrement and pre-decrease where possible
In case the compiler won't optimize such cases
2020-02-24 21:24:06 +02:00
Thanasis Antoniou 32258cf4fd BLADERUNNER: Fix broken zbuf draw for debugger 2020-02-20 22:41:00 +02:00
Paul Gilbert a00e44ba6c ENGINES: Merge saveGameState virtual methods into a single one 2020-02-16 15:44:28 -08:00
Paul Gilbert e708906916 BLADERUNNER: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
Thanasis Antoniou 602600b944 BLADERUNNER: Removed crowded startup debug messages
Subtitles credits info is now only available from the "subtitle info" command in the debugger

This is due to an issue with certain localized characters not appearing correctly from debug() output on the background console (if enabled).
2020-02-07 03:24:53 +02:00
Thanasis Antoniou d4c659610d BLADERUNNER: Fixes for McCoy's stamina system and drain
The original game had broken stamina system we have it fixed.

This means that in vanilla mode, McCoy's stamina will drain fast if the player does not click the mouse, but he will increase speed up to a max, if the player keeps clicking the mouse.
In Restored Content, we allow McCoy to keep his speed (so that the player does not have to keep clicking); the stamina drain will still kick in but it will be at a slower rate and practically won't be noticeable most of the time.
2020-02-05 18:28:46 +02:00
Peter Kohaut 3619b613bc BLADERUNNER: Fixed crossplatform thumbnails in saves
Thumbnail was broken when savefile was transfered between big endiang
and little endian platforms.

closes #11258
2019-11-26 22:15:27 +01:00
Thanasis Antoniou ca8539dabe BLADERUNNER: Add a engine checkbox to target 120 fps
This is added in the Engine tab for the game. Default is false (60 fps)
2019-11-10 17:37:56 +02:00
Peter Kohaut cd7e44f9f9 BLADERUNNER: Group shapes loading 2019-10-13 14:09:47 +02:00
Thanasis Antoniou 181055b62a BLADERUNNER: Fix crash for some devices for Android SDL port
This is a work around that is confirmed to be working

Reference ticket is here: https://bugs.scummvm.org/ticket/11149
2019-09-18 22:54:20 +03:00
Thanasis Antoniou 7c20b07ffb BLADERUNNER: Add engine gui option to avoid use of delayMillis() 2019-09-16 12:00:25 +03:00
Thanasis Antoniou 29aa2e163b BLADERUNNER: Remove redundant initializations
Redundant setting of actors health (Init_Actor_Health) and a duplicate _crimesDatabase init
2019-09-15 10:06:23 +03:00
Cameron Cawley c786b139db BLADERUNNER: Remove use of unaligned memory access (#1839) 2019-09-12 22:02:52 +02:00
Thanasis Antoniou 2003c12bc3 BLADERUNNER: Move shutdown() in Engine destructor 2019-09-10 19:18:45 +03:00
Thanasis Antoniou bef3f902e6 BLADERUNNER: Add DebugMan.clearAllDebugChannels() in shutdown 2019-09-10 19:18:45 +03:00
Thanasis Antoniou a51efbf560 BLADERUNNER: Debugger output x,y 2d co-ordinate for mouse click info 2019-09-08 15:05:03 +03:00
Peter Kohaut 94b9304014 BLADERUNNER: Improved support for Russian translations
Adds support for Home Systems, Inc. + Siberian Studio R4 translation
patch.
Added name scrambling algorithm from R4 patch.
Fixed R3 support (previously was not named).

closes #11102
2019-09-07 21:18:20 +02:00
Peter Kohaut 89384b9124 BLADERUNNER: Framelimiter simplification 2019-09-04 21:26:37 +02:00
Thanasis Antoniou fd7fd3a18b BLADERUNNER: Isolate new frame limiter code in new class 2019-09-01 16:39:36 +03:00
Peter Kohaut a7399c5111 BLADERUNNER: Use best pixel format on every platform
Updated all drawing routines to be pixel format agnostic.
Might decrease performance.
2019-08-31 23:09:19 +02:00
Thanasis Antoniou a99e8d7bab BLADERUNNER: Replace delayMillis(10) calls with software timers 2019-08-31 19:19:32 +03:00
Thanasis Antoniou 4ba487a064 BLADERUNNER: Close MODE.MIX if ScummVM is closed during ESPER 2019-07-28 22:52:18 +03:00
Thanasis Antoniou 45e58abe36 BLADERUNNER: Clean up KIA at endgame and playerDied 2019-07-28 22:52:18 +03:00
Thanasis Antoniou 4b482b2d3e BLADERUNNER: prevent seg fault in ESPER
Also added CLIP to all getBasePtr() calls where it would seem appropriate/safer to do so
2019-07-28 14:06:26 +03:00
Thanasis Antoniou af9ec2f691 BLADERUNNER: Revert uint32 vars to int32 if they could be init to -1 2019-07-22 01:09:23 +03:00
Thanasis Antoniou caa4578add BLADERUNNER: Use unsigned 32bit diff for time durations 2019-07-17 19:09:15 +03:00
Peter Kohaut a767a6800d BLADERUNNER: Added TTF & UTF8 support for subtitles 2019-07-16 21:32:34 +02:00
Peter Kohaut ffbfe90afa BLADERUNNER: Ajdust font interface to ScummVM's one 2019-07-16 21:32:34 +02:00
Thanasis Antoniou 491adeb656 BLADERUNNER: Fix Rats resurrecting 2019-07-14 15:53:10 +03:00
Thanasis Antoniou 509738bb49 BLADERUNNER: Fix seg fault at load from ScummVM menu
Happened if player was clicking mouse furiously while loading from the ScummVM GUI
2019-07-14 02:18:34 +03:00
Peter Kohaut 577a84a24c BLADERUNNER: Explicit message about missing game files 2019-07-04 00:09:47 +02:00
jepael ea3f8f2e33 BLADERUNNER: JANITORIAL: Fix a compiler warning with a const cast. (#1719)
Tested and it works. Thanks for the fix!
2019-06-29 09:57:55 +02:00
Thanasis Antoniou a81e3add2f BLADERUNNER: JANITORIAL: Code formatting fixes 2019-06-28 15:30:44 +03:00
Thanasis Antoniou 2382200205 BLADERUNNER: Keydown should be ignored in VK 2019-06-25 01:54:51 +03:00
Peter Kohaut dd0c030278 BLADERUNNER: Fixed alpha channel issues
Alpha channel is inverted in the game assets and that lead to issues in
OpenGL renderer. E.g. screenshot of savegames were partly black or
showing artifacts

closes #10983
2019-06-24 21:45:56 +02:00
Thanasis Antoniou 66bd815e04 BLADERUNNER: Switch to forced key down after modal dialogue
Modal dialogue prompt about loading an Uncut version game in original mode or vice versa would not close KIA any more
2019-06-24 11:23:00 +03:00
Peter Kohaut 4cd58f2fba BLADERUNNER: Switch all keyUp events to keyDown
With keyDown events some parts of the game feels more responsive.
This wasn't working before because of a issue in SDL library.
Also added ability to skip talking with ESC key.
2019-06-22 11:40:47 +02:00
Tarek Soliman 9d0de3e168 BLADERUNNER: Skip movies on keydown not keyup (#1696)
* BLADERUNNER: Skip movies on keydown not keyup

* BLADERUNNER: Filter out key-repeats when skipping movies
2019-06-22 10:36:47 +02:00