I'm just now learning Allegro, and all the tutorials I have looked at have used a function called textout_ex to print things out to the screen.

The problem is - textout_ex is really starting to p*ss me off horribly because of how specific you must be in the info you give it.
(for example, you can only print out char* variables, and nothing else, unless its inside quotations, and you can only print out 1 set of info)

question - is there anything better to use besides textout_ex?

Just make a wrapper function :

void print(std::string msg, int posX, int posY, int color){
 textout_ex(screen, font, msg.c_str(),posX, posY, color);
}

And use it like so :

void doo(){
 string msg = "hello 2d world!";
 print(msg,0,0,makecol(255,0,0));
}

an even better wrapper :

void print(std::string msg, Vec2d pos, int color){
 textout_ex(screen, font, msg.c_str(),pos.x, pos.y, color);
}

Where Vec2D is a class that holds the x and y position of an object.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.