1 /* 2 XorGramana Copyright 2009 James W. Morris, james@jwm-art.net 3 4 This file is part of XorGramana. 5 6 XorGramana is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 XorGramana is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with XorGramana. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 #ifndef MAPDISPLAY_H 20 #define MAPDISPLAY_H 21 22 #include "map.h" 23 #include "input.h" 24 25 enum MAP_KEYS 26 { 27 MAP_KEY_UP, 28 MAP_KEY_DOWN, 29 MAP_KEY_LEFT, 30 MAP_KEY_RIGHT, 31 MAP_KEY_IN, 32 MAP_KEY_OUT, 33 MAP_KEY_HIDE, 34 MAP_KEYS_XXX 35 }; 36 37 enum MAP_ICONS 38 { 39 MAP_FLOOR, 40 MAP_WALL, 41 MAP_MASK, 42 MAP_EXIT, 43 MAP_EXIT_OPEN, 44 MAP_BLANK, 45 MAP_SPACE, 46 MAP_ICONS_XXX 47 }; 48 49 extern struct xg_key** map_keys; 50 51 struct map_display_data 52 { 53 struct xy center; /* coordinates in map to use as center in display */ 54 su_t zoom; /* 8 = 8x8, 16 = 16x16, 32 = 32x32 */ 55 56 su_t min_zoom; 57 58 xy_t blk_count_x; /* values dependant on zoom */ 59 xy_t blk_count_y; 60 61 int map_tlx; 62 int map_tly; 63 int map_brx; 64 int map_bry; 65 SDL_Surface** zicons; 66 SDL_Surface* icons32[MAP_ICONS_XXX]; 67 SDL_Surface* icons16[MAP_ICONS_XXX]; 68 SDL_Surface* icons8[MAP_ICONS_XXX]; 69 }; 70 71 extern struct map_display_data map_display; 72 73 bool map_display_create_keys(); 74 void map_display_destroy_icons(); 75 void map_display_destroy_keys(); 76 77 void map_display_init(); 78 void map_display_show(); 79 80 #endif 81