|
Odamex
Setting the Standard in Multiplayer Doom
|
00001 // Emacs style mode select -*- C++ -*- 00002 //----------------------------------------------------------------------------- 00003 // 00004 // $Id: p_pspr.h 1788 2010-08-24 04:42:57Z russellrice $ 00005 // 00006 // Copyright (C) 1993-1996 by id Software, Inc. 00007 // Copyright (C) 2006-2010 by The Odamex Team. 00008 // 00009 // This program is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU General Public License 00011 // as published by the Free Software Foundation; either version 2 00012 // of the License, or (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 // DESCRIPTION: 00020 // Sprite animation. 00021 // 00022 //----------------------------------------------------------------------------- 00023 00024 00025 #ifndef __P_PSPR_H__ 00026 #define __P_PSPR_H__ 00027 00028 // Basic data types. 00029 // Needs fixed point, and BAM angles. 00030 #include "m_fixed.h" 00031 #include "tables.h" 00032 00033 00034 // 00035 // Needs to include the precompiled 00036 // sprite animation tables. 00037 // Header generated by multigen utility. 00038 // This includes all the data for thing animation, 00039 // i.e. the Thing Atrributes table 00040 // and the Frame Sequence table. 00041 #include "info.h" 00042 00043 // 00044 // Frame flags: 00045 // handles maximum brightness (torches, muzzle flare, light sources) 00046 // 00047 #define FF_FULLBRIGHT 0x8000 // flag in thing->frame 00048 #define FF_FRAMEMASK 0x7fff 00049 00050 00051 00052 // 00053 // Overlay psprites are scaled shapes 00054 // drawn directly on the view screen, 00055 // coordinates are given for a 320*200 view screen. 00056 // 00057 typedef enum 00058 { 00059 ps_weapon, 00060 ps_flash, 00061 NUMPSPRITES 00062 00063 } psprnum_t; 00064 00065 inline FArchive &operator<< (FArchive &arc, psprnum_t i) 00066 { 00067 return arc << (BYTE)i; 00068 } 00069 inline FArchive &operator>> (FArchive &arc, psprnum_t &out) 00070 { 00071 BYTE in; arc >> in; out = (psprnum_t)in; return arc; 00072 } 00073 00074 typedef struct pspdef_s 00075 { 00076 state_t* state; // a NULL state means not active 00077 int tics; 00078 fixed_t sx; 00079 fixed_t sy; 00080 00081 } pspdef_t; 00082 00083 FArchive &operator<< (FArchive &, pspdef_t &); 00084 FArchive &operator>> (FArchive &, pspdef_t &); 00085 00086 #endif // __P_PSPR_H__ 00087 00088