Commit graph

51 commits

Author SHA1 Message Date
BLooperZ
24d5420aae SCUMM: simplify majmin bitstream reading 2022-11-18 13:53:12 +01:00
BLooperZ
1e51c121bd SCUMM: reuse majmin codec for smap 2022-11-18 13:53:12 +01:00
athrxx
3c459416c3 SCUMM: (FM-TOWNS) - minor gfx performance boost 2022-10-22 15:30:38 +02:00
athrxx
012949a04f SCUMM: (FM-Towns) - code style fixes 2022-10-10 22:44:17 +02:00
athrxx
33c2631290 SCUMM: (V2) - improve CGA and Hercules modes
Should be pixel-perfect now.
This change is only about SCUMM2 (ZAK/MM).
2022-07-15 15:40:16 +02:00
athrxx
97fbe867cb SCUMM: (MMv1/ZAKv1) - add support for CGA, CGA Composite and Hercules modes
This does not improve anything about these modes for v2 and v3, except:
- brighter CGA colors
- v2 will also get the more accurate Hercules mouse cursor

I will do improve v2/v3 as separate tasks. v3 seems to be mostly fine, anyway, except for the actors (we dither them just like the backgrounds, but that looks different in DOSBox).
2022-07-10 01:04:38 +02:00
Torbjörn Andersson
0f4881214b SCUMM: Add semi-smooth scrolling for the FM Towns Loom intro
Scrolling four pixels at a time is smoother than eight, and able to
keep up with the fast camera move in the FM Towns Loom intro.
2022-04-21 11:07:17 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
athrxx
d099ed5047 SCUMM: (FM-TOWNS) - make scrolling more smooth for fast platforms
The engine now measures whether it can perform one screen update within a 60Hz tick. Unfortunately the calls to OSystem::updateScreen() may take very long, depending on the backend and the filter setting. In this case the engine will start to catch up to the current frame. It should still look fine, unless the platform is way too slow for the selected filter setting (with the wrong settings it is not too difficult to achieve OSystem::updateScreen()  durations of over 100ms).
2021-05-28 20:26:28 +02:00
athrxx
78de93126f SCUMM: (FM-TOWNS) - optimize drawing code
("drawing" in this case means the data conversion and transfer from the gfx layers to the screen buffer)

From my measuring experiments in the MSVC debugger this speeds up the drawing 2 - 3 times. Not sure about release builds, whether these profit even more.
2021-05-24 03:34:49 +02:00
D G Turner
a404c80d41 SCUMM: Fix Memset on Non-Trivial Structure GCC Compiler Warnings 2021-03-24 23:23:46 +00:00
athrxx
4f9ae442d5 SCUMM: (FM-TOWNS) - add smooth scrolling
This is mostly based on ZAK and MI2 disasm (and a bit LOOM). For MI1 and INDY4 I have at least checked with the FM-Towns UNZ emulator to ensure that they actually have the smooth scrolling.

The smooth scrolling is a bit tricky with regard to the timing. The scrolling tends to be a bit too slow for the engine, since it happens at a speed of 1 pixel per 60Hz tick, while the engine sometimes writes one or more new 8 pixel strips at the same time. So the scrolling often has to catch up to the engine. The original has a compensation mechanism which I tried to adapt. We'll see if it needs more fine tuning...

The Loom intro even glitches in the UNZ FM-Towns emulator due overflowing the scrolling surface (and causing a wraparound). But I made a fix for that.

Since we do have a bug report about the speed of the ZAK intro (and the new scrolling code does affect the timing) I have run the ZAK intro in ScummVM and in the FM-Towns UNZ emulator (with i80386DX, 16 MHz setting) side by side and they seem totally in sync. If I reduce the MHz setting in the emulator to 10 MHz on the emulator the intro will play slower, but still not play through the whole song. With 8 MHz I get close to finishing the song, but this seems to be almost to slow to run the game properly. So I'll leave that bug ticket open...
2021-02-11 20:01:24 +01:00
Bastien Bouclet
730a1ee4cc SCUMM: Add override keywords 2020-02-09 12:43:16 +01:00
Torbjörn Andersson
1e23d43006 SCUMM: Silence GCC memset() warnings
Recent GCC versions complain if you memset() a class or struct that
contain non-POD data types. Get around that by either initializing
the object when created, or by adding a reset() method.
2019-07-14 14:58:19 +03:00
Robert Crossfield
1a880c748c SCUMM: Maniac V0: Clear the text area of the screen on fade out 2016-07-17 16:40:49 +10:00
Johannes Schickel
3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Tobias Gunkel
9dd6105ce6 SCUMM: replace "c64" with "v0" when it applies to both C64 and AppleII v0 versions
In addition some routines (e.g. the gfx ones) that are even used in v1.
2012-02-11 08:30:08 +01:00
Johannes Schickel
3b7c91f2a7 COMMON: Move HerculesDimensions enum to SCUMM.
The enum is only used inside the SCUMM engine so it is rather pointless to
keep it in common/util.h right now. Also if we really want it in some common
place it should probably be better in graphics/ too.
2011-06-21 16:59:50 +02:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
athrxx
03ba1871f7 SCUMM: fixed messed up colors in 16bit HE games
(regression from 068b4a5351)
2011-06-18 19:45:36 +02:00
athrxx
0a42a7d625 SCUMM: hopefully fix 16bit mode support for SCUMM FM-TOWNS games and LOOM PCE on Android
This mostly reverts 5b7754e3f0. Instead, we try to use other 16bit modes  after 555 fails.
2011-06-15 22:30:04 +02:00
Max Horn
068b4a5351 SCUMM: Move tmsk code into its own Gdi subclass 2011-05-13 11:47:07 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Johannes Schickel
b0bd8fa795 SCUMM: Prefer Surface::format over Surface::bytesPerPixel. 2011-04-17 20:58:07 +02:00
Florian Kagerer
5af782c5d2 SCUMM/FM-TOWNS: disable new graphics code in DS port
svn-id: r53033
2010-10-05 19:04:52 +00:00
Florian Kagerer
c9713bef7c SCUMM/FM-TOWNS: improve merging of graphics layers
svn-id: r52995
2010-10-03 17:25:38 +00:00
Florian Kagerer
0d8f4a22ae SCUMM/FM-TOWNS: fix palette and other graphics issues
This commit should fix at least the following bugs/feature requests: #1032859, #1252088, #1055391, #1315968, #1315938, #1742106, #812891.
The FM-Towns version of Scumm games use a mixed graphics mode with 2 layers (one with 32767 colors and one with 16 colors). Among other things I have added a screen output class which emulates this  dual layer approach which allows specific hardware effects like enabling and disabling layers (e.g. in the voodoo priestess scene in MI1).

Old savegames (saved before this update) will load, but you’ll encounter palette glitches in the verb/inventory screen, since the 16 color palette for layer 2 is not contained in your savegame. This will be true at least for version 5 games. Certain scene change actions (which require the verb/inventory part to be redrawn) might correct this (e.g. try looking at the treasure map in MI1 and closing it). Version 3 games should be okay, since they use a static text palette which is never changed and which will be reset after loading a savegame.

This update requires a USE_RGB_COLORS setting for proper operation. 8 bit users will get a warning that they’ll have to expect palette glitches . Apart from that the engine in 8 bit mode should not only still work okay, but also benefit from some of the other (non palette related) improvements (e.g. bug #1032859 should be fixed even in 8 bit mode).

Japanese font drawing hasn’t been improved much yet. This will be a separate task.

svn-id: r52966
2010-10-01 19:24:52 +00:00
Torbjörn Andersson
25077baf6a Moved setTileData() into GdiPCEngine since that's the only class that uses it.
svn-id: r50888
2010-07-14 16:55:32 +00:00
Travis Howell
bb0c765731 Exclude Loom PCE engine specific code, from non-16bit color build.
svn-id: r46080
2009-11-22 11:43:12 +00:00
Travis Howell
e49065c821 Add support for distaff images in PCE version of Loom.
svn-id: r45433
2009-10-27 09:17:09 +00:00
Travis Howell
88c7ca6f8f Add patch from Tobias, for object masking support in PCE version of Loom.
svn-id: r45396
2009-10-26 10:15:05 +00:00
Travis Howell
6b61700a7b Add patch from Tobias, for masking support in PCE version of Loom, with minor changes.
svn-id: r45387
2009-10-26 02:45:26 +00:00
Travis Howell
7e98cf5ca9 Remove unused variables.
svn-id: r45382
2009-10-25 23:12:46 +00:00
Travis Howell
746258f882 Add patch from Tobias, for graphic support (backgrounds/objects) in PCE version of Loom, with minor changes.
svn-id: r45304
2009-10-21 12:59:10 +00:00
Travis Howell
b8a9823f4e Fix regression in scrolling rooms.
svn-id: r41624
2009-06-18 06:10:13 +00:00
Travis Howell
ccee18a489 Cleanup.
svn-id: r41195
2009-06-05 10:13:19 +00:00
Travis Howell
3a64d35dfd Add 16bit color support for later HE games.
svn-id: r41153
2009-06-04 01:05:47 +00:00
Bertrand Augereau
0e99719b3a Compile fix for 34006
svn-id: r34009
2008-08-18 20:43:44 +00:00
Jordi Vilalta Prat
38a8aa516e Allow static and dynamic plugins to be used at the same time
svn-id: r31888
2008-05-06 03:00:26 +00:00
Max Horn
0cccbb29d6 Some cleanup (yay for whomever had the brilliant idea to let SVN work over HTTPS and hence through proxies&firewalls :)
svn-id: r28877
2007-09-08 11:15:27 +00:00
Max Horn
218e132e37 Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
svn-id: r27024
2007-05-30 21:56:52 +00:00
Max Horn
aba0cd04d6 SCUMM: got rid of the _bompActorPalettePtr member var (which was only used as a hidden param to drawBomp); turned drawBomp into a regular function (used to be a ScummEngine member method)
svn-id: r26045
2007-03-10 00:34:20 +00:00
Torbjörn Andersson
a1a16d1579 Use consistent naming for the preprocessor constants used to guarantee that
header files are only included once. Many of them didn't have a SCUMM prefix
which could have lead to clashes with common header files.

svn-id: r25727
2007-02-19 17:48:19 +00:00
Max Horn
fd85c13d8f Cleaned up Gdi::roomChanged
svn-id: r23938
2006-09-18 22:22:35 +00:00
Max Horn
60951b6f1a Moved some more code from class Gdi into new subclasses GdiV1 and GdiV2
svn-id: r23937
2006-09-18 22:06:39 +00:00
Max Horn
1324677395 Moved NES specific code from class Gdi to GdiNES
svn-id: r23934
2006-09-18 21:20:21 +00:00
Max Horn
a0e1a98647 Oops, accidentally broke TMSK support for HE 72+ games
svn-id: r23933
2006-09-18 19:58:22 +00:00
Max Horn
06ddd876a5 Fix --disable-he
svn-id: r23932
2006-09-18 19:22:40 +00:00
Max Horn
2906e8d2a3 Moved some code from Gdi::drawBitmap to separate methods
svn-id: r23930
2006-09-18 19:16:31 +00:00
Max Horn
285aa5d0b2 renamed ScummEngine::restoreBG to restoreBackground; renamed and moved Gdi::copyVirtScreenBuffers to ScummEngine_v70he::restoreBackgroundHE
svn-id: r23925
2006-09-17 23:35:09 +00:00