Commit Graph
133 Commits
Author SHA1 Message Date
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
Johannes Schickel 3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Johannes Schickel 89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02: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
Tobias Gunkel e14e4ab3b0 SCUMM: adjust to coding style-guide 2012-02-11 08:30:02 +01:00
Tobias Gunkel d4ddd2ca84 SCUMM: introduce constants for _userState for cleaner and easier to understand code 2012-02-11 08:29:51 +01:00
Tobias Gunkel 7d409dd15f SCUMM: in v0 do not allow an inventory item as 2nd object of a give-to command 2012-02-11 08:29:44 +01:00
Tobias Gunkel e3f9a09d49 SCUMM: keep track of the number of nested script calls for a sentence
command in v0

If for instance an object necessary for the sentence command is not reachable or pickupable (try to use faucet (object 55) with jar with water in microwave (object 50), the pick-up script of the jar will tell the actor to pickup object 99 (jar not in microwave)) the actor will try to pick-up the jar infinitely.
This is fixed by counting the amount of nested scripts the sentence command has called (directly or indirectly) so far and aborts it if there have been too many.
2012-02-11 08:29:21 +01:00
Tobias Gunkel fb68456541 SCUMM: complete handling of pending walkTo actions for sentence commands
in v0
2012-02-11 08:29:19 +01:00
Tobias Gunkel b31157cee3 SCUMM: delete some obsolete v0 TODOs 2012-02-11 08:29:14 +01:00
Tobias Gunkel f22bbc47b4 SCUMM: fix v0 mode handling and actor switching
- handle mode switching correctly
  - do not freeze scripts in cutscene mode (mode 0), as some scripts are freezed in mode 0 that should not be freezed
  - kModeNoNewKid (mode 2) needs the same userState as mode 3
- rename o_cursorCommand to o_setMode as it is not really cursor specific
- handle actorHiding correctly (do not set costume to 0 as the previous costume cannot be reverted after hiding)
- add drawSentence
- document meanings for actor misc flags
- fix actor names for "new kid" if the radiation suit is used (all kids are set to 0 then with actor 0 name " ")
- cleanup actor switching routine
- _userPut is not used anymore in v0
2012-02-11 08:29:05 +01:00
Tobias Gunkel 2f1336cdf0 SCUMM: fix blank sentence line in v0 after cutscenes and remove unused parameter of resetSentence() 2012-02-11 08:29:03 +01:00
Tobias Gunkel c138ef6709 SCUMM: merge _activeObjectNr/_activeObjectType and _cmdObjectNr/_cmdObjectType 2012-02-11 08:28:46 +01:00
Tobias Gunkel f2309998ff SCUMM: fix debugger for v0 2012-02-11 08:28:44 +01:00
Tobias Gunkel ffcd600461 SCUMM: make what-is verb work in v0 again 2012-02-11 08:28:38 +01:00
Tobias Gunkel 4bc726b995 SCUMM: reset object2 in v0 correctly
This fixes the issue that a kid will not enter the front door after opening it with the key.
2012-02-11 08:28:36 +01:00
Tobias Gunkel e14bc5fd6d SCUMM: improve verb and sentence handling
- execute sentence if verb was clicked twice
- reuse the first object if a new verb is selected (but no preposition is used yet)
2012-02-11 08:28:33 +01:00