From c585380de6e9deb22c881b615cfda3e729ac9f4a Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 1 May 2009 19:28:57 +0000 Subject: [PATCH] Mapster fixes git-svn-id: https://svn.eduke32.com/eduke32@1360 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/editor.h | 2 + polymer/eduke32/build/src/build.c | 75 +++++++++++++++----------- polymer/eduke32/build/src/engine.c | 1 + polymer/eduke32/source/actors.c | 29 +++++----- polymer/eduke32/source/astub.c | 22 ++++---- 5 files changed, 71 insertions(+), 58 deletions(-) diff --git a/polymer/eduke32/build/include/editor.h b/polymer/eduke32/build/include/editor.h index 3171cb127..b9e0c4282 100644 --- a/polymer/eduke32/build/include/editor.h +++ b/polymer/eduke32/build/include/editor.h @@ -9,6 +9,8 @@ extern "C" { #endif +#define VERSION " 1.3.0devel" + // Build keys #define BK_MOVEFORWARD 0 #define BK_MOVEBACKWARD 1 diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 8ce8704f4..43d481c3e 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -12,8 +12,6 @@ #include "cache1d.h" #include "editor.h" -#define VERSION "("__DATE__" "__TIME__")" - #include "baselayer.h" #ifdef RENDERTYPEWIN #include "winlayer.h" @@ -376,15 +374,6 @@ int32_t app_main(int32_t argc, const char **argv) if (!loaddefinitionsfile(defsfilename)) initprintf("Definitions file loaded.\n"); - if (setgamemode(fullscreen,xdimgame,ydimgame,bppgame) < 0) - { - ExtUnInit(); - uninitengine(); - Bprintf("%d * %d not supported in this graphics mode\n",xdim,ydim); - exit(0); - } - setbrightness(brightness,palette,0); - k = 0; for (i=0; i<256; i++) { @@ -438,6 +427,17 @@ int32_t app_main(int32_t argc, const char **argv) vid_gamma = gamma; setbrightness(brightness,palette,0); } + else + { + if (setgamemode(fullscreen,xdimgame,ydimgame,bppgame) < 0) + { + ExtUnInit(); + uninitengine(); + Bprintf("%d * %d not supported in this graphics mode\n",xdim,ydim); + exit(0); + } + setbrightness(brightness,palette,0); + } CANCEL: quitflag = 0; while (quitflag == 0) @@ -5048,6 +5048,28 @@ void clearmidstatbar16(void) enddrawing(); } +void clearministatbar16(void) +{ + int32_t i, col = whitecol - 16; + begindrawing(); + + for (i=ydim-STATUS2DSIZ2; i MAXSECTORSV7 || numwalls > MAXWALLSV7 || numsprites > MAXSPRITESV7); @@ -5907,7 +5931,7 @@ void printcoords16(int32_t posxe, int32_t posye, int16_t ange) } snotbuf[46] = 0; - printext16(264, ydim-STATUS2DSIZ+128, editorcolors[9+m], editorcolors[0], snotbuf,0); + printext16(264, ydim-STATUS2DSIZ+128, m?editorcolors[10]:whitecol, -1, snotbuf,0); } void updatenumsprites(void) @@ -6232,27 +6256,16 @@ void _printmessage16(const char *fmt, ...) snotbuf[i] = tmpstr[i]; i++; } - while (i < 94) - { - snotbuf[i] = 32; - i++; - } - snotbuf[94] = 0; + snotbuf[i] = 0; if (lastpm16time == totalclock) Bstrcpy(lastpm16buf, snotbuf); + + clearministatbar16(); + begindrawing(); ybase = (overridepm16y >= 0) ? ydim-overridepm16y : ydim-STATUS2DSIZ+128-8; - printext16((overridepm16y >= 0) ? 200L-24 : 8, ybase+8L, editorcolors[9], editorcolors[0], snotbuf, 0); - /* - i = 0; - while (i < 54) - { - snotbuf[i] = 32; - i++; - } - snotbuf[54] = 0; - printext16(200L-24, ybase+20L, editorcolors[9], editorcolors[0], snotbuf, 0); - */ + + printext16((overridepm16y >= 0) ? 200L-24 : 8, ybase+8L, whitecol, -1, snotbuf, 0); enddrawing(); } diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 2592417bf..1eaa4b5ff 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -6432,6 +6432,7 @@ void drawmapview(int32_t dax, int32_t day, int32_t zoome, int16_t ang) cx1 = (windowx1<<12); cy1 = (windowy1<<12); cx2 = ((windowx2+1)<<12)-1; cy2 = ((windowy2+1)<<12)-1; + if (zoome == 2048) zoome = 2047; // FIXME zoome <<= 8; bakgxvect = divscale28(sintable[(1536-ang)&2047],zoome); bakgyvect = divscale28(sintable[(2048-ang)&2047],zoome); diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 46d2c464f..131363158 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -2531,10 +2531,12 @@ static void G_MoveWeapons(void) if (ActorExtra[i].projectile.isound >= 0) A_PlaySound(ActorExtra[i].projectile.isound,i); - if (!(ActorExtra[i].projectile.workslike & PROJECTILE_FORCEIMPACT))KILLIT(i); + if (!(ActorExtra[i].projectile.workslike & PROJECTILE_FORCEIMPACT)) + KILLIT(i); } - if (ActorExtra[i].projectile.workslike & PROJECTILE_FORCEIMPACT)goto BOLT; + if (ActorExtra[i].projectile.workslike & PROJECTILE_FORCEIMPACT) + goto BOLT; } else if ((j&49152) == 32768) @@ -2611,18 +2613,6 @@ static void G_MoveWeapons(void) } } - if (ActorExtra[i].projectile.workslike & PROJECTILE_RPG && ActorExtra[i].projectile.spawns > 0) - { - k = A_Spawn(i,ActorExtra[i].projectile.spawns); - Bmemcpy(&sprite[k],&davect,sizeof(vec3_t)); - - if (ActorExtra[i].projectile.sxrepeat > 4) - sprite[k].xrepeat=ActorExtra[i].projectile.sxrepeat; - if (ActorExtra[i].projectile.syrepeat > 4) - sprite[k].yrepeat=ActorExtra[i].projectile.syrepeat; - } - - if (ActorExtra[i].projectile.workslike & PROJECTILE_HITSCAN) { if (!actorscrptr[sprite[i].picnum]) @@ -2634,6 +2624,17 @@ static void G_MoveWeapons(void) if (ActorExtra[i].projectile.workslike & PROJECTILE_RPG) { + if (ActorExtra[i].projectile.spawns > 0) + { + k = A_Spawn(i,ActorExtra[i].projectile.spawns); + Bmemcpy(&sprite[k],&davect,sizeof(vec3_t)); + + if (ActorExtra[i].projectile.sxrepeat > 4) + sprite[k].xrepeat=ActorExtra[i].projectile.sxrepeat; + if (ActorExtra[i].projectile.syrepeat > 4) + sprite[k].yrepeat=ActorExtra[i].projectile.syrepeat; + } + if (ActorExtra[i].projectile.isound >= 0) A_PlaySound(ActorExtra[i].projectile.isound,i); diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 1a764f26a..65d8caa52 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -50,7 +50,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif #define BUILDDATE " 20090430" -#define VERSION " 1.3.0devel" static int32_t floor_over_floor; @@ -7192,10 +7191,6 @@ static void Keys2d(void) }} */ - Bsprintf(tempbuf, "Mapster32" VERSION); - printext16(xdim2d-(Bstrlen(tempbuf)<<3)-3,ydim2d-STATUS2DSIZ2+10L,editorcolors[4],-1,tempbuf,0); - printext16(xdim2d-(Bstrlen(tempbuf)<<3)-2,ydim2d-STATUS2DSIZ2+9L,editorcolors[12],-1,tempbuf,0); - cursectornum = -1; for (i=0; i= 0) showsectordata((int16_t)i+16384); -// keystatus[KEYSC_TAB] = 0; } - else + else if (!(keystatus[KEYSC_F7]|keystatus[KEYSC_F8])) { if (pointhighlight >= 16384) { i = pointhighlight-16384; -// clearmidstatbar16(); showspritedata((int16_t)i+16384); + + if (sprite[i].picnum==SECTOREFFECTOR) + { + char buffer[80]; + + Bsprintf(buffer,"^10%s",SectorEffectorText(i)); + _printmessage16(buffer); + } } else if ((linehighlight >= 0) && (bstatus&1 || sectorofwall(linehighlight) == cursectornum)) { -// clearmidstatbar16(); showwalldata((int16_t)linehighlight+16384); } else if (cursectornum >= 0) { -// clearmidstatbar16(); showsectordata((int16_t)cursectornum+16384); } -// else clearmidstatbar16(); if (totalclock < (lastpm16time + 120*3)) _printmessage16(lastpm16buf); } - /* if ((totalclock > getmessagetimeoff) && (totalclock > (lastpm16time + 120*3))) {