From b412ebd0af9c33585566c60dde59a928f720e891 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 8 Nov 2012 17:01:26 +0100 Subject: [PATCH] Issue #219: Supoort for inverted select structs --- apps/openmw/mwdialogue/selectwrapper.cpp | 9 +++++++-- apps/openmw/mwdialogue/selectwrapper.hpp | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwdialogue/selectwrapper.cpp b/apps/openmw/mwdialogue/selectwrapper.cpp index a45c0adc0b..704c4c7ef2 100644 --- a/apps/openmw/mwdialogue/selectwrapper.cpp +++ b/apps/openmw/mwdialogue/selectwrapper.cpp @@ -51,12 +51,17 @@ MWDialogue::SelectWrapper::Type MWDialogue::SelectWrapper::getType() const return Type_None; } +bool MWDialogue::SelectWrapper::IsInverted() const +{ + return false; +} + bool MWDialogue::SelectWrapper::selectCompare (int value) const { - return selectCompareImp (mSelect, value); + return selectCompareImp (mSelect, value)!=IsInverted(); // logic XOR } bool MWDialogue::SelectWrapper::selectCompare (float value) const { - return selectCompareImp (mSelect, value); + return selectCompareImp (mSelect, value)!=IsInverted(); // logic XOR } diff --git a/apps/openmw/mwdialogue/selectwrapper.hpp b/apps/openmw/mwdialogue/selectwrapper.hpp index acc3e9cc47..c4d954d533 100644 --- a/apps/openmw/mwdialogue/selectwrapper.hpp +++ b/apps/openmw/mwdialogue/selectwrapper.hpp @@ -31,6 +31,8 @@ namespace MWDialogue Type getType() const; + bool IsInverted() const; + bool selectCompare (int value) const; bool selectCompare (float value) const;