summaryrefslogtreecommitdiff
path: root/src/graphics
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-08-22 15:58:37 (GMT)
committer jacob1 <jfu614@gmail.com>2013-08-22 15:58:37 (GMT)
commit6ef3f4126fce8e4aaa1173f202d83db7cff6ec17 (patch)
treea627d039c8cf9952a9843fb11da690e6ab61f1f2 /src/graphics
parent68984bb9be07ea4b6eccf76dddaf3f31d23f577c (diff)
parente2cb5838c6b89bf0f34aa08562d3e3763729cba6 (diff)
downloadpowder-6ef3f4126fce8e4aaa1173f202d83db7cff6ec17.zip
powder-6ef3f4126fce8e4aaa1173f202d83db7cff6ec17.tar.gz
Merge pull request #156 from mniip/regex
regex fix
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/Renderer.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp
index 28e4d9e..45bc15e 100644
--- a/src/graphics/Renderer.cpp
+++ b/src/graphics/Renderer.cpp
@@ -924,26 +924,10 @@ void Renderer::DrawSigns()
if (signs[i].text.length())
{
std::string text = signs[i].getText(sim);
- const char* str = signs[i].text.c_str();
signs[i].pos(text, x, y, w, h);
clearrect(x, y, w+1, h);
drawrect(x, y, w+1, h, 192, 192, 192, 255);
- match=0;
- // check if it's a link sign
- if (str[0]=='{' && (str[1]=='c' || str[1]=='t') && str[2]==':' && str[3]>='0' && str[3]<='9')
- {
- const char* p=str+4;
- while (*p>='0' && *p<='9')
- p++;
- if (*p=='|')
- {
- while (*p)
- p++;
- if (p[-1]=='}')
- match=1;
- }
- }
- if (match)
+ if (splitsign(signs[i].text.c_str()))
drawtext(x+3, y+3, text, 0, 191, 255, 255);
else
drawtext(x+3, y+3, text, 255, 255, 255, 255);