3694 Commits

Author SHA1 Message Date
D G Turner
0e472905ad GRAPHICS: MACGUI: Fix Set But Unused Variable GCC Compiler Warning
These were left over from "Fix alignment issues for multiline text"
recent commit.
2023-06-25 03:44:59 +01:00
Eugene Sandulenko
ae89982ded
GRAPHICS: Handle null advances and boxes in BdfFonts::scaleFont 2023-06-23 12:03:16 +02:00
Harishankar Kumar
6552dae1a5 GRAPHICS: Fixed irregular fonts height in macfonts
leading of a font is added to the height of the font when returning font
height, additionally the definition of leading says:
`Alternatively called line spacing, leading is the space between lines`

This fixes alignment of texts in `warlock-100` while also fixing the
line heights in `theapartment`.
2023-06-21 20:18:39 +03:00
Harishankar Kumar
283b5c4b20 GRAPHICS: MACGUI: Fix kMacRoman fonts issues with special characters
This commit removes Mac Roman from plainByteMode(), this partially
reverts commit `9d4ac18be542eed5fdbb52519fd95ea7ac47a9e4` from
PR #3823, this change breaks Hebrew rendering in Pink.

Fixes rendering of texts in `theapartment` using MacRoman fonts.
2023-06-21 20:18:39 +03:00
Harishankar Kumar
b7e09d8259 GRAPHICS: MACGUI: Fix alignment issues for multiline text
This patch fixes the alignment issue for multiline text in text castMember
it increases the line height of each line by one, this added change over
multiple lines result in fixed alignment. This patch also removes the height
reduction due to empty line (which cumulatively caused the alignment issue).

`DATA/SUPPORT/INTRODUCTION@111` of 'warlock-100' has this alignment issue
where the text "The Blaster" was above the button it was supposed to be.
2023-06-21 20:18:39 +03:00
Walter Agazzi
237cb4d52a VIDEO: Add YUV422 and YUV444 to Theora decoder 2023-06-19 08:43:40 +03:00
Miro Kropacek
5537759c53 BACKENDS: ATARI: Rework
- Atari TT support
- all video and audio is now handled via XBIOS
- reworked IKBD handling using Kbdvbase vectors, esp. Kbdvec()
- video uses proper triple buffer
- arbitrary game screen size support
- many fixes and optimizations
2023-06-15 22:57:55 +02:00
Miro Kropacek
3ab147259b GRAPHICS: Add support for dithering from 3bpp into 1bpp
This allows using "ScummVM Modern" theme in 8-bit resolutions.
2023-06-10 23:27:57 +02:00
Miro Kropacek
3294b20653 GRAPHICS: Support Floyd dithering for RGB121
RGB121 is a special case of CLUT8 similar to RGB332 but with pixels
taking only the low nibble of a byte.
2023-06-10 23:27:57 +02:00
Scott Percival
c94f2de321 DIRECTOR: Add font quirks for two Star Trek games 2023-06-08 09:16:30 +02:00
Le Philousophe
f06f470685 GRAPHICS: Properly take stroke width into account when drawing lines
Old code:
- didn't handle well strokes with an odd width
- didn't handle strokes widths above 1 in generic lines handler
2023-06-03 18:27:17 +02:00
Harishankar Kumar
797803d515 GRAPHICS: MACGUI: Implement lockable widgets
Lockable widgets are those which takes in all input
and if set then no other widget can take any input
its same as them being inactive, no buttons, animations
etc will work.

This is implemented to support `modal` property of window,
which requires a window to take all input and prevent all
others from having any actions.
2023-06-01 20:17:23 +02:00
Harishankar Kumar
dd72dd09ca DIRECTOR: Implement the titleVisible property of window
Modifies border of window by first changing title to "", then updating
window border to borderType 2 `ThinNoTitle`.

`titleVisible of window` to verify this behavior.

Co-authored-by: Pragyansh Chaturvedi <pragyanshchaturvedi18@gmail.com>
2023-06-01 20:17:23 +02:00
Harishankar Kumar
4f07e8dec4 GRAPHICS: MACGUI: Added support to change inner dimension of macwindow derived object
Added setInnerDimension which calls resize (with bool inner dimension change: true), moveto and finally updateOuterDimension.

This was implemented to match window rectangle size as used by window property `rect`, `rect of window` in `workshop` uses this.
2023-05-31 13:29:33 +02:00
Harishankar Kumar
23f1229e67 GRAPHICS: MACGUI: Refactor resize() to extract inner window resizing
resize function is extracted to new function resize and resizeInner,
also a new private function rebuildSurface is created to handle common
code of refreshing/rebuilding surface after modifying inner or outer
window dimensions.
2023-05-31 13:29:33 +02:00
Harishankar Kumar
76d1590ccc GRAPHICS: Implement smartmenu for macpopups
Smartmenu implementation using offsetY to displace popup such that the previous selected item will fall onto cursor, includes checked item and highlighted.

For `Popup Menu` in theapartment, without this patch the second popmenu was not remembering the last selected item and was opening it from scratch, after this patch popupmenu will open from the last selected item already selected with checkbox.
2023-05-28 13:50:18 +02:00
Harishankar Kumar
fd5977b911 GRAPHICS: Add blinking animation when selecting item
Additional logic for drawing blinks when closing popup menu is added, closeMenu is overriden because it is called inside eventLoop and therefore need to be captured when closingMenu.

Add blinking animation support for macpopups, affects `Popup Menu` in theapartment, before this there was no animation when selecting item and the menu just used to immediately close, now however there is proper animation for item selection.
2023-05-28 13:50:18 +02:00
Harishankar Kumar
e12d3053cc GRAPHICS: Implement macpopupmenu while reusing macmenu
Added functions for menu drawing/selections, this uses the base functions of macmenu to implement mac-styled popupmenu's, also return selected item index/text.

Used by 'Popup Menu' in theapartment: With this changes the popupmenu is working with both item selectors, doesn't implement the icon selector.
2023-05-28 13:50:18 +02:00
Harishankar Kumar
014712bbc5 GRAPHICS: Add menu by id and support custom menu
Adds new function addMenu/getMenu with menu id to add custom menus.

Used when implementing macpopupmenu which reuses macmenu for theapartment.
2023-05-28 13:50:18 +02:00
Harishankar Kumar
5bb6e06624 GRAPHICS: Expose internal macmenu structs for reusing in popmenu
Exposed MacMenuItem, MacMenuSubMenu, MacMenuItem and MacMenuData to headers and changed visibility of needed functions to protected.

These structs and functions is used in popupmenu for reusing macmenu code.
2023-05-28 13:50:18 +02:00
Eugene Sandulenko
70b1a4432a
GRAPHICS: MACGUI: Use proper check symbol in MacMenu 2023-05-28 12:54:06 +02:00
Walter Agazzi
421295bdc6 GRAPHICS: Change pitch from int16 to int32
This is required for games allocating very big surfaces
(e.g. 9000x300 in Chronicle of Innsmouth - Mountains of Madness)
2023-05-20 23:23:58 +02:00
Vladimir Serbinenko
2366bff928 GRAPHICS: Fix glyph offsets for PC98 glyphs *9e 2023-05-19 21:16:17 +02:00
Eugene Sandulenko
39cd7338bc
GRAPHICS: Added missing override keywords 2023-05-14 23:23:44 +02:00
Vladimir Serbinenko
b4881f1451 GRAPHICS: Support PC98 font ROM 2023-05-14 23:12:46 +02:00
Cameron Cawley
bbe8010cd1 TINYGL: Remove use of Graphics::PixelBuffer from the Line class 2023-05-14 23:04:11 +02:00
Cameron Cawley
d293a659d3 TINYGL: Remove use of Graphics::PixelBuffer from the FrameBuffer class 2023-05-14 23:04:11 +02:00
Misty De Meo
ce61aa9b9b GRAPHICS: MACGUI: remove unused variable 2023-05-14 12:04:58 +03:00
Miro Kropacek
6c1002aca5 GRAPHICS: ATARI: Fix special move16 case when w==15 2023-05-10 23:02:12 +02:00
Miro Kropacek
76d3706492 BACKENDS: ATARI: Add build scripts
- consolidate public #define's (just ATARI)
- cpu compiler flags are specified in the script
- allow explicit move16, SV and SV Blitter features enabled/disabled

Provide two build scripts:

1. "Fat" one targeted at 040/060 machines (possibly with SuperVidel)

This one is optimized for 68020-60 (so it's still possible to try
highres engines on 68030 machines).

2. "Slim" one targeted at 030 machines (Falcon030+DFB/CT2 or TT030)

This one is optimized for 68030 and stripped from even more features:
"fancy" (highres) themes, move16 & SuperVidel routines and most
importantly the highres engines.
2023-05-10 22:58:26 +02:00
Vladimir Serbinenko
1dc7fac7cc GRAPHICS: Fix default bpp value for drawBig5Char 2023-05-03 15:22:17 +02:00
Eugene Sandulenko
fbb238bb91
GRAPHICS: Fix include 2023-04-29 13:39:21 +02:00
Vladimir Serbinenko
eb2c55fe04 COMMON: Move DOS font from AGI to common
It's useful for Chinese EOB2 as well
2023-04-29 13:37:45 +02:00
Vladimir Serbinenko
b43be897c7 GRAPHICS: sanity check for big5 font file 2023-04-29 13:37:45 +02:00
Vladimir Serbinenko
95bbb7c3d5 GRAPHICS: New method hasGlyphForBig5Char in big5font 2023-04-29 13:37:45 +02:00
Vladimir Serbinenko
bc80106e04 GRAPHICS: Bring on-par Surface and raw draw for big5 font 2023-04-29 13:37:45 +02:00
Thierry Crozat
4b61397acd GRAPHICS: Support bliting CLUT8 Surface in non-CLUT8 ManagedSurface
The inner blitting code already handled that case, but we needed to be able to
pass the Surface palette to that inner code.
2023-04-25 21:44:51 +01:00
Thierry Crozat
facb6852b8 GRAPHICS: Fix incorrect assert in ManagedSurface::blitFromInner
When blitting from CLUT8 to another format, we need a palette
for the source surface.
2023-04-25 21:44:51 +01:00
NischayDiwan
aaa32cf118 GRAPHICS: Fix scaling for BDF fonts
- The primary change is to fix or improve the scaling of BDF fonts
 - Now uses the same approach as in MacFonts scaling that is creating another surface and refactor it with a grayscalemap
 - Bugs - there are still some problems when testing in capital letters
2023-04-16 21:13:50 +02:00
NischayDiwan
4b83dd78d6 GRAPHICS: Refactor MacFont scaling into reusable methods
- The refactoring code for MacFont that magnifies the font on a surface and then uses a grayscalemap to refactor the scaling, is pushed back into a resuable method in the base font class.
 - surface magnigy funtion transfer and scaleSingleGlyph method add to the font class.
2023-04-16 21:13:50 +02:00
su-xingyu
6ff2212f51 GUI: Fix hard shadow of tabs under HiDPI
Introduce 'shaodwIntensity' to shadow drawing functions
2023-04-15 22:17:27 +02:00
su-xingyu
c577b1d616
GUI: Fix hard shadow under HiDPI rendering (#4908) 2023-04-15 02:04:16 +02:00
su-xingyu
dc997b22ce GUI: Fix draw-size computation 2023-04-14 16:45:53 +02:00
Matthew Jimenez
d456052c4c GRAPHICS: Fix cursor surface when bytes per pixel greater than one 2023-04-10 20:12:41 +02:00
Eugene Sandulenko
d2abfe6f8a
Revert "Revert "GRAPHICS: Add support for cursor as Surface""
Since the devs already started adapting other engines, this now is problematic.
2023-04-10 12:21:29 +02:00
Eugene Sandulenko
8ac1d007e2
Revert "GRAPHICS: Add support for cursor as Surface"
This reverts commit dd1232325d9b310a85244f78ca5d12c063cf047f.

This breaks Windows cursors and was not tested properly.
2023-04-10 11:38:21 +02:00
Miro Kropacek
dd1232325d GRAPHICS: Add support for cursor as Surface
This helps engines which pass Surface buffers to replaceCursor() and
pushCursor() while the surface is not guaranteed to have width == pitch.
2023-04-09 13:12:06 +02:00
Cameron Cawley
fb2503d02e GUI: Only use a transparent colour for BMP images 2023-04-09 12:54:38 +02:00
Cameron Cawley
f5f445be5f GRAPHICS: Add generic versions of applyColorKey() and setAlpha() 2023-04-09 12:49:23 +02:00
Miro Kropacek
b2103898a7 GRAPHICS: ATARI: Optionally avoid surface pitch align
Some engines are too bound to linear surfaces in 8bpp that it is very
hard to repair them. So instead of polluting the engine with
Surface::init() & delete[] Surface::getPixels() just use this
workaround.

It is also useful as an early fix for newly found engines which may be
fixable later.
2023-04-07 15:54:28 +02:00