|
Odamex
Setting the Standard in Multiplayer Doom
|
00001 // Emacs style mode select -*- C++ -*- 00002 //----------------------------------------------------------------------------- 00003 // 00004 // $Id: r_things.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 // Rendering of moving objects, sprites. 00021 // 00022 //----------------------------------------------------------------------------- 00023 00024 00025 #ifndef __R_THINGS__ 00026 #define __R_THINGS__ 00027 00028 // [RH] Particle details 00029 struct particle_s { 00030 fixed_t x,y,z; 00031 fixed_t velx,vely,velz; 00032 fixed_t accx,accy,accz; 00033 byte ttl; 00034 byte trans; 00035 byte size; 00036 byte fade; 00037 int color; 00038 int next; 00039 }; 00040 typedef struct particle_s particle_t; 00041 00042 extern int NumParticles; 00043 extern int ActiveParticles; 00044 extern int InactiveParticles; 00045 extern particle_t *Particles; 00046 00047 #ifdef _MSC_VER 00048 __inline particle_t *NewParticle (void) 00049 { 00050 particle_t *result = NULL; 00051 if (InactiveParticles != -1) { 00052 result = Particles + InactiveParticles; 00053 InactiveParticles = result->next; 00054 result->next = ActiveParticles; 00055 ActiveParticles = result - Particles; 00056 } 00057 return result; 00058 } 00059 #else 00060 particle_t *NewParticle (void); 00061 #endif 00062 void R_InitParticles (void); 00063 void R_ClearParticles (void); 00064 void R_DrawParticle (vissprite_t *, int, int); 00065 void R_ProjectParticle (particle_t *); 00066 00067 00068 extern int MaxVisSprites; 00069 00070 extern vissprite_t *vissprites; 00071 extern vissprite_t* vissprite_p; 00072 extern vissprite_t vsprsortedhead; 00073 00074 // Constant arrays used for psprite clipping 00075 // and initializing clipping. 00076 extern int *negonearray; 00077 extern int *screenheightarray; 00078 00079 // vars for R_DrawMaskedColumn 00080 extern int* mfloorclip; 00081 extern int* mceilingclip; 00082 extern fixed_t spryscale; 00083 extern fixed_t sprtopscreen; 00084 00085 extern fixed_t pspritexscale; 00086 extern fixed_t pspriteyscale; 00087 extern fixed_t pspritexiscale; 00088 00089 00090 void R_DrawMaskedColumn (column_t* column); 00091 00092 00093 void R_CacheSprite (spritedef_t *sprite); 00094 void R_SortVisSprites (void); 00095 void R_AddSprites (sector_t *sec, int lightlevel); 00096 void R_AddPSprites (void); 00097 void R_DrawSprites (void); 00098 void R_InitSprites (const char** namelist); 00099 void R_ClearSprites (void); 00100 void R_DrawMasked (void); 00101 00102 #endif 00103