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 _ALLEGRO5FONT_
00019 #define _ALLEGRO5FONT_
00020 #include <allegro5/allegro_font.h>
00021 #endif // _ALLEGRO5FONT_
00022
00023 #ifndef _ALLEGRO5TTF_
00024 #define _ALLEGRO5TTF_
00025 #include <allegro5/allegro_ttf.h>
00026 #endif // _ALLEGRO5TTF_
00027
00028 #ifndef _ALLEGRO5IMAGE_
00029 #define _ALLEGRO5IMAGE_
00030 #include <allegro5/allegro_image.h>
00031 #endif // _ALLEGRO5IMAGE_
00032
00033 #ifndef _COMMONS_
00034 #define _COMMONS_
00035 #include "../include/commons.h"
00036 #endif // _COMMONS_
00037
00038 #ifndef _BUTTONS_
00039 #define _BUTTONS_
00040 #include "../include/buttons.h"
00041 #endif // _BUTTONS_
00042
00043 #ifndef _HOWTOPLAY_
00044 #define _HOWTOPLAY_
00045 #include "../include/howtoplay.h"
00046 #endif // _HOWTOPLAY_
00047
00048
00049
00050 static BUTTONPTR back = NULL;
00051
00052
00053
00054 void howtoplay(void)
00055 {
00056 GDATAPTR game = get_game_data();
00057 if(back == NULL)
00058 {
00059 back = create_new_button("BACK",
00060 "DEFAULT",
00061 "BACK",
00062 game->b_font,
00063 BCOLOR(255, 255, 255, 255),
00064 BCOLOR(65, 105, 255, 191),
00065 -280,
00066 500,
00067 50,
00068 BRIGHT,
00069 BVISIBLE,
00070 true
00071 );
00072 }
00073 }
00074
00075
00076
00077 void howtoplay_cleanup(void)
00078 {
00079 remove_element_from_button_list(&back);
00080 back = NULL;
00081 }
00082
00083
00084
00085 void exit_howtoplay(GDATAPTR game)
00086 {
00087 BUTTONPTR currentptr, firstptr = get_first_element_from_button_list();
00088 currentptr = search_button_list_for_element(&firstptr, "BACK");
00089 currentptr->bdata.limit = -280;
00090 currentptr->bdata.aflags = BLEFT;
00091 }
00092
00093
00094
00095
00096
00097