Commit Graph
149 Commits
Author SHA1 Message Date
Torbjörn Andersson fb2bd1166d SCUMM: Split up gfx_mac.cpp into new macgui directory
The Mac GUI code is getting unwieldy, and this is an attempt at breaking
it up into more manageable chunks.
2023-12-22 15:09:06 +01:00
Torbjörn Andersson ec1ab82283 SCUMM: Initial work on a common MacGui class that handles Mac menus etc.
This will be used for Last Crusade and Loom. Loom is currently the more
broken of the two, though.
2023-11-18 18:47:39 +01:00
AndywinXp 1b40a6c932 SCUMM: MI1 (SegaCD Jap): Fix remaining text rendering issues
These include:
- Stray "-" characters (actually, "_") in dialogues
- Graphical glitches when scrolling dialog choices horizontally

With this commit we finally close issue #10447
2023-11-13 10:17:55 +01:00
Torbjörn Andersson 2223c96395 SCUMM: More Indy 3 Mac GUI cleanups 2023-10-16 17:40:29 +02:00
Torbjörn Andersson a67b1e9758 SCUMM: Remove Indy 3 Mac GUI verb script check
It seems it's no longer needed. Also, cleaned up naming a bit so that
instead of "active" and "visible", the GUI is now "allowed" and
"active".
2023-10-16 17:40:29 +02:00
Torbjörn Andersson 44b7558756 SCUMM: Remove Indy 3 Mac hacks that are no longer needed 2023-10-16 17:40:29 +02:00
Torbjörn Andersson 6bc9ccadef SCUMM: Fix clicking on Indy 3 Mac GUI sentence line 2023-10-16 17:40:29 +02:00
Torbjörn Andersson fd63cf734d SCUMM: Hopefully fix Indy 3 Mac verb shortcut keys 2023-10-16 17:40:29 +02:00
Torbjörn Andersson 62af893348 SCUMM: Major (incomplete) refactoring of Indy 3 Mac GUI
Widgets are now proper objects. I'm back to the point where verbs work
again, but not the inventory. Still, this is too scary not to commit now
that it's beginning to work again.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson b8d5096d7c SCUMM: Some more Indy 3 Mac inventory work 2023-10-16 17:40:29 +02:00
Torbjörn Andersson eeac1b24ef SCUMM: Indy 3 Mac responds to verbs now 2023-10-16 17:40:29 +02:00
Torbjörn Andersson f37152d468 SCUMM: Indy 3 Mac is actually drawing scripted buttons now
This is by no means the final code for it, but it's still a good place
to commit.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson 716cd6e0e5 SCUMM: Remove Indy 3 Mac GUI mock-up. Begin work on proper GUI.
The goal is to make the interface as simple as possible, and to put as
much of the knowledge of what's going on into MacIndy3Gui itself.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson c6d1a256ef SCUMM: Moved Mac Indy 3 GUI into its own class
This is still just a mock-up, and a bad one at that. It will all be for
nought unless I can figure out how to wire up these buttons to the SCUMM
verbs.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson 1d154df781 SCUMM: Use Geneva for Indy 3 Mac GUI
Font rendering is broken at the moment. I have to figure out if it's a
problem with my code, or with the Mac Font class.
2023-10-16 17:40:29 +02:00
athrxx 1290da84ca SCUMM: (INDY3) - fix "what is" bug
(the verb should not be usable on actors)
2023-10-15 22:14:53 +02:00
athrxx 829572057c SCUMM: minor code style fixes 2022-10-17 23:03:04 +02:00
athrxx 7ba7d259c7 SCUMM: (SAM) - fix bug no. 13761
(Can't shoot names during the credits)
2022-08-21 01:38:04 +02:00
athrxx 319e50fc35 SCUMM: (LOOM/VGA Talkie) - improve verb handling
- get rid of weird hackery in o5_verbOps
- make sure the verbs are properly restored after loading a savegame
2022-08-10 15:27:23 +02:00
Donovan Watteau 27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
athrxx f28300f27f SCUMM: (V1) - add support for CGA black & white 2022-07-11 18:16:29 +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
athrxx 123e6d10b6 SCUMM: (COMI/CJK) - fix verb drawing regression 2022-04-08 19:53:44 +02:00
athrxx acb665c109 SCUMM: (SCUMM7/8) - cleanup (text) verb drawing and Hebrew right-to-left drawing
(SCUMM7/8 only)
2022-04-08 19:53:44 +02:00
athrxx d9ca128863 SCUMM: (SCUMM7/8) - implement right alignment flag for text
The original has it, although it isn't used. It is not meant for right to left languages, it just right-aligns left-to-right texts. Since I'll only use it for Hebrew I have to upgrade it a bit...
2022-04-08 19:53:44 +02:00
athrxx de4513cdff SCUMM: (SCUMM7/8) - implement original text formatting flags for more flexibility 2022-04-08 19:53:44 +02:00
athrxx 78835f0318 SCUMM: (SCUMM7/8) - start cleaning up text verb drawing
(this commit actually makes more of a mess than it cleans up anything and it also kills Hebrew, but it's easier for me not to squash this)
2022-04-08 19:53:44 +02:00
Torbjörn Andersson 9d9b6be671 SCUMM: Hack around Mac Loom text glitch
When using Straw To Gold (either on Loom island or in the Blacksmiths's
cell), the "gold" / "straw" texts overlap each other. This does not
happen in the original. Normally, script 8 would be responsible for
erasing that part of the screen, I think, but the Mac version does
things differently than the DOS version and I can't figure out how to
get it to work properly.

Maybe it's all down to differences in how we implement the
high-resolution text rendering in ScummVM? I'm adding a hack to fix it
for now, but if anyone has a better solution I'd be happy to see it go.

Fortunately, only two games use this, and the hack only affects one of
them. I've played through the game - again - without seeing any
regressions.
2022-04-06 11:40:58 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh ed5489929c SCUMM: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Torbjörn Andersson 5f2bf42f84 SCUMM: Changed the workaround for verbs drawn in room 80
It turns out that checking the room height causes verbs not to be
redrawn after reading books. Let's just limit it to room 80, and hope
there aren't any other cases.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson 276381dac2 SCUMM: Work around problem with inactive verbs being drawn in a scene
There is at least one scene in the game where inactive verbs are drawn,
and then the scene background is drawn over them. This should mean the
verbs are no longer visible, but the way we implement high-resolution
text on a scaled low-resolution background all text is assumed to have a
text mask on the text surface.

We work around this by only drawin verbs in standard rooms, where
"standard" is defined as being 128 pixels tall.
2021-06-30 14:59:55 +02:00
Orgad Shaneh 8047607908 SCUMM: Fix unclickable centered verbs
Fixes #12552
2021-05-17 22:16:56 +03:00
Filippos Karapetis cb6a107499 SCUMM: Limit x-range of selection workaround to Hebrew versions
Fixes bug #12552
2021-05-17 02:08:21 +03:00
Orgad Shaneh c8fc484c37 SCUMM: Fix X-range of selection for Hebrew on scumm<7
curRect.left is assigned in the script, and it is not modified. right is
assigned with the screen width - original left.

This results in bad highlighting of the verbs all over the line width,
instead of being limited to the actual string.

Due to that, sometimes the selection range of the up/down arrows overlaps
with some of the verbs, and then these verbs cannot be selected.

Solve by storing the original left value, and using it as initial x
position for the string (the actual right-to-left manipulation is done in
drawString()), and modify the value of curRect.left to match the string
that was actually drawn.

This bug is similar to the one that was fixed in 58e921eb87, but the
solution that was done there for v7 and v8 cannot work here, because the
string logic is much more complicated.
2021-04-26 21:26:41 +03:00
Orgad Shaneh 58e921eb87 SCUMM: Fix wrong rect for verbs on Hebrew
The value of left is applied from the script all the time, and was
replaced in drawVerb.

The problem with this approach is that redrawVerbs maps the mouse
location to verb index *before* calling drawVerb, so the rectangles it
compares against are invalid in X-axis (right is always _screenWidth -
1, and left is always 5).

This caused several bugs:
* Each verb was clickable all over the screen's width, although it was
  not highlighted.
* If the mouse was between 2 verbs, long above short, the Y-axis has 6
  overlapping pixels (e.g. 1: 330-360, 2: 354-384). Scanning is done
  bottom-up, so 1 was highlighted, but 2 was selected because of the
  previous bullet.
* The text on Hebrew was aligned to the right without any padding. Other
  languages have left = 5.

Fixed by setting right instead of left when applying the script, and
adjusting left in drawVerb. Other languages are not affected.

Another issue, unrelated to language selection: A verb that was split to
2 lines was clickable all over the screen's width. That's because
curRect.right was set beyond the _screenWidth, and it was not trimmed to
the first (longer) line's length. On Hebrew, curRect.left became
negative. This is also fixed in this commit.
2021-03-08 11:57:30 +02:00
sluicebox 93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
BLooperZ f76d858e6a SCUMM: COMI: fix hebrew multiline dialogue 2021-02-04 22:25:39 +02:00
BLooperZ 7f8b584aa3 SCUMM: remove commented out code 2020-01-01 00:31:21 +01:00
BLooperZ 2105313d8b SCUMM: remove forced right-to-left mode 2020-01-01 00:31:21 +01:00
BLooperZ 0af04124c8 SCUMM: export fakeBidi to function 2020-01-01 00:31:21 +01:00
BLooperZ 0625518e9f SCUMM: in-place verb strings reversal 2020-01-01 00:31:21 +01:00
BLooperZ 80218a5203 SCUMM7: reverse in single place 2020-01-01 00:31:21 +01:00
BLooperZ 8bef2a9b36 SCUMM: add check for hebrew version for position 2020-01-01 00:31:21 +01:00
ניב באר 72471ec431 SCUMM: rtl support for scumm-7-8 2020-01-01 00:31:21 +01:00
D G Turner 59b639ed4d SCUMM: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-23 11:56:16 +00:00
Eugene Sandulenko dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Robert Crossfield d83438225e SCUMM: Maniac V0: Add support for D64 Demo Disk, Cleanup duplicate 'Talk' array 2014-12-08 10:14:37 +11:00
Robert Crossfield 29d46e8a10 SCUMM: Maniac V0: If boxes are neighbors, walk directly to the new box. Remove extra call to 'animateCostume'. Remove now unnecessary V0 walk calc functions 2014-11-29 09:07:10 +11:00
Robert Crossfield 2dbd99d572 SCUMM: Maniac V0: Implement the original Walk Code (to fix some anim glitches), fix opcode to use _moving correctly (as V0 is different) 2014-11-28 22:24:45 +11:00