[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - fitzquake, r_nolerp_list parsing

fitzquake, r_nolerp_list parsing

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

fitzquake, r_nolerp_list parsing

Postby szo » Wed Dec 14, 2011 11:59 am




szo
 
Posts: 132
Joined: Mon Dec 06, 2010 4:42 pm

Re: fitzquake, r_nolerp_list parsing

Postby Baker » Wed Dec 14, 2011 12:28 pm

I think I managed to turn the above function into 5-6 lines of code. I passed the cvar as a string, the "search for model" as string and the delimitor as string (so I could reuse the function for something else in the future). I made a copy of the string with the delimiter snprintf ("%s%s%s", delimiter, cvar_string, delimiter) and did the same for the search string. Then did a strstr or what not, returned 0 or 1 and let the "new map" function handle whether or not to assign the model flag.

Slightly inelegant for sure, but the shortness of function made sure I didn't have to spend any time debugging it.

I guess I did that because I didn't see why that function had to be so complex to begin with. It really is just looking to see if the model is in a comma delimited list.

I used metlslime's "special models" cvar idea for a few things. Like to allow special texture effects for surfaces (reflective-ish sphere-mapish, metallic-like, fence texture alpha mask style, additive blend) so all the cool stuff from Kurok would not have to be hard coded in engine code and could be more ... what's the word ... not hardcoded hacks but exposed to mod creator. (Without altering the model format to accommodate extra flags or doing anything to the .bsp)

[Yeah, yeah ... I still haven't released the engine work but I sure want to. But not till its done right and complete how I'd like to be. I went all in with some of the ideas I got from DirectQ's coding style, ideas from Quakespasm and some of the stuff Spike talked about being Q1 engine deficiencies solved in FTE. Sigh ... time ...]
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 ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: fitzquake, r_nolerp_list parsing

Postby szo » Wed Dec 14, 2011 2:38 pm

Applied the fix to quakespasm in a slightly modified way:
http://quakespasm.svn.sourceforge.net/v ... vision=517
... will be part of v0.85.5.



szo
 
Posts: 132
Joined: Mon Dec 06, 2010 4:42 pm

Re: fitzquake, r_nolerp_list parsing

Postby mh » Wed Dec 14, 2011 4:52 pm

I'd agitate for this string to be treated the same as GL_EXTENSIONS; i.e. a pretty standard space-delimited string that you can query with strstr. I've quite an intense dislike for lots of different textual formats each of which needs it's own custom parser.

Of course, that wouldn't be compatible with Fitz as it stands, but them's the breaks.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: fitzquake, r_nolerp_list parsing

Postby szo » Wed Dec 14, 2011 5:00 pm




szo
 
Posts: 132
Joined: Mon Dec 06, 2010 4:42 pm

Re: fitzquake, r_nolerp_list parsing

Postby metlslime » Wed Dec 14, 2011 10:09 pm

metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests