View previous topic :: View next topic |
Author |
Message |
leileilol

Joined: 15 Oct 2004 Posts: 1321
|
Posted: Tue Mar 30, 2010 11:00 pm Post subject: |
|
|
Is it the old 'bragabouthowhardcoreourcardisbyspammingthestringsfullofsupportedglextensions' bug? _________________
 |
|
Back to top |
|
 |
Charlieguitar
Joined: 29 Mar 2010 Posts: 20
|
Posted: Tue Mar 30, 2010 11:11 pm Post subject: |
|
|
yep that one doesnt work either.
MSVC points to this line in dbghook.c ??
_debugger_hook_dummy = 0;
Not sure whats going on as thats obviously not part of the engine. |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Tue Mar 30, 2010 11:45 pm Post subject: |
|
|
leileilol wrote: | Is it the old 'bragabouthowhardcoreourcardisbyspammingthestringsfullofsupportedglextensions' bug? |
Open gl_vidnt.c, look for this line in GL_Init (line number 609 or thereabouts): Code: | Con_Printf ("GL_EXTENSIONS: %s\n", gl_extensions); |
And comment it out.  _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Charlieguitar
Joined: 29 Mar 2010 Posts: 20
|
Posted: Tue Mar 30, 2010 11:51 pm Post subject: |
|
|
haha wow, thankyou mh and leileilol that lets it run now!!!
Awesome!
im having some weird graphical glitches(all textures are white) but atleast the engine runs now so i can move on to the next problem haha
Thanks guys |
|
Back to top |
|
 |
Charlieguitar
Joined: 29 Mar 2010 Posts: 20
|
Posted: Tue Mar 30, 2010 11:53 pm Post subject: |
|
|
and ive now fixed that with the -no8bit command
yay
time to get to the fun parts! |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Wed Mar 31, 2010 11:42 am Post subject: |
|
|
Good news.
A few suggestions for what to do next. There are some serious bugs in GLQuake that need fixing before you start having fun. Two major ones are in GL_LoadTexture (in gl_draw.c) and in Sbar_DrawFace (in sbar.c).
For the GL_LoadTexture bug, look for this block: Code: | else {
glt = &gltextures[numgltextures];
numgltextures++;
} | And change it to this (i.e. remove the else condition): Code: | glt = &gltextures[numgltextures];
numgltextures++; |
For the Sbar_DrawFace bug, look for this: Code: | if (cl.stats[STAT_HEALTH] >= 100)
f = 4;
else
f = cl.stats[STAT_HEALTH] / 20; | And change it to this: Code: | if (cl.stats[STAT_HEALTH] >= 100)
f = 4;
else if (cl.stats[STAT_HEALTH] <= 0)
f = 0;
else
f = cl.stats[STAT_HEALTH] / 20; |
Here we're just adding a < 0 condition so that the engine won't crash if health goes less than -19. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Charlieguitar
Joined: 29 Mar 2010 Posts: 20
|
Posted: Wed Mar 31, 2010 4:41 pm Post subject: |
|
|
oh awesome, added those little snippets! Thanks for all the information and help, really apreciate it guys
I'll no doubt be back for more help in the future  |
|
Back to top |
|
 |
Tomaz
Joined: 05 Nov 2004 Posts: 49
|
Posted: Sun Apr 04, 2010 4:11 pm Post subject: |
|
|
mh wrote: | leileilol wrote: | Is it the old 'bragabouthowhardcoreourcardisbyspammingthestringsfullofsupportedglextensions' bug? |
Open gl_vidnt.c, look for this line in GL_Init (line number 609 or thereabouts): Code: | Con_Printf ("GL_EXTENSIONS: %s\n", gl_extensions); |
And comment it out.  |
Another way to fix it is to go to Con_Printf ( console.c around line 370ish )
change:
#define MAXPRINTMSG 4096
to:
#define MAXPRINTMSG 1024 * 16
and also change the call to:
vsprintf (msg,fmt,argptr);
to say:
vsnprintf (msg,sizeof(msg),fmt,argptr);
The new vsnprintf fixes the crash itself ( I have replaced all calls to vsprintf and sprintf in my entire code to use vsnprintf and snprintf )
The reason it fixes it is because it limits the amount of text that can be put in the string. The change on the define is so it will actually be able to display all the extensions and not just cut off halfway through.
Just my $0.02
mh wrote: |
For the Sbar_DrawFace bug, look for this: Code: | if (cl.stats[STAT_HEALTH] >= 100)
f = 4;
else
f = cl.stats[STAT_HEALTH] / 20; | And change it to this: Code: | if (cl.stats[STAT_HEALTH] >= 100)
f = 4;
else if (cl.stats[STAT_HEALTH] <= 0)
f = 0;
else
f = cl.stats[STAT_HEALTH] / 20; |
Here we're just adding a < 0 condition so that the engine won't crash if health goes less than -19. |
Sweet! I had not caught that one, adding it to CleanQuakeCpp ! |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Sun Apr 04, 2010 5:10 pm Post subject: |
|
|
Tomaz wrote: | Another way to fix it is to go to Con_Printf ( console.c around line 370ish )
change:
#define MAXPRINTMSG 4096
to:
#define MAXPRINTMSG 1024 * 16
and also change the call to:
vsprintf (msg,fmt,argptr);
to say:
vsnprintf (msg,sizeof(msg),fmt,argptr); |
Yup, that's probably a better way of doing it.  _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Mon Apr 05, 2010 6:06 am Post subject: |
|
|
chugging in with some extra info
if using msvc 8 on windows 7 you might get errors while linking
took me a bit of digging to find out you need this -> Microsoft Windows SDK v7.0
when installed you need to register this sdk with msvc theres a shortcut for this function in the shortcut folder. |
|
Back to top |
|
 |
Charlieguitar
Joined: 29 Mar 2010 Posts: 20
|
Posted: Wed Apr 07, 2010 4:14 pm Post subject: |
|
|
Thanks reckless, i for sure have been having some linker errors. 50% of the time linker.exe actually crashes and i have to hit compile a second time to make it work. very strange, hopefully the SDK will sort that out )
cheers!
And thanks again to all, the help ive gotten here has really fired me up
Are there many other tutorial sites for quake1 engine programming? I've tried out a few of the old ones such as phoenix's interpolation and a few others, sadly due to my inexperience i have some trouble even making theses tutorials work in my code. Any helpfull links and things would be great! |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Wed Apr 07, 2010 6:00 pm Post subject: |
|
|
The old QuakeSrc.org tutorials are here: http://www.quake-1.com/docs/quakesrc.org/
Some of them are slightly ropey (watch out for the ones I wrote!), but a lot of people started out here. The Hexen II ones should also be mostly usable, and even some of the Quake II ones, although you may have to massage the code a little to get things working right (but that's half the fun!)
It's also worthwhile to download the Hexen II and Quake II code as a lot of it is actually usable in Quake. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Thu Apr 08, 2010 6:34 am Post subject: |
|
|
aye for some reason the old manifest tool with windows sdk 6 and 6.1
crashes the linker on win7 exact same error i was getting sdk 7.0 fixes it mostly allthough i had a few occasions where it still does it but far less frequent (seems to be permission related).
atleast there next version will have side by side configuration removed and about time that function alone has caused me more headaches than anything  |
|
Back to top |
|
 |
Charlieguitar
Joined: 29 Mar 2010 Posts: 20
|
Posted: Sat Apr 10, 2010 6:41 pm Post subject: |
|
|
fairly consistent problem im having right now is that the weapon models are randomly dissapearing in game. I've not edited any of that code so im not sure whats going on. Is this a known bug? Any suggestions where i start looking to correct it? this machine has a nvidia 8800. I've recompiled quake with the latest dxsdk etc.. Also this problem doesnt happen with fquake or dark places. |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Sat Apr 10, 2010 10:02 pm Post subject: |
|
|
might be the ol ztrick hack some newer cards REALLY dont like this one.
[code
void R_Clear (void)
{
if (r_mirroralpha->value != 1.0)
{
if (gl_clear->value)
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
else
glClear (GL_DEPTH_BUFFER_BIT);
gldepthmin = 0;
gldepthmax = 0.5;
glDepthFunc (GL_LEQUAL);
}
else if (gl_ztrick->value) // ztrick hack
{
static int trickframe;
if (gl_clear->value)
glClear (GL_COLOR_BUFFER_BIT);
trickframe++;
if (trickframe & 1)
{
gldepthmin = 0;
gldepthmax = 0.49999;
glDepthFunc (GL_LEQUAL);
}
else
{
gldepthmin = 1;
gldepthmax = 0.5;
glDepthFunc (GL_GEQUAL);
}
}
else
{
if (gl_clear->value)
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
else
glClear (GL_DEPTH_BUFFER_BIT);
gldepthmin = 0;
gldepthmax = 1;
glDepthFunc (GL_LEQUAL);
}
glDepthRange (gldepthmin, gldepthmax);
}
[/code]
try setting gl_ztrick to 0 in game and reload the lvl if this fixes it remove this part
[code
else if (gl_ztrick->value) // ztrick hack
{
static int trickframe;
if (gl_clear->value)
glClear (GL_COLOR_BUFFER_BIT);
trickframe++;
if (trickframe & 1)
{
gldepthmin = 0;
gldepthmax = 0.49999;
glDepthFunc (GL_LEQUAL);
}
else
{
gldepthmin = 1;
gldepthmax = 0.5;
glDepthFunc (GL_GEQUAL);
}
}
[/code] |
|
Back to top |
|
 |
|