Atrinik Client 2.5
include/map.h
Go to the documentation of this file.
00001 /************************************************************************
00002 *            Atrinik, a Multiplayer Online Role Playing Game            *
00003 *                                                                       *
00004 *    Copyright (C) 2009-2011 Alex Tokar and Atrinik Development Team    *
00005 *                                                                       *
00006 * Fork from Daimonin (Massive Multiplayer Online Role Playing Game)     *
00007 * and Crossfire (Multiplayer game for X-windows).                       *
00008 *                                                                       *
00009 * This program is free software; you can redistribute it and/or modify  *
00010 * it under the terms of the GNU General Public License as published by  *
00011 * the Free Software Foundation; either version 2 of the License, or     *
00012 * (at your option) any later version.                                   *
00013 *                                                                       *
00014 * This program is distributed in the hope that it will be useful,       *
00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00017 * GNU General Public License for more details.                          *
00018 *                                                                       *
00019 * You should have received a copy of the GNU General Public License     *
00020 * along with this program; if not, write to the Free Software           *
00021 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.             *
00022 *                                                                       *
00023 * The author can be reached at admin@atrinik.org                        *
00024 ************************************************************************/
00025 
00030 #ifndef MAP_H
00031 #define MAP_H
00032 
00034 #define MAP_START_XOFF 386
00035 
00037 #define MAP_START_YOFF 143
00038 
00040 #define MAP_TILE_POS_YOFF 23
00041 
00043 #define MAP_TILE_POS_YOFF2 12
00044 
00046 #define MAP_TILE_POS_XOFF 48
00047 
00049 #define MAP_TILE_POS_XOFF2 24
00050 
00052 #define MAP_TILE_XOFF 12
00053 
00055 #define MAP_TILE_YOFF 24
00056 
00058 #define MAX_LAYERS 7
00059 
00061 typedef struct _multi_part_tile
00062 {
00064     int xoff;
00065 
00067     int yoff;
00068 } _multi_part_tile;
00069 
00077 typedef struct _multi_part_obj
00078 {
00080     int xlen;
00081 
00083     int ylen;
00084 
00086     _multi_part_tile part[16];
00087 } _multi_part_obj;
00088 
00090 typedef struct _mapdata
00091 {
00093     char name[HUGE_BUF];
00094 
00096     int xlen;
00097 
00099     int ylen;
00100 
00102     int posx;
00103 
00105     int posy;
00106 } _mapdata;
00107 
00109 struct MapCell
00110 {
00112     uint8 quick_pos[MAX_LAYERS + 1];
00113 
00115     char pcolor[MAX_LAYERS + 1][COLOR_BUF];
00116 
00118     uint8 probe[MAX_LAYERS + 1];
00119 
00121     uint8 darkness;
00122 
00124     uint8 flags[MAX_LAYERS + 1];
00125 
00127     uint8 draw_double[MAX_LAYERS + 1];
00128 
00130     uint8 alpha[MAX_LAYERS + 1];
00131 
00133     sint16 faces[MAX_LAYERS + 1];
00134 
00136     sint16 height[MAX_LAYERS + 1];
00137 
00139     sint16 zoom[MAX_LAYERS + 1];
00140 
00142     sint16 align[MAX_LAYERS + 1];
00143 
00145     sint16 rotate[MAX_LAYERS + 1];
00146 
00148     uint8 infravision[MAX_LAYERS + 1];
00149 
00151     uint32 stretch;
00152 
00154     char pname[MAX_LAYERS + 1][64];
00155 } MapCell;
00156 
00158 struct Map
00159 {
00161     struct MapCell cells[MAP_MAX_SIZE][MAP_MAX_SIZE];
00162 } Map;
00163 
00164 extern _mapdata MapData;
00165 
00166 #endif