fteqw/engine/qclib
Spoike e996609c73 added qccgui icon (courtesy of shpuld)
isolated transfers a little.
added preliminary support for r1q2 and q2pro protocols (no zlib).
fixed some missing q2 hud configstrings.
fixed models attached to particles not appearing the first time around.
fixed halos appearing on {foo fullbright textures.
fix particle crash bug from missing particlecubes.
implement r_converteffectinfo (instead of r_importeffectinfo with r_exportalleffects) for convenience. also now more complete and more accurate.
loadfont no longer auto-allocates slot 0.
fix issues with r_dynamic -1
don't restart audio on vid_reload (only reload it). this fixes audio issues with capturedemo with gamedir changes.
fix possible crash from loading sounds during an audio reload/restart.
now listens on both ports 27500 and 26000 when running quake, by default. sv_port or -port args will override.
work around surfedge corruption in some instance of the slide4 map that dimman found.
attempt to nudge players to travel at at least 200qu when travelling vertically through portals. this should help alieviate gravity-induced stuttering issues.
fix nested function types used in conjunction with op_state. now assumes static within the parent.
optimise array indexes slightly.
fix issue with ptr[float].foo
fix some qcc bugs to do with implicit type conversions
fix a portal / angle protocol extension issue, so legacy clients can use portals, they just can't see the other side (nor predict them).
fix q2 victory.pcx issue at the end of the game.
use abort/sigabort instead of sigsegv on linux sys_errors. this should help get people to report stuff better.
reformat the nq server advertising to be more helpful.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4996 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-12-28 17:41:39 +00:00
..
dotnet2008 Added MSVC9 (dotnet2008) & MSVC10 (dotnet2010) project files for QCLIB aka FTEQCC 2011-07-16 11:25:56 +00:00
dotnet2010 Added MSVC9 (dotnet2008) & MSVC10 (dotnet2010) project files for QCLIB aka FTEQCC 2011-07-16 11:25:56 +00:00
vc6 Added MSVC9 (dotnet2008) & MSVC10 (dotnet2010) project files for QCLIB aka FTEQCC 2011-07-16 11:25:56 +00:00
LICENSE GNU GPL V2 2005-06-01 18:33:06 +00:00
Makefile git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4861 fc73d0e0-1445-4013-8a0c-d673dee63da5 2015-04-21 23:11:26 +00:00
byshpuld.ico added qccgui icon (courtesy of shpuld) 2015-12-28 17:41:39 +00:00
cmdlib.h in_forceseat will not break clientcmds any more. 2015-04-27 06:19:33 +00:00
comprout.c fix ogg audio truncation. 2015-09-02 03:12:25 +00:00
execloop.h added qccgui icon (courtesy of shpuld) 2015-12-28 17:41:39 +00:00
fteqcc.rc added qccgui icon (courtesy of shpuld) 2015-12-28 17:41:39 +00:00
gui.h rewrote huge chunks of qcc code to track which symbols were used where. 2015-04-14 12:24:05 +00:00
hash.c rewrote ban code, merging bans+nonbans+cuffs+mute+cripple+deaf+lagged+vip. added timeouts. new penalties have no dedicated command. use the addip command for it. 2014-03-30 08:55:06 +00:00
hash.h rewrote ban code, merging bans+nonbans+cuffs+mute+cripple+deaf+lagged+vip. added timeouts. new penalties have no dedicated command. use the addip command for it. 2014-03-30 08:55:06 +00:00
initlib.c fix gles1 issues (read: android port now works again). 2015-09-14 10:36:42 +00:00
pr_comp.h Reworked client support for DPP5+. less code now, its much more graceful. 2015-07-26 10:56:18 +00:00
pr_edict.c add hud_miniscores_show cvar to hide the mini deathmatch overlay 2015-11-18 07:37:39 +00:00
pr_exec.c fix an issue with bloom by making sure a cvar is created for glsl to use (even if not directly used by the engine). this ensures there's no weirdness with defaults. 2015-09-06 03:30:28 +00:00
pr_multi.c Reworked client support for DPP5+. less code now, its much more graceful. 2015-07-26 10:56:18 +00:00
pr_x86.c add hud_miniscores_show cvar to hide the mini deathmatch overlay 2015-11-18 07:37:39 +00:00
progsint.h add hud_miniscores_show cvar to hide the mini deathmatch overlay 2015-11-18 07:37:39 +00:00
progslib.h add hud_miniscores_show cvar to hide the mini deathmatch overlay 2015-11-18 07:37:39 +00:00
progtype.h Rewritten how arguments and fields are stored. No longer mangles types quite so much. 2013-06-02 06:03:54 +00:00
qcc.h added qccgui icon (courtesy of shpuld) 2015-12-28 17:41:39 +00:00
qcc_cmdlib.c Fix some issues with emscripten. 2015-08-02 11:36:46 +00:00
qcc_pr_comp.c added qccgui icon (courtesy of shpuld) 2015-12-28 17:41:39 +00:00
qcc_pr_lex.c misc fixes and tweaks: 2015-10-27 15:20:15 +00:00
qccgui.c added qccgui icon (courtesy of shpuld) 2015-12-28 17:41:39 +00:00
qccguistuff.c glibc workaround 2015-12-12 19:25:15 +00:00
qccmain.c be more verbose about the port that we're redirected to when acting as an nq client. 2015-09-10 10:16:26 +00:00
qcctui.c Fix some issues with emscripten. 2015-08-02 11:36:46 +00:00
qcd.h threaded loading code and associated/extensive tweaks. 2014-10-05 20:04:11 +00:00
qcd_main.c threaded loading code and associated/extensive tweaks. 2014-10-05 20:04:11 +00:00
qcdecomp.c threaded loading code and associated/extensive tweaks. 2014-10-05 20:04:11 +00:00
readme.txt origional -> original. 2005-07-28 15:52:31 +00:00
test.c revamp fteqcc a little to cope with a.b.c+=f;f++; more correctly/efficiently. 2013-09-26 14:36:52 +00:00

readme.txt

Readme for the FTE QCLib

This library is a library for running QuakeC gamecode. It does not provide any builtins itself.

Features:
	* Multiple library instances, enabling server qc, client qc, and menu qc. There is no maximum instance limit other than memory.

	* Addons, for running multiple progs in any individual instance.

	* Field reassignment, allowing a single engine to support multiple subtly different QC APIs. Also makes additional fields easier.

	* Step-by-step debugging. Requires a text editor of some form, however. A printout of the current line is also useful of course.

	* 64bit support. All strings, globals, and fields are allocated in a consecutive addressable section of memory. This also allows pointers and secure access (not implemented yet, but should be relativly easy bar builtins, which are your responsability).

	* Multiple 'threads'. The library allows a builtin to make a duplicate of the current execution state, or to wipe the current state. This allows sleep commands and fork commands. How handy.

	* Integrated QC compiler. FTEQCC comes as part of qclib. By setting up an interface with a specific value, you can cause it to always run, or run only if it detects a source change.

	* Support for different sorts of progs. Namly Hexen2's, kkqwsv's bigprogs, and FTE's extended format with extra opcodes and possibly fully 32bit offsets. The use of kkqwsv's progs is not recommended - this might be removed at some point.




Quirks:
	* don't use multiple instances of fteqcc at the same time. Compilation will fail.
	* 64bit support requires all strings to be allocated by qclib itself, achivable via a method call. Compatability requires a certain ammount of caution.
	* a fair number of methods are obsolete.
	* An overuse of pointers in the API. There are some macros which you can use to hide some of the dereferences.
	* kkqwsv progs are not reliable. Do not try saving the game. Avoid letting your users know of support.
	
	* Builtin structures are different from original quake. You'll need to convert the arguments to qclib style. This change was required for both multiple instances as well as addon support. It should be straightforward enough.
	* Entity fields are accessed via a pointer from the edict_t structure. This was required to place entity fields within the 64bit accessable section. Changing a . to a -> is not a major issue though. However, there are a lot. do a find and replace of ->v. to ->v->
	* FTE's entities are numbers not pointers. This fact is not made into a big feature as it's kinda incompatable with standard quake. Please do not use numbers directly to refer to ents but instead use the EDICT_TO_PROGS macro which will give protection. This is consistant with standard quake.


Basic usage:
	* refer to test.c for a sample on how to set up the library.
	* refer to progslib.h for the things that I've forgotten to mention.
	* Call the InitProgs function to get a handle to the instance. It takes a parameter which should be set up with some fields. You'll require ReadFile, FileSize, Abort and printf for basic execution.
	* Call the configure function to say how much memory to use, and how many progs/addons to support.
	* Load your progs via LoadProgs. Use a crc of 0 to use any. Otherwise progs will be rejected if it doesn't match. Give it a list of progs-specific builtins too. :)
	* Before calling the spawn builtin, call the InitEnts method. It's parameter stating how many maximum entities to spawn. Using a really large quantity is not much of an issue, as they are allocated as required.
	* Before calling InitEnts, you can tell the VM which fields your engine uses (state all basic ones or none). This will place the entity fields in the same order as your engine expects for entvars_t.
	* Obtain pointers to globals, or just use the globals structure directly.
	* Call the ExecuteProgram method to start execution.
	* Call the FindFunction method to find a function to run in the first place.
	* Call the 'globals' method to retrieve a pointer to the globals (you should always use PR_CURRENT here). Set the parameters with the G_INT/G_FLOAT macros and friends. Use OFS_PARM0 - OFS_PARM7 to set params before calling or read inside a builtin. Use OFS_RETURN to read the return value. These macros are hard coded to use a 'pr_globals' symbol, so avoid renaming builtin parameter names.
	* Ask me on IRC when it all starts keeling over.
	* These are the C files that form qclib: pr_edict.c pr_exec.c pr_multi.c initlib.c qcc_pr_comp.c qcc_pr_lex.c qccmain.c qcc_cmdlib.c comprout.c hash.c qcd_main.c qcdecomp.c