[DarkPlaces] QC drawing graphics onto the screen?
Moderator: InsideQC Admins
26 posts
• Page 2 of 2 • 1, 2
Well, all I wanted to do was create a custom HUD and draw some in-game menus for the player inventory.
I'll just attach the stuff to the player's view and make use of DP's EF_NOGUNBOB. This CSQC stuff is way too complicated for me.
I'll just attach the stuff to the player's view and make use of DP's EF_NOGUNBOB. This CSQC stuff is way too complicated for me.
-

Nash - Posts: 95
- Joined: Fri Oct 19, 2007 5:56 pm
- Location: Kuala Lumpur, Malaysia
CSQC isn't too difficult... it's just that the people who know how to use it don't know how to explain it in an orderly manner. (I probably don't either
)
but having said that... where you want to start is in CSQC_UpdateView (hopefully you already have some kind of csqc codebase)
for starters, try messing around in this function by adding some lines after R_RenderScene();
for example:
drawstring('320 240 0', "this is a string", '10 10 0', '1 1 1', 1, 0);
or
drawpic('320 240 0', "image.tga", '32 32 0', '1 1 1', 1, 0);
but having said that... where you want to start is in CSQC_UpdateView (hopefully you already have some kind of csqc codebase)
for starters, try messing around in this function by adding some lines after R_RenderScene();
for example:
drawstring('320 240 0', "this is a string", '10 10 0', '1 1 1', 1, 0);
or
drawpic('320 240 0', "image.tga", '32 32 0', '1 1 1', 1, 0);
-daemon [ daemonforge.org ]
-

daemon - Posts: 63
- Joined: Wed Nov 07, 2007 11:10 pm
daemon wrote:(hopefully you already have some kind of csqc codebase)
No, I don't. The only one available to me, from Nexuiz, is heavily convoluted and not suitable for learning from.
Care to post a clean CSQC base for modders?
Also, I think half of the problem would be solved if someone would be kind enough to give ANY kind of explanation on the parameters for most of the important built-in functions for CSQC. Yes I realize the types are named clearly but it doesn't really tell much IMO.
-

Nash - Posts: 95
- Joined: Fri Oct 19, 2007 5:56 pm
- Location: Kuala Lumpur, Malaysia
trying to get ahold of Dresk to see if I can post what he gave me... not really sure yet if i need to get permission first or credit anyone
-daemon [ daemonforge.org ]
-

daemon - Posts: 63
- Joined: Wed Nov 07, 2007 11:10 pm
Here's the CSQC codebase that Dresk put together:
http://www.daemonforge.org/files/source/csqc-scratch.zip
http://www.daemonforge.org/files/source/csqc-scratch.zip
-daemon [ daemonforge.org ]
-

daemon - Posts: 63
- Joined: Wed Nov 07, 2007 11:10 pm
Much appreciated. Thank you.
I'm just wondering though, why is this file so hidden? Had it not been for this forum thread, I don't think it would be possible to ever get a hold of that file, heck no one would even know it exists.
I'm just wondering though, why is this file so hidden? Had it not been for this forum thread, I don't think it would be possible to ever get a hold of that file, heck no one would even know it exists.
-

Nash - Posts: 95
- Joined: Fri Oct 19, 2007 5:56 pm
- Location: Kuala Lumpur, Malaysia
I'm just looking at it, haven't tried it. In main.qc, the CSQC_Parse_TempEntity() function has a TE_GUNSHOT handler, but doesn't do anything - it just says '//do something cool with TE_GUNSHOT!' This looks like something that will crash unless you comment the TE_GUNSHOT case out, or add code to parse the 3 coords and do something with them. (Since bHandled is true unless the switch hits the default case).
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
You're right. I just tried it and it crashes. That whole lower section of Main.qc is actually not used because of line 50 "#ifdef USE_CSQC_OPTIONALFUNCTIONS", but if you comment that out it will crash when TE_GUNSHOT is called.
I've just commented out those example lines inside CSQC_Parse_TempEntity and reuploaded the zip.
http://www.daemonforge.org/files/source/csqc-scratch.zip
I've just commented out those example lines inside CSQC_Parse_TempEntity and reuploaded the zip.
http://www.daemonforge.org/files/source/csqc-scratch.zip
-daemon [ daemonforge.org ]
-

daemon - Posts: 63
- Joined: Wed Nov 07, 2007 11:10 pm
26 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest
