Commit Graph
88 Commits
Author SHA1 Message Date
athrxx 3779f208ad SCI: (SQ4/CD/Windows) - make use of windows gfx drivers
SQ4/CD/Windows uses a simiar interpreter to the KQ6 one, minus the hires
graphics support. It has the same upscaling to 640x440 (or 320x220 for small
windows) and also support the same 16 colors mode.

Also removed some whitespace...

I have attached the SQ4 Windows variant to the gfx drivers I made for KQ6.
The 16 colors mode now requires the SCIWV.EXE executable, though. I had
hard coded the 512 bytes color pattern table for KQ6, since I thought it
would remain the only one necessary. But SQ4 has a different table. So I now
load them from the executable.

There might be more Windows games like that, I just currently don't know
about it (probably other SCI_VERSION_1_1 titles). Adding support would be
super easy. But it will not work right out of the box, since I explicitly check
the game IDs in customizeGuiOptions(), to avoid any nonsense to happen.
2024-12-21 18:33:13 +02:00
athrxx 9dc71ef701 SCI: (PC-98) - add gfx drivers for PC-98 games
16 colors and 8 colors modes for the SCI0 and SCI1
PC-98 games.

The 8 colors modes are new, the 16 colors mode is
basically the pre-existing mode, just with some
minor fixes (palette, font drawing, etc.).

The final goal is to get rid of the upscaling inside the
engine, but that will require more work on the other
game versions that depend on it.
2024-08-06 08:47:25 +03:00
sluicebox 49a2fac05e SCI: Reduce global engine usage 2023-11-16 18:44:42 -08:00
sluicebox a54b882502 SCI: Clarify text-code processing. PVS-Studio V560 2023-11-07 16:07:10 -08:00
sluicebox 1f4124b121 SCI: Remove or disable unused functions 2023-11-03 15:12:41 -07:00
sluicebox c241f21baa SCI: Reduce scope of variables 2023-11-03 15:12:40 -07:00
sluicebox aaebd2aa85 SCI: Fix some comments 2022-11-12 19:33:37 -08:00
sluicebox daed465639 SCI: Add option for high resolution Mac fonts
This adds the existing GAMEOPTION_HIGH_RESOLUTION_GRAPHICS option to
Mac games with native fonts. Default is enabled. If disabled, then the
low resolution Mac fonts are used and the game isn't upscaled.
2022-11-06 23:05:20 -08:00
sluicebox 1efdb1cb6c SCI: Add support for Macintosh fonts
High-resolution native Macintosh fonts are now supported in the
following games when the game's executable is present:

- Castle of Dr. Brain
- Freddy Pharkas
- King's Quest 6
- Leisure Suit Larry 1
- Leisure Suit Larry 5
- Space Quest 1

And in these games when classicmacfonts.dat is present:

- Leisure Suit Larry 6 (floppy)
- Quest for Glory 1
2022-11-06 23:05:20 -08:00
Hubert Maier b756b36aa9 SCI: Correct spelling mistake
questionaire -> questionnaire
2022-10-27 15:57:28 +02:00
sluicebox 34983d1017 SCI: Fix out of bounds read when measuring text
Found with valgrind. The OOB read did not affect behavior.
Introduced in 8a87d1030c
2022-05-18 14:26:06 -04:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
sluicebox c577976cd7 SCI: Remove FIXME from intended fall-throughs 2021-12-20 23:04:42 -05:00
sluicebox 8a87d1030c SCI: Fix newline handling in Japanese PQ2
Many PQ2 Japanese strings contain escaped newlines ("\n") which we have
not been handling. We have been handling these in getSciLanguageString()
when returning Japanese text but that's not where SSCI does this work.
PQ2's Print procedure in script 255 parses Japanese text itself and our
getSciLanguageString() is never involved.

Now Japanese newline handling is done in the core text measuring and
drawing functions, which is closer to where SSCI did it, but without the
hack of having GetLongest() patch out Japanese newlines like in SSCI.

Fixes bug #13154
2021-12-13 11:43:35 -07:00
Orgad Shaneh 940c7bfc14 SCI: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Paul Gilbert 0136043f09 COMMON: Revert Change Rect and Point to have int32 fields
This reverts commit 1c3e7fb4e9.
2021-07-06 20:35:42 -07:00
Paul Gilbert 1c3e7fb4e9 COMMON: Change Rect and Point to have int32 fields 2021-07-04 18:24:26 -07:00
Torbjörn Andersson 7746c00a64 SCI: Fix a tiny memory leak in GfxText16 2021-06-04 07:00:30 +02:00
wonst719 e2415b59d6 SCI: Change Korean text detection method 2020-11-08 22:26:31 +02:00
wonst719 00bd552840 SCI: Korean code cleanup
- Move repeated message.map tests into ResourceManager::isKoreanMessageMap()
- Fix comments
- Fix formatting
- Remove unused codes
2020-11-08 22:26:31 +02:00
wonst719 b7664c24dc SCI: Korean fan translation support 2020-11-08 22:26:31 +02:00
Walter van Niftrik 22593de73f SCI: Rename font.h/cpp to scifont.h/cpp
This avoids an issue with MSVC where if (non-SCI) "graphics/font.h" is
included through another include file from the SCI engine root, it finds
"sci/graphics/font.h" first and uses that instead.
2020-08-27 14:56:17 +02:00
Zvika Haramaty 82be4ec7c0 SCI: Make menus BiDi 2020-08-05 13:04:25 -07:00
Zvika 9f10fbcfc1 SCI: Hebrew SQ3 - fixed rejects 2020-05-25 03:21:59 +03:00
Zvika Haramaty 6ab0cb78e0 SCI: Improve vm_hooks ; Support Hebrew SQ3
- vm_hooks: fully support 'call*'
- make required changes to support Hebrew SQ3 (which is still a WIP
project)
2020-05-25 03:21:59 +03:00
D G Turner d11c61db14 SCI: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-01 05:06:31 +00:00
sluicebox ca66a776b0 SCI: Implement early GetLongest() behavior, bug #10000 2019-07-09 09:51:10 +03:00
D G Turner 09abcc5c2c SCI: Fix Fall Through Compiler Warnings. 2018-11-13 12:10:30 +00:00
Torbjörn Andersson 70a2ca8b7d JANITORIAL: Silence more GCC 7 warnings
All these fall through were marked as deliberate, so again I've only
changed the comment to silence GCC.
2017-08-06 13:30:51 +02:00
Colin Snover 10d97ce379 SCI: Fix more unsafe C-string usage 2017-02-05 12:38:21 -06:00
Eugene Sandulenko dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Colin Snover 4e1a9be816 SCI32: Remove CoordAdjuster32, at least for the moment
This may come back in the future to deduplicate some gfx code,
but SCI32 had two different inlined ways of doing coordinate
conversions with different rounding methods, so CoordAdjuster32
didn't get used when the graphics system was rewritten.

At the moment, SCI32 code uses the mulru/mulinc methods from
helper.h for scaling up/down coordinates.
2016-08-19 15:23:10 -05:00
Lars Skovlund 54acbdccc6 SCI: Fix obsolete comment 2015-12-28 10:28:27 +01:00
Lars Skovlund 9a3084d320 SCI: Fix when more than 10 font codes are used 2015-12-28 05:50:26 +01:00
Martin Kiewitz 431d33b119 SCI: use diff. PC98 word wrap tables for SCI0/01/1
also added even more comments about details of word wrapping
SCI0 (PQ2) and SCI1 (Brain/KQ5/SQ4) got their own table now
2015-12-14 00:20:56 +01:00
Martin Kiewitz 1161e3e89d SCI: add difference for SCI1 PC-98 word-wrapping
fixes small issue in Castle of Dr. Brain PC-98 Japanese
room 120, when looking at the table
Also added a few comments to Japanese word wrapping code
2015-12-13 22:56:42 +01:00
Martin Kiewitz 0fd16ef39f SCI: hopefully Japanese text wrapping is fine now
also removed duplicate entries in punctuation table
thanks to wjp
2014-11-06 20:45:24 +01:00
Martin Kiewitz eff78c4424 SCI: fix Japanese Space Quest 4 (intro + buttons)
At least SQ4 uses #j text prefix as signal for the
interpreter to not use the PC9801 hires font, but
to use the internal low res font instead
2014-11-04 22:01:21 +01:00
Martin Kiewitz fa7a6d473e SCI: GetClosest() bugfix the bugfix thx wjp 2014-11-02 19:37:23 +01:00
Martin Kiewitz 11ba447483 SCI: bugfix in GetLongest() for Japanese SQ4 2014-11-02 19:31:37 +01:00
Martin Kiewitz 5aae18feb8 SCI: text16 Shift-JIS font switch fixed
fixes Police Quest 2 Japanese intro and others,
where the internal SCI font was used and not
the Shift-JIS hires font
2014-11-02 13:08:33 +01:00
Martin Kiewitz 9d693b9a79 SCI: fix another bug in text16 / GetLongest() 2014-11-02 02:31:32 +01:00
Martin Kiewitz c4ca0a7de2 SCI: fix bug in text16 / GetLongest() 2014-11-02 02:16:00 +01:00
Martin Kiewitz c9e74d6d54 SCI: text16 GetLongest() changes fixes bug #5334
also fixes bug #5159
also fixes Japanese line wrapping (hopefully)
2014-11-01 23:36:29 +01:00
Martin Kiewitz 9561d5f6f8 SCI: revert r55034, fixes bug #6539
original bug wasn't solved properly
will reopen the original bug #5334
and figure out that one instead
2014-11-01 00:57:26 +01:00
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Max Horn 51bde6ced5 SCI: Remove a bunch of unused private member variables
All instances uncovered by clang warnings.
2013-04-18 23:50:20 +02:00
Max Horn 4f8665fc83 COMMON: Move isFoo functions to namespace Common, add doxygen comments 2012-02-20 16:18:27 +01:00
Max Horn 658080deed ALL: Avoid using is* macros from ctype.h
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
2012-02-15 16:51:37 +01:00
Littleboy b694a78f62 ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04:00