Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

How to work with CSQC?

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
Zylyx_ Joined: 05 Dec 2007 Posts: 111 Location: scotland, uk |

Posted: Sun Mar 01, 2009 12:28 pm Post subject: How to work with CSQC? |

Hi ! I use the Frikqcc QC compiler for my DP modding, and I recently read that that DP supports the QSQC extensions, which I think is cool coz I would like add my own custom HUD and other things like that. The question I have is that of how I would compile the QC code which has QSQC specific code in it? Will Firkqcc give me problems with this or will i need a new compiler, or do I just includes the QC stuf with the progdefs.h?
Thanx!
_________________
....noodle...

Back to top |

MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Sun Mar 01, 2009 12:37 pm Post subject: |

Urre has created two excellent CSQC intro tutorials: http://qexpo.tastyspleen.net/booth.php?id=165&page=308 http://qexpo.tastyspleen.net/booth.php?id=165&page=317 _________________ Apathy Now!

Back to top |

Zylyx_ Joined: 05 Dec 2007 Posts: 111 Location: scotland, uk |

Posted: Sun Mar 01, 2009 1:14 pm Post subject: |

cool thnax! I now have my project dir all setup and I'm using FTEQCC to compile my code. _________________ ....noodle...

Back to top |

Zylyx_ Joined: 05 Dec 2007 Posts: 111 Location: scotland, uk |

Posted: Sun Mar 01, 2009 1:39 pm Post subject: |

Oh, I just have a few more issues now. The biggest issue is that I cant compile my csprogs.dat using FTEEQCC after I add dpextensions.qc after the the cs_builtins.qc in the progs.src in my csqc directory. FTEQCC returns these errors:

Code:
Source file: progs.src outputfile: ../csprogs.dat compiling Defs.qc compiling csqc_constants.qc compiling csqc_builtins.qc
compiling dpextensions.qc
dpextensions.qc:16: error: checkextension redeclared, prev instance is in csqc_builtins.qc
csqc_builtins.qc:62: checkextension is defined here
dpextensions.qc:96: error: EF_ADDITIVE redeclared
csqc_constants.qc:98: EF_ADDITIVE is defined here
dpextensions.qc:104: error: EF_BLUE redeclared
csqc_constants.qc:99: EF_BLUE is defined here
dpextensions.qc:120: error: EF_FLAME redeclared
csqc_constants.qc:102: EF_FLAME is defined here
dpextensions.qc:128: error: EF_FULLBRIGHT redeclared
csqc_constants.qc:101: EF_FULLBRIGHT is defined here
dpextensions.qc:136: error: EF_NODEPTHTEST redeclared
csqc_constants.qc:105: EF_NODEPTHTEST is defined here
dpextensions.qc:144: error: EF_NODRAW redeclared
csqc_constants.qc:97: EF_NODRAW is defined here
dpextensions.qc:166: error: EF_NOSHADOW redeclared
csqc_constants.qc:104: EF_NOSHADOW is defined here
dpextensions.qc:174: error: EF_RED redeclared
csqc_constants.qc:100: EF_RED is defined here
dpextensions.qc:182: error: EF_STARDUST redeclared
csqc_constants.qc:103: EF_STARDUST is defined here
dpextensions.qc:565: error: cvar_string redeclared, prev instance is in csqc_builtins.qc
csqc_builtins.qc:220: cvar_string is defined here

I'm using the dpextensions.qc file from the 20090222beta1 version of DP.
Also, in my moddir/src folder I have two sub folders, csqc and ssqc. Now in both of them I have the FTEEQCC compiler, so that the ssqc compiles the progs.dat and the csqc compiles the csprogs.dat. Now, I would like to know if my mod requires both of those, or just the csprogs.dat, and if the csprogs gets overwritten with the progs.dat when loading in DP.
thnx again
[/code]
_________________
....noodle...

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA |

Posted: Sun Mar 01, 2009 7:07 pm Post subject: |

is your csqc in a different folder than your other ssqc files? i actually use 2 different compilers i use, friks for ss and fte for cs. _________________ QuakeDB - Quake ModDB Group

Back to top |

Zylyx_ Joined: 05 Dec 2007 Posts: 111 Location: scotland, uk |

Posted: Sun Mar 01, 2009 7:46 pm Post subject: |

ye, they are in two seperate folders in my source directory. I have my scr/ssqc/ and src/csqc/ folders _________________ ....noodle...

Back to top |

Boss429 Joined: 03 Dec 2006 Posts: 22 |

Posted: Mon Mar 02, 2009 12:57 am Post subject: |

I was just trying to complete this tutorial too. The error your getting is because you are declaring the same thing twice for some reason (maybe dpextensions.qc looked different when this tutorial was written). I'm pretty new to this myself but what I did was comment out all of the lines that were redundant in csqc_builtins.qc and sqc_constants.qc. You could comment them out of your dpextensions file but then you would have to keep doing that over and over every update of DarkPlaces.
It took forever but once it was all said and done I still got an error

Code:
compiling Main.qc in function CSQC_Ent_Update (line 56) Main.qc:57: error: Unknown value "enttype". Main.qc:57: error: "." - not a name

My guess is the tutorial is out of date and enttype doesn't work anymore or something.
Edit: If you declare .float enttype; in defs.qc it fixes the error I mentioned. works fine now.

Back to top |

Zylyx_ Joined: 05 Dec 2007 Posts: 111 Location: scotland, uk |

Posted: Mon Mar 02, 2009 10:10 am Post subject: |

Well, I dont think we even need the scratch base csqc code to code cs. My theory is that as long you have dpextensions included in both the csqc and the ssqc code bases then it should work fine. The only question that is still unanswered for me is why is ssqc even needed? I mean, I could just code verything in csqc and have no problems, right?
_________________
....noodle...

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Mon Mar 02, 2009 11:45 am Post subject: |

While you can code a mod entirely in csqc, you loose any multiplayer compatibility. csprogs.dat is _not_ a replacement for progs.dat, it is an addition. Having said that, it does allow you to reduce your progs.dat to simple resending of events.
Regarding dpextensions.qc - your csqc_builtins.qc file has elements inside it which are not actually part of the base csqc.
cvar_string is also not explicitly defined to be part of csqc either, but checkextension is defined as an extension which must be present in csqc.
Additionally not all of dpextensions.qc makes sense (eg: botclient).
Easiest is to just comment out stuff from csqc_builtins/csqc_constants.
csqc itself does not require fteqcc to compile/use. However, your base code may utilise some of its features, most commonly its arrays.
Both fteqcc and frikqcc support #ifdef stuff, so both are plausible compilers for csqc.
_________________
What's a signature?

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA |

Posted: Mon Mar 02, 2009 4:13 pm Post subject: |

fte compiled something that friks didnt. so i use frik for ss and fte for cs. _________________ QuakeDB - Quake ModDB Group

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group