Commit Graph

1138 Commits

Author SHA1 Message Date
Brian Koropoff 4074999b9b Numerous enhancement and fixes to GIB, including index ranges, fixed
escape characters, and more.
2002-05-08 23:01:07 +00:00
Bill Currie 44f9700ed2 two spelling correctsions are remove a redundant VectorCopy 2002-04-30 16:37:11 +00:00
Bill Currie 93febb90c9 search for .gz first 2002-04-30 04:39:03 +00:00
Brian Koropoff 942b3c2744 Floating point value of fov is now used. 2002-04-29 22:03:33 +00:00
Bill Currie 08f12355c5 this /should/ fix CoolMoDee's autoconf 2.53 issues 2002-04-29 19:19:26 +00:00
Bill Currie a1fef28b60 fix the sw32 fov caps so it maches sw and gl 2002-04-29 17:21:52 +00:00
Brian Koropoff 601736719d Fixed the use of double quotes in chat messages and removed single quotes
as an option to enclose tokens.
2002-04-29 01:04:29 +00:00
Jeff Teunissen 2711cbbe7c Don't restore gamma if it's never been initialized. :) 2002-04-28 09:03:50 +00:00
Brian Koropoff ff901a312f Added argument-list functions to EXP with trig and inverse trig functions
to start.  More will follow.  Switched to doubles from floats and allowed
numbers with exponents to be parsed properly.  Also changed the number of
significant digits printed to 10.  Changed fov so it is now capped at 1,
not 10.  The float value of fov is now used instead of int, so more
precision can be attained at small values.
2002-04-28 08:30:54 +00:00
Bill Currie a59e509033 Multi_key (K_COMPOSE) and Menu (K_MENU) are now supported 2002-04-27 00:25:40 +00:00
Bill Currie a5dc496c38 support the printscr key in X 2002-04-27 00:07:47 +00:00
Brian Koropoff 7121891895 Fixed Cmd_If_f so that embedded commands work again. 2002-04-26 22:09:28 +00:00
Jeff Teunissen 411ade4ce2 Fix gamma again. Also some minor whitespace and slight code cleanup. 2002-04-26 20:25:01 +00:00
Bill Currie ac73653741 XPutImage returns 0 for success, not error 2002-04-26 18:55:37 +00:00
Bill Currie 9399b35b02 alpha compile fix 2002-04-26 17:15:00 +00:00
Bill Currie 89f7604d40 VID_GetGamma neither compiles nor is needed :) 2002-04-25 21:54:07 +00:00
Chris Ison 54ed05e52b changed sig handling to allow for core dumps etc, like x11 and glx 2002-04-25 21:51:47 +00:00
Jeff Teunissen b75d50d088 X11 gamma restoration now works properly for systems with a normal gamma that
uses all three components (red, green, blue).

Next up: three-component internal gamma.
2002-04-25 20:53:15 +00:00
Jeff Teunissen c877ba7fbd System gamma is now restored properly in X11. 2002-04-25 20:28:15 +00:00
Bill Currie 45e98d80d9 redo the cvar vector reading code to produce more useful results 2002-04-25 20:08:18 +00:00
Bill Currie ce1c2e0bd1 sort the sources list 2002-04-25 19:39:26 +00:00
Jeff Teunissen 7c134a6f95 Fix up the watervis stuff. Whoops! :) 2002-04-25 14:34:15 +00:00
Jeff Teunissen 5b069de40c Redo r_wateralpha so that it doesn't force its value based on the watervis
serverinfo. Instead, create a new cl_wateralpha float variable that is set to
r_wateralpha->value in Host_Frame, and use that float during rendering.
2002-04-25 12:51:04 +00:00
Bill Currie da994c16e5 rewrite R_SplitEntityOnNode to be itterative rather than recursive (using
a static `stack') to avoid the function call overhead. this cuts about 40%
of the execution time from this function.

No matter what I tried, best results were obtained using __builtin_expect,
so make sure non-gcc compilers do the right thing when they encounter it.
2002-04-25 04:32:55 +00:00
Brian Koropoff bf323c3f0a Cleaned up Cmd_Args. It is no longer uselessly built up in
Cmd_TokenizeString since I realized the code was just pulling it apart and
putting it back together.  Added Cmd_Argsu to access the unprocessed
command.  Added support for else following if in such a way that
if/else if/else structures work.  Added support for unary operators in
EXP and added the ! (not) operator.  The ifnot command will be kept
for variety.
2002-04-24 22:33:04 +00:00
Bill Currie e4975cd675 very minor load-time optimisation 2002-04-23 17:23:18 +00:00
Brian Koropoff 7f295d61ee Added the getserverinfo command to return the value of a server info key
to GIB.  Fixed a bug in dstring_replace that was causing too much data to
be copied when the incoming string was larger than what was being replaced.
Very minor reorganization in cmd.c (1 function moved around I think).
cmd.c should probably get broken up into separate files soon.
2002-04-23 07:47:24 +00:00
Brian Koropoff 349fbf7150 Fixed a bug with escaped braces and quotes and added the strlen and streq
commands to GIB.
2002-04-22 04:23:36 +00:00
Bill Currie 4ccc9d6322 dstring.c dstring.h:
add dstring_replace. this replaces a string of lenth rlen at position
	pos with data of lenth len, growing, shrinking and shuffling data as
	appropriate. At this rate, the dstring `class' will get buffer gap
	editing capabilities :)
cmd.c:
	Cmd_TokenizeString builds cmd_active_buffer->line again.
	Cmd_Process bails out instantly if cmd_active_buffer is a legacy buffer
	and uses dstring_replace to modify the parameters in
	cmd_active_buffer->line. This last change results in drastic
	simplification (and accuracy) of the commandline reconstruction code,
	both in Cmd_TokenizeString and Cmd_Process.
2002-04-19 22:54:27 +00:00
Bill Currie ef81af9245 the "two birds with one stone" commit
1) when /not/ building static plugins, the plugin info name is, once again,
   PluginInfo, but is still type_name_PluginInfo for static plugins. This
   allows plugins to be symlinked (highly desirable for the debian packages,
   and likely others). This also requires plugins to /not/ be loaded with
   RTLD_GLOBAL.
2) because of 1, snd_alsa_0_9 has to explicitly load libasound itself. This
   just happens to fix my segfault on shutdown in RedHat 6.2.
2002-04-19 20:08:54 +00:00
Bill Currie e34ab5541c munmap the sound buffer when closing the device. This might help with some
hangs on shutdown.
2002-04-17 21:15:19 +00:00
Brian Koropoff 4cb89c69b2 Moved commands from bound keys into a separate buffer, changed the syntax
of for loops to be like that of C, changed math expressions to be
enclosed in #{} instead of #().
2002-04-17 07:05:43 +00:00
Brian Koropoff fafb014bbe Oops. Fixed a stupid bug that broke having more than one embedded command
in a token.
2002-04-17 01:15:10 +00:00
Brian Koropoff cb79de3584 Completely redid the way embedded functions are subroutines in general are
handled, meaning that execution can be paused at any time without a hitch.
Warning: This is a major change to the architecture (or lack thereof) of
GIB.  Please test for bugs!  Also, there are a few ugly bits of code that
need to be cleaned up, but that work for now.
2002-04-16 23:56:21 +00:00
Jeff Teunissen a4f3973ef1 Add multitexture support for Alias models, and disable the multitexture
support for BSP models, until they can be fixed. gl_multitexture should now
actually be a speedup!

NOTE: Some OpenGL implementations have trouble with the texture function
used. 3Dfx Voodoo 1/2 are known to have this trouble. I don't know how to fix
this, or even if it can be fixed. :/
2002-04-16 16:51:35 +00:00
Bill Currie 55a5c39187 Turns out that on PPC, va_list is an array (effectivly typedef struct
__va_list_tag va_list[1];) which causes grief when attempting to reuse
va_list variables (eg, in vsnprintf retry loops). This is the reason for
MisterP's crashes as the pointers in va_list no longer point to valid data.

acinclude.m4:
	shamelessly steal the va_list, va_copy and __va_copy macros from
	cdda2wav but modified so AC_DEFINE includes the description (so
	acconfig.h can remain gone)
configure.ac:
	use AC_TYPE_VA_LIST, AC_FUNC_VA_COPY and AC_FUNC_VA__COPY
dstring.c:
	stash the incoming va_list args in a temp var before calling vsnprintf
	then restore them each time before retrying, but only if va_list is an
	array (hopefully this is ok for when va_list is a structure)
2002-04-15 22:17:02 +00:00
Chris Ison 347cdc5e33 some small performance optimizations with textures and animations 2002-04-15 03:26:08 +00:00
Bill Currie 49deaf2661 that wasn't meant to get checked in. it came from an aborted change to
how commands get register.
2002-04-14 22:52:52 +00:00
Brian Koropoff c3da90fce0 You can now assign to local variables with var = value. You can also
index into variables in either substitution (i.e. $bob[25]) or assignment
(i.e. bob[25] = 'q') When using assignment into an index of a var, the
current character is removed and replace with the new value.  That means
that if the new value is longer than one character, the string will grow.
A feature that may be done in the future is indexing between two values
to get a substring, ie bob[25..30] = newstr.
2002-04-14 22:35:56 +00:00
Bill Currie 403af77038 give qc access to Cmd_Return 2002-04-14 01:25:24 +00:00
Brian Koropoff 503dab1aee The tokenizer will now not break tokens appart within quotes or braces.
This means things like echo ~{somefunc arg1 arg2} will get parsed properly
without having to enclose it in quotes.  Exported the Cmd_Return function
so that anything can return values to GIB (such as quakec).
2002-04-14 01:12:19 +00:00
Bill Currie b4c8546169 add the keyhelp command. think xev 2002-04-13 04:56:00 +00:00
Bill Currie 8220ddd83d and the command api to csqc and use it to bind menu_load and menu_save. F2
and F3 now work in nq :)
2002-04-12 17:19:49 +00:00
Bill Currie a974eb2333 move buildnum.c to util and make nq and qw init more similar 2002-04-11 18:42:55 +00:00
Bill Currie ba9ad15ebd it he's if I understand that Draw_CachePic puts the pic into the cache... 2002-04-10 06:56:25 +00:00
Bill Currie 0855e018dd d'oh, bloody gcc 2.95 builtin prototypes 2002-04-10 01:38:21 +00:00
Bill Currie 15e17acc1c the draw api now uses a `real' qpic_t rather than loading the pic every time 2002-04-09 21:38:41 +00:00
Bill Currie 76d004f9cf fix confim_quit 2002-04-09 17:00:39 +00:00
Bill Currie 47a94ed6af clear out the string hash resources completely 2002-04-09 16:21:27 +00:00
Bill Currie 8588d2d1cd fix a silly braino in the resources code that was causing the resource
structs to not get linked into the chain
2002-04-09 16:06:05 +00:00