(no subject)

Sep 24, 2003 00:06

Well.

After a restart and a fresh compile, it turned out it WAS Dev-C++ (or Ming32, whatever), so I was able to isolate the problem.

That just made it even more confusing.

Basically:

class sprite
{
blah
SDL_Surface* baseimg;
};

sprite::sprite(blah)
{
blah
char * stringe;
blah (stringe is set to base.bmp)
baseimg = SDL_LoadBMP(stringe);

And that's what crashes it. I'm pretty sure it's not stringe; because I've both tested it (it's correct), and I've hard-coded various image filenames into it. The images DO exist, and the filenames ARE correct. So why does setting a SDL_Surface * with SDL_LoadBMP(char*filename) crash my program? =. The confusion is overwhelming.

Dave, you have the code, and what I have is the same except for a couple log strings (since it crashes, NOW); So what do you see? =. I don't get it. :continues to work, or goes to bed, something:

[EDIT: Never mind. I feel stupid being blatant. I need to just forget it.]

[EDIT NUMBER TWO: Well, uh, it turns out you can't call SDL_LoadBMP from within an open file stream. At least not one named file. So that solves that. Sorta.]

[EDIT NUMBER THREE: Not solves much. You were partially right, Dave; Something to do with the pointer deletion was screwy; I removed all of those, and it doesn't crash now... but it also quit logging. I think this entire thing is screwed. I really shoulda just gone through that damn sprite tutorial of Marius's, but I always get halfway and then fall asleep.. Like now. Night.]
Previous post Next post
Up