- made AActor::alpha a floating point value

- replaced some uses of FRACUNIT with OPAQUE when it was about translucency.
- simplified some overly complicated translucency multiplications in the SBARINFO code.
This commit is contained in:
Christoph Oelckers 2016-03-21 12:18:46 +01:00
commit 4e60ea0252
50 changed files with 235 additions and 216 deletions

View file

@ -35,6 +35,20 @@
**
*/
// <wingdi.h> also #defines OPAQUE
#ifdef OPAQUE
#undef OPAQUE
#endif
enum
{
OPAQUE = 65536,
TRANSLUC25 = (OPAQUE / 4),
TRANSLUC33 = (OPAQUE / 3),
TRANSLUC66 = ((OPAQUE * 2) / 3),
TRANSLUC75 = ((OPAQUE * 3) / 4),
};
// Legacy render styles
enum ERenderStyle
{
@ -127,7 +141,7 @@ union FRenderStyle
operator uint32() const { return AsDWORD; }
bool operator==(const FRenderStyle &o) const { return AsDWORD == o.AsDWORD; }
void CheckFuzz();
bool IsVisible(fixed_t alpha) const throw();
bool IsVisible(double alpha) const throw();
private:
// Code that compares an actor's render style with a legacy render
// style value should be updated. Making these conversion operators
@ -152,5 +166,6 @@ class FArchive;
FArchive &operator<< (FArchive &arc, FRenderStyle &style);
fixed_t GetAlpha(int type, fixed_t alpha);
fixed_t GetAlpha(int type, double alpha);
#endif