mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-19 19:01:24 +00:00
b8eb530a0d
completely ignore them, either). - Separated light level fixing out of player_t's fixedcolormap parameter. Using a fixed light level (e.g. PowerTorch) will no longer wipe out colored lighting. - Moved the blending rectangle drawing into a separate discrete stage, since doing it while copying the 3D view window to the display now blends underneath the weapon instead of on top of it. - Consolidated the special colormaps into a single 2D table. - Tweaked the special colormaps slightly to make the true color results more closely match the paletted approximations. - fb_d3d9_shaders.h was getting unwieldy, so I moved the shaders out of the executable and into zdoom.pk3. Shaders are still precompiled so I don't need to pull in a dependancy on D3DX. - Added a few more shaders to accomodate drawing weapons with all the in-game lighting models. These are accessed with the new DrawTexture tags DTA_SpecialColormap and DTA_ColormapStyle. - Player weapon sprites are now drawn using Direct3D and receive all the benefits thereof. SVN r1858 (trunk)
110 lines
2.8 KiB
C++
110 lines
2.8 KiB
C++
// Emacs style mode select -*- C++ -*-
|
|
//-----------------------------------------------------------------------------
|
|
//
|
|
// $Id:$
|
|
//
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
//
|
|
// This source is available for distribution and/or modification
|
|
// only under the terms of the DOOM Source Code License as
|
|
// published by id Software. All rights reserved.
|
|
//
|
|
// The source is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
// for more details.
|
|
//
|
|
// DESCRIPTION:
|
|
// Rendering of moving objects, sprites.
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
#ifndef __R_THINGS__
|
|
#define __R_THINGS__
|
|
|
|
// [RH] Particle details
|
|
struct particle_t
|
|
{
|
|
fixed_t x,y,z;
|
|
fixed_t velx,vely,velz;
|
|
fixed_t accx,accy,accz;
|
|
BYTE ttl;
|
|
BYTE trans;
|
|
BYTE size;
|
|
BYTE fade;
|
|
int color;
|
|
WORD tnext;
|
|
WORD snext;
|
|
subsector_t * subsector;
|
|
};
|
|
|
|
extern WORD NumParticles;
|
|
extern WORD ActiveParticles;
|
|
extern WORD InactiveParticles;
|
|
extern particle_t *Particles;
|
|
|
|
const WORD NO_PARTICLE = 0xffff;
|
|
|
|
inline particle_t *NewParticle (void)
|
|
{
|
|
particle_t *result = NULL;
|
|
if (InactiveParticles != NO_PARTICLE)
|
|
{
|
|
result = Particles + InactiveParticles;
|
|
InactiveParticles = result->tnext;
|
|
result->tnext = ActiveParticles;
|
|
ActiveParticles = WORD(result - Particles);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
void R_InitParticles ();
|
|
void R_DeinitParticles ();
|
|
void R_ClearParticles ();
|
|
void R_DrawParticle (vissprite_t *);
|
|
void R_ProjectParticle (particle_t *, const sector_t *sector, int shade, int fakeside);
|
|
void R_FindParticleSubsectors ();
|
|
|
|
extern TArray<WORD> ParticlesInSubsec;
|
|
|
|
extern int MaxVisSprites;
|
|
|
|
extern vissprite_t **vissprites, **firstvissprite;
|
|
extern vissprite_t **vissprite_p;
|
|
|
|
// Constant arrays used for psprite clipping
|
|
// and initializing clipping.
|
|
extern short zeroarray[MAXWIDTH];
|
|
extern short screenheightarray[MAXWIDTH];
|
|
|
|
// vars for R_DrawMaskedColumn
|
|
extern short* mfloorclip;
|
|
extern short* mceilingclip;
|
|
extern fixed_t spryscale;
|
|
extern fixed_t sprtopscreen;
|
|
extern bool sprflipvert;
|
|
|
|
extern fixed_t pspritexscale;
|
|
extern fixed_t pspriteyscale;
|
|
extern fixed_t pspritexiscale;
|
|
|
|
|
|
void R_DrawMaskedColumn (const BYTE *column, const FTexture::Span *spans);
|
|
|
|
|
|
void R_CacheSprite (spritedef_t *sprite);
|
|
void R_SortVisSprites (int (STACK_ARGS *compare)(const void *, const void *), size_t first);
|
|
void R_AddSprites (sector_t *sec, int lightlevel, int fakeside);
|
|
void R_AddPSprites ();
|
|
void R_DrawSprites ();
|
|
void R_InitSprites ();
|
|
void R_DeinitSprites ();
|
|
void R_ClearSprites ();
|
|
void R_DrawMasked ();
|
|
void R_DrawRemainingPlayerSprites ();
|
|
|
|
void R_ClipVisSprite (vissprite_t *vis, int xl, int xh);
|
|
|
|
|
|
#endif
|