From 33780b42e9f693a8c40247eab03378e836200474 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 3 Mar 2010 01:37:27 +0000 Subject: [PATCH] Fix a couple of bugs git-svn-id: https://svn.eduke32.com/eduke32@1605 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 6 ++---- polymer/eduke32/source/gamedef.c | 9 +++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 17bcffdc3..fa49842ef 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2618,7 +2618,7 @@ void G_DrawTXDigiNumZ(int32_t starttile, int32_t x,int32_t y,int32_t n,int32_t s for (k=i-1; k>=0; k--) { p = starttile+*(b+k)-'0'; - j += (tilesizx[p]+1*z)>>16; + j += (tilesizx[p]+1)*(z>>16); } if (cs&256) j<<=16; c = x-(j>>1); @@ -2628,9 +2628,7 @@ void G_DrawTXDigiNumZ(int32_t starttile, int32_t x,int32_t y,int32_t n,int32_t s { p = starttile+*(b+k)-'0'; rotatesprite((c+j)<>((cs&256)?0:16)); + j += ((tilesizx[p]+1) * (z>>((cs&256)?0:16))); } } diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 36a02608e..2a81aa7a2 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1546,6 +1546,7 @@ static void C_GetNextVarType(int32_t type) int32_t i=0,f=0; C_SkipComments(); + if (!type && !g_labelsOnly && (isdigit(*textptr) || ((*textptr == '-') && (isdigit(*(textptr+1)))))) { if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug) @@ -1580,6 +1581,8 @@ static void C_GetNextVarType(int32_t type) C_GetNextLabelName(); return; } + + textptr++; } C_GetNextLabelName(); @@ -4709,6 +4712,12 @@ repeatcase: } case CON_DEFAULT: g_scriptPtr--; // don't save + + C_SkipComments(); + + if (*textptr == ':') + textptr++; + if (g_checkingSwitch<1) { g_numCompilerErrors++;