Basically, I have been writing a game in C++ using Allegro. I mostly just use the library to draw bitmaps, draw text, and play audio.
My main concern as the game continues to grow code-wise, is that with all the places I use
al_play_sample, etc it becomes harder and harder to ever switch libraries if I so desire.
Aka all the places in code I would have to change the function calls and data types (ALLEGRO_BITMAP, ALLEGRO_SAMPLE, ALLEGRO_COLOR, etc).
I was wondering if it is a good idea to make a class (or classes) with generic mappings so that my code calls my own DrawImage(), PlaySound(), etc and then maybe typecast the data types (ALLEGRO_BITMAP, etc)?
This way its much less to change in the long run. I understand there would still be work involved and obviously I could only switch to another C++ library.
I'm not sure if there is a reason why this would be a bad idea, or if its actually a good idea, whats the best way to go about it.