Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

I am too stoopid to live.

Sign in to follow this  


Oh man. What a dumb bug. I gotta make a post just about this stupid bug.

Okay, Bola has functionality to handle "shared" bitmaps. See Cammy down there? A lot of Street Fighter animations, I found, used a frame of animation more than once in the same sequence. Like if you throw a punch, the punch animation can be just the fist being thrown, then the same frames in reverse as the fist comes back. Rather than waste memory on duplicate frames, the same image is just recycled for multiple frames. It's a useful feature and my animation engine supports it.

So I'm trying to load these images en masse into Bola and I can't figure out why it's crashing whenever I try to draw one or access the bitmap member variables. I even tried to save a bitmap immediately after loading it, and it still crashed! So I go look at the shared bitmap class and what do I see?

     CSharedImage(BITMAP* img = NULL, int n = 0): numofuses(n), index(0), image(NULL) { }

... yeah. Where did THAT come from? No wonder my bitmaps wouldn't stay loaded. Like I said before, that's what you get for coming back to year-old code. Needless to say, I simply replaced "NULL" with "img" and everything works now, and I need to go clean out all the mess I added to the code to check for errors across half my source files. Now I'll just nip off and shoot myself.

Don't worry. I'll be very humane.

Just before I do that though, I need to direct your attention here. It's a new shareware game by a friend of mine who's been working on it in secret for several months now. The demo is highly cool and the whole package is very slick and professional; check it out. Us shareware folks need all the attention we can get ...
Sign in to follow this  

1 Comment

Recommended Comments


...I've probably done the same thing ten times.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!