Commit Graph

3386 Commits

Author SHA1 Message Date
Thierry Crozat
566ca4ef54 GRAPHICS: Remove outdated builtin font names 2021-10-02 23:50:21 +01:00
Thierry Crozat
f3829243a1 GRAPHICS: Remove obsolete genLocalizedFontFilename FontManager
This function supported loading alternative bdf fonts when we were
using 8 bits encodings for the translations. Now that we are using
unicode for all language, this is no longer needed.
2021-10-02 23:50:21 +01:00
Paweł Kołodziejski
51edb55851
GRAPHICS: Do not clear frame buffer. Let engine only do that. Fixes #12936 2021-10-01 22:31:13 +02:00
Thierry Crozat
3e1c61cdb8 GRAPHICS: Support loading a Windows font from an existing stream 2021-09-24 23:42:18 +01:00
Martin Gerhardy
37de1b3146 MACGUI: const for some methods 2021-09-19 15:21:56 +02:00
Martin Gerhardy
1287dce313 MACGUI: whitespace issues 2021-09-19 15:21:56 +02:00
DivyamAhuja
04a2a1f87c MACGUI: Fix code formatting according to coding conventions 2021-09-19 15:21:56 +02:00
DivyamAhuja
bf46669cf8 MACGUI: Add methods to find top window at at a given point 2021-09-19 15:21:56 +02:00
Paweł Kołodziejski
de35138f3e GRAPHICS: Use OpenGL with shaders as default 2021-09-06 22:12:19 +02:00
ysj1173886760
83615f0d86 GRAPHICS: MACGUI: fix text display issue in mactextwindow. 2021-09-06 20:58:53 +08:00
Eugene Sandulenko
797ca3568d
JANITORIAL: Fix code formatting 2021-08-20 21:17:19 +02:00
Christian Kündig
a7196e347e OPENGL EMSCRIPTEN: Add ifndef go WebGL constants not defined by emscripten 2021-08-20 21:13:49 +02:00
Christian Kündig
8af8ac2e08 OPENGL EMSCRIPTEN: clean up ifdefs, fix opengl in main menu, remove 10ms delay in GRIM main loop 2021-08-20 21:13:49 +02:00
Christian Kündig
501c7ba7aa DISTS EMSCRIPTEN: set correct datadir (fixed issue with shader loading) 2021-08-20 21:13:49 +02:00
Christian Kündig
3a323d6899 OPENGL: Replace ifdef for runtime check of GL_VERSION 2021-08-20 21:13:49 +02:00
Christian Kündig
b7a2e22b0a DISTS: New Emscripten/WebAssembly dists target
This is an initial version of the emscripten build/dist target.
Many things are still missing, see dists/emscripten/README.md for
a detailed summary of what this provides and still misses
2021-08-20 21:13:49 +02:00
ysj1173886760
69cb4dd7a9 GRAPHICS: MACGUI: fix rendering text. 2021-08-18 21:06:41 +08:00
ysj1173886760
4133592992 GRAPHICS: MACGUI: add cache for inverted color. 2021-08-16 16:58:48 +08:00
ysj1173886760
50bfc4e521 GRAPHICS: MACGUI: implement global color inverter. 2021-08-16 16:54:00 +08:00
ysj1173886760
d00c5d1c36 DIRECTOR: fix _interLinear in mactext.
looks like it's the max text height, instead of the height of intervals of line.
2021-08-13 20:27:18 +08:00
ysj1173886760
e5af48a2ac GRAPHICS: MACGUI: fix getRowCol.
deal with out of bound error.
2021-08-12 17:03:09 +08:00
ysj1173886760
c4f7848084 GRAPHICS: MACGUI: fix createSubMenuFromString. 2021-08-09 16:51:25 +08:00
Max Horn
c9c13f49d8 GRAPHICS: fix global constructor warnings
Arguably it's better to use a hard code constant anyway, as the result
of sqrt(2) can vary between platforms (not that it is likely to matter
in practice ;-) ).
2021-08-07 10:46:14 +02:00
Max Horn
b7e6d61669 JANITORIAL: Fix compiler warnings about unused code 2021-08-07 10:46:14 +02:00
djsrv
40c8ab4724 GRAPHICS: MACGUI: Fix registering font to preferred ID 2021-08-06 08:56:32 -04:00
djsrv
1e61684570 GRAPHICS: MACGUI: Add replaceCustomCursor 2021-08-06 01:11:39 -04:00
djsrv
93f585c524 GRAPHICS: MACGUI: Clean up cursor management
Cursor types are now stored in a stack. Pushes and pops to the cursor
stack, cursor palette stack, and cursor type stack are now fully
synchronized.
2021-08-06 01:11:30 -04:00
Thierry Crozat
3203346dfb GRAPHICS: Do not use ellipsis by default when drawing text
This makes the default for drawString consistent with the default
for getBoundingBox.

This should also fix ellipsis being used by mistake in some games
(this was reported in Myst Masterpiece Edition for the menu screen).
2021-08-01 17:22:13 +02:00
Thierry Crozat
bb98ce92f2 MACGUI: Explicitly use ellipsis to draw text when needed
This is the default, so this commit does not change the behaviour.
But this will allow to change the default at a later stage.
2021-08-01 17:22:13 +02:00
ysj1173886760
9148f6dd20 GRAPHICS: MACGUI: fix the behaviour of drawing selection 2021-07-31 18:23:47 +08:00
ysj1173886760
b60bcbfef7 GRAPHICS: MACGUI: implement getMouseLine 2021-07-31 15:52:41 +08:00
ysj1173886760
9ba14cf696 GRAPHICS: MACGUI: implement getMouseWord 2021-07-31 15:46:50 +08:00
djsrv
114b4d5e5a GRAPHICS: MACGUI: Fix segfault 2021-07-30 17:04:36 -04:00
djsrv
54b84aaedd GRAPHICS: MACGUI: Fix desktop memory leak 2021-07-30 16:43:57 -04:00
djsrv
ad780d761c GRAPHICS: MACGUI: Handle TTF fonts with slant 2021-07-30 16:43:57 -04:00
djsrv
29197c191c GRAPHICS: MACGUI: Fix font memory leaks 2021-07-30 16:43:57 -04:00
ysj1173886760
87cd99126a GRAPHICS: MACGUI: implement getMouseWord 2021-07-30 16:38:15 +08:00
ysj1173886760
b1f5de3501 GRAPHICS: MACGUI: implement mouseChar 2021-07-30 16:25:51 +08:00
ysj1173886760
99447ca832 GRAPHICS: MACGUI: implement getting member of menuItem 2021-07-30 15:43:00 +08:00
ysj1173886760
66fb967d56 GRAPHICS: MACGUI: support setting action id for macmenuItem 2021-07-29 19:48:42 +08:00
ysj1173886760
5ae035f4b5 GRAPHICS: MACGUI: implement overload version for the functions for setting menu attributes 2021-07-29 12:45:16 +08:00
ysj1173886760
7673cbcc86 GRAPHICS: MACGUI: implement setMenuItemName 2021-07-29 12:28:05 +08:00
ysj1173886760
948604d79d GRAPHICS: MACGUI: text length should not bigger than maxWidth - 1 2021-07-29 12:04:20 +08:00
ysj1173886760
53fd14b283 GRAPHICS: MACGUI: add functions for setting member checkMark and Enable of menuItem 2021-07-29 11:40:18 +08:00
ysj1173886760
c57c7b11b2 DIRECTOR: skip setting shortcut key when we only read / 2021-07-29 10:52:45 +08:00
ysj1173886760
36abd91264 GRAPHICS: MACGUI: introduce checkBoxAccess to determines what happens when user clicks the checkbox or radio button 2021-07-29 10:52:45 +08:00
ysj1173886760
a8d7767b36 DIRECTOR: don't highlight buttons in list button style when we are not clicking button initially. 2021-07-28 16:20:48 +08:00
ysj1173886760
17b1915c72 GRAPHICS: MACGUI: introducing hilitingWidget to macwidget for implementing list button style 2021-07-28 16:13:37 +08:00
ysj1173886760
b16b2c4b6b GRAPHICS: MACGUI: amend the behaviour for list style button 2021-07-28 15:50:49 +08:00
Le Philousophe
585b112d6b GRAPHICS: Implement horizontal triangles
Simplify drawTriangle in the same time and fix a bad copy paste when
drawing outline with w == h
2021-07-27 20:38:45 +02:00
ysj1173886760
a2d453a8f9 GRAPHICS: MACGUI: don't apply the kerning offset for the generated font
because we have already applied it when we are generating the font.
2021-07-26 20:55:49 +08:00
ysj1173886760
e4762aef5e DIRECTOR: don't scroll for auto expand text. 2021-07-26 17:10:10 +08:00
ysj1173886760
bd6f680648 GRAPHICS: MACGUI: fix rendering text.
previously, it will blink due to i was using transBlitFrom to blit text to composed surface.
for now, i've fixed the render logic, this should behave correct and more faster than ever.
2021-07-26 14:31:57 +08:00
ysj1173886760
05041e5001 GRAPHICS: MACGUI: introduce builtin pattern to wm. use builtin pattern to draw disabled menu items. 2021-07-24 18:34:56 +08:00
ysj1173886760
091e49fb66 GRAPHICS: MACGUI: implement checked item for macmenu 2021-07-24 16:38:57 +08:00
ysj1173886760
70e2ca433c GRAPHICS: MACGUI: fix rendering text shadow with non-black text. 2021-07-24 15:10:13 +08:00
ysj1173886760
238971bc46 GRAPHICS: MACGUI: initialize slant of macFontfont. 2021-07-23 18:16:22 +08:00
ysj1173886760
7e2f3edc61 GRAPHICS: MACGUI: initialize bitImage to 0. 2021-07-23 17:06:38 +08:00
ysj1173886760
dc8418b547 GRAPHICS: MACGUI: implement shadow font. 2021-07-23 17:06:38 +08:00
ysj1173886760
1d7e82bf3e GRAPHICS: MACGUI: amend makeOutline 2021-07-23 17:06:38 +08:00
ysj1173886760
cae8166101 GRAPHICS: MACGUI: organize the code for extension. 2021-07-23 17:06:38 +08:00
ysj1173886760
822ca12ab2 GRAPHICS: MACGUI: draw the underLine in kerning area when we are dealing with underLine font. 2021-07-23 17:06:38 +08:00
ysj1173886760
0aa7518c5b GRAPHICS: MACGUI: set the kerning offset to 0 when dealing with underLined space. 2021-07-23 17:06:38 +08:00
ysj1173886760
6752b923b9 GRAPHICS: MACGUI: amend makeOutline in macFont. 2021-07-23 17:06:38 +08:00
ysj1173886760
e434198924 GRAPHICS: MACGUI: implement underline font. 2021-07-23 17:06:38 +08:00
ysj1173886760
0f6c0f0904 GRAPHICS: MACGUI: clean the formats in mactext 2021-07-23 17:06:38 +08:00
ysj1173886760
3d0b7d5130 GRAPHICS: MACGUI: modify the parameter of scaleFont in macFont 2021-07-23 17:06:38 +08:00
ysj1173886760
4dd8e71fb9 GRAPHICS: MACGUI: fix outline style font. 2021-07-22 21:42:19 +08:00
ysj1173886760
e02911f283 GRAPHICS: MACGUI: add 1 to the width of outline font. 2021-07-22 21:42:19 +08:00
ysj1173886760
9ec4a2449e GRAPHICS: MACGUI: using bitmapWidth to replace width when dealing with bitmap. 2021-07-22 21:42:19 +08:00
ysj1173886760
63b9ae3679 GRAPHICS: MACGUI: enhance italic font. Fix the implementation for generating slant fonts. 2021-07-22 21:42:19 +08:00
ysj1173886760
79755cfb02 GRAPHICS: MACGUI: implement basic italic supporting. 2021-07-22 21:42:18 +08:00
Orgad Shaneh
dd792e9e87 JANITORIAL: Fix some MSVC warnings 2021-07-22 07:28:01 +03:00
ysj1173886760
a319074c86 GRAPHICS: MACGUI: add kerning offset when drawing single char 2021-07-20 16:49:01 +08:00
ysj1173886760
296750d5de GRAPHICS: MACGUI: implement reading styleWidths and glyph-width table for macfont 2021-07-20 16:49:01 +08:00
ysj1173886760
e24b22ed56 GRAPHICS: MACGUI: eliminate some TODO in load macFontFamily 2021-07-20 16:49:01 +08:00
Torbjörn Andersson
2ba156184c SCUMM: Add Macintosh b/w rendering mode
This is currently only (partially) implemented for the 16-color Mac
versions of Loom and Indiana Jones and the Last Crusade. The text is
still drawn in color, since that's rendered separately, but I'm
committing this now while it still works.
2021-07-13 09:53:36 +02:00
djsrv
ea7d098913 GRAPHICS: MACGUI: Clean up comments 2021-07-12 18:02:56 -04:00
djsrv
6621b6121d GRAPHICS: MACGUI: Fix ID at which Japanese fonts start 2021-07-12 18:02:56 -04:00
djsrv
de929228c4 GRAPHICS: MACGUI: Add Japanese mode 2021-07-12 18:02:56 -04:00
djsrv
ad79812cc6 GRAPHICS: MACGUI: Introduce font aliases
Easy way of adding more font IDs and names for the same font.
2021-07-12 18:02:56 -04:00
djsrv
0c053d20ba GRAPHICS: MACGUI: Replace kMacCentralEurope with kMacRoman 2021-07-12 15:41:21 -04:00
djsrv
0b7af4209f GRAPHICS: MACGUI: Remove MacButton ctor with encodeType
Encoding is handled in MacFontRun now, so this is no longer needed.
2021-07-12 15:41:21 -04:00
djsrv
354e344b4d GRAPHICS: MACGUI: Start IDs for new font registrations at 100
Makes it clearer that these are not system fonts.
2021-07-12 15:41:21 -04:00
djsrv
68426370f3 GRAPHICS: MACGUI: Don't register font name in loadFonts
We don't know a font's preferred ID at this point. We must get that from
the Director movie's font map.
2021-07-12 15:41:15 -04:00
djsrv
9fe78bc54d GRAPHICS: MACGUI: Fix unregistered font segfault 2021-07-12 01:33:16 -04:00
djsrv
c4626eef97 GRAPHICS: MACGUI: Fix compilation
Forgot to eliminate new uses of _encodeType when rebasing. As formatting
strings only use ASCII characters the encoding shouldn't really matter,
and using the default of UTF-8 is easier than fetching the actual
encoding from the relevant MacTextRun.
2021-07-12 00:54:37 -04:00
djsrv
5bc3ad06c0 GRAPHICS: MACGUI: Move encoding tracking to MacFontRun
Font is basically the only way to determine a piece of text's encoding
in Director. Since MacFontRun tracks fonts, it's the nicest place to
handle encoding too.
2021-07-12 00:38:05 -04:00
djsrv
f4d2b75342 GRAPHICS: MACGUI: Set default encodings in registerFontName 2021-07-12 00:38:05 -04:00
djsrv
2e3b08017f GRAPHICS: MACGUI: Whitespace cleanup 2021-07-12 00:38:05 -04:00
djsrv
acb3ace45e GRAPHICS: MACGUI: Detect Japanese fonts from preferred ID 2021-07-12 00:38:05 -04:00
djsrv
71d4127b8a GRAPHICS: MACGUI: Store font lang and encoding 2021-07-12 00:38:05 -04:00
djsrv
ed406150c2 GRAPHICS: MACGUI: Add font name from Alan Kay demo 2021-07-12 00:38:05 -04:00
djsrv
50cec75fd5 GRAPHICS: MACGUI: Remove changing font ID 3 to 1
We register font ID 3 now.
2021-07-12 00:38:05 -04:00
djsrv
53f600846b GRAPHICS: MACGUI: Fix fallback of Japanese fonts to Osaka 2021-07-12 00:38:05 -04:00
djsrv
b57f6d8b7f GRAPHICS: MACGUI: Allow fonts to be registered to a preferred ID 2021-07-12 00:38:05 -04:00
djsrv
f39e6eaac7 GRAPHICS: MACGUI: Add Japanese font info 2021-07-12 00:38:05 -04:00
djsrv
b7c40b3d37 GRAPHICS: MACGUI: Create font info dictionary 2021-07-12 00:38:05 -04:00
Martin Gerhardy
b2878dea3b GRAPHICS: removed invalid char from comment 2021-07-11 13:56:19 +02:00
ysj1173886760
c6bd9f908f GRAPHICS: MACGUI: fixing mactext for dealing with fg color 2021-07-09 19:48:37 +08:00
ysj1173886760
f4a2b8b963 GRAPHICS: MACGUI: amend drawing color 2021-07-09 19:48:37 +08:00
ysj1173886760
947764159c DIRECTOR: fix rendering text separately. read fg color though text, instead of argument 2021-07-09 09:41:31 +08:00
ysj1173886760
4c9db11696 GRAPHICS: MACGUI: amend setting bgcolor and fgcolor. drawing color by fgcolor 2021-07-09 09:41:31 +08:00
ysj1173886760
dc41917a74 DIRECTOR: implement text chunk fields operations 2021-07-08 02:25:11 +02:00
ysj1173886760
6e2a8fc08f GRAPHICS: MACGUI: implement setting text slant and text fontId of text chunks 2021-07-08 02:25:11 +02:00
ysj1173886760
42aa4739f8 DIRECTOR: implement chunk field operations for text cast member 2021-07-08 02:25:11 +02:00
ysj1173886760
56fad1585b DIRECTOR: implement setting text size for text cast member 2021-07-08 02:25:11 +02:00
ysj1173886760
1492a06a84 GRAPHICS: MACGUI: amend interLinear for mactext 2021-07-08 02:25:11 +02:00
ysj1173886760
60c0e78d95 GRAPHICS: MACGUI: add line spacing for mactext 2021-07-08 02:25:11 +02:00
ysj1173886760
a841358e69 DIRECTOR: implement some basic field operations for text cast 2021-07-08 02:25:11 +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
djsrv
e9d9b9f569 DIRECTOR: Revert FXmp handling
This reverts commit 4dabee7e8b.
This reverts commit 3fda461d5f.
This reverts commit 831c014f9e.
This reverts commit b3b55e59e9.
2021-07-06 16:47:20 -04:00
djsrv
3fda461d5f GRAPHICS: MACGUI: Handle FontXPlatformMap in MacFontManager::getFont 2021-07-05 22:54:14 -04:00
djsrv
831c014f9e DIRECTOR: Make FXmp available to MacText 2021-07-05 22:53:35 -04:00
djsrv
b3b55e59e9 GRAPHICS: MACGUI: Add parent to MacFontRun 2021-07-05 22:53:35 -04:00
Le Philousophe
25426c0a80 MACGUI: Fix int/int32 build failures
All of this is because Rect and Surface have moved to int32
2021-07-05 23:54:34 +02:00
Paul Gilbert
baccbedf50 GRAPHICS: Changed surface classes sizes from uint16 to int16 2021-07-04 18:24:27 -07:00
Paul Gilbert
1c3e7fb4e9 COMMON: Change Rect and Point to have int32 fields 2021-07-04 18:24:26 -07:00
djsrv
58ab956d72 GRAPHICS: MACGUI: Don't allow font IDs to be overridden
New fonts are automatically assigned a unique ID.
2021-07-02 18:08:21 -04:00
Eugene Sandulenko
7eb9bcf705
GRAPHICS: Fix MSVC warning 2021-07-01 01:35:58 +02:00
ysj1173886760
1945e3ec5c GRAPHICS: MACGUI: realloc surface after changing dims 2021-06-30 16:29:00 +02:00
ysj1173886760
bcd33eeba3 DIRECTOR: fix rendering text to suit for different style text 2021-06-30 16:29:00 +02:00
ysj1173886760
d0317fa1bb DIRECTOR: use text style to determine whether text should fix dims 2021-06-30 16:29:00 +02:00
ysj1173886760
202f6ce7e5 GRAPHICS: MACGUI: move set fixed dims to ctor for mactext 2021-06-30 16:29:00 +02:00
ysj1173886760
c759e27fe7 GRAPHICS: MACGUI: introduce _fixedDims to mactext, which represent for whether mactext should auto expanding. 2021-06-30 16:29:00 +02:00
ysj1173886760
787454f908 GRAPHICS: MACGUI: support partial color setting in mactext 2021-06-30 16:29:00 +02:00
ysj1173886760
ba858522eb GRAPHICS: MACGUI: add basic color changing support for mactext 2021-06-30 16:29:00 +02:00
ysj1173886760
6db3b93050 GRAPHICS: MACGUI: add an overload version for findBestColor 2021-06-30 16:29:00 +02:00
ysj1173886760
b512f33263 GRAPHICS: MACGUI: pass an event of lbutton_up to those widgets should clear widgets correctly. 2021-06-30 16:29:00 +02:00
ysj1173886760
bb26ca4d46 GRAPHICS: MACGUI: reset variable for handling events for macwidgets when wm won't handle events correctly 2021-06-30 16:29:00 +02:00
Orgad Shaneh
968e52ee98 GRAPHICS: Fix crash when resizing the window to low width 2021-06-27 09:05:17 +03:00
ysj1173886760
258c8447a2 GRAPHICS: MACGUI: modify the behaviour of selection. we will select whole area when we select whole text. 2021-06-26 16:08:20 +02:00
ysj1173886760
76e0494f27 GRAPHICS: MACGUI: clean the code 2021-06-26 16:08:20 +02:00
ysj1173886760
b442d634b4 GRAPHICS: MACGUI: fix drawing selection when we have borders in mactext 2021-06-26 16:08:20 +02:00
ysj1173886760
576ce1176e GRAPHICS: MACGUI: fix heap overflow when drawing selection in mactext 2021-06-26 16:08:20 +02:00
ysj1173886760
46f8b7df75 GRAPHICS: MACGUI: amend drawing selection in mactext 2021-06-26 16:08:20 +02:00
ysj1173886760
868f58b3c2 GRAPHICS: MACGUI: update selection after setting text in mactext 2021-06-26 16:08:20 +02:00
ysj1173886760
832455d812 GRAPHICS: MACGUI: eliminate offset in macbutton. amend the behaviour of setEditable in mactext 2021-06-26 16:08:20 +02:00
ysj1173886760
325481b38e GRAPHICS: MACGUI: amend the behaviour when we destruct mactext and setting the selRange 2021-06-26 16:08:20 +02:00
ysj1173886760
78d77319e7 GRAPHICS: MACGUI: eliminate vertical 1 offset in mac 2021-06-26 16:08:20 +02:00
ysj1173886760
9d63692348 GRAPHICS: MACGUI: eliminate offsets in mactext 2021-06-26 16:08:20 +02:00
ysj1173886760
39fc525bf0 DIRECTOR: modify and organize the logic of mactext and macbutton.
eliminated a lot of magic offsets.
reaching nearly 100% reappearance.
2021-06-26 16:08:20 +02:00
ysj1173886760
158406487a GRAPHICS: MACGUI: re-organize the logic of calculating offsets of mactext and macbutton. 2021-06-26 16:08:20 +02:00
Fiodar Stryzhniou
894f4916f5 GRAPHICS: Fix warnings for header search failure.
WARNING: Can't find following headers in User or System Include Paths "opinfo.h"
2021-06-26 08:46:07 +03:00
Cameron Cawley
359109df10 GRAPHICS: Add optimized versions of scaleBlitBilinear and rotoscaleBlitLinear 2021-06-24 11:55:54 +02:00
Cameron Cawley
82a85494cd GRAPHICS: Integrate Graphics::ColorMasks with Graphics::PixelFormat 2021-06-24 11:55:54 +02:00
Cameron Cawley
757a819da9 GRIM: Remove unneeded use of Graphics::createPixelFormat 2021-06-24 11:55:54 +02:00
Cameron Cawley
c2ae54306f BASE: Update scaler settings from old config files 2021-06-23 21:29:53 +02:00
Cameron Cawley
da5d773924 BACKENDS: Add getDefaultScaler and getDefaultScaleFactor to OSystem 2021-06-23 21:29:53 +02:00
Cameron Cawley
7ed5984e2f SDL: Add some validation to setScaler() 2021-06-23 21:29:53 +02:00