Commit Graph

2215 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
olebeck
5005772243 correct texture address mode, use tlsf instead of sceClibMspace 2025-06-29 16:30:20 +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
olebeck
7c15d4f9d8 run clang format 2025-06-28 03:39:00 +02:00
olebeck
4744142c9d wrong env dest 2025-06-28 03:33:46 +02:00
olebeck
88173dabba forgot env var 2025-06-28 03:31:29 +02:00
olebeck
2aeeff7d07 remove some unneeded changes 2025-06-28 03:30:03 +02:00
olebeck
a6b90abcca Merge remote-tracking branch 'upstream/master' 2025-06-28 02:47:07 +02:00
olebeck
7b258b0e30 fix normals matrix 2025-06-28 02:44:52 +02: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
olebeck
a7f41dd4a3 clean up a bit 2025-06-27 23:59:17 +02:00
olebeck
4aad9a9786 make 3d work, broken lights 2025-06-27 17:20:25 +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
olebeck
5f9b9675eb fix Draw2DImage 2025-06-27 00:38:05 +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
olebeck
5a6d05c38f support paletted textures directly to avoid copying the texture twice 2025-06-26 17:45:52 +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
olebeck
fb17107bca fix rendering somewhat, some geometry shows up 2025-06-26 14:03:20 +02: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
olebeck
06f2179ea1 make gxm renderer work with new d3drm 2025-06-26 02:34:16 +02:00
olebeck
b41e760d9d Merge remote-tracking branch 'upstream/master' 2025-06-25 22:07:25 +02:00
olebeck
d0020a3b9a avoid sdl renderer for vita, seems broken 2025-06-25 21:40:17 +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
olebeck
b38091ba1b add gxm renderer (not working with display yet) 2025-06-24 16:36:09 +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