Commit Graph
1570 Commits
Author SHA1 Message Date
Filippos Karapetis bd7e708fc3 SCI: Move resource related functionality into a separate folder 2020-11-29 14:34:55 +02:00
Cameron Cawley c877097b49 ALL: Remove use of "" in Common::U32String constructors 2020-11-16 16:56:58 +00:00
Eugene Sandulenko 458b2332d5 JANITORIAL: Formatting fixes 2020-11-09 19:33:57 +01:00
Filippos Karapetis e9e30b0c23 SCI: Change the generated SCIFX code to arrays
The end result of these rules is palette adjustments, so there's no
reason to create custom code for each effect. Searching for palette
mods has an O(n) complexity, but the dataset is quite small, so it
should be negligible.
2020-11-08 22:27:46 +02:00
wonst719 e2415b59d6 SCI: Change Korean text detection method 2020-11-08 22:26:31 +02:00
wonst719 a615b7a66c SCI: Fix Korean detection table entries
- Remove GK1 exception in GfxFrameout::detectHiRes()
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 dc41e0e3cc SCI: Remove leftover code from scummvm-kor 2020-11-08 22:26:31 +02:00
wonst719 36f02ab3b9 SCI: Add missing const to GfxText32 methods 2020-11-08 22:26:31 +02:00
wonst719 b7664c24dc SCI: Korean fan translation support 2020-11-08 22:26:31 +02:00
Willem Jan Palenstijn 2cc67cd29b SCI: Add custom palette mods for SQ3 and LSL2
This adds a devtools script to convert scifx config files from FreeSCI
into C++ code to apply the palette mods.

The actual palette mods are by Matt Hargett, and from FreeSCI.
2020-10-31 11:44:28 +02:00
Filippos Karapetis c5df234521 SCI: Render text in games running at a 480x300 resolution
It looks awful for now, but at least there is text showing up on screen
2020-10-28 22:12:41 +02:00
Filippos Karapetis 95bafa8d60 SCI: Don't scale the mouse cursor by 2x in games running at 480x300
It looks big and quite wrong in this case
2020-10-28 22:12:40 +02:00
Zvika Haramaty 417e9767b9 SCI: Add RTL support in GfxControls16::drawListControl
When using original save/load screens, the games list wasn't properl
aligned, if contained Hebrew text. Fixed by calling the BiDi algorithm
in drawListControl.
2020-10-27 10:19:36 +02:00
Willem Jan Palenstijn 0be765b288 SCI: Add support for RGB rendering 2020-10-24 02:55:01 +03:00
aryanrawlani28 a56dc094b9 ENGINES: ALL: Move detection_enums -> detection.h
- Cleans up headers quite a bit.
2020-10-03 14:56:36 +02:00
aryanrawlani28 e644782294 SCI: Move graphics helpers/detection related enums into a new header 2020-10-03 14:56:36 +02:00
sluicebox f1d4ff6559 SCI: Fix boundary checks when drawing font chars
Adds boundary checks to handle characters with pixels that
are to the left or above the screen. This occurs in the fan
game Soulshade Asylum which draws a large window whose title
is above the screen and not meant to be seen. The window code
clips the rectangles but the text was drawn outside the buffer.

Fixes the existing boundary checks so that the correct pixels
are drawn when there's overlap with the right edge of the screen.
2020-09-29 18:39:08 -07:00
sluicebox 3e176b38d2 SCI: Add workarounds for NRS SQ4 Update 1.3
Workarounds for this excellent fan patch were deliberately
excluded because previous versions were distributed with a full
version of the game, but 1.3 is distributed as a true patch set.

Confirmed that this version is now completable.
2020-09-24 04:23:06 -07:00
sluicebox 6a9ad2daf2 SCI32: Update hi-res detection for PQ4 Mac 2020-09-07 17:02:01 -07:00
sluicebox a455e23c5f SCI32: Use CursorManager to show/hide Mac cursors
Fixes cursor disappearing after closing overlay dialog
2020-09-07 07:39:10 -07:00
sluicebox 6d8c4c783f SCI32: Fix LSL6 HIRES Mac planes when restoring
Fixes an incorrect game-id test which prevented deleting planes
2020-09-06 23:40:25 -07:00
sluicebox c4eda7ab4a SCI32: Set Mac gamma level 2020-09-06 21:56:58 -07:00
aryanrawlani28 12e4f871a3 GUI: U32: Improve u32 in all engine subsystems
- Common: add wordWrap function to ustr.cpp
- Bladerunner: Explicitly state we have a U32String in subs (same as Subtitles::loadOuttakeSubsText)
- Don't use translations for engine specific "put strings", because they might not support.
- SCI: Use const references for showScummVMDialog
- SCUMM:
-- Don't use translation in md5 warning. left comments with the translated version.
-- Remove some redundant headers in help.cpp
-- Don't use translation in handleSaveload when printing to console
-- Also, display success transaction correctly via u32::format
- TESTBED: Use fake constructor when setting label of button
- SKY: Correctly use translation when using SaveStateDescription
- ULTIMA: Don't use translations when display_string
- ENGINES:
-- GenerateUnknownGameReport correctly, with proper translations.
-- There was an error, where a function had been declared twice, in a header file. Correct this.
2020-08-30 14:43:41 +02:00
aryanrawlani28 e22b32abfe GUI: U32: Use Common::U32String::format where necessary and GUIError to u32
- Where necessary as in, where translated messages are used.
- GUIErrorMessage now takes in U32String
- error messages across some engines use U32Strings. they are changed because they show a message dialog.
2020-08-30 14:43:41 +02:00
aryanrawlani28 bed05ea134 GUI: U32: Fix compilation errors across entire project
After the initial changes just to scummvm/gui for u32, this commit includes the whole project

- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor
2020-08-30 14:43:41 +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
sluicebox 1d67ba6668 SCI: PalVary includes palette entries 0 and 255
Fixes color 0 in QFG1VGA at night. This is the menu bar background.

QFG1VGA uses a soft black (27,27,27) for color 0 during the day and
regular black (0,0,0) at night. Until recently, ScummVM didn't display
the soft black, because it didn't include color 0 when copying pic
palettes to the system palette. Now that color 0 is included, it's
exposed that PalVary has been excluding colors 0 and 255 when
calculating the new palette, preventing QFG1VGA's soft black from
transitioning to regular black at night.

SSCI includes all entries when calculating the new palette.
2020-08-18 03:07:18 -07:00
sluicebox 43ae2cc2ce SCI: Set palette entry 0 on more SCI 1.1 operations
In SCI 1.1 most palette operations copy entry 0 to the system palette,
such as when drawing a view. This continues an earlier fix which
included entry 0 when drawing a pic and exposed that this needs to
happen in other places too: 3de471de36

Fixes bug #11544 where a KQ6 RAVE resource ended up with the wrong
color in room 380. System palette entry 0 ended up as [7,7,7] when
the RAVE was drawn instead of black, the expected color, causing the
RAVE palette to merge incorrectly. [7,7,7] comes from pic 380's
palette, after which entry 0 should be set to black when drawing
view 5 and copying its palette, which is what now happens.
2020-08-11 01:39:31 -07:00
Zvika Haramaty 82be4ec7c0 SCI: Make menus BiDi 2020-08-05 13:04:25 -07:00
sluicebox 852e6c2954 SCI: Removed unused GfxPicture::_animationNr 2020-08-02 22:20:48 -07:00
sluicebox c3e199309e SCI: Fix transposed pic transitions
Fixes two pic transitions which were backwards. The oldTransitionIDs
table masked this bug in several games. These are the transitions that
go to and from the edge of the screen and the center from all sides.

Examples of both transitions:
KQ6 entering oracle room 380
ECO2 restarting from any room

Example with the two-part blackout effect:
KQ4 looking through keyhole in room 51
2020-08-02 22:02:35 -07:00
sluicebox 336bf0dd37 SCI32: Translate Mac colors when drawing cels
Fixes KQ7 credits, RAMA credits
2020-07-23 02:41:10 -07:00
sluicebox 452343a58e SCI32: Support late Mac composited VMD playback
Fixes RAMA intro video
2020-07-23 02:41:10 -07:00
Cameron Cawley ad722f31cc SCI32: Allow using HQ video with pixel formats other than RGBA8888
This should fix Trac #11332.
2020-07-18 12:16:52 +02:00
Cameron Cawley 352653b8a2 GRAPHICS: Add a function for scaling a standard Graphics::Surface
This also makes use of it in the SCI and Wintermute engines
2020-07-18 12:16:52 +02:00
sluicebox ec4bce9c2f SCI: Fix font parsing when bitmaps are unordered
GfxFontFromResource::getCharData() calculates the size of a character's
bitmap by assuming that it's followed by the next character's bitmap,
but the bitmap order isn't relied upon by Sierra's interpreter or the
major resource viewers. Several Polish games have fonts whose bitmaps
appear in arbitrary orders and also have extra bytes between them.

Fixed by calculating bitmap size by dimensions, which is what the
drawing code uses anyway.

Fixes Polish versions of KQ5, LSL1VGA, LSL5, and LSL6. Bug #10509
2020-07-09 12:09:39 -07:00
Cameron Cawley 00e3c03755 ALL: Remove unnecessary graphics/colormasks.h includes 2020-06-15 16:59:34 +01: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
Zvika Haramaty b4d40ed596 SCI: add support for Hebrew translation of Torin
- Detect fan made Hebrew translation of Torin's Passage
- Use BiDi algorithm in SCI engine
2020-05-19 12:32:58 +02:00
Eugene Sandulenko 7a152e9af4 JANITORIAL: #include "engine.h" -> "engines/engine.h" 2020-05-10 23:45:43 +02:00
Henrik "Henke37" Andersson fa4518fbab SCI: Use PauseToken in kernelMessageBox 2020-05-10 23:39:31 +02:00
sluicebox 8ab13e59e1 SCI32: Fix Mac cursor when resource doesn't exist
Fixes Phantasmagoria cursor disappearing when viewing inventory
2020-04-21 21:29:51 -07:00
sluicebox 3deabc9873 SCI32: Add QuickTime support for KQ7 Mac movies 2020-04-20 15:59:32 -07:00
sluicebox 1f0334ee6b SCI32: Don't delete planes on restore in all Mac games 2020-04-20 00:19:38 -07:00
sluicebox bfb9290138 SCI32: Handle Mac black palette entry 2020-04-16 17:08:49 -07:00
sluicebox acfe23b42c SCI32: Handle Mac color remapping range 2020-04-16 17:07:49 -07:00
sluicebox 6e9d0fafb5 SCI32: Use Mac cursor palettes
Fixes cursor colors in SCI32 Mac games that use native cursor resources.
2020-02-12 09:04:57 -08:00
Eugene Sandulenko 8ef27002cb SCI: Fix compilation on platforms without RGB colors 2020-02-12 00:40:28 +01:00