From 864fb5798e8e6416d9ddfa80d42c34143556da92 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 20 Sep 2012 02:14:43 +0000 Subject: [PATCH] - Added desaturated translation support to ACS. SVN r3878 (trunk) --- src/p_acs.cpp | 19 +++++++++++++++++++ src/p_acs.h | 1 + 2 files changed, 20 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 4fe558206..daffe0eae 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -6534,6 +6534,25 @@ scriptwait: } break; + case PCD_TRANSLATIONRANGE3: + { // translation using desaturation + int start = STACK(8); + int end = STACK(7); + fixed_t r1 = STACK(6); + fixed_t g1 = STACK(5); + fixed_t b1 = STACK(4); + fixed_t r2 = STACK(3); + fixed_t g2 = STACK(2); + fixed_t b2 = STACK(1); + sp -= 8; + + if (translation != NULL) + translation->AddDesaturation(start, end, + FIXED2DBL(r1), FIXED2DBL(g1), FIXED2DBL(b1), + FIXED2DBL(r2), FIXED2DBL(g2), FIXED2DBL(b2)); + } + break; + case PCD_ENDTRANSLATION: // This might be useful for hardware rendering, but // for software it is superfluous. diff --git a/src/p_acs.h b/src/p_acs.h index df2abdf84..c2e0e9155 100644 --- a/src/p_acs.h +++ b/src/p_acs.h @@ -601,6 +601,7 @@ public: PCD_PUSHFUNCTION, // from Eternity /*360*/ PCD_CALLSTACK, // from Eternity PCD_SCRIPTWAITNAMED, + PCD_TRANSLATIONRANGE3, /*361*/ PCODE_COMMAND_COUNT };