Commit graph

28 commits

Author SHA1 Message Date
athrxx
7afd105562 SCUMM: (FM-TOWNS) - add menu option to disable smooth scrolling 2021-08-01 16:10:42 +02:00
athrxx
534a30ea97 SCUMM: (FM-TOWNS) - disable smooth scrolling in fast (Ctrl+f) mode 2021-08-01 13:40:52 +02: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
cdfc7aba23 SCUMM: (FM-TOWNS) - cleanup 2021-05-24 13:53:42 +02:00
athrxx
cfa0654ce8 SCUMM: (FM-TOWNS) - fix for builds w/o USE_RGBCOLOR
These changes are currently pointless, since the affected function variants won't be called. The Japanese game versions for which they would be used are not supported in non-USE_RGBCOLOR builds. But the code should be correct nonetheless...
2021-05-24 04:13:23 +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
athrxx
78ec256cca SCUMM: (FM-TOWNS) - fix bug no. 12560 ("[FM Towns] scrolling much too slow")
(partly revert fb8f1084)

There is no simple solution that would still  leave the "butter smooth" scrolling for faster platforms intact. I have measured times between several code points to find any bottlenecks. My finding is that even single script opcodes may well take over 200ms to execute. And exceeding a singe 60 Hz tick happens way more often (which makes the scrolling fall behind and have to catch up, thus becoming a bit sloppy). So, for the "butter smooth" scrolling I'll probably implement a timer for the screen updates (which will then really behave much more like the interrupt handler of the original). But that's for a separate commit. This one is mostly about the bug ticket..
2021-05-22 14:24:54 +02:00
athrxx
fb8f108402 SCUMM: (FM-Towns) - improve smooth scroling
I have made the scrolling more smooth and still hopefully managed not to break the sync with the engine (which really is a bit tricky).
I've tested playing the ZAK and LOOM intros and also walking around in ZAK and MI2, since there are some good test cases there. I've also compared all these side by side with the UNZ emulator.
2021-05-17 20:02:24 +02: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
Eugene Sandulenko
3f2fce5691 SCUMM: Properly inint FM-TOWNS gfx code 2016-11-27 14:02:52 +01:00
Johannes Schickel
3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Johannes Schickel
0a1cbac76a SCUMM: Take advantage of Surface::getPixels. 2013-08-03 04:02:50 +02:00
Johannes Schickel
c05cb7f3bb SCUMM: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:31 +02:00
Christoph Mallon
75efdd2d84 JANITORIAL: Replace (x ? false : true) by !(x). 2012-03-13 15:43:36 +01:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06: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
0881f54a06 SCUMM: fix FM-TOWNS graphics output for ARM devices
(changed behavior of USE_ARM_GFX_ASM define)
2011-06-17 23:38:22 +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
athrxx
724b22e5c7 SCUMM FM-TOWNS: add number of color check in TownsScreen::updateOutputBuffer()
Although the 16 color surface is normally not on bottom, there could (theoretically?) be cases in 8bit fallback mode where this becomes relevant.
2011-06-13 22:35:01 +02:00
athrxx
3e6f031fc5 SCUMM: some cleanup in gfx_towns.cpp 2011-06-13 12:39:15 +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
athrxx
4e6c025633 SCUMM FM-TOWNS: minor cleanup (git test) 2011-02-13 15:19:43 +01: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
3185b9df42 SCUMM/FM-TOWNS: cleanup
svn-id: r53016
2010-10-04 17:03:38 +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
77fe52bbd7 INDY3/FM-TOWNS: fix intro graphics bug
svn-id: r52987
2010-10-02 23:18:15 +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