2239 Commits

Author SHA1 Message Date
Christian Semmler
aa825aeecf
Add macro for switchable building index (#1596) 2025-06-29 17:55:34 +02:00
David Gow
e87184b502
Fix the OpenGL backends on non-glx Linux platforms (and remove GLEW dependency) (#446)
* Work around issues with depth-buffer size on EGL-based platforms

The OpenGL 1.1 and OpenGL ES 2.0 backends can break on EGL-based platforms,
such as Wayland, or X11 with SDL_VIDEO_FORCE_EGL=1. One of the reasons for
this (the other being glew on the GL1.1 backend) is that SDL/egl get very
confused by the way we set OpenGL attributes, particularly SDL_GL_DEPTH_SIZE,
resulting in SDL_GL_CreateContext() failing with EGL_BAD_MATCH.

The exact cause of this is unknown, but it seems to be a combination of:
- SDL_GL_SetAttribute() is supposed to be called _before_ the window is
  created, and we're calling it afterward.
- Creating several test windows during the enumeration process, mixing
  and matching between OpenGL and OpenGL ES profiles.

The "most correct" solution is probably to delay creating the game window
until the backend creation process, rather than before the enumeration
occurs. But that's a real refactor, which could cause other issues.

Instead, set the 24-bit bit depth (which we've hardcoded anyway) before
creating the window, and use SDL_GL_ResetAttributes() when creating backends.

This seems to work here in all of the cases I was able to try (modulo the GLEW
dependency, which is removed in the next patch).

* miniwin: Remove GLEW dependency for OpenGL 1.1

GLEW normally backs directly onto glXGetProcAddress on Linux, which is broken
on non-GLX setups, such as Wayland (but also X11 with EGL, and presumably KMSDRM).

Replace it with manual calls to SDL_GL_GetProcAddress() for the VBO path.

Note, however, that SDL_opengl.h includes "windows.h", so conflicts with the
miniwin implementation, which breaks builds on windows.

In order to work around this, we do what the Direct3D9 implementation does and
push all of the OpenGL calls to a separate file, actual.cpp.

Going forward, it may make sense to load _all_ OpenGL entry points via SDL,
which would allow us to avoid linking directly with libGL/libOpenGL, and
therefore eliminate the separate build dependency altogether, as well as
allowing more runtime configurability as to the OpenGL library to load.

(But that's definitely a bit uglier, and also useful very rarely.)
2025-06-29 17:47:09 +02:00
Christian Semmler
020969c483
Add transition type to ini (#441) 2025-06-29 02:49:46 +02:00
Fabian Neundorf
0982038453
Clear unknown in Hospital (#1595) 2025-06-28 15:38:48 -07:00
Fabian Neundorf
9dcc701fcb
Clear unknowns in GetSoundId (#1594) 2025-06-28 20:32:09 +02:00
Fabian Neundorf
89539a64f1
Clear unknown 0x10 in LegoEntity (#1593)
The naming is a bit weird, as only one bit is used so there are no other usages of this value.
2025-06-28 07:28:13 -07:00
Christian Semmler
02dd261ca9
Fix isle/master merge 2025-06-27 16:15:08 -07:00
Christian Semmler
c0e41a8ef6
Merge remote-tracking branch 'isle/master' 2025-06-27 16:10:31 -07:00
Korbo
16a94c725c
Names for race related or adjacent functions and variables (#1592)
* Names for race related or adjacent functions and variables

* fix formatting

* fix formatting
2025-06-28 01:08:45 +02:00
Christian Semmler
a987595e1e
1.0 compatibility (#434)
* Make Infocenter compatible with 1.0 versions

* Fix

* Emscripten patch

* Fix

* Fix Emscripten patch

* Window title

* Naming

* Don't exit car build automatically in 1.0

* Disable character selection by clicking icon in 1.0

* Remove obsolete includes
2025-06-27 02:30:24 +02:00
Fabian Neundorf
056064f9d4
Clear unknown in LegoLOD (#1590)
The function does mostly the same as `SetTextureInfo` but does not
explicitly set the color as well.
2025-06-26 22:35:04 +02:00
Christian Semmler
eaeccdb77d
Merge remote-tracking branch 'isle/master' 2025-06-26 11:32:59 -07:00
Fabian Neundorf
b66d1e2f64
Clear unknowns in Ambulance and AmbulanceMissionState (#1588) 2025-06-26 20:31:30 +02:00
Christian Semmler
976336649a
Merge remote-tracking branch 'isle/master' 2025-06-26 11:22:18 -07:00
Danct12
a782c48980
miniwin: Use PRIu32 for printing uint32_t (#436)
Some architecture uses different type for uint32_t.

For example:
x86_64 | aarch64 = unsigned int
xtensa | riscv32 = long unsigned int
arm              = long unsigned int
2025-06-26 19:41:46 +02:00
VoxelTek
73bab24721
Add Launch Game button to config tool, rename executable to isle-config (#435)
* Add Launch Game option to config tool

* Rename executable from "config" to "isle-config"

* Add error popup if unable to find game executable

* Use one QMessageBox for both Win and *nix

Create one QMessageBox object to use for both Windows and non-Windows platforms. Additionally, set all relevant text during creation of QMessageBox, and show Warning icon as part of message box.

* Add tooltips to save, launch, and exit buttons

* Change "Launch Game" to "Save and Launch"

* Remove unnecessary Windows-specific code
2025-06-26 07:21:11 -07:00
Carson
7797729a3f
Add option to remove startup delay (#395)
* Add startup delay option

* Remove build option

* Add comment back
2025-06-25 20:27:53 -07:00
VoxelTek
7a92f53212
Revamp config tool, add tooltips and consolidate options. (#427)
* Add tooltips, remove obsolete directory stuff

In the config tool, the "Media Path" entry was removed, as it doesn't do anything in isle-portable as far as I know.
The "Disk Path" and "CD Path" options were merged into one directory editing thing, where CD Path is specified and Disk Path is then derived from that.
A checkbox to enable or disable full-screen was added.
Tooltips were added to the config app, so now users can more easily tell what a setting in the config tool does.

* Make clang-format happy

* oops that's an extra semicolon I don't need

* Remove obsolete full screen forcing

Co-authored-by: Anders Jenbo <anders@jenbo.dk>

* Update CONFIG/config.cpp

Co-authored-by: Anders Jenbo <anders@jenbo.dk>

---------

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
2025-06-26 03:58:06 +02:00
Anders Jenbo
dcacdcc711
Fix d3drmmesh type error (#433) 2025-06-26 02:46:10 +02:00
Anders Jenbo
b65284a7a0
Move 2D drawing and upscaling to the renderer (#348) 2025-06-25 19:45:26 +02:00
Christian Semmler
6942016a76
Fix LegoPlantManager::CreatePlant (#425) 2025-06-25 01:23:58 +02:00
Christian Semmler
8dbcaf6d65
Allow running game without audio device (#426)
* Allow running game without audio device

* Remove dot

* Add SDL error to message
2025-06-24 22:54:26 +00:00
Christian Semmler
87b4c0412e
Enhance compatibility of FetchFS (#424) 2025-06-24 22:03:54 +00:00
Fabian Neundorf
8498c69af1
Clear unknowns in LegoPlantManager (#1587) 2025-06-24 22:38:08 +02:00
Christian Semmler
822a6a338c
Fix debug window 2025-06-24 09:23:32 -07:00
Christian Semmler
a9505f435a
Fix clang-format 2025-06-24 09:11:08 -07:00
Christian Semmler
ae632c2367
Merge: update meshbuilder.cpp 2025-06-24 09:08:16 -07:00
Christian Semmler
69b5f17599
Merge remote-tracking branch 'isle/master' 2025-06-24 09:05:44 -07:00
MattKC
ce85377f18
Create LICENSE (#1497) 2025-06-24 18:00:23 +02:00
Fabian Neundorf
7f10f7ae14
Clear unknown in ModelDbModel (#1586) 2025-06-23 14:34:02 -07:00
Anders Jenbo
c8bb0da5a7
Implement DrawFPS (#420) 2025-06-23 21:04:52 +00:00
jonschz
edae5f58ec
Remove getters/setters that (likely) don't exist (#1583)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-23 20:58:16 +02:00
Danct12
19fee55333
Shared library support (#404)
This allows isle-portable to be built using shared libraries
provided by the developer's distribution.
2025-06-23 17:20:39 +02:00
MS
1701117e6f
Improve MeshBuilderImpl::CreateMesh (#1584)
* CreateMesh

* Effective match for Clone()
2025-06-23 10:24:13 -04:00
jonschz
1677193635
Add reference to isle-portable to README (#1579)
* Add reference to `isle-portable` to README

* Fix uppercase

* Address review comments

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-23 12:32:19 +02:00
Christian Semmler
0c66273c9f
Update README.md [skip ci] 2025-06-22 22:04:21 +02:00
Danct12
3698f4fb0c
Bump version for SDL_SCALEMODE_PIXELART to 3.3.0 (#403) 2025-06-22 17:54:35 +00:00
Christian Semmler
5a756f033b
Set UseJoystick to true by default (#397) 2025-06-22 18:49:06 +02:00
Christian Semmler
41daf76bca
Merge remote-tracking branch 'isle/master' 2025-06-22 09:48:17 -07:00
Christian Semmler
8195d2b251
Update legogamestate.cpp (#1582) 2025-06-22 18:48:09 +02:00
Christian Semmler
92e0cb0845
Fix JoystickIndex ini default (#400) 2025-06-22 18:34:05 +02:00
Christian Semmler
67a89f2d78
Merge remote-tracking branch 'isle/master' 2025-06-22 08:57:16 -07:00
Christian Semmler
0a50915312
Fix implicit signed char-ness (#1581) 2025-06-22 17:55:36 +02:00
Anders Jenbo
5a628cafaa
No longer log file mapping (#396) 2025-06-22 17:07:56 +02:00
Fabian Neundorf
2595537c4c
Clear unknowns in LegoAnimActorEntry and LegoAnimKey (#1580) 2025-06-22 05:34:29 -07:00
jonschz
16db496832
Match LegoGameState::History::WriteScoreHistory(), clear unknowns (#1576)
---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-22 08:22:25 +02:00
Anders Jenbo
3678c97ec3
Allow for building on slightly older SDL3 versions (#394) 2025-06-22 03:29:37 +02:00
Ramen2X
0e53ac469f
elaborate on SDL_GPU backends in readme (#388) [skip ci] 2025-06-21 19:40:20 -04:00
Ramen2X
aae8da391c
add usage section to readme (#384) [skip ci] 2025-06-21 18:55:57 -04:00
Fabian Neundorf
e3fc6fd135
Use enum from LegoActor to map between string and id (#1577) 2025-06-21 15:32:30 -07:00