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.
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. :/
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).
structure to help tidy the command buffer struct up a bit, fixed a few
bugs and probably created 100 more. A lot of things were changed to
allow embedded commands:
- Old buffers on the stack are left alone for Cbuf_ExecuteStack to
clean up. This is so return values can be extracted from them.
- The imperative flag has been added. An imperative buffer and all buffers
following it can not be paused with the wait command.
- The returning flag and retval dstring have been added. If a buffer
returned something, the flag will be set.
- The return command was added so there was something to use in the
substitution. Return nukes all loop buffers since they don't really count
as independent functions, sets the return value on the top buffer, and
clears it.
- Who knows what else.
now recycled, not freed. Fixed some bugs in exp.c. Ready to add embeded
functions (read: function calls with return values) and for loops.
Probably some other misc. fixes, I tend to go on debugging streaks.
Made variable substitution recursive, so ${${foo}} will be the value of
the variable whose name is contained in foo. Added setl command to
manipulate local variables. The only other place they can be used is in
variable substitution.
buffers to be linked into execution stacks and changed aliases and script
files to be run in a new stack frame. Cbuf_Execute executes the stack from
the top down, so wait commands are handled properly.
within braces, and put support for comments back in (oops). To use math
evaluation, put a math expression inside $(). If you have spaces in your
expression, you'll need to enclose the entire thing in quotes so it doesn't
get split up into multiple tokens.
Changed Cmd_TokenizeString to accept a flag that controls the application
of filters (tags, variables, escape characters) to the tokens and modified
a few places in the source that called it. Added a secondary command
buffer that is parsed without filters for legacy command support.
Currently, it is only used for commands stuffed into the console from the
server. It is hacky, and I hope to eventually generalize the console
interface to support any number of buffers and audit the rest of the code
to recognize it. For now, the legacy buffer at least keeps escape
character parsing from destroying info strings.
console command parser. It will eventually include html-like tags for
modifying text (gold numbers, brown characters, etc) and escaped characters.
The major differences so far are that dynamic strings are now used instead
of static buffers, and single quotes can be used to enclose tokens as
well as double quotes.
little odd:
Received signal 11, exiting...
IN_Shutdown
IN_LL_Shutdown
VID_Shutdown
Segmentation fault (core dumped)
but the core file does accurately show the error
about the path it's handed (need to get even more paranoid, though). the
string module just has char replacement so far. Add Draw_CenterPic to
r_progs.c, but this will only last till qpic_t is supported in qc.
the load menu almost works: just need to add key handling and fix a bug in
PF_sprintf
emit.c: convert & (address) to . in unary .
rewrite emit_assign_expr
expr.c: remove debug code and make unary . less agressive on address calcs
also convert & (address) to . for lvals
code into the sw model loading code, remove all refs to r_pixbytes from the
sw renderer (it was never anything but 1), kill libQFmodels_sw32, remove
all the 16 bit code from the 8 bit sw renderer.
code. This fixes blather's `melted models' (sw), the nq alt player model
skins (gl), the arbitrary limits on skins and skin groups in gl, and the
incorrect timing of group skins (animated) in gl.
o add OP_JUMPB
o OP_JUMPB renumberd some opcodes, so up PROG_VERSION
pr_edict.c:
o make the version error reporting more informative
pr_exec.c:
o implement OP_JUMPB (goto *(ptr + index))
pr_opcode.c: (libs/gamecode/engine)
o add OP_JUMPB to the table
expr.h:
o ex_uinteger support
o some const correctness
o prototype new_label_expr
qfcc.h:
o uinteger ussport
o add pointers for op_jump and op_jumpb
o prototype PR_GetArray
emit.c:
o general uinteger support
o new reference/reloc type 3: absolute statement address
o jumpb support (binary goto)
expr.c:
o uinteger support
o break the label name creation out of new_label_expr into
new_label_name
o some const correctness
pr_def.c:
o add PR_GetArray to allocate an array in global space
o factor out some code common to PR_GetDef and PR_GetArray that would
otherwise be duplicated
pr_imm.c:
o some const correctness
o uinteger support
pr_lex.c:
o uinteger support
pr_opcode.c: (tools/qfcc/source)
o support jump and jumpb
switch.c:
o rewrite the binary search code to support ranges.
o add ev_uniteger to the types enum
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
progs.h:
o add uinteger accessors
pr_exec.c:
o implement ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
pr_opcode.c:
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
expr.h:
o prototype inc_users
qfcc.h:
o add externs for op_ifbe, op_ifb, op_ifae and op_ifa
emit.c:
o don't bother emiting an assignment to a temp def that's only used once
(ie, it's never read, only written to)
o support the new if* instructions
expr.c:
o support the new if* insructions
o dectect expression loops in append_expr
o support unsigned integers
o re-work temp def usage counting
pr_def.c
o debugging for temp def usage counts
pr_opcode.c:
o support the new if* instructions
qc-parse.y:
o provide defines for IFBE IFB IFAE IFA
switch.c:
o do binary searches for strings, floats and ints if there are more than
8 cases in a switch. Strings need more testing.
like normal, f_skins reports the average percent fullbright for all loaded
skins, and f_skins skinname reports the fullbright percent for a signle
skin. cl_freply controls the time in seconds before another query can be
made. Set it to 0 to disable them. More queries will be added later.
The table for accessing special characters from the console has been
tweaked a bit. Expect it to get tweaked more in the future.
This required changes to the api (info_t instead of char *) but should be
a net gain in speed (not a lot, admittedly: it was pretty fast to begin
with, but this paves the way for some other changes I have in mind).
- new opcodes for pointers
progs.h:
- prototype PR_Check_Opcodes
pr_edict.c:
- move the static bounds checking to PR_Check_Opcodes in pr_opcode.c
pr_exec.c:
- vector instruction cleanup
- temporarily nuke bounds checking from storep.*
- move base of address results from pr->edicts to pr->pr_globals
- implement new pointer related instructions
- nuke proposed global pointer instructions (not flexible enough)
pr_opcode.c:
- add new pointer instuctions
- re-implement static bounds/invalid opcode checking. no more multiple
case statements to keep track of.
give mst_t a buffer to hold unterminated message strings
kill MSG_ReadStaticString and MSG_ReadStringLine
msg.c:
kill MSG_ReadStaticString and MSG_ReadStringLine
MSG_ReadString: implement the buffer for unterminated message strings
and update readcount on badread
cl_main.c:
go back to MSG_ReadString and fix up the resulting const char * issues
cl_parse.c:
rewrite the cl_mofake code all because of an uninitialized variable :)
sv_main.c:
use MSG_ReadString instead of MSG_ReadStringLine because
Cmd_TokenizeString really doesn't care about a terminating \n
directly into the packet data.
- change a bunch of char *'s to const char *'s for the above. Only
thing that had trouble was the cl_nofake handler, which I changed to
use a local buffer.
- add MSG_ReadStaticString which acts like the old MSG_ReadString,
specifically that it uses a static buffer and tollerates
unterminated strings.
- add a Q_strnlen function, and make strnlen use it if strnlen is
undefined.
- Add a net_svc.h and net_svc.c which will preparse svc messages into
structs, for easier handling. Currently only soundlist and
modellist are done.
segfault if your first call was with "". Probably could cause
crashes too
- add a string.c file to libQFutil, with a Q_strcasestr function,
which strcasestr is defined to if it's not already defined. (we'd
get that with glibc if we defined __USE_GNU, but we don't)
- make client_t and SV_ExtractFromUserinfo both use NAME_MAX for
their name arrays, instead of 32 for one and 80 for the other
- rewrite almost all of SV_ExtractFromUserinfo's name handling.
- \r, \n, and \t are all converted to spaces
- leading/trailing spaces are stripped
- consecutive spaces are reduced to a single space
- empty names are considered bad
- user-* nicks are considered bad (unless forced to them)
- a name containing console or admin is considered bad
- a name that already exists is considered bad
- if they have a bad name it gets forced to user-%d, where %d is
their userid
- netname in the progs is now updated properly
- name changes are always reported unless it's the initial setting,
rather than only if they're full connected and not a spectator
- finally, if the name change fails (info string exceeded), give
them the boot. (before this was only done for duplicate names)
That's about it :)
of pre-registered (Sys_RegisterShutdown) function before actually exiting
the program. This should take care of the pain when an ncurses server
crashes.
value
- switch some prints over NUM_FOR_BAD_EDICT
- change NUM_FOR_EDICT to call PR_RunError on error, instead of
PR_Error. That was it prints out a backtrace.
(I did it in reverse order ;)
(Sys_DPrintf is new) is now used exclusively for all lib printing. Con_Init
sets the sys printf recirection to Con_Print (which has been revamped
appropriatly) and the server sets it to SV_Print (which was SV_Printf and
the new SV_Printf calls /it/). This should fix the rcon print redirection
issues.
IMT_DEFAULT to the bottom of the list so that IMT_0 gets written as such
rather than IMT_DEFAULT.
Also, clean up nq's EF_* dlight creation a bit (haven't touched
EF_MUZZLEFLASH: undecided on what to do).
networking support.
Second, I moves keys.c from qw and nq to libs/video/targets when I did
the next thing.
Existing user configs which do binds, sledge hammer. Sledge hammer,
existing user configs which do binds. *WHACK* *WHACK* *WHACK*
See, much nicer now.
Someone should document it, and fix all targets which don't use SDL for
input. (I honestly don't expect svgalib and the like to ever be fixed.)
R_MarkLights is now about 3% instead of about 15%, I've lost 8 fps on my
null GL speed test. However, R_AddDynamicLights has jumped up a bit, so I'm
wording if maybe more surfaces are being lit.
generice, and also more in line with the rest of quake's clipping system
(ie, support the entity size selected hulls). I'm not /entirly happy with
what's here, but it's a start, and the force fields in customtf work /much/
better :)
integer constants and float function args/return values.
pr_comp.h:
o add the integer opcodes to pr_opcode_e
pr_edict.c:
o add "quaternion" and "integer" to type_name[]
o support quatnernion and integers types when printing values
o support the integer opcodes when bounds checking
pr_exec.c
o enable the integer opcodes
pr_opcode:
o add the integer opcodes to the opcode table
o logical operators all result in an integer rather than a value
expr.h:
o rename int_val to integer_val
qfcc.h:
o kill another magic number
expr.c:
o move the opcode to string conversion out of type_mismatch and into
get_op_string
o rename int_val to integer_val
o general integer type support.
o generate an internal comipiler error for null opcodes rather than
segging.
pr_imm.c:
o rename int_val to integer_val
o support integer constants, converting to float when needed.
pr_lex.c:
o magic number death and support quaternions and integers in type_size[]
qc-lex.l
o rename int_val to integer_val
o support quaternion and integer type keywords
qc-parse.y:
o rename int_val to integer_val
o use binary_expr instead of new_binary_expr for local initialized
variables
builtins.c:
o rename int_val to integer_val
o fix most (all?) of the INT related FIXMEs
defs.qc:
o use integer instead of float where it makes sense
main.c:
o read_result is now integer rather than float
main.qc:
o float -> integer where appropriate
o new test for int const to float arg
enable the cd_data_t entry so func and data structures are consistent.
cd.h:
create cd_data_t (empty)
console.h:
better understanding of how these things work :)
api change: Cmd_Args () now takes a parameter inidcating which arg to
start at for grabbing the un-parsed command line
qw/source/sv_ccmds.c:
implement kk's tell command and user name matching (though # is used for
the wildcard and it's still case sensitive)
everything else:
adjust for the new Cmd_Args protype
implementation of his sound/focus patch. NOTE: only alsa 0.9 is tested
(Rhamph, can you test 0.5, please?) and only the alsa drivers stop the
hardware right ow.
WARNING!!! you /will/ have to re-install your plugins, or you will get
segfaults when the window gains/loses focus.
How do you tell if a window has focus on first mapping in X11?
remove include of glob.h. not needed and causes win32 build to fail
plugin.c:
include compat.h and cast the return of GetProcAddress
gl_funcs.c:
fix parse error and type mismatch
qfgl_ext.c:
half re-write QFGL_ExtensionAddress to use QFGL_ProcAddress
vid_wgl.c:
fix for the new gl linking
Sys_Printf still has the format attribute. To redirect Sys_Printf, declare the
redrecting function as void (const char *, va_list) and call Sys_SetPrintf
with this function as its parameter.
way.. Sys_Printf is now Sys_StdPrintf for now. Sys_Printf is a function
pointer and will end up replacing Con_Printf as well. Names will change
to something intelligent when I'm done. Win32 is not yet touched, but I
haven't forgotten it.
The reason for this is the assumption that Con_Printf and Sys_Printf do
not overlap. The new server console WILL change that, requiring that we
change how we handle both functions. The plan: Default to using stubs
and swap them for full-featured functions on Console init which do all
the things we expect. Will also do a stderr version later.
The major change is that we no longer require libGL to even exist on the
system at compile time for the GL targets, we dynamicly link to the
libGL of choice at run time. (This probably breaks most non-linux
systems, and all GL targets except -glx, some fixup will be needed.)
(This also kills glquake, dead dead DEAD! GONE FOREVER! WHEE!)
Some gl_draw cleanup.
Commented out equake alias model occlusion test stuff, very experimental.
Added the .lo and .la patterns to the .gitignore files.
Some minor sbar cleanup. (We don't use the disc in use symbol for
anything.)
(and thus have a new simpler PL_ObjectForKey() function to get a value for
a key). Also, you can now call PL_FreeItem() on a plitem_t to free a
property list item and all of its descendants (if it has any).
Binary plist values are still not supported.
define PROG_ID_VERSION as 6 and redefine PROG_VERSION as 0x00fff001
(0.fff.001) for the new qc features.
pr_edict.c:
support version 6 and version 0.fff.001 progs
qfcc.h:
add version field to options_t
add min_version field to opcode_t
pr_opcode.c:
set the minumum version of each opcode (gee, that table is getting ugly)
filter out opcodes with too high a min_version when initializing the opcode
hash tables.
qfcc.c:
update help output.
accept --id to limit code generation to id compatable (ver 6) progs.
default progs generation to 0.fff.001
add no_exec_limit field. Set to 1 to disable the runaway loop check
for unlimited runs (eg, in qwaq)
pr_exec.c:
don't bother checking the profile counter if pr->no_exec_limit is set
pr_strings.c:
free unreferenced dynamic strings rather than referenced.
add OP_ADD_S. WARNING!!! this /will/ move.
progs.h:
add prototype for PR_PrintStatement
pr_edict.c:
add OP_ADD_S support in the progs checker
pr_exec.c:
implement OP_ADD_S
tools/qfcc/include/.gitignore:
add config.h.in
qfcc.h:
nuke PR_NameImmediate and change PR_ParseImmediate's prototype (see
pr_imm.c)
pr_comp.c:
add ADD_S, adjust for PR_ParseImmediate's prototype, make
PR_ParseExpression work with non-sequential opcodes (slow, will work on
that next). Fix up initialised global parsing.
pr_imm.c:
nuke PR_NameImmediate. didn't work well and wasn't such a good idea anyway.
PR_ParseImmediate now accepts a def_t * arg. if null, will allocate a
new global def, otherwise it will initialize the def passed in.
qwaq/main.c:
sports some debugging code (dumps info about the progs it's running)
qwaq/main.qc:
better ADD_S testing
quakeio.h -> vfile.h
More diff reduction between trunk and my VFS code. Also took the time to
put some headers in order and fix a few #include's pointed out by moving
things around a bit.
add a crc field to aliashdr_t
model_alias.c:
set it for all models
cl_parse.c:
set the pmodel and emodel info keys to the crcs of the player and eye
models
Don't bother checking vid_gamma for CVAR_ROM becuase it is impossible to
get to VID_UpdateGamma when it is set except for when the cvar is
initially created, and we /want/ the code to execute in that case.
vid.h:
add initialized to viddef_t
vid_common_gl.c:
actually /use/ gammatable (it tends to help)
vid_*.c:
clean up rendundant decls of gammatable, vid_initialized (now
vid.initialized) and make sure vid.initialized gets set.
gl_view.c:
remove gammatable decls
out into r_graph.c (Time and Z graph), cl_ngraph.c (Net graph), and
{gl,sw}_graph.c (R_LineGraph). gl_ngraph.c is gone. Unfortunatly, something
is rather wrong with NetGraph in gl (probably R_LineGraph).
thinking :)
set fs_pluginpath to point to the right dir, and set snd_plugin to pick a sound
plugin.
Current issues:
- alsa 0.5 won't build properly, dunno why
- segfault on exit. I think I know the cause of this, and how to fix it
- alsa 0.9, gus, sgi, sun, and win32 havn't been tested