• entries
686
1952
• views
387716

# Of interest...Okay I lied!

90 views

I finally took advantage of AllegroFont, which is an extremely easy to use library. I still need to get a font that is easier to read, but the point is made.

I seem to have isolated the exact line of code that is crashing my game when it exits. I have clearly marked it within the method that it is taking place:

void CApp::m_End(){        destroy_bitmap(m_Sglobals.buffer);    destroy_bitmap(m_Sglobals.player);    destroy_bitmap(m_Sglobals.bg);    destroy_bitmap(m_Sglobals.enemy[0]);    destroy_bitmap(m_Sglobals.enemy[1]);    destroy_bitmap(m_Sglobals.shot);    destroy_bitmap(m_Sglobals.title);    destroy_bitmap(m_Sglobals.otherproducts);    destroy_bitmap(m_Sglobals.explode);    destroy_bitmap(m_Sglobals.coin);    destroy_bitmap(m_Sglobals.rifle);    destroy_bitmap(m_Sglobals.shotgun);    destroy_bitmap(m_Sglobals.health_pack);    destroy_bitmap(m_Sglobals.magnum);    destroy_bitmap(m_Sglobals.smg);        alfont_destroy_font(m_Sglobals.Stompy_font);        // Crash! ///////////////////////////    unload_datafile(m_Sglobals.GameRes);     /////////////////////////////////////        fprintf(log, "Resource memory freed...\n");      }

This is a pretty bad situation, although, at least the BITMAP pointers are being deleted.

Now I've gotta implement FMOD into the mix. I've tried this twice already with results that made the program crash. After looking at some FMOD tutorials, I determined that I was passing some weird values to the functions, which is probably what is crashing the program. I'd rather just use AllegroMp3, but the documentation for that is very poor. Does anyone know any good AllegroMp3 tutorials? An imaginary cookie for anyone who tells me where to find one!

I would try again with FMOD if I where you, once you get it working it does everything you need. If you download the FMOD zip off their website it comes with quite a good help file.

You probably need FSOUND_Stream_Open to use MP3s. don't forget to use F_SOUND_Init too.

Very pretty. I like those logos.

## Create an account

Register a new account

×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!