Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void mouse() {
- int my_pic_y =- 2 - (mapa[1][0][m_tam - 1] * 5); p_y = m_tam - 1;
- int na_area_central = 0;
- mostramenu = 1;
- ALLEGRO_BITMAP *area_central = 0;
- area_central = al_create_bitmap(18, 18);
- if (ev.type == ALLEGRO_EVENT_MOUSE_AXES) {
- if (ev.mouse.x >= 656 - al_get_bitmap_width(area_central) / 2 &&
- ev.mouse.x <= 656 + al_get_bitmap_width(area_central) / 2 &&
- ev.mouse.y >= 90 - al_get_bitmap_height(area_central) / 2 &&
- ev.mouse.y <= 90 + al_get_bitmap_height(area_central) / 2)
- {
- na_area_central = 1;
- }
- else
- {
- na_area_central = 0;
- }
- }
- else if (ev.type == ALLEGRO_EVENT_MOUSE_BUTTON_DOWN) {
- }
- al_set_target_bitmap(area_central);
- if (!na_area_central) {
- al_clear_to_color(al_map_rgb(255, 255, 255));
- }
- else
- {
- al_clear_to_color(al_map_rgb(0, 255, 0));
- }
- al_set_target_bitmap(al_get_backbuffer(display));
- al_draw_bitmap(area_central, 656 - al_get_bitmap_width(area_central) / 2,
- 90 - al_get_bitmap_height(area_central) / 2, 0);
- if (mostramenu == 1) {
- if (mapa[0][p_x][p_y] == 1) {
- al_draw_bitmap(tile, 680, 82, 0);
- }
- else if (mapa[0][p_x][p_y] == 2) {
- al_draw_bitmap(tile2, 680, 82, 0);
- }
- }
- al_destroy_bitmap(area_central);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement