Commit Graph
157 Commits
Author SHA1 Message Date
NabeelShabbir f8ad3fe2e4 SWORD1: Add keymapper support 2024-08-31 22:22:09 +03:00
AndywinXp 9d5b70d1d4 SWORD1: Add internal support for language switching
For now this is controllable only by setting e.g.:
subtitles_language_override=it
in the relevant [sword1] entry within scummvm.ini.
2024-08-23 17:31:48 +02:00
AndywinXp 6097f386e7 SWORD1: Implement alternative Windows audio driver behavior
Implements feature request #15092, bringing the DirectSound driver
as an option for the game.

For now this is toggleable by editing scummvm.ini and adding:
windows_audio_mode=true

Differences between the DOS and Windows audio drivers:
* DOS:
   - Apparently uses linear volume curves, as per the AIL/Miles drivers;
   - Music can fade in and out;
   - Fades sound effects in and out at each scene change;
   - Lowers the volume of the music each time a speech line is playing;

* Windows:
   - Uses DirectSound with volume tables for game volume -> decibel
     volume conversion; the resulting logarithmic curve and slightly
     different volume scaling for sound effects ensures audibly
     different intensities for some sounds;
   - Music can only fade out, not in;
   - Does NOT sound effects in and out at each scene change;
   - Does NOT lower the volume of the music each time a speech line is playing;
2024-05-31 23:52:48 +02:00
Le Philousophe b9150691d9 SWORD1: Migrate engine to Path 2023-12-24 13:19:25 +01:00
AndywinXp 7ebf5e4f6d SWORD1: Fix support for Korean translation
From british-choi ScummVM fork
2023-12-02 11:38:40 +01:00
AndywinXp 3bde6ebf00 SWORD1: PSX: Improve accuracy of "Paused" message 2023-10-17 00:26:46 +02:00
AndywinXp 70568e6cf2 SWORD1: Prevent softlock when saving on phone envelope screen
And we prevent it by... drum roll please... disabling
the main menu and saving from the GMM whenever
we are in that screen :-)
2023-10-16 20:26:55 +02:00
AndywinXp 5daae32032 SWORD1: PSX: Implement credits
The PSX version doesn't have a credits Smacker video
but has a CREDITS.DAT file containing credits strings which
have to be displayed as a scrolling list of names and roles.
2023-10-16 12:59:17 +02:00
AndywinXp acba0e6a0b SWORD1: SOUND: Fix typo which broke GMM interoperability 2023-10-12 23:54:24 +02:00
AndywinXp 5ecdcecf72 SWORD1: SOUND: Remove Music class and files
All sound is now handled by a single engine (Sound class)
2023-10-12 23:54:24 +02:00
AndywinXp a4d08cfc4c SWORD1: SOUND: Final code clean-up pass
...hopefully :-)
2023-10-12 23:54:24 +02:00
AndywinXp 0f02b66ebe SWORD1: SOUND: Implement persistence of volume settings 2023-10-12 23:54:24 +02:00
AndywinXp caaf249e09 SWORD1: SOUND: Implement music for DOS version
PSX and compressed versions will follow shortly after
2023-10-12 23:54:24 +02:00
AndywinXp bcff798029 SWORD1: SOUND: Do a code clean-up pass 2023-10-12 23:54:24 +02:00
AndywinXp 4c0d127a62 SWORD1: SOUND: Reimplement speech
Compressed speech files should work right out of
the box.
2023-10-12 23:54:24 +02:00
AndywinXp c03fe08881 SWORD1: SOUND: Implement sound effects playing and fading 2023-10-12 23:54:24 +02:00
AndywinXp 88dd4ee928 SWORD1: SOUND: Wire up some variables&funcs used externally 2023-10-12 23:54:24 +02:00
AndywinXp f0f23208ac SWORD1: SOUND: Wire up more functions and set up the fade timer thread 2023-10-12 23:54:24 +02:00
AndywinXp 94a8fc246b SWORD1: Begin sound engine rewrite 2023-10-12 23:54:24 +02:00
AndywinXp 730af6eae6 SWORD1: Improve accuracy of menu bars handling
More specifically:
- Improve handling of menu bar fading during a palette fade;
- Fix _getOff not being handled if top menu was disabled.
2023-10-08 22:47:39 +02:00
AndywinXp 85a34350d2 SWORD1: Properly init virtual mouse coordinates
This ensures that when loading a savegame the top menu bar
doesn't enter in its open state by mistake because the mouse
coordinates are wrongly set as (0,0).
2023-10-05 00:02:04 +02:00
AndywinXp 70b6da9211 SWORD1: Apply script patch found in executable and source
This patch is available in every executable after the
original UK one. Its purpose is to turn off scripts which
were causing issues by continuing running past their scope.
The patch, as descripted within the the original source
code, checks if the game is past the Syria section,
and if so it checks if the Market Stall section is still
alive, and if so it closes both the section (45) and
the Mega object for Duane (134), effectively terminating
their scripts.
2023-10-01 09:33:33 +02:00
AndywinXp c99265cf97 SWORD1: Optimize menu handling during palette fades
We are only updating the menu bars when the screen is not fading.
This optimization restores the same code speed as previous
codebase iterations without thread-safeness whenever a menu
is interacted with during a palette fade.
2023-09-28 11:02:04 +02:00
AndywinXp 2b38cbc660 SWORD1: Ensure thread safeness when blitting cursor 2023-09-28 09:20:04 +02:00
AndywinXp dcc37481dc SWORD1: Add screen access mutex in critical places
This was deemed necessary by the fact that we have the main thread
and the timer thread which are constantly reaching out to functions which
update the screen in one form or another. By putting locks around calls to
_system->updateScreen() and _system->getPaletteManager()->setPalette()
we should be able to avoid issues like the one described in bug #14638.

I marked all places which seem sensitive enough when the main thread and
the timer are both in full operation. I might dial it back in the future after
we are sure that the original issue is gone.
2023-09-25 09:28:56 +02:00
AndywinXp f380cebcae SWORD1: Use full refresh when displaying debug mouse and grid 2023-09-24 21:25:49 +02:00
AndywinXp 0d0a8ad11e SWORD1: Add more toggleable debug information
Pressing SHIFT-M shows a debug mouse cursor, and
pressing CTRL-G shows the walk grid.

Also, moved the showDebugInfo() function to sword1.cpp
because it seemed more appropriate.
2023-09-24 21:18:36 +02:00
AndywinXp b9107e27ee SWORD1: Implement pause button and on-screen debug text
You can now pause the game via the 'P' key! Also, using CTRL-T
when ScummVM is in debug mode, toggles some on-screen debug
information which was also available in the original DOS version by
launching the game as "sword rev text". Implementing all of this also
meant that I had to finally implement the FPS counter.

I frankly don't know if the PSX version was supposed to have this, but
it appears to work right out of the box...
2023-09-23 13:21:27 +02:00
AndywinXp 8b3f16e923 SWORD1: Rewrite main menu code
This now matches the source code and the executable;
this fixes a lot of inaccuracies, implements the tombstone
"death font", implements the Speed setting.

The askForCd() routine is now more accurate as well.
2023-09-21 21:41:22 +02:00
AndywinXp dbe1a2df4f SWORD1: Make changes for code review 2023-09-02 11:32:51 +02:00
AndywinXp 4ab197b16f SWORD1: Implement fades on the main menu
Had to reshuffle some stuff to make it work properly,
and in order to set up everything for future changes.
2023-09-02 11:32:51 +02:00
AndywinXp 9b27c38390 SWORD1: Set a timeout for fades 2023-09-02 11:32:51 +02:00
AndywinXp 1822ce506b SWORD1: Set slow/fast modes as sys vars 2023-09-02 11:32:51 +02:00
AndywinXp 2d884572aa SWORD1: Implement fast and slow mode for timing debugging
They can only be activated via the original debug keys ('1' and '4'),
and only if ScummVM is launched in debug mode.
2023-09-02 11:32:51 +02:00
AndywinXp 394642598c SWORD1: Implement accurate fading routines 2023-09-02 11:32:51 +02:00
AndywinXp e21e0ed089 SWORD1: Improve accuracy of in-game timers
Also begin work on palette and sound fades
2023-09-02 11:32:51 +02:00
Eugene Sandulenko 45b03009ef SWORD1: Made detection more robust and added Polish with DXA. Bug #14276 2023-03-02 00:26:16 +01:00
Eugene Sandulenko 4da6f1ec4d SWORD1: Simplify detection of Spanish demo
This was breaking all other demos and was introduced in
7a1ca2821a
2023-01-14 23:54:24 +01:00
Eugene Sandulenko 5c65be0719 SWORD1: Do not add duplicate directories to SearchMan 2023-01-14 21:14:21 +01:00
Eugene Sandulenko e0d0eca348 SWORD1: Remove redundant flags from the detection entries 2023-01-14 21:14:21 +01:00
Le Philousophe b2ecd531a6 SWORD1: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
Cameron Cawley aaf82d7ca6 SWORD1: Switch to AdvancedMetaEngineDetection 2022-10-22 18:38:38 +02:00
trembyle b9e7b1dfcd COMMON: ENGINES: Correct Czech language ISO code
1. Correct constant in common files
2. Add the old code to obsolete language codes
3. Replace all occurences in engine code
2022-03-04 18:29:02 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Zvika Haramaty f204d3639a SWORD1: Add support for Hebrew translation 2021-08-17 00:12:18 +02:00
Eugene Sandulenko 49e8b52a7e SWORD1: Added detection and support for Spanish demo. Fixes #11397
This demo uses normal interpreter with less differences than
the English demo.
2020-09-01 19:22:27 +02:00
Eugene Sandulenko a619827ffa SWORD1: Improved detection for demos. Now Spanish demo is detected properly 2020-09-01 16:37:36 +02:00
Paul Gilbert 46a1f92ef6 SWORD1: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
Colin Snover 432fd522d2 ENGINES: Remove default1x scaler flag
This flag is removed for a few reasons:

* Engines universally set this flag to true for widths > 320,
  which made it redundant everywhere;
* This flag functioned primarily as a "force 1x scaler" flag,
  since its behaviour was almost completely undocumented and users
  would need to figure out that they'd need an explicit non-default
  scaler set to get a scaler to operate at widths > 320;
* (Most importantly) engines should not be in the business of
  deciding how the backend may choose to render its virtual screen.
  The choice of rendering behaviour belongs to the user, and the
  backend, in that order.

A nearby future commit restores the default1x scaler behaviour in
the SDL backend code for the moment, but in the future it is my
hope that there will be a better configuration UI to allow users
to specify how they want scaling to work for high resolutions.
2017-10-07 12:30:29 -05:00
Thierry Crozat 6ff927bff7 SWORD1: Use booleans for _systemVars speech and subtitles flags
The were defined as uint8 and the code was inconsistent in the
way they were handled, for example setting them to 1 in some
places and to true in others. It was working but relying on implicit
conversions both ways between 1 and true.
2017-07-08 12:55:11 +01:00