00001
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _ALLEGRO5_
00014 #define _ALLEGRO5_
00015 #include <allegro5/allegro5.h>
00016 #endif // _ALLEGRO5_
00017
00018 #ifndef _IMAGESCALE_
00019 #define _IMAGESCALE_
00020 #include "../include/imagescale.h"
00021 #endif // _IMAGESCALE_
00022
00023
00024
00025 void scale(int init_width, int init_height)
00026 {
00027 ALLEGRO_TRANSFORM trans;
00028 float width = al_get_display_width();
00029 float height = al_get_display_height();
00030 al_identity_transform(&trans);
00031 al_scale_transform(&trans, width/init_width, height/init_height);
00032 al_use_transform(&trans);
00033 }
00034
00035
00036
00037 void nscale(void)
00038 {
00039 ALLEGRO_TRANSFORM trans;
00040 al_identity_transform(&trans);
00041 al_scale_transform(&trans, 1.0, 1.0);
00042 al_use_transform(&trans);
00043 }
00044
00045
00046
00047
00048
00049