FitzQuake Mark V - Easy to compile and ...

Discuss programming topics for the various GPL'd game engine sources.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: FitzQuake Mark V - Easy to compile and ...

Post by Baker »

Spike wrote:if you're after random windows features, try right-clicking fte on the task bar in windows 7 (either pinned or unpinned).
What I loved about the fteqcc gui code is that by looking at it, I was able to determine how to create a menu from nothing. No resources files, no MFC, etc. And your menu does it at run time.
Spike wrote:I'm not sure how I feel about menu bars in quake engines tbh.
I agree, it isn't very Quake-like.

That is why the functionality requires a command to activate that is buried in a readme. Generally, no one will know it is there. But my menu code makes pagination and submenus easy, I plan to use the menu system to expose developer information like "edicts", "model indexes", texture info, in a way the screen can't reasonably do justice to.

That code isn't particularly Windows dependent either, just makes a table of "text to display", "string representation of Quake command to run" and associated command number # which is table index (all dynamically allocated/freed). If I figure out how to use a Mac's way of generating menus at run-time, I could probably change maybe 20-30 lines of code and have it do the same on a Mac --- if OS X permits the kind of menu complexity that Windows allows which is no sure thing, really ... actually I bet it doesn't.
Baker, remind me some time to show you how to hack my npapi browser plugin to load up your engine instead.
A month ago, I started giving your npapi client a look-over out of curiosity. You do a masterful job of taking "write once, run everywhere in C" to interesting places. :D

My thought process is actually in a "make sure all of my code is hardened enough against unexpected input" kind of place. You've hardened FTE from a security standpoint, for example. But about any Quake engine that isn't FTE is very vulnerable to "attacks" ... i.e. evil server could feed client commands that the client should not allow a server to run (case in point for NetQuake would be "cd eject") or how FTE/Quakeworld clients isolate "server" sent aliases. You've pointed this out many times.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: FitzQuake Mark V - Easy to compile and ...

Post by Spike »

Baker wrote:You've pointed this out many times.
If I recall correctly, that's because people have had problems with it. :P
But yeah, you're probably right.

oo developer info, nice.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: FitzQuake Mark V - Easy to compile and ...

Post by Baker »

The Z-Fighting Evil Haxxors everyone hates is in this. Load up E1M1 and go to Quad area or go to E1M2 exit. Nothing!!!

A living monstrosity of bug fixes and sanity. Possibly 10x over-polished.

FitzQuake Mark V -- Final Version - Beta 1. :arrow: Download + Source :arrow:
Autocompletion of virtually everything, even after semicolons, for maps, demos, skyboxes, keynames, ...
Complete video code rewrite. Complete input code rewrite in MH philosophy of single point of change.
Subtle stainmaps (fte), window only brightness (reckless), multisample (fte), sndspeed cvar.

Status bar displays time, skill level, remaining demo completion % --- very subtlety.

Demo rewind/foward enhancements, ALT-ENTER to switch fullscreen-> windowed is enhanced.

Engine can toggle between external textures and standard Quake textures on the fly. (bind <key> "toggle external_textures"]

Demos embed gamedir and skill level in them, automatic gamedir change playing those demos or connecting as a client.

Full ProQuake NAT client fix. Alternate fog system (which very possibly looks better) from Kurok.

Tons of other stuff, really. You can copy and paste textures to the clipboard with tool_texturepointer, like open a photo editor and do copy and then point at the wall in start.bsp and paste replace a texture.
Fun function to pull keys out of worldspawn:

Code: Select all

char *COM_CL_Worldspawn_Value_For_Key (const char *find_keyname)
{
	static char		valuestring[4096];
	char			current_key[128];
	const char		*data;
	const char		*copy_start;

	// Read some data ...
	if (!(data = COM_Parse(data = cl.worldmodel->entities)) || com_token[0] != '{')	// Opening brace is start of worldspawn
		return NULL; // error

	while (1)
	{
		// Read some data ...
		if (!(data = COM_Parse(data)))
			return NULL; // End of data
			
		if (com_token[0] == '}')	// Closing brace is end of worldspawn
			return NULL; // End of worldspawn

		// Copy data over, skipping a prefix of '_' in a keyname
		copy_start = &com_token[0]; 
		
		if (*copy_start == '_')
			copy_start++;
		
		q_strlcpy (current_key, copy_start, sizeof(current_key) );

		String_Edit_RemoveTrailingSpaces (current_key);

		if (!(data = COM_Parse(data)))
			return NULL; // error

		if (Q_strcasecmp (find_keyname, current_key) == 0)
		{
			q_strlcpy (valuestring, com_token, sizeof(valuestring));
			return valuestring;
		}

	}

	return NULL;
}
Usage: (replaces about 50 lines of horrific code with these 2 lines of easy code)

Code: Select all

	if ((valuestring = COM_CL_Worldspawn_Value_For_Key ("sky")))
		Sky_LoadSkyBox(valuestring);
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: FitzQuake Mark V - Easy to compile and ...

Post by r00k »

One should merge Mark V with RMQe and have an uber sofisticated fitzQuake .. :)
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: FitzQuake Mark V - Easy to compile and ...

Post by frag.machine »

Baker wrote:FitzQuake Mark V -- Final Version - Beta 1
Will you stop development on that, Baker ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: FitzQuake Mark V - Easy to compile and ...

Post by Baker »

After I fix any bugs reported and fix up r_mirroralpha and "correct" multigame dir, yeah.

Metlslime gave us protocol 666, which I think had a lot to do with the energized engine activity we had here for a while.

I wanted to record all these discoveries we've been digging up here (which is quite a mountain) and put them back into the FitzQuake engine. Karma, doing the right thing, making the world a better place and all that --- sure the world doesn't work like that, but it should and one day it will and what is good enough for tomorrow is good enough for today.

My mission is pretty much complete. :D
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
hondobondo
Posts: 207
Joined: Tue Sep 26, 2006 2:48 am
Contact:

Re: FitzQuake Mark V - Easy to compile and ...

Post by hondobondo »

i'm getting an enormous mess when I try to compile

Code: Select all

1>------ Build started: Project: Fitzquake, Configuration: Debug Win32 ------
1>Compiling...
1>dirent.c
1>c1 : fatal error C1083: Cannot open source file: '.\dirent.c': No such file or directory
1>crc.c
1>common.c
1>sbar.c
1>menu.c
1>keys.c
1>in_win.c
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(40) : error C2011: 'tagWINDOWINFO' : 'struct' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(11913) : see declaration of 'tagWINDOWINFO'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(53) : warning C4273: 'GetWindowInfo' : inconsistent dll linkage
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(11931) : see previous definition of 'GetWindowInfo'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(69) : error C2371: 'PKBDLLHOOKSTRUCT' : redefinition; different basic types
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(949) : see declaration of 'PKBDLLHOOKSTRUCT'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(74) : warning C4005: 'MAPVK_VK_TO_VSC' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5356) : see previous definition of 'MAPVK_VK_TO_VSC'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(75) : warning C4005: 'MAPVK_VSC_TO_VK' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5357) : see previous definition of 'MAPVK_VSC_TO_VK'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(76) : warning C4005: 'MAPVK_VK_TO_CHAR' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5358) : see previous definition of 'MAPVK_VK_TO_CHAR'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(77) : warning C4005: 'MAPVK_VSC_TO_VK_EX' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5359) : see previous definition of 'MAPVK_VSC_TO_VK_EX'
1>cvar.c
1>console.c
1>conproc.c
1>cmd.c
1>world.c
1>sv_user.c
1>sv_phys.c
1>sv_move.c
1>sv_main.c
1>This sv map not found couldn't spawn server needs love
1>pr_exec.c
1>pr_edict.c
1>pr_cmds.c
1>net_wipx.c
1>c1 : fatal error C1083: Cannot open source file: '.\net_wipx.c': No such file or directory
1>Generating Code...
1>Compiling...
1>net_wins.c
1>net_win.c
1>net_main.c
1>net_loop.c
1>net_dgrm.c
1>wad.c
1>view.c
1>r_world.c
1>r_sprite.c
1>r_part.c
1>r_brush.c
1>r_alias.c
1>image.c
1>gl_warp.c
1>gl_vidnt.c
1>c1 : fatal error C1083: Cannot open source file: '.\gl_vidnt.c': No such file or directory
1>gl_texmgr.c
1>Message determine if replacement texture here?
1>Baker: This must be here for texture reload
1>This isn't a fix, we must properly delete it?
1>Need to turn fullbright to none?
1>Baker remove the conprint of make dprint
1>Right now we can't copy a replaced texture correctly because we aren't writing a cache file
1>gl_test.c
1>gl_sky.c
1>gl_screen.c
1>gl_rmisc.c
1>Generating Code...
1>Compiling...
1>gl_rmain.c
1>Baker: Depth range here ...
1>gl_rlight.c
1>gl_refrag.c
1>gl_model.c
1>Baker: If this isn't right, we will find out
1>Do we say anything about gamedir change required
1>gl_mesh.c
1>gl_fog.c
1>gl_draw.c
1>cl_tent.c
1>cl_parse.c
1>cl_main.c
1>cl_input.c
1>cl_demo.c
1>chase.c
1>snd_win.c
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(40) : error C2011: 'tagWINDOWINFO' : 'struct' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(11913) : see declaration of 'tagWINDOWINFO'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(53) : warning C4273: 'GetWindowInfo' : inconsistent dll linkage
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(11931) : see previous definition of 'GetWindowInfo'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(69) : error C2371: 'PKBDLLHOOKSTRUCT' : redefinition; different basic types
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(949) : see declaration of 'PKBDLLHOOKSTRUCT'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(74) : warning C4005: 'MAPVK_VK_TO_VSC' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5356) : see previous definition of 'MAPVK_VK_TO_VSC'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(75) : warning C4005: 'MAPVK_VSC_TO_VK' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5357) : see previous definition of 'MAPVK_VSC_TO_VK'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(76) : warning C4005: 'MAPVK_VK_TO_CHAR' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5358) : see previous definition of 'MAPVK_VK_TO_CHAR'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(77) : warning C4005: 'MAPVK_VSC_TO_VK_EX' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5359) : see previous definition of 'MAPVK_VSC_TO_VK_EX'
1>snd_mix.c
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(40) : error C2011: 'tagWINDOWINFO' : 'struct' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(11913) : see declaration of 'tagWINDOWINFO'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(53) : warning C4273: 'GetWindowInfo' : inconsistent dll linkage
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(11931) : see previous definition of 'GetWindowInfo'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(69) : error C2371: 'PKBDLLHOOKSTRUCT' : redefinition; different basic types
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(949) : see declaration of 'PKBDLLHOOKSTRUCT'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(74) : warning C4005: 'MAPVK_VK_TO_VSC' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5356) : see previous definition of 'MAPVK_VK_TO_VSC'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(75) : warning C4005: 'MAPVK_VSC_TO_VK' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5357) : see previous definition of 'MAPVK_VSC_TO_VK'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(76) : warning C4005: 'MAPVK_VK_TO_CHAR' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5358) : see previous definition of 'MAPVK_VK_TO_CHAR'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(77) : warning C4005: 'MAPVK_VSC_TO_VK_EX' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5359) : see previous definition of 'MAPVK_VSC_TO_VK_EX'
1>snd_mem.c
1>snd_dma.c
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(40) : error C2011: 'tagWINDOWINFO' : 'struct' type redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(11913) : see declaration of 'tagWINDOWINFO'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(53) : warning C4273: 'GetWindowInfo' : inconsistent dll linkage
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(11931) : see previous definition of 'GetWindowInfo'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(69) : error C2371: 'PKBDLLHOOKSTRUCT' : redefinition; different basic types
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(949) : see declaration of 'PKBDLLHOOKSTRUCT'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(74) : warning C4005: 'MAPVK_VK_TO_VSC' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5356) : see previous definition of 'MAPVK_VK_TO_VSC'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(75) : warning C4005: 'MAPVK_VSC_TO_VK' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5357) : see previous definition of 'MAPVK_VSC_TO_VK'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(76) : warning C4005: 'MAPVK_VK_TO_CHAR' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5358) : see previous definition of 'MAPVK_VK_TO_CHAR'
1>f:\engines\fitzquake_mark_v_final_beta_1\source\winquake.h(77) : warning C4005: 'MAPVK_VSC_TO_VK_EX' : macro redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\winuser.h(5359) : see previous definition of 'MAPVK_VSC_TO_VK_EX'
1>Generating Code...
1>Build log was saved at "file://f:\engines\fitzquake_mark_v_final_beta_1\source\Debug\BuildLog.htm"
1>Fitzquake - 11 error(s), 20 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
This is Express 2008. i'm sure I'm missing something, but what?
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: FitzQuake Mark V - Easy to compile and ...

Post by Spike »

if you're using something other than msvc6 you're kinda screwed.
you'll have to fix up everything to work with a more recent version of msvc.
and msvc6 is OLD.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: FitzQuake Mark V - Easy to compile and ...

Post by revelator »

Might have better luck with the codeblocks project in there but if you want ill update it for newer msvc :)
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: FitzQuake Mark V - Easy to compile and ...

Post by revelator »

Updated the msvc2012 project and it compiles fine now, the codeblocks project however needs some work it seems because gcc does not allow mixing UNICODE strings with ANSI in unzip.cpp and zip.cpp so you will get an error about it.
Productivity is a state of mind.
hondobondo
Posts: 207
Joined: Tue Sep 26, 2006 2:48 am
Contact:

Re: FitzQuake Mark V - Easy to compile and ...

Post by hondobondo »

reckless wrote:Updated the msvc2012 project and it compiles fine now, the codeblocks project however needs some work it seems because gcc does not allow mixing UNICODE strings with ANSI in unzip.cpp and zip.cpp so you will get an error about it.
do you have a link? or is it the same link?
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: FitzQuake Mark V - Easy to compile and ...

Post by revelator »

Still trying to fix the gcc bug but ill upload current version on my site, hang on.
Last edited by revelator on Sun Apr 13, 2014 7:28 pm, edited 1 time in total.
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: FitzQuake Mark V - Easy to compile and ...

Post by revelator »

https://sourceforge.net/projects/cbadva ... FitzQuake/

Atm only the msvc 2012 and msvc 6 projects work if you have neither try upgrading the msvc 6 solution to your msvc version, you will get a lot of warnings if you do that but it should compile.
I removed the codeblocks project for the moment because of a bug in the zip code that gcc does not allow, ill look for a comparable version that compiles with gcc (could probably snatch it from dhewm3).
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: FitzQuake Mark V - Easy to compile and ...

Post by revelator »

Fixed a few oversights in the code.

R_EmitBox used a vec3_t for color the check for alpha becomes invalid by this though as a vec3_t can only hold a rgb value, i changed it to a const vec_t * instead to make it able to handle a rgba value.
Note a vec4_t might be more prudent :).
Changed a few memcpy overflows.
A few places had the same value twice in code.
MP3 works fine with msvc > 1002 so i disabled the disable :P
Productivity is a state of mind.
Spirit
Posts: 1065
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Re: FitzQuake Mark V - Easy to compile and ...

Post by Spirit »

Grr reckless, how can I permanently persuade you to use better filenames than source.7z or text.doc? :twisted:
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Post Reply