Page 4 of 6

Posted: Tue Feb 02, 2010 2:31 am
by Team Xlink
I didn't mean you at all.

Posted: Tue Feb 02, 2010 3:06 am
by LonePossum.
Could anyone do a tutorial on it o_O.

Posted: Fri Mar 19, 2010 6:03 pm
by Ranger366
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.

Posted: Fri Mar 19, 2010 7:56 pm
by Teiman
Ranger366 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.
He..... his a new guy!.. wellcome :-)
Ask anything you need :-)

Posted: Sat Mar 20, 2010 5:43 pm
by Ranger366
Teiman wrote:
Ranger366 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.
He..... his a new guy!.. wellcome :-)
Ask anything you need :-)
Thanks :D

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.

Posted: Sat Jul 17, 2010 5:16 am
by Hazematman
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?

Posted: Sat Jul 17, 2010 10:37 am
by Baker
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?
Revert your file to the original and re-do steps 12a, 12b and 13 so you don't have the problem?

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.

Posted: Sat Jul 17, 2010 4:45 pm
by Hazematman
ok the code is

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; 
} 
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.

Posted: Sat Jul 17, 2010 6:17 pm
by mh
Post the 5 to 10 lines your code that come before it. ;)

Posted: Sat Jul 17, 2010 6:56 pm
by Baker
mh wrote:Post the 5 to 10 lines your code that come before it. ;)
Yeah, what he said ^^^

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.

Posted: Sat Jul 17, 2010 7:08 pm
by Hazematman
ok thanks I found the problem, I was missing this:

Code: Select all

loadmodel->lightdata = Hunk_AllocName ( l->filelen, loadname); 
memcpy (loadmodel->lightdata, mod_base + l->fileofs, l->filelen); 
}
lines of code after that.

Posted: Sun Jul 18, 2010 1:21 am
by Hazematman
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?

Posted: Sun Jul 18, 2010 2:41 am
by mh
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?
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.

Posted: Sun Jul 18, 2010 2:47 am
by Hazematman
Im not entirely sure what what you mean. its winquake being compile under GL release (I believe). but if I do a project search I can find two places where lightofs is used.

Posted: Sun Jul 18, 2010 4:11 am
by gnounc
zat mean you're back then?