/* Kitsune's Curse Copyright (C) 2020-2023 Juan J. Martinez This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _MAPS_H #define _MAPS_H #include #ifndef LOCAL #define LOCAL extern #endif void init_map(uint8_t m); void set_map(uint8_t m); void draw_map(); uint8_t exit_map_left(); uint8_t exit_map_right(); uint8_t exit_map_up(); uint8_t exit_map_down(); void set_map_tile(uint8_t x, uint8_t y, uint8_t tile); uint8_t is_map_blocked(uint8_t x, uint8_t y); uint8_t is_map_deadly(uint8_t x, uint8_t y); LOCAL uint8_t cmap, ts; LOCAL uint8_t exit_up, offset_up, exit_down, offset_down; LOCAL uint8_t last_deadly; LOCAL uint8_t wmap[TMW * TMH]; // highest bit denotes deadly tile #define DEADLY_TILE_BASE 59 #define BLOCKED_PLATFORM 128 #define BLOCKED_OPEN_DOOR 143 #define BLOCKED_OPEN_DOOR_TILE 43 #define SWITCH_DOOR_TILE 58 #define BLOCKED_UP (1<<4) #define BLOCKED_DOWN (1<<5) #define BLOCKED_LEFT (1<<6) #define BLOCKED_RIGHT (1<<7) #define LAST_TILE_TILESET 48 #define LAST_NON_SOLID 10 #undef LOCAL #endif // _MAPS_H