Inside3D!
     

Passing data from qc vm to engine

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
h4des



Joined: 08 Feb 2009
Posts: 4
Location: Portugal

PostPosted: Sun Feb 08, 2009 11:56 pm    Post subject: Passing data from qc vm to engine Reply with quote

Hi, im using Darkplaces and I want to pass some variables (floats) from the quake c vm to the engine code.

I have a "music player" implemented under the quake c code and I want to display the name of song that is being played on the hud but the only way to draw images on the hud is by using the engine code.

So, Im wondering how can I pass the infos I need so the engine knows which song is being played.

thanks
Back to top
View user's profile Send private message MSN Messenger
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Mon Feb 09, 2009 1:10 pm    Post subject: Reply with quote

Stick it in a cvar. There are 4 provided in Quake for just this kind of purpose: scratch1, scratch2, scratch3 and scratch4. You might need to extern them so that the hud code knows about them.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine 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