Forum

Passing data from qc vm to engine

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Passing data from qc vm to engine

Postby h4des » Sun Feb 08, 2009 11:56 pm

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
h4des
 
Posts: 4
Joined: Sun Feb 08, 2009 11:48 pm
Location: Portugal

Postby mh » Mon Feb 09, 2009 1:10 pm

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.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest