../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)) {
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
- 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
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
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
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
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.
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
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.
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
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