Commit graph

14095 commits

Author SHA1 Message Date
Bill Currie
5f45c8a0d2 [win] Handle move and size events
Hook up WM_MOVE and WM_SIZE with QF's internal events.

Fixes #61
2023-11-24 22:59:48 +09:00
Bill Currie
f58a14c2d3 [build] Disable 32-bit win32 in release build script
32-bit Windows isn't relevant enough any more. Anybody that wants 32-bit
windows QuakeForge can go through the pain.
2023-11-24 12:29:39 +09:00
Bill Currie
250cac6079 [vid] Remove direct draw interface
It has been dead for a long time.
2023-11-24 12:28:55 +09:00
Bill Currie
f721021fec [win] Clean up event handling and a pile of dead code
The event handling changes take care of VagueLobster's segfaults on
startup for all renderers (vulkan will still be iffy depending on his
hardware: it dies on my GTX 965 M, probably due to memory and QF's
shadows). One nice side effect is it takes care of the broken CD audio
event handling (does anyone even care, though?).
2023-11-24 12:28:06 +09:00
Bill Currie
0a89c513b4 [win] Do not call IN_ClearStates when creating the window
The window is created before input is initialized. Fixes a segfault on
startup of nq-win.exe.
2023-11-23 21:13:47 +09:00
Bill Currie
f3a428fbdd Fix up windows and the release scripts
I really need more feedback and the best way to get that is to have more
users, and for that, I need packages.
2023-11-23 20:28:19 +09:00
Bill Currie
97a9620cb9 Do the distcheck dance 2023-11-23 17:55:33 +09:00
Bill Currie
c9cfd9e8cf Fix window build for recent config changes
And, more importantly get curl working in the mxe build.
2023-11-23 17:16:53 +09:00
Bill Currie
7a2a61d365 Merge branch 'wip-trails' 2023-11-23 14:00:11 +09:00
Bill Currie
a8ff58baa4 [glsl] Remove a debug print 2023-11-23 13:58:44 +09:00
Bill Currie
43cea64709 [renderer] Get trails looking vaguely acceptable
Still not great, but I like the falloff and the mixing is better. The
path offset seems to be unstable, so that needs work still.
2023-11-23 13:58:44 +09:00
Bill Currie
34daf9032d [renderer] Get trails rendering again
They're not quite working (trail path offset is incorrect) but their
pixels are getting to the screen. Also, lifetimes are off for rocket
trails in that as soon as the entity dies, so does the trail.
2023-11-23 13:58:44 +09:00
Bill Currie
70d07d8026 [quakefs] Document that QFS_LoadFile closes the file
In the end, I decided that the behavior isn't so bad, but it does need to
be documented.

Closes #34
2023-11-19 16:40:24 +09:00
Bill Currie
e8b2822587 [nq] Add more checks for dedicated server in client
When the nq client is run in dedicated server mode, the client state is not
initialized thus none of the client code should be run. This became more
critical with the addition of scenes and an ECS as there are a lot more
pointers involved.

Fixes #46
2023-11-19 15:03:13 +09:00
Bill Currie
49667b439d [build] Batch-report missing packages
Very debian-centric and the reported packages rely on package dependencies,
but it's better than getting part-way through a build only to find
something is missing and having to restart..
2023-11-18 12:16:35 +09:00
Bill Currie
1545480ecb [debian] Clear out a large pile of bitrot
This gets debian packages building again, though it was mainly a test for
some improvements to configure and missing package reporting.
2023-11-18 11:53:23 +09:00
Bill Currie
053e9f2fb4 Add more library packages for building
freetype, fontconfig, harfbuzz, xinput and xfixes. Also, create a shell
script that installs all the debian packages needed to build QF.
2023-11-17 20:51:12 +09:00
Bill Currie
c322fb68d3 [cexpr] Remove unnecessary config.h include 2023-11-17 20:51:12 +09:00
Bill Currie
3a38560ceb [libs] Fix some c23 build errors for mxe 2023-10-15 18:22:06 +09:00
Bill Currie
c467d2f9b8 [vulkan] "Use" most params for QFV_duSetObjectName
When disabled, its params go unused and thus results in gcc unused
locals warnings.
2023-10-15 18:20:55 +09:00
Bill Currie
ef6b10afb1 [renderer] Remove dead r_part_comp.c 2023-10-03 21:27:04 +09:00
Bill Currie
a905dcd4f9 [renderer] Update particle scale
It seems I forgot this and didn't notice until now. The glsl renderer's
particles (style 1) look a lot better now.
2023-10-03 18:37:59 +09:00
Bill Currie
4554ea47b0 [glsl] Apply an old debug stash for trails
The code is mostly disabled, but this should prevent too much bitrot.
2023-10-03 15:05:13 +09:00
Bill Currie
5311f9906a [nq,qw] Call Mod_ClearAll in CL_Shutdown
Although the model subsystem does this too, it does it too late relative
to the video shutdown, resulting in segfaults for glsl due to the
drivers having been unloaded.
2023-10-03 14:28:32 +09:00
Bill Currie
7f3fc6d832 [nq,qw] Call Mod_ClearAll in CL_Shutdown
Although the model subsystem does this too, it does it too late relative
to the video shutdown, resulting in segfaults for glsl due to the
drivers having been unloaded.
2023-10-03 14:26:54 +09:00
Bill Currie
1c6986f0ab Merge branch 'master' into wip-trails 2023-10-03 14:11:22 +09:00
Bill Currie
c5731374cd [glsl] Separate out the trails implementation
This gets things *compiling* again, though it's still non-functional and
definitely wrong (don't want trail in renderer_t), but I need to think
about the design for getting trails as components. Also need to think
about integrating trails into the client effects system so trails can be
shared between renderers.
2023-10-03 13:49:25 +09:00
Bill Currie
ba35ce71b3 [qfcc] Support 32-bit and 64-bit handle types
32-bit is nice because it's small, but 64-bit is handy for special
handle encodings.
2023-10-02 23:33:37 +09:00
Bill Currie
360dfc0038 [qfcc] Respect commutativity when optimizing adds
This fixes the really odd bug of certain string values getting swapped
in vkgen when DEBUG_QF_MEMORY was defined in expr.c. It will also
prevent a lot of fun with floats in the future, I imagine.
2023-10-02 22:33:29 +09:00
Bill Currie
0974983a39 [qfcc] Set expression associativity field
I forgot this when adding the option.
2023-10-02 22:32:23 +09:00
Bill Currie
7f42677a34 [qfcc] Clean up the last general uses of expr's next
It's now meant only for ALLOC. Interestingly, when DEBUG_QF_MEMORY is
defined in expr.c, something breaks badly with vkgen (no sniffles out of
valgrind, though), but everything is fine with it not defined. It seems
there may be some unpleasant UB going on somewhere.
2023-10-02 21:38:16 +09:00
Bill Currie
ef807f411e [qfcc] Check alignment when looking for immediates
I'm not sure why this showed up now (I guess just not enough large
immediate values), but this fixes a segfault in the algtypes test (the
mystery is why it showed up this late).
2023-10-02 21:14:14 +09:00
Bill Currie
4952d298ac [qfcc] Fix some memory errors
Found thanks to running valgrind over qfcc through the entire build
whith -DDEBUG_QF_MEMORY.
2023-10-02 21:14:14 +09:00
Bill Currie
bde35749f5 [util] Define ALLOC_FREE_BLOCKS for DEBUG_QF_MEMORY
More bitrot.
2023-10-02 20:40:21 +09:00
Bill Currie
471f5488ff [qfcc] Catch some error expressions
Not really enough in general as an internal error still occurs, but the
triggering error is caused by some broken changes.
2023-10-02 14:46:42 +09:00
Bill Currie
261ea0c4de [qfcc] Be more const-correct with expressions
Diagnostics that return an expression now return const, and fixes error
not returning an error expression.
2023-10-02 14:46:39 +09:00
Bill Currie
f3ca0c9222 [qfcc] Dump conflicting type expressions in debug 2023-10-02 12:06:14 +09:00
Bill Currie
b89e243c47 [qfcc] Improve handling of different types in ?: 2023-10-02 09:07:37 +09:00
Bill Currie
6423c13108 Merge branch 'master' into wip-trails 2023-10-02 00:48:14 +09:00
Bill Currie
2134c85a47 [qfcc] Collect common multiplication terms
This gets my `m * p * ~m` code as optimal as possible if my counting is
correct (this does not include the extra extends and add needed to merge
the values). Also, there might be a possibility of recombining some ops
into a vector op, but I'm happy with this.
2023-10-01 23:17:51 +09:00
Bill Currie
f3edc06c45 [qfcc] Prefer constant scalar mults for collecting
This makes it more likely for a squared scale multiplier remaining
intact, resulting in slightly better code.
2023-10-01 22:31:35 +09:00
Bill Currie
04f49d1ca4 [qfcc] Commit common scale terms
While it works, and does improve the code slightly, it could do better
by favoring constants over variables for the common factor.
2023-10-01 21:53:50 +09:00
Bill Currie
e8521eb4cd [qfcc] Collect like terms into products
That is, `x+x -> 2*x` (and similar for higher counts). Doesn't make much
difference for just 2, but it will make collecting scales easier and I
remember some testing showing that `2*x` is faster than `x+x` for
floating point.

Of course, motor-point keeps bouncing around numerically :/
2023-10-01 19:01:36 +09:00
Bill Currie
96215ed749 [qfcc] Clean up some struct forward declarations
Having to have `struct foo` everywhere gets a bit annoying after a
while.
2023-10-01 17:45:27 +09:00
Bill Currie
ca1b455aa0 [qfcc] Collect common cross product terms
This reduces the number of cross products in `m * p * ~m` from 4 or 5 (4
after the old CSE went through the code) to 2 even before CSE.
2023-10-01 17:32:10 +09:00
Bill Currie
afe6ea526b [qfcc] Give mono-group multivec types structs
This fixes the motor-point.r test (ie, the sub-type field selector works
on mono-group types now). Still need to sort out something for scalars
(but I imagine that can work only in an @algebra context).
2023-09-30 16:33:14 +09:00
Bill Currie
87cf48ffc4 [qfcc] Sort factors in summed terms
This allows them to be matched with cancelling factors. My fancy zero
test is now just that: a fancy zero:

    typedef @algebra(float(3,0,1)) PGA;
    typedef PGA.group_mask(0xa) bivector_t;
    typedef PGA.group_mask(0x1e) motor_t;
    typedef PGA.tvec point_t;
    typedef PGA.vec  plane_t;

    plane_t
    apply_motor (motor_t m, point_t p)
    {
        return (m * p * ~m).vec;
    }

    0000 nop there were plums...
    0001 adjstk 0, 0
    apply_motor:
    motor.r:32:{
    0002 with 2, 0, 1
    motor.r:33:     return (m * p * ~m).vec;
    0003 return (<void>)

The motor-point.r test fails because it uses (m * p * ~m).tvec to get
the value but the type system is slightly broken in that a mono-group
algebra type does not have a structure associated with it and thus the
"missing" field results in 0. Yes, I spent too long chasing that one,
too.
2023-09-30 15:13:14 +09:00
Bill Currie
546253cea7 [qfcc] Add support for associativity
With (not yet hooked up) options for floating point.
2023-09-30 11:06:06 +09:00
Bill Currie
3f40977ecb [qfcc] Handle cancellations in large chains
It turned out I wasn't shuffling canceled terms correctly, thus far too
many hours of bug hunting.
2023-09-29 21:53:56 +09:00
Bill Currie
35ec9062cf [qfcc] Find the dagged expression for scales
I'd missed this in the previous commit, which was a good thing, really,
as it turns out this was the trigger of the bug that causes my fancy
zero test to become non-zero. It seems the bug is in either
component_sum or in the extend merging.
2023-09-29 18:39:33 +09:00