From 8ac8615034b1fd613c4cf94440109648969f5de8 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 1 Oct 2009 19:43:15 +0000 Subject: [PATCH] small m32 changes git-svn-id: https://svn.eduke32.com/eduke32@1519 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 25 ++++++++++++++++++------- polymer/eduke32/build/src/config.c | 6 ++++++ polymer/eduke32/build/src/engine.c | 2 +- polymer/eduke32/build/src/sdlayer.c | 4 +++- polymer/eduke32/source/m32exec.c | 6 ++++-- 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index b243f83a5..41485c504 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -2757,19 +2757,30 @@ SKIP: dragpoint(pointhighlight,dax,day); else if ((pointhighlight&0xc000) == 16384) { - daz = ((tilesizy[sprite[pointhighlight&16383].picnum]*sprite[pointhighlight&16383].yrepeat)<<2); + int32_t daspr = pointhighlight&16383; + vec3_t vec, ovec; + + Bmemcpy(&ovec, (vec3_t *)&sprite[daspr], sizeof(vec3_t)); + vec.x = dax; + vec.y = day; + vec.z = sprite[daspr].z; + if (setsprite(daspr, &vec) == -1) + Bmemcpy(&sprite[daspr], &ovec, sizeof(vec3_t)); +/* + daz = ((tilesizy[sprite[daspr].picnum]*sprite[daspr].yrepeat)<<2); for (i=0; i= getceilzofslope(i,dax,day)) - if (sprite[pointhighlight&16383].z-daz <= getflorzofslope(i,dax,day)) + if (sprite[daspr].z >= getceilzofslope(i,dax,day)) + if (sprite[daspr].z-daz <= getflorzofslope(i,dax,day)) { - sprite[pointhighlight&16383].x = dax; - sprite[pointhighlight&16383].y = day; - if (sprite[pointhighlight&16383].sectnum != i) - changespritesect(pointhighlight&16383,(int16_t)i); + sprite[daspr].x = dax; + sprite[daspr].y = day; + if (sprite[daspr].sectnum != i) + changespritesect(daspr,(int16_t)i); break; } +*/ } } asksave = 1; diff --git a/polymer/eduke32/build/src/config.c b/polymer/eduke32/build/src/config.c index c910b16cd..b6d7c460f 100644 --- a/polymer/eduke32/build/src/config.c +++ b/polymer/eduke32/build/src/config.c @@ -152,6 +152,9 @@ int32_t loadsetup(const char *fn) if (readconfig(fp, "maxrefreshfreq", val, VL) > 0) maxrefreshfreq = Batoi(val); #endif #if defined(POLYMOST) && defined(USE_OPENGL) + if (readconfig(fp, "usemodels", val, VL) > 0) usemodels = Batoi(val)?1:0; + if (readconfig(fp, "usehightile", val, VL) > 0) usehightile = Batoi(val)?1:0; + glusetexcache = glusetexcachecompression = -1; if (readconfig(fp, "glusetexcache", val, VL) > 0) { @@ -312,6 +315,8 @@ int32_t writesetup(const char *fn) "\n" #if defined(POLYMOST) && defined(USE_OPENGL) "; OpenGL mode options\n" + "usemodels = %d\n" + "usehightile = %d\n" "glusetexcache = %d\n" "glusetexcachecompression = %d\n" "gltexfiltermode = %d\n" @@ -457,6 +462,7 @@ int32_t writesetup(const char *fn) #endif editorgridextent, #if defined(POLYMOST) && defined(USE_OPENGL) + usemodels, usehightile, glusetexcache, glusetexcachecompression, gltexfiltermode, glanisotropy, #endif #ifdef RENDERTYPEWIN diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index bed3edb64..a881799bc 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -11139,7 +11139,7 @@ void draw2dscreen(int32_t posxe, int32_t posye, int16_t ange, int32_t zoome, int } if (editstatus == 1) { - if ((pointhighlight-16384) > 0 && (j+16384 == pointhighlight || ((sprite[j].x == sprite[pointhighlight-16384].x) && (sprite[j].y == sprite[pointhighlight-16384].y)))) + if ((pointhighlight-16384) >= 0 && (j+16384 == pointhighlight || ((sprite[j].x == sprite[pointhighlight-16384].x) && (sprite[j].y == sprite[pointhighlight-16384].y)))) { if (totalclock & 32) col += (2<<2); } diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index 28cdf41a6..ce365dfa0 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -229,7 +229,7 @@ static void attach_debugger_here(void){} static void sighandler(int signum) { - if (signum==SIGSEGV) +// if (signum==SIGSEGV) { SDL_WM_GrabInput(SDL_GRAB_OFF); SDL_ShowCursor(SDL_ENABLE); @@ -278,6 +278,8 @@ int32_t initsystem(void) } signal(SIGSEGV, sighandler); + signal(SIGABRT, sighandler); + signal(SIGFPE, sighandler); atexit(uninitsystem); diff --git a/polymer/eduke32/source/m32exec.c b/polymer/eduke32/source/m32exec.c index d5669b3b0..31a97928c 100644 --- a/polymer/eduke32/source/m32exec.c +++ b/polymer/eduke32/source/m32exec.c @@ -1223,12 +1223,14 @@ skip_check: case ITER_LOOPOFWALL: if (parm2 < 0 || parm2 >= numwalls) goto badindex; - for (ii=parm2, jj=wall[parm2].point2; jj!=ii; jj=wall[jj].point2) + jj = parm2; + do { Gv_SetVarX(var, jj); insptr = beg; X_DoExecute(1); - } + jj = wall[jj].point2; + } while (jj != parm2); break; case ITER_RANGE: for (jj=0; jj