From 4ca69f10c72456f04d9e225cd6e394a948ba8a63 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 7 Feb 2017 10:55:59 +0100 Subject: [PATCH] - removed a few unused definitions. --- src/oplsynth/muslib.h | 18 ------------------ src/r_data/renderstyle.cpp | 2 +- src/r_data/renderstyle.h | 4 ---- src/r_draw.cpp | 4 ++-- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/oplsynth/muslib.h b/src/oplsynth/muslib.h index e4b4ac5cbd..9091c85366 100644 --- a/src/oplsynth/muslib.h +++ b/src/oplsynth/muslib.h @@ -83,26 +83,9 @@ class FileReader; /* Global Definitions */ -#define MLVERSION 0x0175 -#define MLVERSIONSTR "1.75" -extern char MLversion[]; -extern char MLcopyright[]; - #define CHANNELS 16 // total channels 0..CHANNELS-1 #define PERCUSSION 15 // percussion channel -/* MUS file header structure */ -struct MUSheader { - char ID[4]; // identifier "MUS" 0x1A - WORD scoreLen; // score length - WORD scoreStart; // score start - WORD channels; // primary channels - WORD sec_channels; // secondary channels (??) - WORD instrCnt; // used instrument count - WORD dummy; -// WORD instruments[...]; // table of used instruments -}; - /* OPL2 instrument */ struct OPL2instrument { /*00*/ BYTE trem_vibr_1; /* OP 1: tremolo/vibrato/sustain/KSR/multi */ @@ -131,7 +114,6 @@ struct OP2instrEntry { }; #define FL_FIXED_PITCH 0x0001 // note has fixed pitch (see below) -#define FL_UNKNOWN 0x0002 // ??? (used in instrument #65 only) #define FL_DOUBLE_VOICE 0x0004 // use two voices instead of one diff --git a/src/r_data/renderstyle.cpp b/src/r_data/renderstyle.cpp index 6e656f715a..5c9dcc429b 100644 --- a/src/r_data/renderstyle.cpp +++ b/src/r_data/renderstyle.cpp @@ -103,7 +103,7 @@ double GetAlpha(int type, double alpha) switch (type) { case STYLEALPHA_Zero: return 0; - case STYLEALPHA_One: return OPAQUE; + case STYLEALPHA_One: return 1.; case STYLEALPHA_Src: return alpha; case STYLEALPHA_InvSrc: return 1. - alpha; default: return 0; diff --git a/src/r_data/renderstyle.h b/src/r_data/renderstyle.h index 501c14c5f9..947f9afeda 100644 --- a/src/r_data/renderstyle.h +++ b/src/r_data/renderstyle.h @@ -44,10 +44,6 @@ enum { OPAQUE = 65536, - TRANSLUC25 = (OPAQUE / 4), - TRANSLUC33 = (OPAQUE / 3), - TRANSLUC66 = ((OPAQUE * 2) / 3), - TRANSLUC75 = ((OPAQUE * 3) / 4), }; // Legacy render styles diff --git a/src/r_draw.cpp b/src/r_draw.cpp index 10bc104c2e..c4449f73bb 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -383,7 +383,7 @@ namespace swrenderer if (style.BlendOp == STYLEOP_Shadow) { style = LegacyRenderStyles[STYLE_TranslucentStencil]; - alpha = TRANSLUC33; + alpha = OPAQUE / 3; color = 0; } @@ -393,7 +393,7 @@ namespace swrenderer } else if (style.Flags & STYLEF_Alpha1) { - alpha = FRACUNIT; + alpha = OPAQUE; } else {