Commit Graph

3363 Commits

Author SHA1 Message Date
Bill Currie 35bf957d08 Add a 4x4 matrix type and some functions for it. 2011-12-30 20:11:53 +09:00
Bill Currie edb05fdfce Rename Vector3Scale and QuatCompScale.
They are now VectorCompMult and QuatCompMult.
2011-12-30 20:04:55 +09:00
Bill Currie bcdcd7b36d Implement sprint glsl loading.
That was... easy.
2011-12-30 09:36:57 +09:00
Bill Currie a87a60a6fd Flush the text buffer before drawing conback or menus.
Ok, now really done until I notice something else (I forgot this one
momentarily).
2011-12-29 18:23:09 +09:00
Bill Currie 047b7bcc32 Implement Draw_TileClear.
With this, 2d seems to be finished. YAY.
2011-12-29 18:15:15 +09:00
Bill Currie a1035aafe9 Implement Draw_TextBox. 2011-12-29 17:51:31 +09:00
Bill Currie 0e521a7779 Correctly detect going past the end of the pcx data.
palette is just that, the palette, and often won't point to the end of the
pcx data. Use the right end :).
2011-12-29 11:27:54 +09:00
Bill Currie 2b44a25c6b Flush console text after each screen function.
This on its own doesn't fix menus being overwritten with console text, but
it's an important step.
2011-12-29 11:26:14 +09:00
Bill Currie 9fec4d5be0 Implement Draw_Fill.
Almost there with 2d.
2011-12-29 11:25:27 +09:00
Bill Currie 9d0ed6b885 Fix the missing text.
Silly case and paste error cleared out my text vertex array prematurely.
2011-12-29 08:47:32 +09:00
Bill Currie bece72e746 Use a quick hack to get colored crosshairs working. 2011-12-28 21:45:20 +09:00
Bill Currie e69a583f1b Work around a bug in mesa.
Since I'm not specifying the api when creating my context, mesa is giving
me GL2. This is fair enough, but in GL2, vertex attribute 0 is the vertex
position. This too, is fair enough. The problem is, mesa is assigning 0 to
my vcolor attribute and thus I can't set it. The work around is simply to
swap the declaration order of vcolor and vertex (this really shouldn't work
eiter, I suspect).
2011-12-28 20:43:56 +09:00
Bill Currie 6a44978a0f Fix reading of GL_CURRENT_VERTEX_ATTRIB.
Turns out it returns a vec4. oops.
2011-12-28 20:41:26 +09:00
Bill Currie 8ee13ef8c2 Do some clipping in the draw routines.
After fixing Maraakate's crash, I thought it would be a good idea to put
the fixes into QF, too.
2011-12-28 19:20:18 +09:00
Bill Currie 4e7af5c3e0 Add a function to dump the info for all attribute arrays. 2011-12-28 14:27:59 +09:00
Bill Currie 411ab8f359 Be noisy when resolving uniforms and attributes. 2011-12-28 12:58:26 +09:00
Bill Currie be9530afb6 Dump a lot of info about shader programs.
New developer bit: SYS_GLSL (2048).
2011-12-28 12:40:28 +09:00
Bill Currie b657905c83 Bring in Despair's gl error checking from the gl renderer. 2011-12-28 09:05:36 +09:00
Bill Currie 151cc05882 Add support for vertex colors.
As I need to control the alpha, they're sent as rgba rather than quake
palette indices. Text works well. All other 2d stuff does not :(.
2011-12-28 09:04:26 +09:00
Bill Currie b943b6d6e8 Implement crosshairs, mostly.
Colored crosshairs aren't supported yet (next).
2011-12-27 17:59:58 +09:00
Bill Currie db8573b774 Make the cross-hair data sharable between renderers. 2011-12-26 21:43:15 +09:00
Bill Currie 705d07fa39 Implement most of the 2d rendering functions.
textbox, crosshair, tileclear, fill and fadescreen are the remaining
functions.

There's a problem with 2d icons being drawn over the text (instead of
under), but I'll leave that for later.
2011-12-26 20:33:40 +09:00
Bill Currie e2a8de33cc First real texture support function for glsl. 2011-12-26 18:34:51 +09:00
Bill Currie 42034acc03 Organize the text program data.
Also, rename the charmap uniform in quake2d.frag as it's more generic than
that.
2011-12-26 18:00:55 +09:00
Bill Currie 2ccfbb0c1c Move the shader program code into vid_common_glsl.
Much more useful in the long run.
2011-12-26 17:17:29 +09:00
Bill Currie 5bed38dcd9 Rename quaketxt.frag to quake2d.frag.
It's actually fairly generic for 2d rendering (no lighting, palette lookup)
2011-12-26 17:11:31 +09:00
Bill Currie f78db6c570 Clean up the generated shader files. 2011-12-26 16:39:02 +09:00
Bill Currie d743c6c55f Make a clean break heading for GLES compatibility.
Add GLSL directory to QF and use it for all gsls based code (instead of
GL). defines.h, types.h and funcs.h are derived from gl2.h from khronos.

Text drawing now uses triangles instead of quads.
2011-12-26 16:08:55 +09:00
Bill Currie e6c6de3a2a Fix the palette uploading.
Ooooops :P
2011-12-26 10:41:16 +09:00
Bill Currie 7bd5ab882c Get text rendering working.
It comes out as a funky green (that's not in the quake palette!!!), but
it's mostly readable.
2011-12-26 10:16:16 +09:00
Bill Currie 9f5eacd1fb Try to get text rendering.
Still a black screen :(
2011-12-26 08:12:05 +09:00
Bill Currie c161a91d4a Split out and partially implement the screen code. 2011-12-26 08:09:47 +09:00
Bill Currie 1268830082 Split out the particle code. 2011-12-26 08:02:18 +09:00
Bill Currie 7d653f3676 Start work on outputting text.
The shaders now compile. No linking is done yet. Char quads are generated,
but not sent to the card.
2011-12-25 19:42:39 +09:00
Bill Currie 91afdcf064 Don't call init_box when not doing a box trace.
I took the opportunity to pass qf through callgrind. init_box was
surprisingly expensive, especially considering its results were never used.
2011-12-25 17:11:48 +09:00
Bill Currie 55a0ed49cd Build qw-client-glslx too.
I was asked about timedemo overkill (bigass1 currently gets 40kfps, haha),
so I had to add qw-client-glslx to the build.
2011-12-25 16:41:14 +09:00
Bill Currie 9df7370bcd Create some shaders for quake text.
Still nothing drawn, but this gets my shader scripts into C without me
having to look at ugly strings.
2011-12-25 15:53:12 +09:00
Bill Currie b7c90fa02d Load the quake palete as a texture.
256x1 rgba.
2011-12-25 13:53:52 +09:00
Bill Currie 99c490ce52 Get glsl running as a null renderer.
This means that nq-glslx can get through demo1, demo2, demo3 and bigass1
without crashing. However, nothing is rendered, so unless you like black,
it's not very interesting.
2011-12-25 13:02:26 +09:00
Bill Currie 2894689f71 Clean up mod_lightmap_bytes.
Just how many definitions do we need?
2011-12-25 13:02:26 +09:00
Bill Currie dcf2b14188 Implement alias model skin loading for glsl. 2011-12-25 13:02:26 +09:00
Bill Currie e62eb23f67 And do the real merge.
That drastically simplifies the processes of alias model loading for glsl :)
2011-12-25 11:04:03 +09:00
Bill Currie c0d37ddc1e Pseudo merge gl and sw Mod_LoadAliasGroup.
Interestingly, this didn't break gl alias model renderering (but then, it
does weird things to the data anyway).
2011-12-25 10:53:53 +09:00
Bill Currie 1f8db5fe3a Pseudo merge gl and sw Mod_LoadAliasFrame. 2011-12-25 10:34:29 +09:00
Bill Currie cc5140e3a1 Move min/max/bound and field_offset into better locations.
min/max bound into mathlib.h (they /are/ math functions, after all) and
field_offset into qtypes.h.
2011-12-24 10:04:33 +09:00
Bill Currie 59ef1eae9d Split out the floodfile code into its own file. 2011-12-23 19:01:31 +09:00
Bill Currie 6fe9557dae Put in the final pieces so nq-glslx can link.
Everything is still stubs. Trying to run nq-glslx results in a segfault :)
2011-12-23 12:52:55 +09:00
Bill Currie 53d89bf85a Clean up the mess around D_FlushCaches.
Create an R_ClearState and call that from the clients. It calls any
necessary functions itself.
2011-12-23 12:51:47 +09:00
Bill Currie 33c5320c0e Create stubs for most of the required render functions.
nq-glslx almost links. Just some suspicious references in host.c I want to
check before doing anything more.
2011-12-23 12:19:50 +09:00
Bill Currie 497461b4c2 Make a start on making a pure GLSL renderer.
For now, only nq-glslx will be built, but as there is no actual code, it
doesn't link. However, this gets the glsl stuff into the build system.
2011-12-23 12:19:13 +09:00
Bill Currie 858d95de58 Add a bunch more keys to the X11 clients.
Now, QF does something reasonable for every key on my keyboar for which X
gives us a keycode.
2011-12-19 16:37:48 +09:00
Bill Currie 87390f53b0 Z_Realloc() should zero-fill the expandded part of the mem
Patch from Ozkan Sezer (sezero). Thank you.
2011-12-19 09:45:46 +09:00
Bill Currie 52d9269867 Merge brush model with world model rendering.
With this, non-mtex global fog now works properly :).
2011-12-18 08:09:55 +09:00
Bill Currie a8e354536a Implement the instance surface allocation/freeing.
Not actually used yet, so it's harmless at this stage.
2011-12-17 19:42:19 +09:00
Bill Currie 87b78e5533 Move the surface chain links out of the surfaces.
The links are now in "instance surfaces". For non-instanced models (world,
doors, plats etc (ie, world and its sub-models)), there will be one
instance surface per model surface. However, for instanced models (ammo
boxes etc), there will be many, dynamically allocated (not yet
implemented). This commit gets the static instance surfaces working.
2011-12-17 19:14:14 +09:00
Bill Currie 9f0bdf7794 Add some comments. 2011-12-17 09:39:57 +09:00
Bill Currie 933120d44f Fake vertex arrays for text and particles.
Getting gl_vaelements_max -1 to work produced a rather nasty surprise :P
2011-12-16 20:09:05 +09:00
Bill Currie 5cd1f6f5cf Fix a GL version check snafu.
Thanks to MH (on inside3d.com) for pointing this out to me.
2011-12-16 09:43:22 +09:00
Bill Currie e67690a1a9 Restore the missing lightmaps in non-mtex mode.
I forgot to blend in the lightmaps in the fogless non-mtex path.
2011-12-16 09:21:39 +09:00
Bill Currie b2aa5ce554 Register the textures of other brush models; 2011-12-15 17:09:02 +09:00
Bill Currie 962451e2fe Create a list of texture chains.
This moves the texture chains out of the world model and into a separate
list, allowing other brush models to registter their textures.
2011-12-15 17:09:02 +09:00
Bill Currie d6a668d517 Split out chain_surface() from visit_node(). 2011-12-15 17:09:02 +09:00
Bill Currie 3eb859a88f Move the entity transform setup into the clients.
This has several benifits:
  o The silly issue with alias model pitches being backwards is kept out
    of the renderer (it's a quakec thing: entites do their pitch
    backwards, but originally, only alias models were rotated. Hipnotic
    did brush entity rotations in the correct direction).
  o Angle to frame vector conversions are done only when the entity's
    angles vector changes, rather than every frame. This avoids a lot of
    unnecessary trig function calls.
  o Once transformed, an entity's frame vectors are always available.
    However, the vectors are left handed rather than right handed (ie,
    forward/left/up instead of forward/right/up): just a matter of
    watching the sign. This avoids even more trig calls (flag models in
    qw).
  o This paves the way for merging brush entity surface rendering with the
    world model surface rendering (the actual goal of this patch).
  o This also paves the way for using quaternions to represent entity
    orientation, as that would be a protocol change.
2011-12-15 17:09:01 +09:00
Bill Currie f6ebb78140 More GL_Init_Common() cleanup.
Move the call to GL_Common_Init_Cvars() out of the block of check calls.
2011-12-15 17:09:01 +09:00
Bill Currie 51aaee5c3b Put that OpenGL error message to rest.
The error was quite valid: setting GL_TEXTURE_MAX_ANISOTROPY_EXT to 0 is
incorrect. The problem was caused by the call to glTexParameterf being
before the gl_anisotropy cvar was initialized. Thus, move all of the setup
code in GL_Init_Common() to after all the checks and, more importantly,
after the call to GL_Common_Init_Cvars().
2011-12-15 17:09:01 +09:00
Bill Currie da552e33e7 Remove execinfo checks.
It seems we no longer need it (if we ever really did).
2011-12-13 21:25:41 +09:00
Bill Currie 4b515a961b Back out the fitzquake lerp changes.
That's not the direction I wish to take the renderer.
2011-12-13 17:01:15 +09:00
Bill Currie b05be59ea0 Fix alias models in non-mtex fog.
It turns out that due to the way we do fullbrights, nothing special needs
to be done to get the fullbright texture blended with the model even when
fog is enabled.
2011-12-12 17:08:22 +09:00
Bill Currie 8e531a58c2 Get global fog working for multi-pass rendering.
For the world textures, anyway. Entity multi-pass rendering still needs to
be verified.
2011-12-12 17:08:22 +09:00
Bill Currie 206199652a Fix a stray CFLAGS.
Should be AM_CFLAGS.
2011-12-10 20:45:33 +09:00
Bill Currie c3d41326b3 Do key dest changing properly.
key_demo wasn't so well thought out. This seems to be much better (and nq
is known to be working nicely).
2011-12-10 16:14:25 +09:00
Bill Currie 16c8b2a18d Use the new demo imt.
There are some problems with menus and the console messing up the key_dest
state (they assume console/menu or game, nothing else), but otherwise
things seem to work.
2011-12-10 15:18:50 +09:00
Bill Currie 3ae17e4d37 Fix a silly omission.
Must not check for IMT_MOD bindings when using IMT_CONSOLE etc.
2011-12-10 14:49:56 +09:00
Bill Currie 81a16c925b Add IMT_DEMO for demo playback bindings.
This will allow special key bindings for use during demo playback without
interfering with normal keys.
2011-12-10 14:21:12 +09:00
Bill Currie 14d8e8669f Rework the legacy bind/unbind commands.
in_bind_imt is now gone. I guess mercury was right in that it was a poor
design. However, it was (and still is necessary) to support "bind" and
"unbind". Now, instead, they work only with the IMT_MOD table. IMT_MOD sits
below IMT_0 in the imt hierarchy. If the key is not bound in IMT_0+, then
IMT_MOD will be checked. This way, "bind" and "unbind" can never mess with
a user's more sophisticated binding setup.
2011-12-10 13:56:02 +09:00
Bill Currie 49451eea80 Use the new menu/console bingings.
Now, the console toggle will always work (so long as the console is
toggleable in the first place).
2011-12-10 13:24:32 +09:00
Bill Currie d9d56760e1 Add cvars to control the keys for menus and console.
The backquote is not always usable for toggling the console, and the new
bind system doesn't automatically bind a key to both game and console imts
(by design). Thus create a cvar that allows the "always works" console
toggle to be specified in eg $fs_globalcfg. While I'm at it, do one for the
menus, too.
2011-12-10 13:24:32 +09:00
Jeff Teunissen 361255cf31 Ruamoko: New math constants, some new math functions
Also, switch all of the math builtins functions we use from Rua to the
ones that accept and return floats, avoiding conversions to/from double.
2011-12-09 22:36:41 -05:00
Bill Currie 2edac1a438 Nuke a sprintf. 2011-12-08 22:16:59 +09:00
Bill Currie 1c82956dd7 net_udp.c FIONREAD fix from Ozkan Sezer.
net_udp.c: Fixed FIONREAD ioctl to take an int* argument instead of an
unsigned long*.
2011-12-08 21:50:55 +09:00
Bill Currie 8aa5a8139c Split out the portal sanity tests.
With this, the portal code can be tested separately, including the freeing
of the portal information.
2011-12-08 14:59:35 +09:00
Bill Currie f9877ce0e0 Add a function to free a hull's portal information. 2011-12-08 14:58:08 +09:00
Bill Currie d3cf5c4b75 Beg for mmap access.
If the default sound device does not support mmap access, retry with
plughw. However, assume the user knows best and do not retry if snd_device
has been set to anything, including "default".

QF alsa support now works out of the box with pulseaudio.
2011-12-08 11:32:33 +09:00
Bill Currie 45288a1a7f Fix the ghastly sound quality.
Due to quake's original sound engine using a push model, the actual place
to which the sound data should be written is not necessarily where the
"hardware" dma cursor is, but rather where the last write finished off.
Thus, the correct output location is indicated by snd_paintedtime rather
than snd_shm->framepos.
2011-12-08 11:02:19 +09:00
Bill Currie fceed07d0b Tidy up my diagrams. 2011-12-08 08:45:53 +09:00
Bill Currie 9f32004599 Add a fixme.
I've had enough of this for the moment, but I'm pretty sure the test needs
some more consideration, and I'll probably forget about it if I don't mark
it.
2011-12-07 17:27:13 +09:00
Bill Currie 2a27db146e Use a bit of epsilon in trace_contents().
All tests pass again.
2011-12-07 15:35:19 +09:00
Bill Currie 66dffef936 Get trace_to_leaf working a little better.
I think the recursion decision needs a little more work, but this gets the
current tests working (though there's still a failure due to fp math).
2011-12-07 15:31:33 +09:00
Bill Currie ccbc69a7f5 Carve out some more cave and add some more tests.
One of them even breaks the code :)
2011-12-07 13:31:21 +09:00
Bill Currie 4ed8b69e24 Check the cross product length before testing its direction.
This fixes the bogus portal crossings.
2011-12-07 12:20:04 +09:00
Bill Currie 5af88d33fe Trace to the current portal rather than the portal's plane. 2011-12-07 12:17:51 +09:00
Bill Currie 9d2914474c Fix the edge vectors when bounding the portal points. 2011-12-07 12:16:58 +09:00
Bill Currie 6a4021517b Move the box face info into trace_state and init only once.
Then clean up the mess of excess function paramenters.
2011-12-07 10:54:37 +09:00
Bill Currie fc14826cd6 Reorganize the code a little. 2011-12-07 10:42:39 +09:00
Bill Currie 4f13d19b7e Optimize edges_intersect().
I found wolfram's line-line intersection page and noticed their equation
for the time of intersection was rather different to mine. After analyzing
the differences, it turns out they produce exactly the same results (when
the lines are coplanar), but their method allows me to eliminate one dot
product (4->3). Not only that, but it turns out that their method works
equally well for skew lines (ie, non-coplanar).

mine:
  CxA.CxA
  -------
  CxA.AxB

theirs:
  CxA.AxB
  -------
  AxB.AxB
2011-12-07 10:35:58 +09:00
Bill Currie ff693a956a Avoid missed portals in trace_to_leaf(). 2011-12-06 22:09:40 +09:00
Bill Currie 8c840a7003 Sanitize trace_hits_plane().
While unit normals aren't needed, they were too big for sane math. Now
epsilon can be used for the distance tests. One of the two new tests passes
now :).
2011-12-06 22:06:25 +09:00
Bill Currie 2b65f81b72 Use a saner "infinity".
8e6 is just too big for reasonable floating point.
This fixes the bogus portals.
2011-12-06 20:50:09 +09:00
Bill Currie 632817fed5 Fail properly when the portals are bogus. 2011-12-06 20:48:31 +09:00
Bill Currie f496f4d260 Whee, more tests that break things :) 2011-12-06 20:47:57 +09:00
Bill Currie 8fe703d747 Trace to adjoining leafs when necessary.
When the trace stradles a plane in the current leaf, check the other side
of the portal, too, as it is possible that leaf will restrict the movement
of the trace.

All current tests pass! However, I can think of some situations (and I
already have a solution) where things will fail, but that's next.
2011-12-06 17:27:05 +09:00
Bill Currie 4c17ca9583 Break out trace_hits_portal() from trace_enters_leaf(). 2011-12-06 08:46:04 +09:00
Bill Currie 9a9079a2b3 Correct the start-solid in a corner test.
It turns out that the box trace CAN get out of the solid from that location
(though a similar point trace can not). This is because of my decision to
allow non-points to touch a plane from either side without crossing the
plane, whereas a point touching a plane is always considered to be on the
front side of the plane as there is no further information to disambiguate
on which side of the plane the point is.
2011-12-05 22:11:58 +09:00
Bill Currie 4419d4c4ad Move the trace into the leaf before testing the contents.
The trace is moved as far into the leaf as possible without leaving the
other side of the leaf. This ensures that trace_contents is started from a
good location. There is currently a problem with traces that stradle a
plane getting, but this has cleared up all the current contents related
tests.
2011-12-05 22:11:58 +09:00
Bill Currie c588d28b96 Clear contents flags before calling trace_contents. 2011-12-05 22:11:58 +09:00
Bill Currie 8307d9f233 Rename check_in_leaf to trace_enters_leaf. 2011-12-05 22:11:58 +09:00
Bill Currie 3bd029d599 Make the contents flags clear.
I got tired of not being able to remember which flag was which in the
output.
2011-12-05 22:11:47 +09:00
Bill Currie 8e512a087c More failing contents tests.
However, I have a plan :)
2011-12-05 09:03:04 +09:00
Bill Currie b4a497baab Correctly restore the saved start point.
This fixes the point test failures.
2011-12-04 21:12:12 +09:00
Bill Currie 7da6df9dfb Use the "real" contents of the trace's location when visiting a leaf.
When visiting a leaf in box mode, use trace_contents() to get the highest
priority contents of any leafs touched by the box in the current location.
I'm now down to one failing test case, and it's an "allsolid" issue that
might be an incorrect assumption in my test case.
2011-12-04 19:14:35 +09:00
Bill Currie 053d801e92 Break out the leaf visit code into its own funciton. 2011-12-04 18:52:17 +09:00
Bill Currie 4e76aa3025 Don't split on a plane parallel to the motion.
This seems to improve the start/all solid cases a little, and it should
speed things up a little by avoiding unnecessary polygon tests.
2011-12-04 12:46:22 +09:00
Bill Currie ed8e09608a Fix the negative fractions coming from edge_portal_dist().
I have a better fix in the works, but I wanted edge_portal_dist() to be
correct.
2011-12-04 12:11:27 +09:00
Bill Currie e5903a60ff Put the mistaken test case back in. 2011-12-04 11:00:38 +09:00
Bill Currie eb5d2720e4 Avoid a segfault when there's no split plane. 2011-12-04 10:55:46 +09:00
Bill Currie cdfc922bce Fix a silly test case error. 2011-12-04 10:47:52 +09:00
Bill Currie 487a6b20ab Test collisions with a ridge smaller than the box.
Whee, found a failing test case :)
2011-12-04 09:02:12 +09:00
Bill Currie 55eb88b52c Create some tests for MOD_HullContents. 2011-12-03 22:18:43 +09:00
Bill Currie 581972c905 More file splitting for code reuse. 2011-12-03 21:13:01 +09:00
Bill Currie dadfb78992 Split out the hull data so it can be used in other tests. 2011-12-03 20:23:42 +09:00
Bill Currie 9ad298a716 Check whether the portal and box intersect.
Now on to creating tests for MOD_HullContents :)
2011-12-03 19:59:12 +09:00
Bill Currie d9a641c600 Avoid a segfault when the hull hasn't been portalized.
Serves me right for forgetting to test the main engine :P
2011-12-03 09:06:57 +09:00
Bill Currie 27642a080a Avoid infinite recursion. 2011-12-01 12:57:06 +09:00
Bill Currie f9d56f2941 Add MOD_HullContents().
If trace is null or point type, or the hull doesn't have portals, or the
first node is a leaf, MOD_HullContents operates in point mode (exactly the
same way as SV_HullPointContents()). However, in box mode, all leafs
touched by the trace are checked for their contents. The contents field of
trace (a bit field) will indicate the contents type of all touched leafs.
The returned contents value indicates the most important contents:

    solid > lava > slime > water > empty

The one's complement value of the contents type is the bit number of the
contents bit field. I'm not sure how useful this will be as getting the
amount of overlap is currently not supported.
2011-12-01 12:26:33 +09:00
Bill Currie 7ee31dd475 Allow the trace start to be in multiple leafs.
This fixes a couple of in-solid tests, but something better is needed.
2011-11-28 20:56:21 +09:00
Bill Currie 13d37f4838 Add a bunch of in-solid tests.
Tests where the box is only partially in a solid tend to fail (particularly
when the solid is on the back side of the split plane).
2011-11-28 20:56:21 +09:00
Bill Currie 50b08c98fa Add some snug-fit tests and fix the uncovered bugs.
The tests involve the box fitting into a hole with zero slop (this would be
impossible with point clipping).
2011-11-28 20:56:21 +09:00
Bill Currie 985667ecba Fix plane touching box backsideness.
Because a box has size, even when touching a plane, the side on which the
box is can be determined (unlike a point).
2011-11-28 20:56:21 +09:00
Bill Currie 869cd19260 Box traces can now graze a corner. 2011-11-28 20:56:21 +09:00
Bill Currie 45d55d7e9a Test the simple wedge. 2011-11-28 20:56:21 +09:00
Bill Currie 2c9b07b257 Scale the box edge vectors.
Now they represent the lengths of the edges as expected by the edge/polygon
code.
2011-11-28 20:56:20 +09:00
Bill Currie 60dbc0e342 Fix the last few bugs breaking the distance code.
The code itself seems to work now. There are still some problems: the box
faces are using unit vectors for the edges, or I should go back to unit
vectors for the portal edges; starting in a solid corner won't always work;
etc. However, that's just mopping up: the main algorithm seems to be
working.
2011-11-28 20:56:20 +09:00
Bill Currie 996859c367 Correct the projection code.
That needed to be the intersection of two coplanar lines.
2011-11-28 20:56:20 +09:00
Bill Currie ab2ec644d6 Clip the portals when running the test cases.
When the portals are too big, floats break down and break the tests. This
might not be much of an issue in real maps, but my tests use "infinite"
planes.
2011-11-28 20:56:20 +09:00
Bill Currie 2abff68089 Fix some more silly bugs.
The target test now works, but some others have broken due to getting
negative fractions.
2011-11-28 20:56:20 +09:00
Bill Currie a1da8ecdd0 Fix some silly errors that broke most of the box tests.
Uninitialized variables and crossed signs. Oops :/
2011-11-28 20:56:20 +09:00
Bill Currie 8fc99566ab Add code to clip the motion of the box to the leaf's portals.
Unfortunately, something is broken (all box tests fail due to 0 fraction).
2011-11-28 20:56:20 +09:00
Bill Currie 5ee552ea5b Don't normalize the portal edge vectors.
This simplifies the collision handling code.
2011-11-28 20:56:20 +09:00
Bill Currie 174f381125 Add some more tests for the ramp.
These tests pass, but show the basic polygon testing working (just not the
collision handling and thus fraction determination).
2011-11-28 20:56:20 +09:00
Bill Currie 750b5ba0ed Be a little more lenient with float comparisons.
Unfortunately, Pythagorus and binary don't play well together, so rounding
errors are inevetible when testing with a slope. However, 1e-6 seems to be
a good epsilon (printf's %g hides it nicely :).
2011-11-28 20:56:20 +09:00
Bill Currie 73b93ffd74 Clean up the in_leaf test line. 2011-11-28 20:54:35 +09:00
Bill Currie e3d8394b7a Use the split_plane for the in-leaf test.
This seems to work better (all previously working tests pass again), but
the target test is still broken.
2011-11-28 20:54:35 +09:00
Bill Currie 7b59eaf0cd Use the correct vector for the plane distance.
Oops :)
2011-11-28 20:54:35 +09:00
Bill Currie cde0bbb807 For now, don't use box clipping for point traces.
Until I figure out how I want to handle zero sized boxes, don't test them.
2011-11-28 20:54:35 +09:00
Bill Currie fd5aee1d5e Use the portals to check leaf validity.
If the trace hits a portal on the plane that brought us to the leaf, then
we actually are in the leaf (otherwise, we shouldn't be here and thus
should ignore the leaf). At least, that's my thinking.

Many point tests fail (but they're really using box clipping with a zero
sized box) and two box tests fail.
2011-11-28 20:54:35 +09:00
Bill Currie 297275e3de Create edge information for the portals. 2011-11-28 20:54:35 +09:00
Bill Currie 662c04dfdc Add a function to obtain the unit vectors of a winding's edges. 2011-11-28 20:54:35 +09:00
Bill Currie e41da2f579 Store the start fraction and position in the right stack slot.
Oops. Yay, valgrind.
2011-11-28 20:54:35 +09:00
Bill Currie d61cb25a44 Add code to rebuild the bsp brushes.
Names and locations of declarations are still up in the air, but things
seem to be working assuming my test code is correct.
2011-11-28 20:54:35 +09:00
Bill Currie 853bf13d9e Move the winding code into libQFmodels. 2011-11-28 20:54:35 +09:00
Bill Currie 91e65b6c80 Rename mplane_t to plane_t and clean up the mess.
I got rather tired of there being multiple definitions of mostly compatible
plane types (and I need a common type anyway). dplane_t still exists for
now because I want to be careful when messing with the actual bsp format.
2011-11-28 20:54:34 +09:00
Bill Currie 2f23cfa4d0 Add a new (failing) test case.
This one demonstrates the need for more information in the bsp tree
(surface polygons). When the box collides with a corner where one side is
flat and the other angled, but there's a partition plane cutting the two,
the box can instead collide with the angled side before it hits the corner.
2011-11-28 20:54:34 +09:00
Bill Currie 7a1faee460 Bail out when the trace advances past the nearest collision. 2011-11-28 20:54:34 +09:00
Bill Currie a943cdf2c4 Handle dual collisions.
When the trace collides with something on both sides of a plane, the nearer
collision is required. The code now correctly checks both sides and keeps
the nearer collision.
2011-11-28 20:54:34 +09:00
Bill Currie 0cf5dec5bb Fix the covered step tests.
However,  there is still a problem with moves where the box is always cut
by the plane: both sides need to be tested (done), but when the first side
checked allows longer motion than the second, but still collides, only the
first side is checked. The shorter motion is required.
2011-11-28 20:54:34 +09:00
Bill Currie 8cc320b7ef Move the start point to the near side of the crossed plane.
I'm not sure the end point needs to be moved at all, but I'll leave it
alone for now. I have a couple of failing test cases that seem to be caused
by not handling moves where the box is always cut by the plane.
2011-11-28 20:54:34 +09:00
Bill Currie fa6390a46a Correct the sign for the shift in frac.
However, this is not entirely correct as the new start point when testing
the other side of the plane also needs to be calculated.
2011-11-28 20:54:34 +09:00
Bill Currie b82d9f5894 Another test, another bug.
Fix an incorrect test using offset (forgot to negate).
2011-11-28 20:54:34 +09:00
Bill Currie 9984a2e87a Fix some missing usages of offset.
This fixes my one failing box clip test. Now I need to find more broken
cases. At least now, they should be real tests.
2011-11-28 20:54:33 +09:00
Bill Currie 9d63298032 Tweak a fixme comment.
The code is potentially slow, especially on big maps, but I haven't noticed
any issues yet.
2011-11-28 20:54:33 +09:00
Bill Currie 03abb3b27d Add support for ellipsoids.
Not that boxes work yet, but the fix is the same.
2011-11-28 20:54:33 +09:00
Bill Currie b4da9241f6 Make a fresh start on box clipping.
I even have a failing test to fix :)
2011-11-28 20:54:33 +09:00
Bill Currie 6d2b92125a Make nva a little more memory efficient. 2011-11-15 13:47:05 +09:00
Bill Currie 940476dce1 Do some renaming to make things a little clearer. 2011-10-02 15:07:36 +09:00
Bill Currie a356ce6572 Assume the trace will be allsolid.
Rather than setting allsolid when the trace fails to leave solid space,
clear it when the trace enters non-solid space. This is necessary because
the trace might visit only one node and thus the failure to leave solid
space will not be detected. This fixes the problem with hipnotic's bobbing
water.
2011-09-27 17:14:42 +09:00
Bill Currie 9c6693d567 Correct hull3 and its tests.
I'd gotten the solid/empty parts backwards.
2011-09-27 17:11:57 +09:00
Bill Currie 3e74aa5303 Add trace-qf-bad.c to Makefile.am and testclip.c. 2011-09-27 17:09:04 +09:00
Bill Currie e23ee07b6f Ensure id's trace is properly initialized. 2011-09-27 15:38:28 +09:00
Bill Currie 32ff639bf3 Add an old qf version of trace.c
This version is broken (it's the one "fixed" by commit 981622f9), but it
does behave correctly for hipnotic's bobbing water. The question is, why?
2011-09-27 13:00:19 +09:00
Bill Currie 9daa0b7bde Rename the empty and solid flags, and use them correctly.
seen_empty and seen_solid much better reflect their meanings, and also use
them correctly (eg, visiting an empty node does not clear seen_solid).
Hipnotic's bobbing water is still broken, though.
2011-09-27 12:33:50 +09:00
Bill Currie a7482570b6 Document the geometry in the tests. 2011-09-27 12:30:21 +09:00
Bill Currie aa6b7ef7e8 Add some water based tests.
Unfortunatly, they haven't uncovered the bug.
2011-09-26 21:02:54 +09:00
Bill Currie 800e8cb3da Make the id trace code more readily usable in the engine. 2011-09-26 19:56:00 +09:00
Bill Currie ae0dc6f06b Disable the "shouldn't happen" code.
It causes the tests to fail, and doesn't affect the problem I'm currently
facing.
2011-09-26 19:56:00 +09:00
Bill Currie baf9b7c181 Make the test nodes a little easier to read. 2011-09-26 19:56:00 +09:00
Bill Currie 683adf1850 Print the name and texture number for model skins.
Use SYS_GLT (1024) for gl texture debugging.
2011-09-26 13:03:53 +09:00
Bill Currie d9ab3a1f54 Move the config file/command line parsing into qargs.c
I don't like the COM prefix, but it will do for now.
2011-09-11 14:57:05 +09:00
Bill Currie a71acc9ae5 Move the essential init code into Sys_Init(). 2011-09-11 14:56:47 +09:00
Bill Currie 6fb73b5ae8 Nuke some mystery code.
I have no idea why I did that, but it crept in with the var substitution
fix, so I guess it might have been an attempt to fix a bug, but it looks
like it was broken anyway.
2011-09-11 13:10:14 +09:00
Bill Currie e5add8b4f5 Use dstring_freeze() to cleanup some code. 2011-09-11 13:09:24 +09:00
Bill Currie 8bab548d16 Make the hud type configurable via dirconf.
Currently only "id", "hipnotic" and "rogue" are supported (anything else is
treated as "id"). Has no effect in quakeworld (good thing too: changing
gamedirs is a little broken).
2011-09-11 08:13:26 +09:00
Bill Currie 8e30d3098e Fix asm ilnking in mingw.
It seems that recent binutils/libtool doesn't like exporting symbols that
don't begin with a _.
2011-09-10 17:49:14 +09:00
Bill Currie da7ddc35c0 Fix the segaults when trying to use snd_disk.
It's output is still bogus (and it writes to the current directory!), but
at least the plugin can be used without any nasty issues.
2011-09-10 12:07:18 +09:00
Bill Currie bfd1680c15 Fix a 32/64 bit portability issue. 2011-09-09 19:56:16 +09:00
Bill Currie 999912e49a I thought I'd tested those changes :( 2011-09-09 19:55:54 +09:00
Bill Currie a426dacc8a Add a missing \n 2011-09-09 17:43:48 +09:00
Bill Currie d043e2bf17 Rewrite QFS_FileBase().
It now uses QFS_SkipPath() and QFS_FileExtention() to
find the file's base name.
2011-09-09 17:39:00 +09:00
Bill Currie d92488ce9f Rewrite QFS_DefaultExtension() and QFS_SetExtension().
They now use QFS_FileExtension() to find the correct
place for the extension.
2011-09-09 17:37:45 +09:00
Bill Currie 225f1cd06c Rewrite QFS_StripExtension() to use QFS_FileExtension(). 2011-09-09 17:35:12 +09:00
Bill Currie 96ef0ffaea Rewrite QFS_FileExtension() to be more correct. 2011-09-09 17:33:29 +09:00
Bill Currie 08fa6be9f4 Fix a potential buffer underflow. 2011-09-09 17:30:07 +09:00
Bill Currie 20d056e6c5 Fix my broken warnings fixes.
That's what you get for blinding working on code you don't grok :P
2011-09-08 21:05:33 +09:00
Bill Currie 881d4babce Fix some undefined symbols in snd_alsa.c.
Serves me right for testing with only my debug build :P
2011-09-08 18:10:09 +09:00
Bill Currie 6da725d510 Simplify and slightly improve Cmd_StuffCmds().
Make use of dstring to manage the built command mini-script.
Ensure + and - that do not come after whitespace do not start a new
command.
2011-09-08 12:37:52 +09:00
Bill Currie e8e8dad535 Fix a potential crash with the cvar reset command. 2011-09-07 21:07:52 +09:00
Bill Currie 2ae33a753a Support non-interleaved mmap sound.
Unfortuanately, I can't test this properly as I don't have any such
hardware, but as the code is mosly an edited copy of the interleaved code,
any errors should be easy to fix.
2011-09-07 17:00:57 +09:00
Bill Currie a8ea3aaad9 Allow dma sound targets to specify an xfer function. 2011-09-07 17:00:18 +09:00
Bill Currie 9ffa1f410a Detect the silent death of the jack client thread.
When jackd gets an unhandled xrun, it stops all processing but neglects to
tell the client about it. Thus, add a bit of a watchdog function to
s_update() and assume the client thread is dead if there's no sign of life
after one second. No more hanging on exit.
2011-09-07 15:16:27 +09:00
Bill Currie 581539f7af Make debug printing a little smarter.
When a field or global name is used, the printed value reflects the type
of that variable.
2011-09-07 09:41:06 +09:00
Bill Currie 91f6b7f555 Better use of Sys_Printf. 2011-09-07 09:41:06 +09:00
Bill Currie 39190c5e2c Remove an unnecessary include.
Don't need that :P
2011-09-07 09:41:05 +09:00
Bill Currie deddb5cb6a Partially document the message api. 2011-09-04 09:58:12 +09:00
Bill Currie 9afb691dd9 Change MSG_ReadShort to return an unsigned short.
Avoiding the sign extension by default seems to be more useful.
2011-09-04 09:58:12 +09:00
Bill Currie 12e238f806 Add a function to convert quake angles to a quaternion.
The test works by comparing the result of AngleVectors with forward,
right, and up vectors rotated by the quaternion resulting from AngleQuat.
2011-09-04 09:58:12 +09:00
Bill Currie 1c47f9e16d Kill some magic numbers. 2011-09-04 09:58:12 +09:00
Bill Currie fe3cdbcf5a fix a snafu in quattomat 2011-09-04 09:58:12 +09:00
Bill Currie eb205d73fd Add a function to convert a quaternion to a rotation matrix. 2011-09-04 09:58:12 +09:00
Bill Currie 5c9ab2832f Fix win32 cross-building.
No idea if the code actually works :(
2011-09-04 09:48:16 +09:00
Bill Currie e50f0e18ba Make netmain use netadr_t, same as netchan.
Having sockaddr and friends in a header file was bad news for portability
(especially windows).
2011-09-04 09:45:19 +09:00
Bill Currie 5ee01879ec Missed a spot for net_family. 2011-09-03 16:28:00 +09:00
Bill Currie 80b2b82092 Add a cvar to control the address family.
OpenBSD doesn't allow mixed binding of ipv4 and ipv6, but being able to use
ipv6 enabled qf with ipv4 addresses would be nice...
2011-09-03 13:04:47 +09:00
Bill Currie 29a52a8cc8 FIx it for IPv4, too.
Oops, I forgot about that :P
2011-08-31 18:32:47 +09:00
Bill Currie bfcdc5ed17 Fix qw networking on OpenBSD.
OpenBSD is very picky about the address size, but does provide sa_len and
friends to make life easier. Use them as appropriate :)
2011-08-31 18:07:41 +09:00
Bill Currie f75b0a611b Some compile fixes for OpenBSD 2011-08-25 22:35:20 +09:00
Bill Currie 0d5bebabe2 Replace qsockaddr with AF_address_t.
It seems qsockaddr's assumptions aren't necessarily portable, as OpenBSD
seems to be doing weird things with qsa_family. Even if that's not the
case, this is cleaner.
2011-08-24 09:14:02 +09:00
Jeff Teunissen 1cc2b1b178 whitespace 2011-08-23 01:39:40 -04:00
Jeff Teunissen d2fa1e2479 QW IPv6: lose a pointless assign
We already assign a->family earlier, no need to do it again.
2011-08-23 01:39:40 -04:00
Bill Currie 87ad73f146 Add even more info to the address comparison failure.
It turns out the family check is failing. Why?
2011-08-22 18:34:52 +09:00
Bill Currie ce07000054 Make the address comparison a little more informative.
Still hunting the openbsd connection issues. It seems the address
comparision isn't working.
2011-08-22 10:30:35 +09:00
Bill Currie 1402feafd2 Kill some magic numbers and clean up some whitespace. 2011-08-20 16:30:43 +09:00
Bill Currie cf2845a387 Ensure Sys_Error can not form an infinite loop.
I don't remember what propted this change, but it seems like a good idea
anyway, so get it into the repository and clean out my stash :)
2011-08-20 13:13:43 +09:00
Bill Currie bb065bd233 Be a little leniant with vector param stores.
qcc always used vector stores to load values into the function parameters,
but if the location of the value is too close to the end of the global data
block (the vector spans the end of the block), it would trigger the bounds
check code. Thus, allow such instructions without a murmer, so long as it
actually is a parameter write.
2011-08-16 12:10:05 +09:00
Bill Currie 53049e33eb Make the interface code more portable.
It turns out SIOCGIFINDEX isn't (readily?) available in BSD, but
if_nametoindex() is defined by posix, so use that instead.
2011-08-16 10:03:43 +09:00
Bill Currie 4cec4b9f96 Rewrite the interface detection code.
Turns out SIOCGIFCONF is rather painful to get working cross-platform. This
should work better, and can be used even with ipv6 :)
2011-08-11 18:32:39 +09:00
Bill Currie c1a60551ae Clean up default rate setting and add explicit support for 48kHz. 2011-08-11 17:22:14 +09:00
Bill Currie 5feb0454ca Add and use SYS_SND for both sound and cd debug prints. 2011-08-11 17:20:33 +09:00
Bill Currie 290ac30efc Fix x11 gamma control.
Seems we lost a header include at one stage.
2011-08-11 16:08:20 +09:00
Bill Currie d3c2afc5d7 Handle old global vector compontents.
In the original save gave format, global vectors were saved as individual
components rather than as a single vector, using the _x/_y/_z tags on the
vector name. However, recent qfcc completely dumped vector components as
separate defs, so old save games would have trouble loading with progs
built with a recent qfcc. Thus, do the component translation if necessary.
2011-08-11 15:36:51 +09:00
Bill Currie ff857a9c71 Permit control of single character tokens. 2011-08-11 14:22:27 +09:00
Bill Currie 805256ff65 Use the last used interface address for the socket address.
This allows the correct address to be put in the server info packet
allowing nq to work on multi-homed hosts. More testing needs to be done to
ensure nothing is broken, or better yet, a rewrite of the networking code
to properly associate the information with the packets.
2011-08-06 21:47:57 +09:00
Bill Currie ae9404cc27 Obtain the interface on which the packet arrived.
Once I sort out just how to get the information to the right place, this
should fix a lot of the problems with nq on multi-homed nodes.
2011-08-06 20:33:20 +09:00
Bill Currie 3088566502 Replace get_address() with get_iface_list(). 2011-08-06 18:57:53 +09:00
Bill Currie 6f0ab844ea Some more nq networking debug prints. 2011-08-06 16:54:01 +09:00
Bill Currie eba66b1dde Doc tweaks and some whitespace. 2011-08-02 17:32:36 +09:00
Bill Currie 76f894a29f Add some debug prints for nq networking. 2011-08-02 15:22:57 +09:00
Bill Currie e5876752f3 Document the datagram net driver interface. 2011-08-02 15:22:33 +09:00
Bill Currie e89532cb9f Fix a couple of missed view.h->clview.h changes. 2011-08-02 11:29:20 +09:00
Bill Currie 8e140bc97e Use SYS_NET instead of SYS_DEV for networking debug prints. 2011-07-30 17:44:03 +09:00
Bill Currie 28610c08e3 Do not try to build testsound when not building sound libs. 2011-07-30 15:03:19 +09:00
Bill Currie bf58ad9d80 And silence a "set but not used" warning. 2011-07-29 17:21:33 +09:00
Bill Currie 77dcd07b37 Remove a dead function. 2011-07-29 14:30:54 +09:00
Bill Currie 50341d0972 Whitespace. 2011-07-29 13:51:58 +09:00
Bill Currie 07d5b114bc Clean out some dead code and variables.
We haven't had serial or ipx support for a long time.
2011-07-29 10:11:14 +09:00
Bill Currie 1d57477101 Document the "public" functions of NQ's networking code. 2011-07-26 14:15:41 +09:00
Bill Currie 64881d2eca Finish the docs for netchan.
Also clean out some unnecessary declarations.
2011-07-26 11:30:02 +09:00
Bill Currie 688e5c7e24 Use ncqport_e on the right field.
Well, now, that was incredibly silly, wasn't it? :P
2011-07-23 21:39:13 +09:00
Bill Currie 9ccd570105 Fix a problem with linking FLAC libs. 2011-07-23 21:37:34 +09:00
Bill Currie 3678b610eb Make a start on documenting netchan. 2011-07-23 17:53:06 +09:00
Bill Currie 2035e65bad Make the qport flags a little more doc friendly. 2011-07-23 17:51:07 +09:00
Bill Currie e15771f4a4 Nuke a dead function. 2011-07-23 15:58:45 +09:00
Bill Currie efa0105748 Rename some headers to fix doxygen warnings. 2011-07-23 15:58:45 +09:00
Bill Currie b17e37f802 Remove uneccessary differences between ip4 and ip6 code 2011-07-23 15:58:45 +09:00
Bill Currie 8ac5079ada Get inputlines mostly working.
It should be only behind-the-scenes updates that are still a problem.
2011-07-09 21:16:38 +09:00
Bill Currie 652b434e7b Rework the inputline wrapper.
Use the resource map code for handle management (much safer).
Add support for the enter callback (function or method).

Unfortunately, it still doesn't work due to poor design of the inputline
user data.
2011-07-09 09:44:37 +09:00
Bill Currie 3dd31b7de9 Fix some bugs found while hacking inputlines. 2011-07-09 09:42:11 +09:00
Antti Harri 358a844a42 Implement --version-info configure switch to override QuakeForge
library versioning. From Lasse Collin, thanks!
2011-07-09 01:23:36 +03:00
Bill Currie 4e66a5b327 Add rua rappers for the cvar alias functions. 2011-07-06 19:17:28 +09:00
Bill Currie 6114156b49 Add Cvar_RemoveAlias.
Now aliases can be deleted (needed for menus).
2011-07-05 21:59:47 +09:00
Bill Currie a7291943f7 Fix up Cvar_MakeAlias's error checking. 2011-07-05 21:51:38 +09:00
Bill Currie d2894a6f68 Rename Cvar_AliasGet to Cvar_MakeAliase. 2011-07-05 20:28:57 +09:00
Bill Currie a8245e598e Fix a memory leak.
The command hash table is shared between all progs engine instances, but it
was being allocated for every instance. Ensure only one is allocated.
2011-07-05 19:05:24 +09:00
Bill Currie 6484dd16c7 Finish cvar alias support.
Several functions that manipulate cvars were not checking for aliases.
2011-07-04 21:05:42 +09:00
Bill Currie 0f7390dd60 Clean up all the "set but not used" warnings.
gcc on my system is failing to treat this specific warning as an error :/
2011-06-19 10:48:02 +09:00
Jeff Teunissen 85617586af PCX: display some information on bad PCX files
also, minor whitespace on <QF/image.h>
2011-06-14 13:31:30 -04:00
Bill Currie 42ab0a7dbb Ensure consize is correct in the software renderers.
The software renderers force the console size to be the same as the window
size (no scaling), but they weren't telling the console of the resize.
oops. Fixes the crash when running the software renderers with default
sizes.
2011-06-14 17:54:53 +09:00
Bill Currie c57d252dd4 More "set but not used".
Why is finding them so unreliable for me?
2011-06-14 06:26:10 +09:00
Bill Currie 607a4be2e2 Fix a "set but not used" warning/error.
I'm not sure what I had planned with "list", so I just commented it out
with FIXMEs.
2011-06-13 16:44:30 +09:00
Bill Currie b18ff4ed3e Move test-qfs.c into a test directory.
Same as before: avoiding -prefic-pic issues.

Also, catch some minor snafus found in the previous commit. With this, make
distcheck passes again :)
2011-06-12 16:34:15 +09:00
Bill Currie c522726021 Move the testclip program into its own directory.
Same as with the audio test program, this is to avoid issues with
-prefer-pic.
2011-06-12 16:12:52 +09:00
Bill Currie 47201137d5 Make the default cd plugin configurable.
The default default is file, but now distribution maintainers can change it
if necessary.
2011-06-04 17:19:18 +09:00
Antti Harri 8d1bd58ade snd_dma.c fixes for non-power-of-two values. From Jacob Meuser. 2011-06-04 09:47:15 +03:00
Antti Harri 67c7796c0b Change default music backend from OGG to CD. 2011-05-31 00:05:35 +03:00
Antti Harri 65789d22d9 Fix PNG build and use AM_CPPFLAGS instead of INCLUDES that is obsolete. 2011-05-28 10:47:11 +03:00
Bill Currie 74a7e07dfc Use AM_CFLAGS instead of CFLAGS.
CFLAGS is meant to be reserved for the user.
2011-05-10 12:44:44 +09:00
Bill Currie f17b1275ea Undo an accidental commit. 2011-05-10 11:48:38 +09:00
Bill Currie 77ccf8a824 Build the audio libs before the test dir. 2011-05-10 11:32:38 +09:00
Bill Currie f7a95ec2f4 Move the test program into its own directory.
This is to avoid issues with -prefer-pic (really need to clean things up
properly).
2011-05-10 11:25:12 +09:00
Bill Currie d3771dfeba Resolve some inlining issues in recent gcc. 2011-05-04 09:31:18 +09:00
Bill Currie bc2174d92b Remove some dead variables reported by Spirit. 2011-05-04 09:30:38 +09:00
Bill Currie 2a2a431431 Register a complaint when the map has too many entities.
I was wondering why that parrot was dead.

Not realizing that negke's coag3 map had too many entities really ruined
the pleasure of playing it, so it's best to treat such situations as an
error (max_edicts can be bumped up to 32000 if need be, but 2048 is plenty
for his map).
2011-04-17 20:06:20 +09:00
Bill Currie 47e55fe1c6 Properly terminate each fisheye quad strip.
The horizontal quad strips need to be rendered individually rather than as
one single strip. The latter results in ugly triangles crossing the screen.
2011-04-17 13:03:22 +09:00
Bill Currie 55cc0f9206 Bring back the unsigned type (PROGS version bump)
This is only low-level support (the unsigned keyword still does not work),
but sufficient to make switch statements using jump tables work.
2011-04-09 10:07:47 +09:00
Bill Currie 2bacfdabf2 Interpret func fields as selectors for entities with objects. 2011-03-30 20:19:31 +09:00
Bill Currie c8e1d7b45a Fix the API for inputline->enter().
Pass the inputline object rather than the input text, allowing access to
both user_data and the input text.
2011-03-27 08:03:39 +09:00
Bill Currie 84afc458fa Allow the menus to overide the Escape key. 2011-03-25 18:02:59 +09:00
Bill Currie 2be07fd652 Keep the the temp string out of progs for sprintf.
There's no need for the string to be in progs memory when printing as the
end result will be moved into progs memory regardless.
2011-03-24 11:45:58 +09:00
Bill Currie b0d1e782ee Treat allocating less than 1 byte as an error. 2011-03-24 11:10:08 +09:00
Bill Currie 1822290b1a Fix the double offset of inputline text. 2011-03-24 08:50:32 +09:00
Bill Currie bc0cffc9c6 Fix handling of autorelease pools in the menu code.
Create a "menu_pre" function that creates the autorelease pool, change
menu_post() to release the pool correctly, and make the menu internal code
require and call menu_pre.
2011-03-21 13:14:14 +09:00
Bill Currie 7c113a12db Make zone errors a little more useful. 2011-03-20 15:50:09 +09:00
Bill Currie 025c39cc02 Ensure stdout is flushed in the progs signal_hook() 2011-03-20 13:35:59 +09:00
Bill Currie 104c29e4da Avoid a segfault when the called function is invalid.
This is most likely to occur when dumping code from qfo files with external
functions.
2011-03-20 13:35:12 +09:00
Bill Currie f20424afe5 Make "bad type" output more useful.
Print the four (assumes non-v6) values in hex rather than "bad type".
2011-03-17 20:35:14 +09:00
Bill Currie ebfbd7c358 Disable the unsigned comparison instructions.
They need unsigned support, or special treatment, so they have to wait.
2011-03-17 20:33:38 +09:00
Bill Currie bce3935ea6 Add a void address instruction. 2011-03-10 19:28:03 +09:00
Bill Currie 90de6b0499 Add a movepi instruction to support indirect moves of fixed size. 2011-03-09 10:29:24 +09:00
Bill Currie 18005cc80d Rename move to movei. 2011-03-09 10:28:40 +09:00
Bill Currie 6c4563b21d Change movep's name from <MOVE> to <MOVEP>. 2011-03-09 10:25:20 +09:00
Bill Currie 4432bc0bef Make the offset in zone dumps more useful. 2011-03-08 22:44:56 +09:00
Bill Currie 5b8345eecb Do not try to print values from null entities. 2011-03-07 08:28:20 +09:00