Need suggestion on c++ headers

1
2
3
4
5
6
7
8
#include <allegro5/allegro.h>
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <allegro5\timer.h>
#include <allegro5\allegro_audio.h>
#include <allegro5\allegro_acodec.h> 


I had ALLEGRO headers in my game, what if i want to replace them with pure headers of c++ only. I mean I dont want to use ALLEGRO, I want to keep it purely a c++ game. I want someone to help me out with suggesting equivalent names of standard c++ library headers for these ALLEGRO headers. And do let me know if there is any good introduction/manual for pure c++ headers.

UPDATE:
I am using windows platform.
Msvc 10
Just for rendering purpose only i will use opengl.
Rest things i want to do in c++ only.
Last edited on
There isn't standard C++ headers for those - you'll need a library of some sort or you'll need to write your own. In most cases, I'd strongly recommend you don't attempt the latter. Even if you did, you'd use libraries such as OpenGL, which aren't standard C++ headers.

There are alternatives to Allegro, though. SFML and SDL both offer similar functionality.
closed account (j3Rz8vqX)
I've always used sdl and sfml to do media projects.

But maybe something along this line can possibly help you:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd145203(v=vs.85).aspx

I have not worked directly with the GDI++

PNG with GDI++:
http://stackoverflow.com/questions/1905476/is-there-any-way-to-draw-a-png-image-on-window-without-using-mfc

As for everything else, I'm not sure if everything is available...

You can use GetKeyState for determining keys pressed:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646301(v=vs.85).aspx

Good luck with the rest.

BTW why would you not want to use a library made for media?

Edited:
If your not on windows, scratch this off your list - midnight posts are getting to me.
Last edited on
@Dput - your info is windows specific, codeONE didn't say what platform they are using.

like iHutch says, there are no standard library headers for this stuff. this is because these feature work very differently on different platforms so there is nothing "standard" about them.

however, you probably have libraries for your os already, and if you only want to run your code on your OS then you can use those libraries.

windows sdk has audio/image/font/timer methods you can use, as do almost all other OS sdk's.

But of course, if you use these sdk's your code wont compile for other platforms, which is what allegro is trying to do for you.
Guys actually it was more like a task given to me, I had to make a 2D game. So I used Allegro with c++ and successfully made a 2D side scrolling platformer. But now i am asked to get rid of allegro engine and develop it purely in C++.

'Purely' c++ ?? what is that?? I never saw anything for keyboard input events, audio support and such other things with c++ libraries.

So I am totally, confused, what to do and what to use.

So HELP people. Help me understand the situation. What would be your reaction if i asked you to remove ALLEGRO from your game and what would you do , thats what i wanna know.

In short, direct me!
I think you need a bit of clarification from whoever has asked.

You're still going to need some sort of library to handle graphics, input and audio, be it something as lightweight as OpenGL with GLFM and OpenAL audio.

You could also use OS specific functionality to do it but, again, that's far from 'pure' C++.

The only thing I can think of is that Allegro is written in C, not C++. Would a C++ multimedia library, such as SFML, suffice?

I definitely think you need the requirements clarified.
I am allowed to use OPENGL for rendering purpose only.

I am beginner at game development and i dont have knowledge of technical language here.

SO,I presume that rendering refers to drawing graphics primitives, camera transformation, media , audio, bitmap images etc.

Do correct me if I am wrong.

I thought that good coding skills is the only thing thats required but damn, rest of these things are so confusing especially pure c++ part. Thank god I have people ,like you all, here.
There is no equivalent headers. OpenGL is an entirely different library. It's much more low-level and requires more work and care to get something out of. OpenGL is graphics only as far as I know so you will not be able to have any keyboard input and things like that, unless you are allowed to use GLUT (OpenGL Utility Toolkit).
Last edited on
Topic archived. No new replies allowed.