2017-01-03 06:17:54 +00:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
2016-12-30 06:26:25 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2016-12-31 11:45:07 +00:00
|
|
|
#include "r_visiblesprite.h"
|
2017-01-11 19:42:39 +00:00
|
|
|
#include "swrenderer/scene/r_opaque_pass.h"
|
2016-12-30 06:26:25 +00:00
|
|
|
|
2017-01-16 04:43:56 +00:00
|
|
|
struct particle_t;
|
|
|
|
|
2016-12-30 06:26:25 +00:00
|
|
|
namespace swrenderer
|
|
|
|
{
|
2017-01-16 04:26:22 +00:00
|
|
|
class RenderParticle : public VisibleSprite
|
2017-01-11 17:14:04 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-01-12 19:13:21 +00:00
|
|
|
static void Project(particle_t *, const sector_t *sector, int shade, WaterFakeSide fakeside, bool foggy);
|
2017-01-16 04:26:22 +00:00
|
|
|
|
2017-01-16 04:43:56 +00:00
|
|
|
protected:
|
2017-01-16 04:26:22 +00:00
|
|
|
bool IsParticle() const override { return true; }
|
|
|
|
void Render(short *cliptop, short *clipbottom, int minZ, int maxZ) override;
|
2017-01-11 17:14:04 +00:00
|
|
|
|
|
|
|
private:
|
2017-01-16 04:26:22 +00:00
|
|
|
void DrawMaskedSegsBehindParticle();
|
|
|
|
|
2017-01-24 01:28:32 +00:00
|
|
|
fixed_t xscale = 0;
|
|
|
|
fixed_t startfrac = 0; // horizontal position of x1
|
|
|
|
int y1 = 0, y2 = 0;
|
2017-01-16 04:26:22 +00:00
|
|
|
|
2017-01-24 01:28:32 +00:00
|
|
|
uint32_t Translation = 0;
|
|
|
|
uint32_t FillColor = 0;
|
2017-01-11 17:14:04 +00:00
|
|
|
};
|
2016-12-30 06:26:25 +00:00
|
|
|
}
|