On non-Windows, compiling QVM tools failed if dagcheck.md had CRLF line
endings and compiling QVMs failed if game source had CRLF line endings.
Also made Windows open the files as binary (no automatic CRLF to LF) so
it behaves the same as on non-Windows.
If mapLightScale and shadowScale weren't included at the end of
q3gl2_sun, the next shader line was skipped by SkipRestOfLine().
COM_ParseExt() with allowLineBreaks=qfalse, returns "" once and
then goes to the next line anyway. (Doesn't work well multiple
"optional" tokens. It looks like a vanilla bug.)
Fixes World of Padman wop_trashmap.
For r_mergeLightmaps 1
- Fix tcMod transform on "map $lightmap" stages
- Fix external lightmap image texcoords if shader also has an internal
lightmap
For r_sunlightMode 1
- Fix "tcGen lightmap" stages with blendFunc GL_SRC_ALPHA GL_ONE being
converted to white image + modulate lightmap and drawing incorrectly
Generating cubemaps set backEnd.viewParms.isMirror = qtrue while the
loading screen said 'loading... maps/q3dm1.bsp' and it just stayed like
that until done loading (no additional messages or item icons) because
all 2D drawing was culled due to flipped culling for isMirror.
This was noticed because a recent commit fixed RB_ShowImages() to be
drawn to the screen instead of draw into renderFbo and never blit to
the screen. Now the loading screen draws over it as expected.
Mentioned commit: a81df34905
"OpenGL2: Fix border for cg_viewsize using HDR/FB-MSAA w/postProcess"
Fix r_ext_framebuffer_multisample > 0 causing the screen to always be
solid black when using AMD Windows driver.
The AMD Windows driver requires binding renderbuffer for it to be valid.
The OpenGL2 renderer uses GL_EXT_direct_state_access that shouldn't
require this. It would be required for Core/GL_ARB_direct_state_access.
It seems like a driver bug.
If using renderFBO (r_hdr 1 or r_ext_framebuffer_multisample > 0) and
r_postProcess 1, the viewport border (cg_viewsize < 100) which is drawn
before the world scene was drawn to the renderFBO but not copied to the
default framebuffer.
Now 2D before the world scene is drawn to the default framebuffer
directly for r_postProcess 1 like 2D drawn after the world scene.
The QVM interpreter works on all platforms. If building QVMs is an
issue, that should probably be handled separate from whether there
is a QVM JIT compiler.
This enables building QVMs by default on Linux arm64.
The mod list on Windows would search the root of the drive if
fs_basepath, fs_homepath, fs_steampath, or fs_gogpath are blank ("")
(which is usually the case).
The issue is in the low-level Sys_ListFiles() but it only affects the
mod menu, on Windows. It cannot be abused by console commands to
list system files outside of the virtual filesystem.
---
If a directory at the root of the drive of the working directory
contained a pk3 file, the directory was listed in the mods menu. The
virtual filesystem doesn't add blank directory names to the search path
so it cannot load mods from the drive root. (Unless of course you set a
fs_*path cvar to "C:\".)
Sys_ListFiles() with blank directory caused Windows to use "\*" for the
search path and "\" prefix means root of drive. Unix opendir("") failed
so nothing was listed for blank directory.
Sys_ListFilteredFiles() with blank directory _and_ specifying subdirs
could access any directory (on Windows and Unix-like) but no code uses
this or makes it accessible.
These functions are only used for initializing the virtual filesystem
and listing mods. They are not accessible by anything else such as a
console command. Only the mods menu, on Windows, is affected.
The macOS client and server were completely unusable when run from a
terminal. They blocked forever in `[NSApp run];` which was called by
Sys_InitProtocolHandler(). `applicationDidFinishLaunching` was never
called to exit the NSApp run loop.
Use SDL's SDL_DROPFILE event to receive URLs to handle on macOS instead.
This also handles URLs while the game is running (connect to new server)
instead of nothing happening when clicking a link while the game is
running.
This lets the user click a link in a web browser to very easily join a Quake 3 multiplayer game. As browser-based matchmaking websites become more popular, this makes it a lot more convenient and simple to play Quake 3 with others.
The links have the following URI format: quake3://connect/example.com:27950. The format has been designed to be flexible to allow more types of links in the future and avoiding having to make a breaking change. At the moment, "connect" is the only supported command.
Fix crash when scrolling using touchpad on macOS 10.6 (I fixed it
in SDL 2.0.18) and fix failing to start on x86 due to ioq3 SDL dylib
having absolute path instead of "@executable_path/libSDL2-2.0.0.dylib".
SDL 2.24.0 removed macOS 10.6 support (last with x86). Offically at
least, they also dropped x86_64 on macOS 10.7 and 10.8. So ioq3 UB1
is limited to SDL 2.0.22.
- Update x86 and x86_64 to SDL 2.0.22. Compiled with 10.13 SDK as
10.14 SDK dropped running on older than macOS 10.9 and I ran
"strip -x" on the libraries. Ad-hoc signed with PyOxidizer rcodesign.
- PPC is still MAN-AT-ARMS' SDL 2.0.1 build but I ran "strip -x"
on it to reduce the file size.
- ARM64 build was removed from UB1 as UB2 with SDL 2.24.0 should
be used instead.
Update mingw and macOS SDL libraries to 2.24.0. (MSVC .lib files and
Xcode project haven't been updated.)
There is now a separate SDL dylib for macOS Universal Binary 1 and 2
because SDL 2.24.0 dropped support for macOS 10.6 (which is last to
support x86). Documentation says SDL 2.24.0 also dropped macOS 10.7
and 10.8 too. So UB2 is now 10.9 or later while 10.5 to 10.8 live in
UB1.
Compiled using osxcross with macOS 11.3 SDK. Ran "strip -x" on Windows
and macOS libraries. Ad-hoc signed dylib using PyOxidizer rcodesign to
fix digest checksums after strip.
The first chunk of Wavelet sound was decoded as ADPCM and then
following chunks were decoded as Wavelet. It played as static
noise.
Using Wavelet compression requires engine code changes to enable.
When in_restart is called or SDL controller added/remove event is
received, IN_InitJoystick() tried to update the list but instead
of updating the cvar Cvar_Get() just printed a developer message:
Warning: cvar "in_availableJoysticks" given initial values:
"first joystick
", "first joystick
second joystick
"
When using a non-default sound configuration (such as 6 channels), after
a long time (about 4.5hours for 6 channels at 22050 Hz) an overflow will
occur in `S_TransferPaintBuffer`, causing an out of bounds write into
the dma buffer.
The problematic line is:
```
out_idx = (s_paintedtime * dma.channels) % dma.samples;
```
With `s_paintedtime` large enough, the result of the multiplication will
overflow to a negative number (since `s_paintedtime` is signed), and the
index into the output buffer will be negative.
ranlib errors on older macOS because of arm64 arch in code/libs/macosx/-
libSDL2main.a. Use lipo to extract the library for the specific arch
that is being linked.
The engine function pointer to vmMain used variadic arguments but
the vmMain function in the dylib has explicit arguments. Evidently
the arguments are stored on the stack and/or registers differently.
Found by fretn.
Fix "Architecture arm64 is not supported when cross compiling" and
also be more be more flexible for manually specifying CC or the
osxcross darwin version (which corresponds with a macOS SDK version
to build against).