From 7c16a9a32a6706e633a5b0b1667205e7d41bf7ca Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 3 Aug 2018 10:47:20 +0200 Subject: [PATCH] texture aura option --- config.cpp | 2 ++ graph.cpp | 2 +- hyper.h | 3 +++ textures.cpp | 11 +++++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/config.cpp b/config.cpp index 8fe1f1d4..e92b0c6c 100644 --- a/config.cpp +++ b/config.cpp @@ -273,6 +273,8 @@ void initConfig() { addsaver(vid.linequality, "line quality", 0); + addsaver(texture::texture_aura, "texture-aura", false); + #if CAP_SHMUP shmup::initConfig(); #endif diff --git a/graph.cpp b/graph.cpp index dec047df..3c181fd2 100644 --- a/graph.cpp +++ b/graph.cpp @@ -4639,7 +4639,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { queuepolyat(V, shDisk, 0xC0404040, PPR_SWORDMARK); } - addaura(tC0(V), zcol, fd); + if(!texture::using_aura()) addaura(tC0(V), zcol, fd); int ad = airdist(c); if(ad == 1 || ad == 2) { diff --git a/hyper.h b/hyper.h index 4d093b40..8bedc615 100644 --- a/hyper.h +++ b/hyper.h @@ -2903,6 +2903,9 @@ namespace texture { extern bool texturesym; extern cpatterntype cgroup; + + extern bool texture_aura; + bool using_aura(); } #endif diff --git a/textures.cpp b/textures.cpp index 4ab9f662..a9a8f3aa 100644 --- a/textures.cpp +++ b/textures.cpp @@ -342,6 +342,12 @@ int texture_config::recolor(int col) { return col; } +bool texture_aura; + +bool using_aura() { + return texture_aura && config.tstate == texture::tsActive; + } + bool texture_config::apply(cell *c, const transmatrix &V, int col) { if(config.tstate == tsOff) return false; @@ -368,8 +374,7 @@ bool texture_config::apply(cell *c, const transmatrix &V, int col) { lastptd().u.poly.outline = grid_color; } - if(texture::saving) { - // create a nicer aura for saved texture + if(using_aura()) { for(int i=0; i