Commit Graph

810 Commits

Author SHA1 Message Date
Filippos Karapetis
42bc12a007 TINSEL: Remove superfluous V3 checks
TinselV2 already checks for V3
2022-01-16 13:20:40 +02:00
Filippos Karapetis
e90b45b226 TINSEL: Remove superfluous (and a bit confusing) pointer typedefs
This helps align tinsel with our code and type formatting  guidelines
2022-01-16 13:20:40 +02:00
Filippos Karapetis
b108f6c335 TINSEL: Remove non-existent function definition 2022-01-16 13:20:40 +02:00
Filippos Karapetis
effed966dd TINSEL: Resolve FIXMEs
We already verify the data read for the hopper screen via stream err().
Also, LockMem() has no side-effects when removing unused references.
Thanks to @digitall for spotting the unused variables
2022-01-10 01:51:02 +02:00
D G Turner
1cd05f701d TINSEL: Fix GCC Compiler Warnings 2022-01-09 22:58:05 +00:00
Filippos Karapetis
a3f7609de3 TINSEL: Refactor and simplify scene hopper data
This also allows us to remove struct packing, since the raw data is no
longer cast to the hopper structs
2022-01-09 22:38:43 +02:00
Filippos Karapetis
e95a3b6efb TINSEL: Refactor and simplify actor data loading
- Actor data is now obtained as a copy via GetActorData(), which handles
  endianess internally
- There is now a single ACTORDATA class for all Tinsel versions
- Struct packing has been removed from the actor data class, as we no
  longer cast raw data to image pointers
2022-01-09 22:38:43 +02:00
Filippos Karapetis
0221bc5c02 TINSEL: Refactor and simplify image handling
This allows us to merge different code paths for Tinsel V1 - V3 and
simplify the relevant code.

- Images are now obtained as a copy via GetImage(), which handles
  endianess internally
- The GetImageFromFilm() / GetImageFromReel() wrappers have been removed
- Direct setting of the image palette has been removed in favor of
  PokeInPalette(). This allows us to make image pointers const
- Struct packing has been removed from the IMAGE class, as we no
  longer cast raw data to image pointers
- There is now a single IMAGE class for all Tinsel versions
2022-01-09 17:07:46 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
78ef6203de ENGINES: Fix getSavegameFile for almost all engines
Use kSimpleSavesNames correctly, add where needed, remove where needed.

Trac #12977
2021-11-10 21:49:48 +00:00
Filippos Karapetis
640f2d6654 TINSEL: Simplify the palette handling code
Palettes are now loaded with the correct endianess inside GetPalette()
2021-11-06 23:09:50 +02:00
Alexandre Detiste
6044504762 JANITORIAL: typos
some in the variable names, some in the comments;
no change for the strings that interract with original games assets
2021-10-31 20:46:31 +01:00
Eugene Sandulenko
a9267184f4
ENGINES: Drop cxx11 feature dependency. Now it is always preent 2021-10-31 11:46:26 +02:00
Orgad Shaneh
fe104cc337 ENGINES: Use MetaEngine consistently for getting autosave slot
The autosave refactoring that was done in
7adad5aaf5 used g_engine for identifying the
autosave slot. This worked for in-game save/load, but doesn't fit when
called from the launcher.

Fix by passing MetaEngine to SaveStateDescriptor ctor and using it for this
query.

Amends 7adad5aaf5.
2021-10-24 16:46:06 +02:00
Filippos Karapetis
aa7b3470a0 TINSEL: Simplify font loading and handling
This introduces a new helper method, GetFont(), which loads font data
using a memory stream and handles endianess reads internally. This
simplifies font loading and endianess handling considerably, and allows
for the usage of a common font struct for all engine versions
2021-09-04 15:21:07 +03:00
Filippos Karapetis
4f1676e38b TINSEL: Initial work on the Saturn version of DW1
This version is using the same graphics format as the PSX version, with
differences in resource endianess, but features digital music with a
different track structure and has a different sound sample format

Pending issues:
- Font rendering is wrong - this is evident in the text and menus in
  the game title screen
- Cursor sprite and trails are wrong - can be seen in the menu of the
  game title screen
- Digital music is not supported yet - seems that a different track
  structure is used
- The sound sample format is different than the PC version - looks to
   be raw, but isn't
- The game crashes at the first room after watching Rincewind's waking
  up cutscene
2021-09-04 12:13:18 +03:00
Peter Kohaut
25fa525969 TINSEL: Added base of Noir movers
Renamed rince.* files to movers to be more game independent.
Added elementary support for Noir movers which can use different logic.

Allows game to boot to the first interactive scene, but there is no 3D model rendered (that is WIP).
2021-08-08 20:15:18 +02:00
Peter Kohaut
19f6d4f7b5 TINSEL: Add more libcall mapping for Noir 2021-08-08 20:15:18 +02:00
Peter Kohaut
c356bb4c67 TINSEL: Add support for loading Scale polygons for Noir
New type of polygon used to construct groundplane
2021-08-08 20:15:18 +02:00
Max Horn
2f1f8f502e DEVTOOLS: move credits from devtools/credits.pl to engines
This employs a "lazy" approach: the "format" for the credits stays
exactly as it was, i.e., perl code. Of course one may want to change
this to another format (e.g. YAML, JSON, XML; or also shell script or
AWK, like `configure.engine` uses). But I deliberately kept it simple,
to get a minimal change that is easy to verify. Any further changes to
e.g. the format can be layered atop this.
2021-08-05 00:01:46 +02:00
Peter Kohaut
b22b990173 TINSEL: Fixed rendering for more text messages 2021-08-02 20:58:22 +02:00
Peter Kohaut
afa37d775b TINSEL: Added more opcodes for Noir 2021-08-02 20:58:21 +02:00
Peter Kohaut
e242a76694 TINSEL: Added Noir font rendering 2021-08-02 01:08:29 +02:00
Paul Gilbert
005561d305 COMMON: Increase Stream pos, seek, size from int32 to int64 2021-07-08 18:24:28 -07:00
eddebaby
014e539827
TINSEL: Add detection for Discworld 1 PSX Ger/Jap PSX versions
Follow up on: https://bugs.scummvm.org/ticket/11368

Adds detection for German Playstation version.
Also corrects detection of Japanese Playstation version.

Files need to be extracted/split correctly from DISCWLD.LFD/DISCWLD.LFI. I will attach a QuickBMS script to the PR, which can be used on the German and Japanese CDs to extract the data, or could be used to inform handling the LFD/LFI files directly in ScummVM. The QuickBMS script mention in the above request ticket isn't quite right for the Discworld 1 files.

getSampleIndex and getSampleFile in tinsel.cpp now fallback to ENGLISH files if they fail to find (e.g.) GERMAN.IDX.

This was an easy way to add support for the PSX German CD, without breaking the German DOS CD, Japanese PSX CD etc.

The German PSX version should be as compatible as the English PSX version.

The Japanese PSX version subtitles are not supported, and cause ScummVM to crash when you first try to hover over an object. However, you can view the intro cutscene, and hear the audio.
2021-06-25 00:09:43 +03:00
ysj1173886760
7af3a3f84c ENGINES: introduce ADDectedGameExtraInfo to ADGameDetector, add extra info as parameter for fallback detect. 2021-06-13 14:15:45 +02:00
ysj1173886760
bea68bb58c TINSEL: move debug channels to metaEngineDetection 2021-05-22 01:34:57 +02:00
Orgad Shaneh
a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
LKramer
31265970bb
TINSEL: Discworld Noir: Support for opcode 217. (#2988)
This adds support for opcode 217. I have made the assumption that it's
voiceover, and given it an enum value to reflect that. This enables
voiceover to be played in the opening movie.
2021-05-03 19:09:00 +02:00
Donovan Watteau
e60e0b8f20 TINSEL: Fix uninitialized numPolygons value for Discworld 1 Floppy Demo V0
numPolygons was left uninitialized for the original V0 demo, so it could be
set to a big value which would trigger assert(numPolys <= MAX_POLY) in
MaxPolygons() and immediately crash the game.

This restores the implicit behavior before commit 24b77f1e99.
2021-05-01 21:11:52 +03:00
Donovan Watteau
5dbcf6f739 TINSEL: Fix numPolygons read on big-endian systems 2021-05-01 21:11:52 +03:00
Eugene Sandulenko
43f9d85eef
TINSEL: Fully revert accidental change to English detection entry
It was introduced in 1c63d9b958 then
partially reverted in 826ad61d86

This reverts it fully, as now we are showing a warning to the users
that the DW2 CD version 2 is unstable
2021-04-25 02:32:19 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Martin Gerhardy
4b4aef790f TINSEL: fixed compilation error 2021-03-27 19:18:40 +01:00
Eugene Sandulenko
f2cbf19786 TINSEL: Use ScummVM data types 2021-03-27 19:12:11 +01:00
Orgad Shaneh
f835d1cebc TINSEL: Fix Clang warning
../scummvm/engines/tinsel/tinlib.cpp:1610:3: warning: variable 'playfield' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
                CORO_INVOKE_ARGS(PlayFilmc, (CORO_SUBCTX, hFilm, x, y, 0, false, false, myEscape != 0, myEscape, bTop, playfield));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scummvm\common/coroutines.h:226:17: note: expanded from macro 'CORO_INVOKE_ARGS'
                        return; case __LINE__:; \
                                     ^~~~~~~~
<scratch space>:143:1: note: expanded from here
1610
^~~~
../scummvm/engines/tinsel/tinlib.cpp:1610:106: note: uninitialized use occurs here
                CORO_INVOKE_ARGS(PlayFilmc, (CORO_SUBCTX, hFilm, x, y, 0, false, false, myEscape != 0, myEscape, bTop, playfield));
                                                                                                                       ^~~~~~~~~
../scummvm\common/coroutines.h:222:12: note: expanded from macro 'CORO_INVOKE_ARGS'
                        subCoro ARGS; \
                                ^~~~
../scummvm/engines/tinsel/tinlib.cpp:1592:20: note: initialize the variable 'playfield' to silence this warning
        OBJECT** playfield;
                          ^
                           = nullptr
2021-03-24 01:11:12 +02:00
D G Turner
27b8a47297 TINSEL: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings 2021-03-18 23:36:40 +00:00
Orgad Shaneh
dfea702e07 TINSEL: Add a missing case to switch statement
It's not really needed, only to satisfy the compilers.
2021-03-15 23:09:07 +00:00
Einar Johan Trøan Sømåen
040ab7f68b
TINSEL: Map STAND 2021-03-08 23:03:23 +01:00
Einar Johan Trøan Sømåen
bb4ce21bb0
TINSEL: Map HAVE 2021-03-08 23:03:22 +01:00
Einar Johan Trøan Sømåen
ae60814dde
TINSEL: Map TALKVIA 2021-03-08 22:43:54 +01:00
Peter Kohaut
cfea90a261 TINSEL: Fixed video palette glitch 2021-03-06 21:03:20 +01:00
Peter Kohaut
876a6a47c9 TINSEL: Fixed resolution for NOIR 2021-03-06 20:59:24 +01:00
Peter Kohaut
b4cebc67c4 TINSEL: Removed binary literals 2021-03-06 18:12:29 +01:00
Peter Kohaut
01b42e8357 TINSEL: Added video decoding for V3
Still no sound
2021-03-06 17:50:57 +01:00
Peter Kohaut
5b3a45abc1 TINSEL: Fixed polygon loading for V3 2021-03-06 17:46:14 +01:00
Einar Johan Trøan Sømåen
32c4ee5588
TINSEL: Map POSTTAG 2021-03-06 15:04:52 +01:00
Einar Johan Trøan Sømåen
0876f73eaa
TINSEL: Fix off-by-one in RANDOM logging 2021-03-06 13:29:52 +01:00
Einar Johan Trøan Sømåen
c4fbd14b9e
TINSEL: Map PRINTTAG 2021-03-06 13:28:27 +01:00
Einar Johan Trøan Sømåen
5b2c2637fc
TINSEL: Map SHOWTAG 2021-03-06 13:26:30 +01:00