Atrinik Client 2.5
include/sprite.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 SPRITE_H
00031 #define SPRITE_H
00032 
00038 #define BLTFX_FLAG_DARK     1
00039 
00040 #define BLTFX_FLAG_SRCALPHA 2
00041 
00042 #define BLTFX_FLAG_FOW      4
00043 
00044 #define BLTFX_FLAG_RED      8
00045 
00046 #define BLTFX_FLAG_GREY     16
00047 
00048 #define BLTFX_FLAG_STRETCH  32
00049 
00052 typedef struct _BLTFX
00053 {
00055     uint32 flags;
00056 
00058     SDL_Surface *surface;
00059 
00061     int dark_level;
00062 
00064     uint8 alpha;
00065 } _BLTFX;
00066 
00068 typedef struct _Sprite
00069 {
00071     int border_up;
00072 
00074     int border_down;
00075 
00077     int border_left;
00078 
00080     int border_right;
00081 
00083     SDL_Surface *bitmap;
00084 
00086     SDL_Surface *red;
00087 
00089     SDL_Surface *grey;
00090 
00092     SDL_Surface *fog_of_war;
00093 
00095     SDL_Surface *effect;
00096 
00098     SDL_Surface *dark_level[DARK_LEVELS];
00099 } _Sprite;
00100 
00106 #define ANIM_DAMAGE     1
00107 
00108 #define ANIM_KILL       2
00109 
00112 typedef struct _anim
00113 {
00115     struct _anim *next;
00116 
00118     struct _anim *before;
00119 
00121     int type;
00122 
00124     uint32 start_tick;
00125 
00127     uint32 last_tick;
00128 
00130     int value;
00131 
00133     int x;
00134 
00136     int y;
00137 
00139     int xoff;
00140 
00142     float yoff;
00143 
00145     int mapx;
00146 
00148     int mapy;
00149 }_anim;
00150 
00152 #define ASCII_UP 28
00153 
00154 #define ASCII_DOWN 29
00155 
00156 #define ASCII_LEFT 30
00157 
00158 #define ASCII_RIGHT 31
00159 
00160 extern struct _anim *start_anim;
00161 
00162 SDL_Surface *FormatHolder;
00163 
00164 #endif