Commit Graph
3988 Commits
Author SHA1 Message Date
elasota 26c054e0c5 IMAGE: Add support for loading CUR and ANI files 2024-03-31 14:39:28 -04:00
D G Turner 3dcd3e6fa6 GRAPHICS: MACGUI: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings 2024-03-30 16:40:22 +00:00
Krish 34ecd753ad GRAPHICS: MACGUI: Implement submenu scrolling 2024-03-27 15:34:34 +01:00
s-m33r b2851f8128 GRAPHICS: MACGUI: add _draggable property to BaseMacWindow 2024-03-25 21:22:56 +01:00
D G Turner 0d68f7d39a GRAPHICS: Fix Signed vs. Unsigned Comparison GCC Warnings 2024-03-20 22:16:45 +00:00
Matthew Jimenez 771dc751db GRAPHICS: Switch ManagedSurface to use Palette class 2024-03-18 21:06:04 +02:00
Le Philousophe 635cb6b998 GRAPHICS: OPENGL: Upgrade glad headers
This allows to remove a workaround in context creation
2024-03-17 15:39:32 +01:00
Hubert Maier 794f292b5d AMIGAOS: Use compiler defines 2024-03-16 01:59:27 +02:00
Eugene Sandulenko 8af225e5f2 GRAPHICS: Improved debug output on incorrect formats in Surface 2024-03-16 00:35:07 +01:00
Nabeel Khan 5b10353a68 GUI: Implement Window border draggability 2024-03-14 18:59:16 +01:00
hecmar007 c6c80b9313 GRAPHICS: MACGUI: Process extra long words (#5703)
GRAPHICS:  MACGUI: Process extra long words

Added functionality to rewrap words that split into different lines.
2024-03-13 17:39:21 +01:00
Matthew Jimenez 5219c99400 GRAPHICS: Move PaletteManager definition to a separate header 2024-03-12 12:24:00 +02:00
Matthew Jimenez 8af5e55712 GRAPHICS: Define Palette class and use in PaletteLookup 2024-03-11 01:02:15 +01:00
Torbjörn Andersson 1bf0dbad75 GRAPHICS: MACGUI: Eliminate timer use
As part of fixing a graphical glitch in Mac Indiana Jones and the Last
Crusade, eliminate the menu timer from the Mac window manager. It's just
too unpredictable and error prone for my taste.
2024-03-10 23:12:25 +01:00
scemino 0cba66b204 TWP: Move ImGui to backends 2024-03-07 20:08:26 +01:00
scemino b840146b6c TWP: Move imgui into graphics/ 2024-03-07 20:08:26 +01:00
polyesterswing 9626012752 MACGUI: Fill in the upper-left and upper-right corners with black 2024-03-04 19:16:22 +01:00
polyesterswing a6b0d088c2 Revert "GRAPHICS: MACGUI: Fix green borders in upper right and upper left corners of Mac menu bar"
This reverts commit 49ae002d6b.

The changes in this commit prevents windows in macventure from
displaying
2024-03-04 19:16:22 +01:00
Torbjörn Andersson 5117adc24c GRAPHICS: MACGUI: Give loaded fonts their correct ID
When loading other fonts than the system ones, they would get ID -1, not
the one from their resource ID. Even if you later registered the font
name, the old font entries would still be wrong. Another possibility
would be to update _fontRegistry when registering fonts, but sev was ok
with this way so let's go with it for now.

It does not consider the possibility of ID collisions the way
registerFontName() does, but apparently there shouldn't be much risk of
that.
2024-03-03 19:49:00 +01:00
Christian Kündig 7aa72a1633 EMSCRIPTEN: OPENGL: Disable GLAD 2024-02-27 17:07:13 +01:00
Christian Kündig 65bdafa0a0 EMSCRIPTEN: OPENGL: Disable OPENGL_DEBUG on Emscripten
863988f was causing a 10x increase in frame times regressing GRIM from 55fps to 3-5 fps.
2024-02-27 17:07:13 +01:00
Miro Kropacek f41a678ba1 GRAPHICS: ATARI: Utilize dlmalloc
- every malloc is now aligned on 16 bytes

- no need for the hidden pointers

- ct60_vmalloc() is called only once, the rest is handled
  by dlmalloc (SV XBIOS' vmalloc is pretty fragile)
2024-02-24 03:54:54 +01:00
Torbjörn Andersson a1c8db3201 JANITORIAL: Clean up some whitespace and double semicolons 2024-01-29 19:32:00 +01:00
Kaloyan Chehlarski be67cf827b GRAPHICS: Prevent segfault in ManagedSurface
The create() overload of ManagedSurface that creates a
new, owned surface, previously assumed that the
_innerSurface was owned before the call was made. Thus,
when switching between sub-surface and owning surface
modes, a segfault would occur when attempting to free
the pixel data of the inner surface, which is not actually
owned by the ManagedSurface. This commit makes sure
that when free() is called, the inner surface no longer
has an active pointer to its old pixel data.
2024-01-28 02:06:05 +01:00
Le Philousophe 42fa87acea GRAPHICS: OPENGL: Don't try to use GLAD aliasing for shaders
Aliasing doesn't cover all the functions we use.
In addition, old GLSL 1.00 doesn't support the #version stance.
2024-01-27 09:44:39 +01:00
Scott Percival 0562ff567c GRAPHICS: MACGUI: Move paragraph end marker when merging rows
Fixes issue where removing an empty line with backspace would remove the
previous empty line also.
2024-01-20 23:14:52 +01:00
Scott Percival 95b47042f0 GRAPHICS: MACGUI: Stop MacTextCanvas::chopChunk from removing last chunk
There needs to be at least one chunk per line of text, or else many
basic text operations will cause a crash.
2024-01-20 23:14:52 +01:00
Scott Percival b9003c145f GRAPHICS: MACGUI: Fix fgcolor conversion in MacText 2024-01-20 23:14:52 +01:00
Scott Percival 2f16bf2e9f GRAPHICS: MACGUI: Remove pseudotransparency workaround in MacText
Needed in order to e.g. print white text on a black background in
Director.

This reverts 457b09cb4e
2024-01-20 23:14:52 +01:00
Cameron Cawley f3fbd2477c GRAPHICS: Allow specifying separate xdpi and ydpi values in loadTTFFont 2024-01-08 23:41:50 +01:00
elasota 9e374ec4ca GRAPHICS: Use target pragmas instead of compiler flags to prevent ODR problems. 2024-01-08 23:37:39 +01:00
Cameron Cawley 19dfebf7be GRAPHICS: Rename variables in PM scaler to avoid clashing with system headers 2024-01-08 02:56:30 +01:00
Eugene Sandulenko ed4ec96b44 GRAPHICS: MACGUI: Fix links with Unicode characters
If there are unicode characters in the link, it was leading to
wrong length calculation.

Example of such link:

  ![Menü-Symbol](menu.png \"Menü-Symbol\"){w=10em}

The problem is that for simplicity, we are working with UTF8 in
Markdown, but still with U32String in MacTextCanvas. This led to
the string length be calculated for UTF8, which is a multibyte
encoding. As a result, we were overshooting the link parsing
and reading texts as numbers.

This is kind of a hacky solution: we convert text to U32 before
caluclating the string length
2024-01-07 00:39:25 +01:00
Eugene Sandulenko 7361c0f2fa GRAPHICS: MACGUI: Made readHex() more robust
This fixes crashes in Markdown with malformed translations
2024-01-05 01:04:08 +01:00
Eugene Sandulenko df3ee65585 GRAPHICS: MACGUI: Added mre debug output 2023-12-30 22:17:18 +01:00
Eugene Sandulenko 3051af3732 GRAPHICS: MACGUI: Switched debug output to 'macgui' debug channel in MacFontManager 2023-12-30 01:05:26 +01:00
Cameron Cawley f3486a162d GRAPHICS: Add fast paths for scaleBlit when dstW == srcW 2023-12-29 18:00:54 +02:00
Le Philousophe 03a53b1a1e OPENGL: Fix GLSL version parsing
Some old GLES2 implementation did have a different version prefix.
Be more relax like almost everyone and look for the first digit to start
parsing.
2023-12-28 09:31:31 +01:00
Eugene Sandulenko b0a624df76 GRAPHICS: MACGUI: More debug output to MacFontManager 2023-12-26 21:28:28 +01:00
Cameron Cawley 6522c6e11d GRAPHICS: Make the Graphics::PixelFormat constructors constexpr 2023-12-26 20:23:59 +01:00
Cameron Cawley 5b1b14ad80 COMMON: Mark more symbols as const 2023-12-26 20:23:59 +01:00
Le Philousophe 226de788c8 GRAPHICS: Make API use the Path class 2023-12-24 13:19:25 +01:00
Le Philousophe 802c91554f COMMON: Make extrapath a Path object 2023-12-24 13:19:25 +01:00
Torbjörn Andersson d4c9c7208f GRAPHICS: MACGUI: Avoid recursion in Mac menu event processing
When moving the mouse through the menu bar, over a part that's not
occupied by menu items, the Mac menu class will start calling
processEvent() recursively. This is bad for two reasons: During the
recursion (which can easily reach a depth of dozens or even hundreds of
calls) there is no delay, so it will use 100% CPU. And once the
recursion unwinds, all the delays will come at once.

This moves the call to eventLoop() to after the first event has been
fully processed. Hopefully that will have approximately the same desired
effect, without any of the bad side effects.
2023-12-16 21:14:59 +01:00
Le Philousophe 306ca933d4 OPENGL: Use GLAD version when available and check functions before use
When GLAD fails to parse version, glGetError is null and raises a
SIGSEGV.
Current version of GLAD has a bug while parsing extensions so there is a
workaround here which should disappear when it's fixed.
2023-12-14 18:37:23 +01:00
elasota e1fc76c372 GRAPHICS: Fix negation of unsigned integer warning 2023-12-11 23:07:20 +02:00
elasota 9e13093610 GRAPHICS: Fix empty controlled statement warning 2023-12-11 23:07:20 +02:00
Matthew Duggan 0b4aa788ff GRAPHICS: Correct cleanup loop on BDF load failure
Identified by xcode analysis, the cleanup code would have crashed before as it
was using the wrong loop variable.
2023-12-10 10:04:30 +11:00
Eugene Sandulenko b7fd4cb8af GRAPHICS: Fix crash while trying fonts-cjk.dat 2023-12-09 15:33:16 +01:00
Matthew Duggan 0f795b481d GRAPHICS: MACGUI: Only set system palette if screen is CLUT8
This is needed to allow use of macgui components while 16-bit graphic games are
running, eg to display help screens.
2023-12-09 13:53:01 +11:00