Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: ##UnknownPlayer## on October 25, 2002, 01:28:35 am

Title: Compile Problems - DX8 branch
Post by: ##UnknownPlayer## on October 25, 2002, 01:28:35 am
I just downloaded a new fresh copy of the CVS DX8 branch, and I'm pulling a whole lot of errors (24 to be precise) up from it when I compile. It seems to be to do with BMP_NDEBUG defines and such. I was wondering it someone would enlighten me as to the specifics of this addition?
Title: Compile Problems - DX8 branch
Post by: Inquisitor on October 25, 2002, 06:25:30 am
Dump this in bugzilla if you get a chance.

Thanks :)
Title: Compile Problems - DX8 branch
Post by: Righteous1 on October 25, 2002, 09:09:14 am
Move the following #defines from bmpman.cpp to bmpman.h:

#ifndef NDEBUG
#define BMPMAN_NDEBUG
#endif

RT moved some stuff around and missed moving this.  He's got it fixed, just hasn't released it yet I guess.
Title: Compile Problems - DX8 branch
Post by: ##UnknownPlayer## on October 25, 2002, 09:39:59 am
Yeah, I figured that one out. Problem now is I'm getting fatal exceptions in the tga loading code - seems to stem from it trying to call free(targa_file) where targa_file is a file pointer (or a pointer to a large area of memory where a file is stored - I'm really not sure). I can comment it out and it'll execute past that, but then I get another exception from a null pointer. What's going on with that?
Title: Compile Problems - DX8 branch
Post by: RandomTiger on October 25, 2002, 11:49:58 am
Sorry guys, looks like I've been messing up!
Im sure I commited that BMPMAN_NDEBUG fix.
I'll look into the other problem.

Edit: Looks like I didnt check in that fix, must have dreamt it!
Edit2: Wow, just seen the tga bug, I was freeing a FILE pointer!

Wasnt even crashing for me, was causing a strange texture problem though. Anyway its all fixed up and Im off to commit. Checkout a fresh copy if you can.
Title: Compile Problems - DX8 branch
Post by: RandomTiger on October 25, 2002, 12:39:40 pm
That problem should only be showing up when loading tgas. Delete any tga's you have in the data dir as thats code Im developing and you'll save yourself hassle by not going through it.
Title: Compile Problems - DX8 branch
Post by: RandomTiger on October 25, 2002, 02:02:35 pm
I dont seem to have write access!

To fix the problems:

Move

#ifndef NDEBUG
#define BMPMAN_NDEBUG
#endif

From the top of bmpman.cpp to bmpman.h above the structures that use it.

And to fix the other bug, in grd3dtexture.cpp change

free(targa_file);

to

free(tga_data);

Could either UP or R1 do this as obviously I cant!