From 708243626778e357a6471921d3a43f6a51677831 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 24 Aug 2008 04:35:35 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1013 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/include/editor.h | 4 +-- polymer/build/src/build.c | 4 +-- polymer/eduke32/source/astub.c | 5 ---- polymer/eduke32/source/mapster32.h | 1 - polymer/eduke32/source/osdfuncs.c | 46 +++++++++++++++++++++--------- polymer/eduke32/source/sector.c | 5 ++-- 6 files changed, 39 insertions(+), 26 deletions(-) diff --git a/polymer/build/include/editor.h b/polymer/build/include/editor.h index e35c7edac..3e244dc05 100644 --- a/polymer/build/include/editor.h +++ b/polymer/build/include/editor.h @@ -45,11 +45,11 @@ extern unsigned char somethingintab; extern unsigned char buildkeys[NUMBUILDKEYS]; extern int ydim16, xdimgame, ydimgame, bppgame, xdim2d, ydim2d, forcesetup; -extern char unrealedlook, quickmapcycling; +extern int unrealedlook, quickmapcycling; extern int pk_turnaccel,pk_turndecel,pk_uedaccel; extern int revertCTRL,scrollamount; extern int autosave; - +extern int mlook; extern int ExtInit(void); extern int ExtPreInit(int argc,const char **argv); diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 266b28038..553356b14 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -127,9 +127,9 @@ unsigned char temppal, tempvis, tempxrepeat, tempyrepeat; signed char tempshade; unsigned char somethingintab = 255; -char mlook = 0,mskip=0; +int mlook = 0,mskip=0; int revertCTRL=0,scrollamount=3; -char unrealedlook=0, quickmapcycling=0; //PK +int unrealedlook=1, quickmapcycling=1; //PK static char boardfilename[BMAX_PATH], selectedboardfilename[BMAX_PATH]; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index f16e5ac6d..e819ea29e 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -2857,8 +2857,6 @@ static int DrawTiles(int iTopLeft, int iSelected, int nXTiles, int nYTiles, int } -extern char unrealedlook; //PK - int spriteonceilingz(int searchwall) { int z=sprite[searchwall].z; @@ -6887,9 +6885,6 @@ static int osdcmd_noclip(const osdfuncparm_t *parm) } //PK vvv ------------ -extern int pk_turnaccel, pk_turndecel, pk_uedaccel; -extern char quickmapcycling; - static int osdcmd_vars_pk(const osdfuncparm_t *parm) { int showval = (parm->numparms < 1); diff --git a/polymer/eduke32/source/mapster32.h b/polymer/eduke32/source/mapster32.h index 41edf183a..54479db47 100644 --- a/polymer/eduke32/source/mapster32.h +++ b/polymer/eduke32/source/mapster32.h @@ -141,7 +141,6 @@ extern int numsprites; extern int showfirstwall; extern char spritecol2d[MAXTILES][2]; extern char custom2dcolors; -extern char mlook; int intro=0; extern int ydim16, halfxdim16, midydim16, zoom; diff --git a/polymer/eduke32/source/osdfuncs.c b/polymer/eduke32/source/osdfuncs.c index 46a2f5bfc..c7885570d 100644 --- a/polymer/eduke32/source/osdfuncs.c +++ b/polymer/eduke32/source/osdfuncs.c @@ -26,28 +26,48 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal) int ht = usehightile; usehightile = (osdhightile && ht); + x = (x<<3)+x; - for (x = (x<<3)+x; len>0; len--, ch++, x++) + if (ch > ptr && ch < (ptr + TEXTSIZE)) + { + do + { + if (*ch == 32) + { + x += OSDCHAR_WIDTH+1; + ch++; + continue; + } + ac = *ch-'!'+STARTALPHANUM; + if (ac < STARTALPHANUM || ac > ENDALPHANUM) { usehightile = ht; return; } + + // use the format byte if the text falls within the bounds of the console buffer + rotatesprite(x<<16, (y<<3)<<16, 65536, 0, ac, (*(ch-ptr+fmt)&~0x1F)>>4, + *(ch-ptr+fmt)&~0xE0, 8|16, 0, 0, xdim-1, ydim-1); + x += OSDCHAR_WIDTH+1; + ch++; + } while (--len); + + usehightile = ht; + return; + } + + do { if (*ch == 32) { - x += OSDCHAR_WIDTH; + x += OSDCHAR_WIDTH+1; + ch++; continue; } ac = *ch-'!'+STARTALPHANUM; if (ac < STARTALPHANUM || ac > ENDALPHANUM) { usehightile = ht; return; } - // use the format byte if the text falls within the bounds of the console buffer - if (ch > ptr && ch < (ptr + TEXTSIZE)) - { - rotatesprite(x<<16, (y<<3)<<16, 65536, 0, ac, (*(ch-ptr+fmt)&~0x1F)>>4, - *(ch-ptr+fmt)&~0xE0, 8|16, 0, 0, xdim-1, ydim-1); - } - else - rotatesprite(x<<16, (y<<3)<<16, 65536, 0, ac, shade, - pal, 8|16, 0, 0, xdim-1, ydim-1); - x += OSDCHAR_WIDTH; - } + rotatesprite(x<<16, (y<<3)<<16, 65536, 0, ac, shade, pal, 8|16, 0, 0, xdim-1, ydim-1); + x += OSDCHAR_WIDTH+1; + ch++; + } while (--len); + usehightile = ht; } diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index 646e89d3c..052c5dea0 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -392,7 +392,6 @@ void animatecamsprite(void) if (g_player[screenpeek].ps->newowner >= 0) OW = g_player[screenpeek].ps->newowner; - else if (OW >= 0 && dist(&sprite[g_player[screenpeek].ps->i],&sprite[i]) < 2048) { if (waloff[TILE_VIEWSCR] == 0) @@ -406,9 +405,9 @@ void animatecamsprite(void) void animatewalls(void) { - int i, j, p = 0, t; + int i, j, p = numanimwalls-1, t; - for (;p < numanimwalls ;p++) + for (;p>=0;p--) // for(p=numanimwalls-1;p>=0;p--) { i = animwall[p].wallnum;