HUD Coding
Moderator: InsideQC Admins
16 posts
• Page 1 of 2 • 1, 2
HUD Coding
Hey Can someone help me.
I´m working on a CounterStrike mod for PSP
I have the SOurce code of the quake engine but
i need a HUD like Counterstrike.
which file must I edit?
sbar.c? help please.
I´m working on a CounterStrike mod for PSP
I have the SOurce code of the quake engine but
i need a HUD like Counterstrike.
which file must I edit?
sbar.c? help please.
- Stealth Kill
- Posts: 83
- Joined: Fri Dec 29, 2006 12:34 pm
I need help
i can´t compile this what is wrong?
- Code: Select all
===============
Sbar_DrawInventory
===============
*/
void Sbar_DrawInventory (void)
{
int i;
char num[6];
float time;
int flashon;
qboolean headsup;
qboolean hudswap;
headsup = !(cl_sbar.value || scr_viewsize.value < 100);
hudswap = cl_hudswap.value; // Get that nasty float out :)
if (!headsup)
Sbar_DrawPic (0, -24, sb_ibar);
i can´t compile this what is wrong?
- Stealth Kill
- Posts: 83
- Joined: Fri Dec 29, 2006 12:34 pm
Stealth Kill wrote:I need help
- Code: Select all
===============
Sbar_DrawInventory
===============
*/
void Sbar_DrawInventory (void)
{
int i;
char num[6];
float time;
int flashon;
qboolean headsup;
qboolean hudswap;
headsup = !(cl_sbar.value || scr_viewsize.value < 100);
hudswap = cl_hudswap.value; // Get that nasty float out :)
if (!headsup)
Sbar_DrawPic (0, -24, sb_ibar);
i can´t compile this what is wrong?
It's very hard to tell looking only to code snipets. If you want to make a game you really should consider learning at least some basic programming skills first.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Have you actually defined the cl_sbar, and cl_hudswap cvars? If so, are they either in sbar.c or externed in sbar.c or externed in a header file included by sbar.c?
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
Yes I defined them in to client.H
I´m using the Qrack source to mix it up with the PSP
source code.
I can copy and paste it till
______________
Sbar_DrawInventory
_____________
when I paste the cl_sbar command it can´t find it.
But I have written it into the client.h
I´m using the Qrack source to mix it up with the PSP
source code.
I can copy and paste it till
______________
Sbar_DrawInventory
_____________
when I paste the cl_sbar command it can´t find it.
But I have written it into the client.h
- Stealth Kill
- Posts: 83
- Joined: Fri Dec 29, 2006 12:34 pm
Looks like you're trying to plug quakeworld code into a non-quakeworld engine.
You'll need to remove those extra references (rewrite them to be hardcoded constant values) or define them properly (rather than merely referencing them).
You'll need to remove those extra references (rewrite them to be hardcoded constant values) or define them properly (rather than merely referencing them).
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Yes the PSP quake engine don´t use QW.
Are there any PC quake engine Sources without QW?
or can you explaine me what can I do?
Step by Step please
I´m new to codeing
is it helpful wenn i upload the sbar.c from qrack and teh sbar.c from
psp quake?
Are there any PC quake engine Sources without QW?
or can you explaine me what can I do?
Step by Step please
I´m new to codeing
is it helpful wenn i upload the sbar.c from qrack and teh sbar.c from
psp quake?
- Stealth Kill
- Posts: 83
- Joined: Fri Dec 29, 2006 12:34 pm
cl_sbar is defined in cl_main.c
cvar_t cl_sbar = {"cl_sbar", "0", true};
its used to toggle the old quake sbar or the new "cut out" overlayed sbar...
just remove reference to that (if you only want the old style).
Otherwise you'll have to tweak the placements of the hud icons to where u want them. (I cant think of how CS's hud looks at the moment). You cant just cut/past that sbar code into the PSP project as there is a great deal of support code that goes with much of the new sbar. Just keep diggin and you find the other required functions.
cvar_t cl_sbar = {"cl_sbar", "0", true};
its used to toggle the old quake sbar or the new "cut out" overlayed sbar...
just remove reference to that (if you only want the old style).
Otherwise you'll have to tweak the placements of the hud icons to where u want them. (I cant think of how CS's hud looks at the moment). You cant just cut/past that sbar code into the PSP project as there is a great deal of support code that goes with much of the new sbar. Just keep diggin and you find the other required functions.
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest


