GLint text_t::SlashParser(char *buffPtr, GLint *x, GLint *y) { GLint ret = 0; buffPtr++; if (!*buffPtr) return ret; switch (*buffPtr) { case 'a': case 'c': { /*x -= size; return SetColorFromToken(buffPtr);*/ int ret = SetColorFromToken(buffPtr); if (ret != -1) *x -= size; return ret == -1 ? 0 : ret; } break; case 'i': { /**x -= size; return ItalicsMode(buffPtr);*/ int ret = ItalicsMode(buffPtr); if (ret != -1) *x -= size; return ret == -1 ? 0 : ret; } break; case 'b': { /**x -= size; return BoldMode(buffPtr);*/ int ret = BoldMode(buffPtr); if (ret != -1) *x -= size; return ret == -1 ? 0 : ret; } break; default: buffPtr--; RenderChar(*buffPtr, *x, *y, size); return ret; break; } }
int Font::SlashParser(char *buffPtr, int *x, int *y) { if (!(*(++buffPtr))) return 0; switch (*buffPtr) { case 'a': case 'c': return SetColorFromToken(buffPtr); break; case 'i': return ItalicsMode(buffPtr); break; case 'b': return BoldMode(buffPtr); break; default: RenderChar(*(--buffPtr), *x, *y, ysize); return 0; break; } }