0

void al_scale_transform(ALLEGRO_TRANSFORM *trans, float sx, float sy);

I guess this function zoom in and zoom out in allegro 5.But I use allegro 4.4. How can I zoom in and zoom out in Allegro 4.4 game programming library? Which function?

o_O
  • 51
  • 7

1 Answers1

0

I have bad news for you...

In allegro 4 the TRANSFORM object doesn't exist, so you have to handle the matrices yourself to do any kind of transformation on the render surface.

I don't use allegro 4, however, it does have a full chapter on the API about 3D-math routines that might assist you in scaling a bitmap. Keep in mind this is not hardware accelerated as-is because that library was not designed for that, so expect a hit on performance using this functions.

As a side note, here is the definition of a built-in MATRIXtype on allegro 4's library.

If you are not supporting some legacy code from Allegro 4, I would honestly recommend to use the newer Allegro 5 library for a new project as it is the one where the new features are worked on and I personally find it easier to use and better designed.

rlam12
  • 603
  • 5
  • 16