Commit Graph

322 Commits

Author SHA1 Message Date
Bill Currie 06da30ac89 mingw build fixes again (including mostly working in sid: got some link issues) 2001-09-25 06:18:30 +00:00
Bill Currie 36de3c147e move Sys_Quit and Sys_Error totally into libQFutil. They will call a list
of pre-registered (Sys_RegisterShutdown) function before actually exiting
the program. This should take care of the pain when an ncurses server
crashes.
2001-09-24 21:00:23 +00:00
Ragnvald Maartmann-Moe IV e2f14519fb Merge world.h. Also reduced smoke particle textures from 8 to 1, a considerable speedup through reduced texture thrash... 2001-09-24 17:52:13 +00:00
Ragnvald Maartmann-Moe IV d247027954 Use a callback for gl_multitexture which sets gl_mtex_active (now a qboolean, rather than a macro). 0.6-1.0% speedup. 2001-09-23 03:24:23 +00:00
Adam Olsen 07b0d91900 - add a NUM_FOR_BAD_EDICT function, which doesn't care if it's a bad
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 ;)
2001-09-23 01:29:52 +00:00
Bill Currie 49a85718f8 total nukage of Con_*Printf calls from libs (except for video). Sys_*Printf
(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.
2001-09-21 04:22:46 +00:00
Bill Currie bdf45386f0 some minor work getting the client side of libQFconsole working, but nowhere
near complete.
2001-09-19 03:39:04 +00:00
Bill Currie dd98622859 x11 vid_fullscreen improvements from james (thanks) 2001-09-18 04:53:01 +00:00
Bill Currie aade80a8d7 /finally/, libQFconsole is being used (qw-server only so far). Still has
some minor nits with ncurses and probably has some isues without ncurses
(quit didn't seem to work when I tried).
2001-09-16 05:41:28 +00:00
Ragnvald Maartmann-Moe IV 431ac4eedb Convert particles to use byte colors instead of float. Roughly breaks even on Mesa on my machine. Should be a speedup under other drivers. 2001-09-14 12:11:54 +00:00
Bill Currie def8bb3cd5 LordHavoc's VectorIsNull changes from 0.3 but as VectorIsZero (no such thing
as a `null' vector) plus a couple of other bits from his patch.
2001-09-11 05:18:15 +00:00
Bill Currie a046592741 make dist fixes 2001-09-11 03:42:03 +00:00
Bill Currie 74e9f89e8c forward port the client info string filtering from 0.3 and remove info.h from
a couple of c files that no longer need it.
2001-09-11 03:10:29 +00:00
Bill Currie 388513e005 several fullscreen toggling improvements including window location restoration 2001-09-10 16:53:33 +00:00
Ragnvald Maartmann-Moe IV 0d0e570676 Small particle trail speedup/legibility/flexibility improvement, at price of redundant code in sw/sw32. Tradeoffs. *sigh* 2001-09-07 05:37:11 +00:00
Bill Currie 3a9191760f some minor improvements 2001-09-07 00:11:22 +00:00
Ragnvald Maartmann-Moe IV 419585b6f2 Obvious optimization missed by a certain tired coder. Thanks to LordHavoc for pointing it out. 2001-09-06 01:09:51 +00:00
Bill Currie 008d80df67 s/IMT_DEFAULT/IMT_0/g for the constant and move the name-enum entry for
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).
2001-09-05 21:22:55 +00:00
Adam Olsen 9ab9764b7a - Change QA_alloc to use variable-arguments, allowing for a much more
extensible interface.
2001-09-05 18:23:38 +00:00
Ragnvald Maartmann-Moe IV 55f0fed0b6 Replace lhrandom with qfrandom, a different convenience macro with better random number distribution (see man 3 rand). 2001-09-05 06:20:45 +00:00
Ragnvald Maartmann-Moe IV d2c041cae6 Remove and ifdef out currently unused code. 2001-09-05 04:25:47 +00:00
Ragnvald Maartmann-Moe IV 75aaccf9f0 Prettier, but slower particle effects. Also skip particle physics when r_particles 0. 2001-09-05 02:04:02 +00:00
Ragnvald Maartmann-Moe IV 9f3bc7f36f Remove a no-longer needed note. 2001-09-04 11:06:49 +00:00
Ragnvald Maartmann-Moe IV 65c526c057 Some minor cleanups, and lots of particle effects tweaks.
Less blinding rocket trails is probably the most noticable change, other than a nice speedup in nq timedemos. Little change for overkill, though. Aw...
2001-09-04 10:32:51 +00:00
Bill Currie dc4cd343b5 id's sky code is back (gl_sky_clip 2 when no skybox is loaded). Not as fast
as the black polygons (duh:) and not as nice looking as the sky dome, but also
not as slow (fps when standing in the normal coridor looking at the sky in
start: 26 for skydome, 37 for id skys, 44 for black). Good for when you want
to see sky other than black but your card can't handle the fillrate
requirements of skydome. I'll clean up the sqrt in there soonish.
2001-09-03 06:12:10 +00:00
Adam Olsen f1a016c8a5 - Refine the Cache_Get callback, to use a void * instead of a char *
- Switch alias models over to Cache_Get/Cache_Release
2001-08-31 12:22:45 +00:00
Adam Olsen 6cab8cf4e0 - change Cache_Get calls to Cache_TryGet (which I just added), so they
can tollerate failure.
- minor error message tweak (an emptry string is not NULL!)
2001-08-31 03:48:26 +00:00
Bill Currie 7aa5ab75de header dep cleanup and IN_LL_Commands is /gone/ 2001-08-30 20:32:27 +00:00
Bill Currie 822e637e11 s/_windowed_mouse/in_grab/ and in_grab and in_dga now use callbacks 2001-08-30 20:04:13 +00:00
Bill Currie d81d7fd02c glColor cleanup 2001-08-30 18:24:19 +00:00
Adam Olsen e149094bd2 - rename Qalloc and friends to QA_alloc
- add a QA_strdup
- add Cache_{Add,Remove,Get,Release}, for the locking version of the
  cache
- Convert libs/audio/* over to locking cache functions
2001-08-30 11:37:50 +00:00
Bill Currie 0d55476711 make VectorSubtract and VectorCompare macros and clean up the readability
of R_DrawParticles
2001-08-29 20:19:54 +00:00
Bill Currie 3656d6fd59 compile fixes for win32 and take the pruning shears to *sys*.c in qw and nq
(they're not done yet, though)
2001-08-29 17:45:53 +00:00
Adam Olsen f423b8a8e0 Preliminary Qalloc implimentation. Not yet used. 2001-08-29 04:52:03 +00:00
Bill Currie 13ecebd6a0 make Z_Malloc and friends more useful by allowing multiple zones 2001-08-28 05:21:30 +00:00
Bill Currie 2f9fd74a31 zone.c gets its name back 2001-08-28 04:24:40 +00:00
Bill Currie a9d6bc9a30 total nukage of #ifdef QUAKE2 (R_DarkFieldParticles is present, just unused) 2001-08-27 23:21:09 +00:00
Bill Currie 3edd4550d2 heh, nor do we need PROGHEADER_CRC 2001-08-27 21:13:00 +00:00
Adam Olsen 36786400ad Doh, need this header change to compile. 2001-08-26 10:13:03 +00:00
Ragnvald Maartmann-Moe IV 06dd45bdb1 Merge common lighting code. Still some lightmap-related code in *_rsurf.c that might be mergable. This is the first step towards 3 component lighting for the sw32 renderer.
Note that gl_lightmap_components is now r_lightmap_components, and gl_dlight_lightmaps is now r_dlight_lightmaps.
2001-08-25 23:23:14 +00:00
Ragnvald Maartmann-Moe IV c6266aba36 sw32. Flee in terror. This'll break compilation for everything until -sdl32 compiles. sw32 wont work for a while either, so don't get overly excited yet. 2001-08-25 02:47:11 +00:00
Adam Olsen cad42cbc78 Put the sound renderer in it's proper place: as a full-fledged plugin.
Bugs expected.  Please report them :)
2001-08-23 04:01:46 +00:00
Adam Olsen 17ba7ef92f - move alot of the builtins to libQFgamecode_builtins
- move the init into qw and nq
2001-08-22 03:24:25 +00:00
Adam Olsen 1314c89b6c - add libs/gamecode/builtins subdir, with libQFgamecode_builtins.la
- add .gitignore files
- fix building :)
2001-08-21 22:34:20 +00:00
Ragnvald Maartmann-Moe IV 36395e1681 Minor comment updates, Imt->IMT in a few function names, and accel->amp for input amplification (once known as sensitivity). 2001-08-17 07:26:01 +00:00
Zephaniah E. Hull 80696badc7 kgt->imt, and imt now displays the current IMT. 2001-08-17 07:06:01 +00:00
Adam Olsen 62813111a0 yet more IE stuff 2001-08-16 23:34:49 +00:00
Adam Olsen 92729ff6b2 More changes to input events 2001-08-16 22:27:22 +00:00
Adam Olsen 916b503f14 Some basic stuff for input events. Not yet used. 2001-08-16 21:08:17 +00:00
Bill Currie 1c12dd804c ok, old configs /should/ work again, though I'm having problems with F10
not quitting (mind you, I'm not connected)
2001-08-16 20:42:57 +00:00
Bill Currie b0cb351fba bind and unbind wrappers for in_bind and in_unbind. old configs/mods are
still currently broken because I need to translate key names still.
2001-08-16 19:10:35 +00:00
Zephaniah E. Hull 20adccc9e4 A few things, first is that I removed the (rather broken) serial
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.)
2001-08-16 09:19:36 +00:00
Bill Currie 9ee3450265 extend the hash api to more easily support general cases 2001-08-16 02:51:53 +00:00
Zephaniah E. Hull 8f011f91ec Length is now a #define, not a bloody function! 2001-08-15 23:01:56 +00:00
Jeff Teunissen 61bb65fa3f Committing some old stuff I hadn't before. This one: removing a variable
name from a prototype.
2001-08-15 22:29:09 +00:00
Ragnvald Maartmann-Moe IV cddaa521cc Change loadas8bit to snd_loadas8bit. 2001-08-15 00:53:37 +00:00
Bill Currie dd16a1c4d5 call the IE init ans shutdown functions. still need to rework the rest of the
intput system to use it.
2001-08-14 00:03:03 +00:00
Bill Currie 07a09e0812 statement printing now infers the type of a def from the instruction where
possible, thus allowing anonymous defs to print their contents.
2001-08-13 23:49:04 +00:00
Bill Currie 283b0e1a21 change the types of the statement operands to unsigned short to clean up
most of the uses
2001-08-13 21:09:00 +00:00
Bill Currie 2a6830d2d8 revised dynamic string handling. allows for `bounds checking' 2001-08-13 20:01:37 +00:00
Bill Currie bbef4b0b6f ugh, I hate the need for this, but it's needed. sv_old_entity_free is my
compromise :) set it to 1 to allow progs like MegaTF to work (reload crash).
2001-08-12 04:14:25 +00:00
Adam Olsen 6414897dae got a few new operators for qc :)
<< >> % which all act like their C counterparts
+= -= *= /= &= ^= |= <<= >>= %= which just expand into the obvious,
also like the C versions.
2001-08-10 16:17:00 +00:00
Ragnvald Maartmann-Moe IV b868a09661 Kill off gl_view.c and sw_view.c. Renderer merge is more or less complete now. Software and gl renderers now calculate color shifts the same way, and sw looks a bit different now. Powerups don't shift enough in sw right now, IMO. 2001-08-10 00:28:57 +00:00
Bill Currie ac9dace768 add focus loss/gain events and fix a silly bug in IE_Set_Focus 2001-08-09 23:43:13 +00:00
Bill Currie bc34529a80 code for the input event system 2001-08-09 23:16:54 +00:00
Bill Currie c96a092f4e header for an event based input system 2001-08-09 22:35:41 +00:00
Bill Currie 081d8f3c47 ^ and ~ operators for qc (^ from Rhamphoryncus) and clean up the punctuation
line in qc-lex.l (why didn't I think to do that in the first place?!?)
2001-08-09 16:34:46 +00:00
Bill Currie dcc6a76313 make SURF_LIGHTBOTHSIDES work and fix a bug in Mod_PointInLeaf that was
preventing grenades from lighting up surfaces when using the vis lighting
2001-08-05 05:59:15 +00:00
Bill Currie 8883bbb369 some lighting fixes. not quite there yet 2001-08-05 05:07:49 +00:00
Bill Currie 647d38fa40 Make R_MarkLights use the vis info to speed things up. Oddly, even though
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.
2001-08-05 04:01:45 +00:00
Adam Olsen dc98a63098 Add a getfunction, which gives an error if it's not found 2001-08-04 23:44:50 +00:00
Bill Currie f9e85cdf8a split up mleaf_t's minmaxs into two arrays 2001-08-03 23:54:09 +00:00
Adam Olsen ae133d0a90 Modify progs to add builtins at runtime. It should be trivial to
lookup functions by name, and make all our new QC builtins allocate
numbers automatically.
2001-08-03 06:40:28 +00:00
Ragnvald Maartmann-Moe IV 6e9b51edfc (Optionally) Use glTexSubImage2D for lightmap updates. Doesn't give as large a boost as I'd hoped, but will matter far more as other optimizations happen. New cvars gl_lightmap_align does nothing yet, and gl_lightmap_subimage only works in mode 0 and 1. Mode 2 (should be fastest mode on most cards) will eventully get implemented... 2001-08-02 02:18:04 +00:00
Bill Currie fe8738b042 make dist works again 2001-08-01 17:49:25 +00:00
Bill Currie 22878209d6 move the forward decl of hashtab_s out of the function prototype 2001-08-01 06:51:06 +00:00
Bill Currie fb26d8b18a make Info_Set* take flags indicating wether funchars should be stripped or not 2001-07-31 18:27:49 +00:00
Bill Currie 6cb2cb5bdc start making the rotated bounding box (really dynamic clipping huls) more
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 :)
2001-07-30 04:33:59 +00:00
Bill Currie c248372e20 Initial integer type support. qfcc /is/ partially broken when it comes to
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
2001-07-23 01:31:22 +00:00
Bill Currie 22c9716b56 rename int_var to integer_var 2001-07-22 20:20:46 +00:00
Bill Currie d6f82b6370 make Qwrite's buffer pointer const. 2001-07-22 18:38:59 +00:00
Bill Currie 55ac55c7ac rename ev_int and ex_int to ev_integer and ex_integer. create type_integer
and def_integer (do I need that?), clean up and or coment on XXX and FIXME
2001-07-22 06:59:12 +00:00
Bill Currie 7e8c75f7c9 forgot to commit this 2001-07-22 03:23:15 +00:00
Bill Currie 46176e1094 azerty kb patch from Filip Van Raemdonck <mechanix@digibel.org>. includes some
misc fixes, too
2001-07-19 21:46:34 +00:00
Bill Currie edcc313501 debug info for local variables is now used. only works when tracing atm:/ 2001-07-19 07:27:14 +00:00
Adam Olsen a771b5bd6c Make edicts command support a search string, so it only prints edicts
with matching classnames.  Makes it easy to print out the type you want
for debugging :)
2001-07-19 03:18:11 +00:00
Bill Currie e9ed59ec27 add an integer type. not yet properly supported 2001-07-18 15:40:32 +00:00
Bill Currie 02e021a958 get the progs /loader/ name and prototype sorted out properly 2001-07-18 02:21:57 +00:00
Bill Currie 159bc6147c create an "input line" object for the console so Con_ProcessInput can be used
in verious contexts
2001-07-17 16:46:51 +00:00
Bill Currie bab80a0648 move the special keys out of the way of ascii codes (unless they represent
ascii codes (eg, K_ENTER)) and remove the magic number for the number of keys.
2001-07-17 15:51:56 +00:00
Bill Currie fcaa687d56 plugin.h:
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 :)
2001-07-16 23:17:52 +00:00
Bill Currie 104701a8c5 the beginnings of the console lib (using plugins for the client/server type
consoles). Currently, doesn't affect anybody other than the need to
re-bootstrap.
2001-07-16 20:41:10 +00:00
Bill Currie 1c9e1b176f fear the mighty const correct patch 2001-07-15 07:04:17 +00:00
Bill Currie 66c8f00dc7 print out source line numbers when available 2001-07-14 23:53:59 +00:00
Bill Currie f4976e8133 more const correctness 2001-07-14 23:50:18 +00:00
Bill Currie 2818d720c2 move the full info opcocde table from qfcc to gamecode (<KURGON>There can be
only one!</KURGON>:) and use the table in PR_PrintStatement. This means that
qfcc now links against libQFgamecode as well as libQFutil
2001-07-14 02:34:16 +00:00
Bill Currie eae97539c2 beginnings of debug info for progs 2001-07-13 06:08:50 +00:00
Bill Currie 7ca4383790 move a Key function out of console and into keys.
replace a Con_Print call with Con_Printf ("%s", ...) (I want to make Con_Print
private)
2001-07-11 19:17:58 +00:00
Bill Currie f9f31ad4b3 ncurses console for the server. input handling is currently a nasty bit of
code duplication, but it seems to work nicely (except for cursor movement
keys) and even gives tab completion to the server :)
2001-07-10 22:36:22 +00:00
Bill Currie ecff96258f cmd.[ch]:
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
2001-07-10 18:25:54 +00:00