Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Basic Half-Life Map Support For Stock GLQuake Goto page Previous 1, 2, 3, 4, 5 Next

| Inside3d Forums Forum Index -> Programming Tutorials

View previous topic :: View next topic
Author | Message
--- | ---
Team Xlink Joined: 25 Jun 2009 Posts: 320 |

Posted: Tue Feb 02, 2010 2:31 am Post subject: |

I didn't mean you at all. _________________

Anonymous wrote:
if it works, it works. if it doesn't, HAHAHA!

Back to top |

LonePossum. Joined: 02 Nov 2009 Posts: 38 |

Posted: Tue Feb 02, 2010 3:06 am Post subject: |

Could anyone do a tutorial on it o_O.

Back to top |

Ranger366 Joined: 18 Mar 2010 Posts: 72 Location: Berlin (Germany) |

Posted: Fri Mar 19, 2010 6:03 pm Post subject: |

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.

Back to top |

Teiman Joined: 03 Jun 2007 Posts: 309 |

Posted: Fri Mar 19, 2010 7:56 pm Post subject: |

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

Back to top |

Ranger366 Joined: 18 Mar 2010 Posts: 72 Location: Berlin (Germany) |

Posted: Sat Mar 20, 2010 5:43 pm Post subject: |

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

Back to top |

Hazematman Joined: 15 Jul 2010 Posts: 31 |

Posted: Sat Jul 17, 2010 5:16 am Post subject: |

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?

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Sat Jul 17, 2010 10:37 am Post subject: |

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.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

Hazematman Joined: 15 Jul 2010 Posts: 31 |

Posted: Sat Jul 17, 2010 4:45 pm Post subject: |

ok the code is

Code:
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.

Back to top |

mh Joined: 12 Jan 2008 Posts: 909 |

Posted: Sat Jul 17, 2010 6:17 pm Post subject: |

Post the 5 to 10 lines your code that come before it. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010 MHQuake Blog (General) Direct3D 8 Quake Engines

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Sat Jul 17, 2010 6:56 pm Post subject: |

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.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

Hazematman Joined: 15 Jul 2010 Posts: 31 |

Posted: Sat Jul 17, 2010 7:08 pm Post subject: |

ok thanks I found the problem, I was missing this:

Code:
loadmodel->lightdata = Hunk_AllocName ( l->filelen, loadname); memcpy (loadmodel->lightdata, mod_base + l->fileofs, l->filelen); }

lines of code after that.

Back to top |

Hazematman Joined: 15 Jul 2010 Posts: 31 |

Posted: Sun Jul 18, 2010 1:21 am Post subject: |

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?

Back to top |

mh Joined: 12 Jan 2008 Posts: 909 |

Posted: Sun Jul 18, 2010 2:41 am Post subject: |

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.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines

Back to top |

Hazematman Joined: 15 Jul 2010 Posts: 31 |

Posted: Sun Jul 18, 2010 2:47 am Post subject: |

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.

Back to top |

gnounc Joined: 06 Apr 2009 Posts: 120 |

Posted: Sun Jul 18, 2010 4:11 am Post subject: |

zat mean you're back then?

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Programming Tutorials | All times are GMT Goto page Previous 1, 2, 3, 4, 5 Next
Page 4 of 5

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group