Commit Graph
68 Commits
Author SHA1 Message Date
Orgad Shaneh e99d7f0a1d TINSEL: Silence signed/unsigned comparison compiler warning
../scummvm/engines/tinsel/handle.cpp: In member function 'void Tinsel::Handle::LoadFile(Tinsel::MEMHANDLE*)':
../scummvm/engines/tinsel/handle.cpp:293:27: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
  293 |                 if (bytes == (pH->filesize & FSIZE_MASK)) {
      |                     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-06-02 23:41:32 +03:00
D G Turner 137a775ea0 TINSEL: Fix GCC Compiler Warnings 2022-05-08 16:57:48 +01:00
Filippos Karapetis 8be80717bb TINSEL: Simplify reading of process information 2022-05-08 13:30:04 +03:00
Jakob Wagner 99c1ea5ea0 TINSEL: Implement DECINVMAIN libcall
DECINVMAIN does not hail the loadingscreen scene yet because playing
it produces an incorrect corotine stack.
2022-04-27 00:33:15 +03:00
Jakob Wagner 31d4dfa351 TINSEL: Implement GetLanguageSceneHandle
Needed for INVMAIN implementation for noir.
2022-04-27 00:33:15 +03:00
Jakob Wagner 165ec9cbae TINSEL: Replace TinselV3 checks with comparisons 2022-04-21 20:34:17 +03:00
Jakob Wagner 67c3bce30e TINSEL: Replace TinselV2 checks with comparisons
Until now, the TinselV* defines were used for discerning between
engine versions. The define TinselV2 was true for both v2 and v3.
Sticking to the old scheme would lead to confusion when more
special paths for v3 are implemented.
2022-04-21 20:34:17 +03: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
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
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
Einar Johan Trøan Sømåen 0f78bfeeae TINSEL: Adjust LoadFile for Noir, stubbing out compression for now. 2021-02-06 00:29:47 +01:00
Einar Johan Trøan Sømåen 6e3daad277 TINSEL: Modify handle to read flags correctly for Noir.
Contains fixes from Kerbox' repos.
2021-02-06 00:29:27 +01:00
Paul Gilbert 9b46b79060 TINSEL: Fix loading of handle table for Tinsel 1 2020-11-16 18:56:02 -08:00
Einar Johan Trøan Sømåen fabf2309e0 TINSEL: Let TinselV2 cover both V2 and V3, and add TinselV3.
Also adjust SetupHandleTable to use TinselV2 directly,
so that it also works for V3 with the above adjustment.

Some of this is based on kimskoglund's Tinsel Noir
sourceforge repository.
2020-10-31 00:24:53 +01:00
Filippos Karapetis bbf81aa216 TINSEL: Move code into class destructors 2020-10-04 01:15:20 +03:00
Filippos Karapetis 5bb0332383 TINSEL: Rename variables in the Handle class 2020-10-04 01:15:20 +03:00
Filippos Karapetis ae2e05cbd3 TINSEL: Move all handle-related functions into a new Handle class 2020-10-04 01:15:19 +03:00
Paul Gilbert 293881c016 TINSEL: Include filename when giving unsupported compression errors 2020-07-11 09:36:52 -07:00
Filippos Karapetis 63ae50e790 TINSEL: Replace usage of NULL with nullptr 2020-02-29 02:21:41 +02:00
Eugene Sandulenko a57aa55999 TINSEL: Safer string manipulation 2016-05-11 12:32:18 +02:00
Johannes Schickel 9b138f4eb4 TINSEL: Make GPL headers consistent in themselves. 2014-02-18 02:39:39 +01:00
Sven Hesse 989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Filippos Karapetis ce87175bed TINSEL: Revert the BE -> LE resource conversion for DW1 Mac
This was a bad idea, as we ended up with another place where the
resource files were processed. Thus, I'm moving back to handling the
BE resources of the Mac version in the engine itself
2012-12-11 02:41:51 +02:00
Torbjörn Andersson 4914bea358 TINSEL: Remove unused variable 2012-12-10 20:07:17 +01:00
Filippos Karapetis b532a81b42 TINSEL: Add a WIP BE To LE SCN file conversion code (unfinished)
This is a cleaner approach to handle the Mac version of DW1 (demo
and full versions - refer to bug #3110936). This way, we can keep
the game engine as LE even with the Mac BE resource files.

Both the demo and the full version progress up to drawing the scene
graphics now and crash because of the currently unhandled bitmap
chunk.
2012-12-10 17:38:24 +02:00
Filippos Karapetis e10b59b624 TINSEL: Cleanup 2012-07-14 05:07:16 +03:00
Paul Gilbert 41692ef48a TINSEL: Refactored Tinsel engine to use the Common coroutine scheduler 2012-05-17 20:42:23 +10:00
Alyssa Milburn be35baddc7 TINSEL: Rename globals to add g_ prefix. 2012-02-22 23:14:29 +01:00
eriktorbjorn 9205b8eb05 TINSEL: Fix bug #3306020, DW2: Crash On Entering Sewers
This is a simpler fix than the one I committed to the 1.3 branch,
but since it carries a theoretical risk of regressions it's so
much more macho.
2011-05-23 23:36:54 +02: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
md5 cd085b1ae8 TINSEL: Removed some unused global static variables 2011-04-10 17:27:48 +03:00
Max Horn 9a0c20a45f TINSEL: Improve support for DW mac demo (see bug #3110936)
svn-id: r54811
2010-12-07 18:00:18 +00:00
Paul Gilbert a2367d26f9 TINSEL: Preliminary functionality for reading BE data files
svn-id: r54392
2010-11-20 03:14:03 +00:00
Max Horn 1dbf8d73d5 TINSEL: Mark all (?) global vars with a FIXME comment
Use of global vars is what prevents RTL from working in Tinsel (and
probably in other engines). More specifically, the fact that many
global vars are not explicitly inited when the engine is (re)launched.

svn-id: r54262
2010-11-16 09:53:55 +00:00
Torbjörn Andersson bcb4c49a03 Cleanup.
svn-id: r50924
2010-07-16 03:14:03 +00:00
Johannes Schickel 5bb4fadc4c Fix change in r49356, Common::strlcpy should only be used on zero terminated source strings.
The original code change with r49086 did only aimed at zero terminating
the szFilename string (as the comment suggests), so I now changed it
to use memcpy and a manual placement of the terminating zero.

svn-id: r49357
2010-05-31 18:05:39 +00:00
David Turner d1da820a75 Fix for DW2 engine abort with message "Cannot find file hienergy.sc!".
Bug introduced by r49086 change which could trim the last character of filenames.

svn-id: r49356
2010-05-31 15:16:46 +00:00
Johannes Schickel 62717eafc4 Replace some strncpy usages with Common::strlcpy.
svn-id: r49086
2010-05-18 18:16:47 +00:00
Max Horn f103f01284 TINSEL: Change cdGraphStream to a Common::File pointer,
to not rely on global constructors

svn-id: r48765
2010-04-21 21:23:08 +00:00
Max Horn f692015301 Got rid of ReadStream::ioFailed()
svn-id: r46379
2009-12-15 08:18:57 +00:00
Max Horn 51933629d1 Changed foo(void) to foo() in almost all non-backend source files
svn-id: r45616
2009-11-02 21:54:57 +00:00
Max Horn 4b681f7ec7 TINSEL: Add some debugging code; fix LockMem() regression
svn-id: r45430
2009-10-27 00:38:41 +00:00
Max Horn 79734dbc15 TINSEL: Make HeapCompact local to heapmem.cpp; add code to print heap statistics
svn-id: r45428
2009-10-27 00:37:54 +00:00
Max Horn 05508d8dcd TINSEL: Change MemoryAllocFixed to return a (kind of fake) MEM_NODE pointer; add MemoryDeinit()
svn-id: r45426
2009-10-27 00:36:56 +00:00
Max Horn 6c1c9eda3a TINSEL: Make MEM_NODE internal to heapmem.cpp
svn-id: r45418
2009-10-26 20:38:34 +00:00
Max Horn d2e64a350a TINSEL: cleanup
svn-id: r45417
2009-10-26 20:36:44 +00:00