Inside3D!
     

[DarkPlaces] QC drawing graphics onto the screen?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Nash



Joined: 19 Oct 2007
Posts: 95
Location: Kuala Lumpur, Malaysia

PostPosted: Fri Nov 02, 2007 5:11 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
daemon



Joined: 07 Nov 2007
Posts: 62

PostPosted: Wed Nov 07, 2007 11:41 pm    Post subject: Reply with quote

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 Smile)

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 ]
Back to top
View user's profile Send private message Visit poster's website
Nash



Joined: 19 Oct 2007
Posts: 95
Location: Kuala Lumpur, Malaysia

PostPosted: Thu Nov 08, 2007 5:09 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
daemon



Joined: 07 Nov 2007
Posts: 62

PostPosted: Sat Nov 10, 2007 7:46 pm    Post subject: Reply with quote

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 ]
Back to top
View user's profile Send private message Visit poster's website
daemon



Joined: 07 Nov 2007
Posts: 62

PostPosted: Sat Nov 10, 2007 10:48 pm    Post subject: Reply with quote

Here's the CSQC codebase that Dresk put together:
http://www.daemonforge.org/files/source/csqc-scratch.zip
_________________
-daemon [ daemonforge.org ]
Back to top
View user's profile Send private message Visit poster's website
Nash



Joined: 19 Oct 2007
Posts: 95
Location: Kuala Lumpur, Malaysia

PostPosted: Sun Nov 11, 2007 1:14 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
daemon



Joined: 07 Nov 2007
Posts: 62

PostPosted: Sun Nov 11, 2007 2:10 am    Post subject: Reply with quote

I don't think it did exist at all until somewhat recently.
_________________
-daemon [ daemonforge.org ]
Back to top
View user's profile Send private message Visit poster's website
xaGe



Joined: 01 Mar 2006
Posts: 329
Location: Upstate, New York

PostPosted: Sun Nov 11, 2007 4:45 am    Post subject: Reply with quote

Sweet...
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Sun Nov 11, 2007 5:25 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
daemon



Joined: 07 Nov 2007
Posts: 62

PostPosted: Sun Nov 11, 2007 7:41 pm    Post subject: Reply with quote

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
_________________
-daemon [ daemonforge.org ]
Back to top
View user's profile Send private message Visit poster's website
Nash



Joined: 19 Oct 2007
Posts: 95
Location: Kuala Lumpur, Malaysia

PostPosted: Sun Nov 11, 2007 8:22 pm    Post subject: Reply with quote

Thanks for the fix, daemon!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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