# HG changeset patch # User Matti Hamalainen # Date 1317001202 -10800 # Node ID a521308b47fb3ff2ed17e904b26c1ce63a3f9495 # Parent 48d4f8e3fce54630c9793675bf61df01e9d6e4e5 Use the new helper functions here. diff -r 48d4f8e3fce5 -r a521308b47fb src/objinfo.cc --- a/src/objinfo.cc Mon Sep 26 04:39:34 2011 +0300 +++ b/src/objinfo.cc Mon Sep 26 04:40:02 2011 +0300 @@ -46,7 +46,7 @@ #include "sticker.h" #include "things.h" #include "wadres.h" - +#include "textures.h" static const int sprite_width = 90; static const int sprite_height = 90; @@ -92,11 +92,6 @@ out_y1 = 0; } -static int is_notexture(const char *name) -{ - return (name[0] == '-' && name[1] == 0); -} - static void draw_sidedef_info(int sidedef, int sd, int sd2, int obj_no, int x0, int y0, int ix0, int iy0, int s1, int s2, int width, int height) { DrawScreenBox3D(x0, y0, x0 + width - 1, y0 + height - 1); @@ -110,7 +105,7 @@ Sectors[s1].ceilh > Sectors[s2].ceilh && !(is_sky(Sectors[s1].ceilt) && is_sky(Sectors[s2].ceilt))) { - set_colour(is_notexture(SideDefs[sd].tex1) ? CLR_ERROR : WINFG); + set_colour(InvalidTextureName(SideDefs[sd].tex1) ? CLR_ERROR : WINFG); } else set_colour(WINFG_DIM); @@ -119,7 +114,7 @@ "\1Upper:\2 %.*s", WAD_TEX_NAME, SideDefs[sd].tex1); - set_colour(sd2 < 0 && is_notexture(SideDefs[sd].tex3) ? CLR_ERROR : WINFG); + set_colour(sd2 < 0 && InvalidTextureName(SideDefs[sd].tex3) ? CLR_ERROR : WINFG); DrawScreenText(-1, -1, "\1Middle:\2 %.*s", @@ -129,7 +124,7 @@ Sectors[s1].floorh < Sectors[s2].floorh && !(is_sky(Sectors[s1].floort) && is_sky(Sectors[s2].floort))) { - set_colour(is_notexture(SideDefs[sd].tex2) ? CLR_ERROR : WINFG); + set_colour(InvalidTextureName(SideDefs[sd].tex2) ? CLR_ERROR : WINFG); } else set_colour(WINFG_DIM);