From 8e942561f1bdad95acc816e9f5fe352960bcb304 Mon Sep 17 00:00:00 2001 From: bjorn Date: Fri, 1 Feb 2019 15:10:12 -0800 Subject: [PATCH] Simplify CompareMode handling; --- src/api/graphics.c | 7 ------- src/graphics/graphics.h | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/api/graphics.c b/src/api/graphics.c index 7f1cb87a..9f1c416b 100644 --- a/src/api/graphics.c +++ b/src/api/graphics.c @@ -63,7 +63,6 @@ const char* BufferUsages[] = { }; const char* CompareModes[] = { - [COMPARE_NONE] = "always", [COMPARE_EQUAL] = "equal", [COMPARE_NEQUAL] = "notequal", [COMPARE_LESS] = "less", @@ -561,12 +560,6 @@ static int l_lovrGraphicsGetStencilTest(lua_State* L) { CompareMode mode; int value; lovrGraphicsGetStencilTest(&mode, &value); - - if (mode == COMPARE_NONE) { - lua_pushnil(L); - return 1; - } - lua_pushstring(L, CompareModes[mode]); lua_pushinteger(L, value); return 2; diff --git a/src/graphics/graphics.h b/src/graphics/graphics.h index 7cc697b8..f0295038 100644 --- a/src/graphics/graphics.h +++ b/src/graphics/graphics.h @@ -41,13 +41,13 @@ typedef enum { } BlendAlphaMode; typedef enum { - COMPARE_NONE, COMPARE_EQUAL, COMPARE_NEQUAL, COMPARE_LESS, COMPARE_LEQUAL, COMPARE_GREATER, - COMPARE_GEQUAL + COMPARE_GEQUAL, + COMPARE_NONE } CompareMode; typedef enum {