Jump to content

Home

Q3 documentation project


Commodus

Recommended Posts

Over at Quake 3 World there is a code documentation project which is striving to document all the trap_ functions in Quake 3 which can more or less be applied to JK2. Check it out if you haven't already done so.

 

Also, does anybody know what exactly does the void va(...) function do? (first argument is a string, all the arguments after are variables of any type)

 

Thanks,

Commodus

Link to comment
Share on other sites

oh, sorry, didn't see that question :D

 

 

do you know the printf functions from the basic libraries?

 

It is an sprintf to an static function var. It returns a pointer to that var.

 

It is used for all the G_Printf like functions too.

 

It can only be used twice in capsulated functions.

 

 

G_Printf("%s",va("%i: %s",i,va("%f: %s",1.0,"HUHU")));

 

would not have the effect which is wanted ( beside it is silly and useless :D ). But there could be cases on which the limit of 2 is broken ( only a second call until one call is finished ).

Link to comment
Share on other sites

Originally posted by Jaii der Herr

oh, sorry, didn't see that question :D

 

 

do you know the printf functions from the basic libraries?

 

It is an sprintf to an static function var. It returns a pointer to that var.

 

It is used for all the G_Printf like functions too.

 

It can only be used twice in capsulated functions.

 

 

G_Printf("%s",va("%i: %s",i,va("%f: %s",1.0,"HUHU")));

 

would not have the effect which is wanted ( beside it is silly and useless :D ). But there could be cases on which the limit of 2 is broken ( only a second call until one call is finished ).

 

Ahh, so say

 

weapon = "bleh";

va("models/weapons2/%s/%s.glm", weapon");

 

Would give you a string with "models/weapons2/bleh/bleh.glm" in it? Sorry if I misunderstood you, I'm not much of a coder, but I'm trying to learn.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...