Basic Half-Life Map Support For Stock GLQuake
-
- Posts: 368
- Joined: Thu Jun 25, 2009 4:45 am
- Location: Michigan
I have to thank Baker so much, for all this stuff he did (This is the only Source on the web for implenting HL BSP Support)
and wanna ask about fixing this sucked up lightning, in Lord Havoc's DarkPlaces Engine everyhing is ok. Im no programmin newbie, but in this Section i need abit help...
I have a very bad past about cutting code out of other engines.
and sry for my bad english, greetings and thanks to Baker, for all his usefull stuff.
and wanna ask about fixing this sucked up lightning, in Lord Havoc's DarkPlaces Engine everyhing is ok. Im no programmin newbie, but in this Section i need abit help...
I have a very bad past about cutting code out of other engines.
and sry for my bad english, greetings and thanks to Baker, for all his usefull stuff.
He..... his a new guy!.. wellcomeRanger366 wrote:I have to thank Baker so much, for all this stuff he did (This is the only Source on the web for implenting HL BSP Support)
and wanna ask about fixing this sucked up lightning, in Lord Havoc's DarkPlaces Engine everyhing is ok. Im no programmin newbie, but in this Section i need abit help...
I have a very bad past about cutting code out of other engines.
and sry for my bad english, greetings and thanks to Baker, for all his usefull stuff.
Ask anything you need
ThanksTeiman wrote:He..... his a new guy!.. wellcomeRanger366 wrote:I have to thank Baker so much, for all this stuff he did (This is the only Source on the web for implenting HL BSP Support)
and wanna ask about fixing this sucked up lightning, in Lord Havoc's DarkPlaces Engine everyhing is ok. Im no programmin newbie, but in this Section i need abit help...
I have a very bad past about cutting code out of other engines.
and sry for my bad english, greetings and thanks to Baker, for all his usefull stuff.
Ask anything you need
Im currently working on a secret Project, but already made alot Menu Stuff alone, and all this QC Code. I wanted to implent HL BSP because mapping is the easiest in HL for me, and Textures have MUCH better quality, but it only looks OK if i compile the map without Rad. (like on the pic shown 2 pages ago, light sucked up)
and i wanted to fix that, but Engine Coding with Stuff i never worked in my whole life. And in DarkPlaces i cant cut the Code out, i only see much much much modified Code.
So i wanted to ask for some advice for fixing this light stuff. I dont have much time, and it would be awesome if i could get a fix, alot thanks from me, and im really sry about my english, im a german guy who works alot.
-
- Posts: 54
- Joined: Thu Jul 15, 2010 1:58 am
- Location: Canada
Revert your file to the original and re-do steps 12a, 12b and 13 so you don't have the problem?Hazematman wrote:whenever I compile with step 13 I always get an "if" statement syntax error, that I can't seem to fix. Does anyone know how to fix this?
An alternative is to post your exact error and the exact code that you have the issue with, but just saying "I get an if statement error" is not enough information for anyone to help you.
That being said ... make sure you aren't missing a "curly brace" ("{" or "}") somewhere.
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-
- Posts: 54
- Joined: Thu Jul 15, 2010 1:58 am
- Location: Canada
ok the code is
and this is the error i keep getting: 1>.\gl_model.c(522) : error C2059: syntax error : 'if'
oh and if it helps line 522 is the first line in that code.
Code: Select all
if (loadmodel->bspversion == HL_BSPVERSION) {
int i;
loadmodel->lightdata = Hunk_AllocName(l->filelen, loadname);
// dest, source, count
memcpy (loadmodel->lightdata, mod_base + l->fileofs, l->filelen);
// Cheat!
// Run thru the lightmap data and average the colors to make it a shade of gray, haha!
for (i=0; i<l->filelen; i+=3)
{
int grayscale;
byte out;
grayscale = (loadmodel->lightdata[i] + loadmodel->lightdata[i+1] + loadmodel->lightdata[i+2])/3;
if (grayscale > 255) grayscale = 255;
if (grayscale < 0) grayscale = 0;
out = (byte)grayscale;
loadmodel->lightdata[i] = loadmodel->lightdata[i+1] = loadmodel->lightdata[i+2] = out;
}
return;
}
oh and if it helps line 522 is the first line in that code.
Yeah, what he said ^^^mh wrote:Post the 5 to 10 lines your code that come before it.
I've checked your block of code, it is fine. It is something like a missing curly brace ABOVE that block of code. Or maybe a semi-colon.
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-
- Posts: 54
- Joined: Thu Jul 15, 2010 1:58 am
- Location: Canada
ok thanks I found the problem, I was missing this:
lines of code after that.
Code: Select all
loadmodel->lightdata = Hunk_AllocName ( l->filelen, loadname);
memcpy (loadmodel->lightdata, mod_base + l->fileofs, l->filelen);
}
-
- Posts: 54
- Joined: Thu Jul 15, 2010 1:58 am
- Location: Canada
Are you using GLQuake or something based on WinQuake? WinQuake doesn't have lightofs. If you're using GLQuake you should delete model.h from your project.Hazematman wrote:Im trying to do spike's fix and I can get the first part done fine but I can't find the msurface_t lightofs field to divide by 3. Can anyone show me what to do?
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
We knew the words, we knew the score, we knew what we were fighting for
-
- Posts: 54
- Joined: Thu Jul 15, 2010 1:58 am
- Location: Canada