Commit Graph

186 Commits

Author SHA1 Message Date
Bill Currie 20ee47404f Merge branch 'master' into wip-twod 2022-09-22 10:06:00 +09:00
Bill Currie 1cd6a174fe [build] Correct cygwin system type
cygwin is not windows, so trying to build a win32 app on cygwin-native
doesn't work too well.
2022-09-19 16:36:29 +01:00
Bill Currie fb5477e0ab [build] Remove -no-cygwin from mingw builds
It seems to have been deprecated. This gets --host builds working,
although some libs don't work properly due to having only dlls and I
guess mingw stuff isn'n on any paths.
2022-09-19 14:13:16 +01:00
Bill Currie ead14d7268 [build] Fix a pile of issues building under cygwin
Many thanks to jdp_ for finding them initially and getting me to take a
look at things.
2022-09-19 13:41:24 +01:00
Bill Currie 935e883d8d [renderer] Switch to using HarfBuzz for glyph positioning
This means that QF should support more exotic fonts without any issue
(once the rest of the text handling system is up to snuff) as HarfBuzz
does all the hard work of handling OpenType, Graphite, etc text shaping,
including kerning (when enabled).

Also, font loading now loads all the glyphs into the atlas (preload is
gone).
2022-09-04 20:56:38 +09:00
Bill Currie 4d5b38f0c9 [renderer] Star work on adding FreeType support
Right now, this just initializes the library and loads a font into
memory, preloading a given set of characters (specified by unicode
values).
2022-08-27 17:53:03 +09:00
Bill Currie 1d1a59ac94 [build] Ensure va_copy def comes after HAVE_VA_COPY
and HAVE__VA_COPY as well. Fixes clang's complaint about va_copy being
redefined.
2022-03-30 23:29:17 +09:00
Bill Currie d8a7706e58 [build] Test for gcc optimization options
While clang accepts gcc's optimization options, it produces a warning
when it ignores them, so need to set -Werror before checking for those
options when building with -Werror otherwise the build will fail.
2022-03-30 23:23:34 +09:00
Bill Currie 6377734e32 [renderer] Merge the two software renderers
I got tired of having to maintain two separate software renderers, but
didn't want to just nuke sw32, so its core changes are merged into sw.

Alias model rendering is broken, but I know exactly what's wrong and how
to fix it, just need to take care due to asm.
2022-03-09 15:56:19 +09:00
Bill Currie 59044d3827 Fix a bunch of distcheck issues 2022-02-14 19:28:19 +09:00
Bill Currie 2f6c3c8ffb [ruamoko] Use pr_type_names.h for Ruamoko
Keeping the two sets of definitions in sync has always been a pain.
2022-01-18 14:21:09 +09:00
Bill Currie 23613ca985 [simd] Get the new functions working on older hardware
In some cases, gcc-11 does a good enough job translating normal looking
C expressions so use just those, but other times need to dig around for
an appropriate intrinsic.

Also, now need to disable psapi warnings when compiling for anything
less than avx.
2022-01-07 11:48:28 +09:00
Bill Currie 0b92cd3a88 [gamecode] Generate the new opcode table
As I expect to be tweaking things for a while, it's part of the build
process. This will make it a lot easier to adjust mnemonics and argument
formats (tweaking the old table was a pain when conventions changed).

It's not quite done as it still needs arg widths and types.
2022-01-05 19:09:07 +09:00
Bill Currie 33e48025dd [ruamoko] Replace rua_key with rua_input
And create rua_game to coordinate other game builtins.

Menus are broken for key handling, but have been since the input rewrite
anyway. rua_input adds the ability to create buttons and axes (but not
destroy them). More work needs to be done to flesh things out, though.
2021-12-24 06:45:13 +09:00
Bill Currie 577959ec6b [build] Use AS_HELP_STRING on all the help strings
Cleans up the inconsistently wrapped lines.
2021-12-24 06:45:13 +09:00
Bill Currie 3ac6d2aa22 [x11] Use barriers to trap the pointer in the window
This should be a much friendlier way of "grabbing" input, though I
suspect that using raw keyboard events will result in a keyboard grab,
which is part of the reason for wanting a friendly grab.

There does seem to be a problem with the mouse sneaking out of the
top-right and bottom-left corners. I currently suspect a bug in the X
server, but further investigation is needed.
2021-11-22 14:59:27 +09:00
Bill Currie e45d19835c [x11] Add initial support for XInput2
Right now, only raw pointer motion and button events are handled, and
the mouse escapes the window, and there are some issues with focus in
focus-follows-mouse environments. However, this should be a much nicer
setup than DGA.
2021-11-21 23:42:33 +09:00
Bill Currie ba8da88f56 [build] Update for autoconf 2.71
Only because I didn't appreciate the warnings about things being
obsolete.
2021-11-20 12:54:05 +09:00
Bill Currie 83abdfa7b9 [qw] Rmove include of rpc/types.h
I have no idea why it was necessary, and certainly should not be now as
any such portability issues should be tucked away such that the client
code never sees such.
2021-11-19 11:57:16 +09:00
Bill Currie 665790f562 [video] Remove libQFjs
It is now redundant with the libQFinput, though nothing actually works yet.
2021-11-01 12:30:45 +09:00
Bill Currie 7fcf6bfef5 [build] Autoconfiscate evdev 2021-09-28 10:57:12 +09:00
Bill Currie d99fb01b65 [build] Fix some distcheck bitrot 2021-08-02 13:47:00 +09:00
Bill Currie 40a26e4bc8 [scene] Rename libQFentity to libQFscene
And start working on scene management.
2021-07-24 14:20:59 +09:00
Bill Currie ae58a8ba5d [qwaq] Create a commandline-only version of qwaq
qwaq-curses has its place, but its use for running vkgen was really a
placeholder because I didn't feel like sorting out the different
initialization requirements at the time. qwaq-cmd has the (currently
unnecessary) threading power of qwaq-curses, but doesn't include any UI
stuff and thus doesn't need curses. The work also paves the way for
qwaq-x11 to become a proper engine (though sorting out its init will be
taken care of later).

Fixes #15.
2021-07-06 12:25:24 +09:00
Bill Currie c554dee0f8 [build] Autoconfiscate simd support
The default is to enable (and autodetect based on lscpu) simd support,
or the mode can be specified via --enable-simd=mode. --disable-simd
disables the support but ensures gcc will still compile the float vector
types.
2021-06-29 15:39:15 +09:00
Bill Currie 53a7fbfe95 [audio] Move jack from renderer to targets
The JACK Audio Connection Kit support is now just an output target
rather than a full duplicate of the renderer (in pull mode). This is
what I wanted to to back when I first added jack support, but I needed
to get the renderer working asynchronously without affecting any of the
other outputs.

Fixes #16.
2021-06-25 18:32:48 +09:00
Bill Currie 770187372d [audio] Get testsound working again 2021-06-21 16:40:40 +09:00
Bill Currie bcc5686606 [util] Add fuzzy and reentrant bsearch
Fuzzy bsearch is useful for finding an entry in a prefix sum array
(value is >= ele[0], < ele[1]), and the reentrant version is good when
data needs to be passed to the compare function. Adapted from the code
used in pr_resolve.
2021-06-01 18:53:53 +09:00
Bill Currie 0293167bd2 [util] Get simd tests working for emulated simd
A bit of a mess for optimized vs unoptimized, but the tests acknowledge
the differences in precision while checking that the code produces the
right results allowing for that precision.
2021-06-01 18:53:53 +09:00
Bill Currie ef9b04ba83 [util] Get tests working with sse2
It seems that i686 code generation is all over the place reguarding sse2
vs fp, with the resulting differences in carried precision. I'm not sure
I'm happy with the situation, but at least it's being tested to a
certain extent. Not sure if this broke basic (no sse) i686 tests.
2021-06-01 18:53:53 +09:00
Bill Currie c5f2aca07d [vulkan] Conditionalize vulkan tests 2021-06-01 18:53:53 +09:00
Bill Currie 778c07e91f [util] Get vectors working for non-SSE archs
GCC does a fairly nice job of producing code for vector types when the
hardware doesn't support SIMD, but it seems to break certain math
optimization rules due to excess precision (?). Still, it works well
enough for the core engine, but may not be well suited to the tools.
However, so far, only qfvis uses vector types (and it's not tested yet),
and tools should probably be used on suitable machines anyway (not
forces, of course).
2021-06-01 18:53:53 +09:00
Bill Currie 0a6cb3ad53 [vulkan] Don't build vkgen when vulkan is unavailable 2021-06-01 18:53:52 +09:00
Bill Currie b2ec1aaf37 [build] Disable SDL by default
Finally, there is no more need to keep it (though I won't nuke the
support just yet) as native windows support is now working.
2021-04-01 20:07:37 +09:00
Bill Currie 596cd164a3 [win] Handle focus in/out events
This fixes the errant console behavior (cursor wasn't showing because QF
thought it had never received focus).
2021-03-31 02:48:25 +09:00
Bill Currie 63e30e6ae0 [win] Fix a handful of small bugs for windows
Only 64-bit windows is tested, and there are still various failures, but
QF is limping along in windows again.

nq-sdl works for sw, and sw32, gl and glsl are mostly black (but not
entirely for gl?),  vulkan is not supported with sdl.

nq-win works for sw and sw32, and sort of for vulkan (very dark and
upside-down?). gl and glsl complain about vid mode,

qw-client-[sdl,win] seem to be the same, but something is wrong with the
console (reading keyboard input).
2021-03-30 20:19:20 +09:00
Bill Currie 15a5254f04 [build] Get ncurses support working again
Some minor errors dues to getting win32 building (and not testing the
results properly in Linux).
2021-03-29 17:54:39 +09:00
Bill Currie 64f51bda6e [build] Get make distcheck working again
again...

This covers only the basic check with a build in debian, but it's a good
start.
2021-03-29 17:35:30 +09:00
Bill Currie 6fea5f5e1a [build] Add -Wformat-non-literal option
While this caused some trouble for pr_strings and configurable strftime
(evil hacks abound), it's the result of discovering an ancient (from
maybe as early as 2004, definitely before 2012) bug in qwaq's printing
that somehow got past months of trial-by-fire testing (origin understood
thanks to the warning finding it).
2021-03-29 17:27:06 +09:00
Bill Currie 88ff254f42 Get QF cross-compiling using MXE/mingw32
This includes -win clients (no clue if anything actually works yet).
2021-03-27 20:09:37 +09:00
Bill Currie a9bd436837 [build] Autoconfiscate printf format attribute
I don't know if gnu_printf is appropriate for all cases, but it is
needed for mingw32.
2021-03-27 19:52:59 +09:00
Bill Currie 4cc6e05140 [build] Fix a silly error that got through testing 2021-03-26 17:34:59 +09:00
Bill Currie 238e80c89b [build] Fix selective build of tools
A couple of things get built when they shouldn't (eg, vkgen) but this
gets the build system back to its pre-non-recursive-make
configurability.
2021-03-26 16:11:29 +09:00
Bill Currie 7dc7bf138f [build] Rename QF_PROCESS_NEED_DIRS
QF_PROCESS_NEED_LIST is a better name as for one, building no longer
depends on directories, and the directories were lists anyway, so the
name is more generally applicable.
2021-03-26 15:26:13 +09:00
Bill Currie 669f9a6500 Revert "[build] Clean up obsolete QF_PROCESS_NEED_DIRS"
This reverts commit 22c0bec03a.

It turns out to have been a critical part of selective build control.
2021-03-26 15:17:46 +09:00
Bill Currie a32e2319e2 Merge branch 'master' into win-merge 2021-03-25 22:42:16 +09:00
Bill Currie 14bc560624 [build] Add option to enable gcov data generation
Nice to be able to check how good the tests are (or aren't, as the case
may be).
2021-03-07 17:39:22 +09:00
Bill Currie 9617bbef97 [build] Create static libs for render targets
The static libs are used to build the plugins, but make it easy to use
only those modules needed for tests. Fixes the link error when running
"make check" with non-static plugins.
2021-03-03 16:34:16 +09:00
Bill Currie 22c0bec03a [build] Clean up obsolete QF_PROCESS_NEED_DIRS
Its need went away with the shift to non-recursive make. The macro is
still available just in case.
2021-03-03 13:02:35 +09:00
Bill Currie 7a353d5aee [model] Build vulkan model libs
The contents are currently empty (required .c files), but this gets the
build system updated.
2021-01-19 14:12:49 +09:00