diff --git a/polymer/build/include/build.h b/polymer/build/include/build.h index 27c80b3d4..d99b983c4 100644 --- a/polymer/build/include/build.h +++ b/polymer/build/include/build.h @@ -491,7 +491,7 @@ long animateoffs(short tilenum, short fakevar); void setpolymost2dview(void); // sets up GL for 2D drawing -long polymost_drawtilescreen(long tilex, long tiley, long wallnum, long dimen); +long polymost_drawtilescreen(long tilex, long tiley, long wallnum, long dimen, int tilezoom); void polymost_glreset(void); void polymost_precache(long dapicnum, long dapalnum, long datype); diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 9f19869a6..4029f2115 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -2669,7 +2669,7 @@ long drawtilescreen(long pictopleft, long picbox) dax = ((cnt%(xtiles<>gettilezoom)) { + if (polymost_drawtilescreen(dax, day, wallnum, 64>>gettilezoom, 0)) { vidpos = ylookup[day]+dax+frameplace; if ((xdime <= (64>>gettilezoom)) && (ydime <= (64>>gettilezoom))) { diff --git a/polymer/build/src/config.c b/polymer/build/src/config.c index b13d74cf0..735457861 100644 --- a/polymer/build/src/config.c +++ b/polymer/build/src/config.c @@ -179,11 +179,11 @@ if (readconfig(fp, "renderer", val, VL) > 0) { i = Batoi(val); setrendermode(i); #endif #ifdef RENDERTYPEWIN - if (readconfig(fp, "windowpos", val, VL) > 0) windowpos = Batoi(val); + if (readconfig(fp, "windowpositioning", val, VL) > 0) windowpos = Batoi(val); windowx = -1; - if (readconfig(fp, "windowx", val, VL) > 0) windowx = Batoi(val); + if (readconfig(fp, "windowposx", val, VL) > 0) windowx = Batoi(val); windowy = -1; - if (readconfig(fp, "windowy", val, VL) > 0) windowy = Batoi(val); + if (readconfig(fp, "windowposy", val, VL) > 0) windowy = Batoi(val); #endif if (readconfig(fp, "keyconsole", val, VL) > 0) { keys[19] = Bstrtol(val, NULL, 16); OSD_CaptureKey(keys[19]); } @@ -238,9 +238,9 @@ int writesetup(const char *fn) "maxrefreshfreq = %d\n" "\n" "; Window positioning, 0 = center, 1 = memory\n" - "windowpos = %d\n" - "windowx = %d\n" - "windowy = %d\n" + "windowpositioning = %d\n" + "windowposx = %d\n" + "windowposy = %d\n" "\n" #endif "; 3D mode brightness setting\n" diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index ea0a79c5f..73ca7c0e9 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -693,7 +693,7 @@ void hicsetpalettetint(long palnum, unsigned char r, unsigned char g, unsigned c int hicsetsubsttex(long picnum, long palnum, char *filen, float alphacut, float xscale, float yscale, char flags) { return 0; } int hicsetskybox(long picnum, long palnum, char *faces[6]) { return 0; } int hicclearsubst(long picnum, long palnum) { return 0; } -long polymost_drawtilescreen (long tilex, long tiley, long wallnum, long dimen) { return -1; } +long polymost_drawtilescreen (long tilex, long tiley, long wallnum, long dimen, int tilezoom) { return -1; } #endif //============================================================================= //POLYMOST ENDS diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index 3e94b1a78..90f18a0ed 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -5012,7 +5012,7 @@ void polymost_fillpolygon (long npoints) } #endif -long polymost_drawtilescreen (long tilex, long tiley, long wallnum, long dimen) +long polymost_drawtilescreen (long tilex, long tiley, long wallnum, long dimen, int tilezoom) { #ifdef USE_OPENGL float xdime, ydime, xdimepad, ydimepad, scx, scy, ratio = 1.0; @@ -5048,8 +5048,11 @@ long polymost_drawtilescreen (long tilex, long tiley, long wallnum, long dimen) bglDisable(GL_ALPHA_TEST); - if (scx > scy) ratio = dimen/scx; - else ratio = dimen/scy; + if (tilezoom) + { + if (scx > scy) ratio = dimen/scx; + else ratio = dimen/scy; + } if (!pth || (pth->flags & 8)) { bglDisable(GL_TEXTURE_2D); diff --git a/polymer/build/src/winlayer.c b/polymer/build/src/winlayer.c index 3c919d784..a520d4e10 100644 --- a/polymer/build/src/winlayer.c +++ b/polymer/build/src/winlayer.c @@ -380,9 +380,9 @@ static int set_maxrefreshfreq(const osdfuncparm_t *parm) int freq; if (parm->numparms == 0) { if (maxrefreshfreq == 0) - OSD_Printf("maxrefreshfreq = No maximum\n"); + OSD_Printf("\"maxrefreshfreq\" is \"No maximum\"\n"); else - OSD_Printf("maxrefreshfreq = %d Hz\n",maxrefreshfreq); + OSD_Printf("\"maxrefreshfreq\" is \"%d\"\n",maxrefreshfreq); return OSDCMD_OK; } if (parm->numparms != 1) return OSDCMD_SHOWHELP; @@ -396,6 +396,20 @@ static int set_maxrefreshfreq(const osdfuncparm_t *parm) return OSDCMD_OK; } +static int set_windowpos(const osdfuncparm_t *parm) +{ + if (parm->numparms == 0) { + OSD_Printf("\"r_windowpositioning\" is \"%d\"\n",windowpos); + return OSDCMD_OK; + } + if (parm->numparms != 1) return OSDCMD_SHOWHELP; + + windowpos = Batol(parm->parms[0])>0; + OSD_Printf("r_windowpositioning %d\n",windowpos); + + return OSDCMD_OK; +} + // // initsystem() -- init systems // @@ -498,6 +512,7 @@ int initsystem(void) initprintf("DirectDraw initialisation failed. Fullscreen modes will be unavailable.\n"); OSD_RegisterFunction("maxrefreshfreq", "maxrefreshfreq: maximum display frequency to set for OpenGL Polymost modes (0=no maximum)", set_maxrefreshfreq); + OSD_RegisterFunction("r_windowpositioning", "r_windowpositioning: enable/disable window position memory", set_windowpos); return 0; } diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index ded1e1f80..cecdc5c79 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -1718,14 +1718,14 @@ static long SelectAllTiles(long iCurrentTile) static long OnGotoTile(long iTile); static long OnSelectTile(long iTile); - +static long s_Zoom = INITIAL_ZOOM; +static long s_TileZoom = 1; static long DrawTiles(long iTopLeft, long iSelected, long nXTiles, long nYTiles, long TileDim); static long m32gettile(long idInitialTile) { - static long s_Zoom = INITIAL_ZOOM; long gap, temp; long nXTiles, nYTiles, nDisplayedTiles; long i; @@ -2017,49 +2017,49 @@ static long m32gettile(long idInitialTile) } // 'V' KEYPRESS - if (keystatus[0x2f] > 0) + if (keystatus[KEYSC_V] > 0) { - keystatus[0x2f] = 0; + keystatus[KEYSC_V] = 0; iTile = SelectAllTiles(iTile); } // 'G' KEYPRESS - Goto frame - if (keystatus[0x22] > 0) + if (keystatus[KEYSC_G] > 0) { - keystatus[0x22] = 0; + keystatus[KEYSC_G] = 0; iTile = OnGotoTile(iTile); } // 'U' KEYPRESS : go straight to user defined art - if (keystatus[0x16]) + if (keystatus[KEYSC_U]) { SelectAllTiles(iTile); iTile = FIRST_USER_ART_TILE; - keystatus[0x16] = 0; + keystatus[KEYSC_U] = 0; } // 'A' KEYPRESS : Go straight to start of Atomic edition's art - if (keystatus[0x1E]) + if (keystatus[KEYSC_A]) { SelectAllTiles(iTile); iTile = FIRST_ATOMIC_TILE; - keystatus[0x1e] = 0; + keystatus[KEYSC_A] = 0; } // 'T' KEYPRESS = Select from pre-defined tileset - if (keystatus[0x14]) + if (keystatus[KEYSC_T]) { - keystatus[0x14] = 0; + keystatus[KEYSC_T] = 0; iTile = OnSelectTile(iTile); } // 'E' KEYPRESS : Go straight to start of extended art - if (keystatus[0x12]) + if (keystatus[KEYSC_E]) { SelectAllTiles(iTile); @@ -2067,7 +2067,13 @@ static long m32gettile(long idInitialTile) iTile = SECOND_EXTENDED_TILE; else iTile = FIRST_EXTENDED_TILE; - keystatus[0x12] = 0; + keystatus[KEYSC_E] = 0; + } + + if (keystatus[KEYSC_Z]) + { + s_TileZoom = !s_TileZoom; + keystatus[KEYSC_Z] = 0; } // @@ -2236,6 +2242,7 @@ static long OnSelectTile(long iTile) { if (s_TileGroups[i].szText != NULL) { + if ((i+2)*16 > ydimgame) break; Bsprintf(tempbuf,"(%c) %s",s_TileGroups[i].key1,s_TileGroups[i].szText); printext256(10L, (i+1)*16, whitecol, -1, tempbuf, 0); } @@ -2337,7 +2344,7 @@ static long DrawTiles(long iTopLeft, long iSelected, long nXTiles, long nYTiles, XPos = XTile * TileDim; YPos = YTile * TileDim; - if (polymost_drawtilescreen(XPos, YPos, idTile, TileDim)) + if (polymost_drawtilescreen(XPos, YPos, idTile, TileDim, s_TileZoom)) { TileSizeX = tilesizx[ idTile ]; TileSizeY = tilesizy[ idTile ]; @@ -2542,7 +2549,44 @@ static void Keys3d(void) } } - if (keystatus[0x2f] > 0) //V + if (keystatus[KEYSC_QUOTE]==1 && keystatus[0x2f]==1) // ' V + { + keystatus[0x2f] = 0; + switch (searchstat) + { + case 1: + case 2: + Bstrcpy(tempbuf,"Sector visibility: "); + sector[searchsector].visibility = + getnumber256(tempbuf,sector[searchsector].visibility,256L,0); + break; + } + } + + if (keystatus[KEYSC_SEMI] && keystatus[KEYSC_V]) // ; V + { + short currsector; + unsigned char visval; + + keystatus[KEYSC_V] = 0; + + if (highlightsectorcnt == -1) + { + message("You didn't select any sectors!"); + return; + } + visval = (unsigned char)getnumber256("Visibility of selected sectors: ",sector[searchsector].visibility,256L,0); + if (AskIfSure()) return; + + for (i = 0; i < highlightsectorcnt; i++) + { + currsector = highlightsector[i]; + sector[currsector].visibility = visval; + } + message("Visibility changed on all selected sectors"); + } + + if (keystatus[KEYSC_V] > 0) //V { if (searchstat == 0) templong = wall[searchwall].picnum; if (searchstat == 1) templong = sector[searchsector].ceilingpicnum; @@ -2672,29 +2716,6 @@ static void Keys3d(void) message("Palettes changed"); } - if (keystatus[KEYSC_SEMI] && keystatus[KEYSC_V]) // ; V - { - short currsector; - unsigned char visval; - - keystatus[KEYSC_V] = 0; - - if (highlightsectorcnt == -1) - { - message("You didn't select any sectors!"); - return; - } - visval = (unsigned char)getnumber256("Visibility of selected sectors: ",sector[searchsector].visibility,256L,0); - if (AskIfSure()) return; - - for (i = 0; i < highlightsectorcnt; i++) - { - currsector = highlightsector[i]; - sector[currsector].visibility = visval; - } - message("Visibility changed on all selected sectors"); - } - if (keystatus[0xd3] > 0) { if (searchstat == 3) @@ -4057,20 +4078,6 @@ static void Keys3d(void) } } - if (keystatus[KEYSC_QUOTE]==1 && keystatus[0x2f]==1) // ' V - { - keystatus[0x2f] = 0; - switch (searchstat) - { - case 1: - case 2: - Bstrcpy(tempbuf,"Sector visibility: "); - sector[searchsector].visibility = - getnumber256(tempbuf,sector[searchsector].visibility,256L,0); - break; - } - } - if (keystatus[0x3c]>0) // F2 { usedcount=!usedcount; diff --git a/polymer/eduke32/source/mapster32.h b/polymer/eduke32/source/mapster32.h index 25bdf31c0..71d229812 100644 --- a/polymer/eduke32/source/mapster32.h +++ b/polymer/eduke32/source/mapster32.h @@ -187,7 +187,7 @@ typedef struct char *szText ; // description to present to user. } TileGroup; -#define MAX_TILE_GROUPS 10 +#define MAX_TILE_GROUPS 32 #define MAX_TILE_GROUP_ENTRIES 1024 TileGroup s_TileGroups[MAX_TILE_GROUPS]; diff --git a/polymer/eduke32/tiles.cfg b/polymer/eduke32/tiles.cfg index e419f81d4..34f7f1517 100755 --- a/polymer/eduke32/tiles.cfg +++ b/polymer/eduke32/tiles.cfg @@ -16,7 +16,7 @@ tilegroup "Actors" COMMANDER COMMANDERSTAYPUT OCTABRAIN OCTABRAINSTAYPUT ORGANTIC - NEWBEAST NEWBEASTSTAYPUT NEWBEASTJUMP + NEWBEAST NEWBEASTSTAYPUT NEWBEASTHANG NEWBEASTJUMP EGG GREENSLIME ROTATEGUN RECON TANK BOUNCEMINE FLOORFLAME // FEMS @@ -55,13 +55,15 @@ tilegroup "Doors" } } -tilegroup "Switches" +tilegroup "Switches and effectors" { hotkey "S" + + tilerange 1 10 tiles { - ACCESSSWITCH ACCESSSWITCH2 SLOTDOOR LIGHTSWITCH SPACEDOORSWITCH SPACELIGHTSWITCH + ACCESSSWITCH ACCESSSWITCH2 ACCESSCARD SLOTDOOR LIGHTSWITCH SPACEDOORSWITCH SPACELIGHTSWITCH FRANKENSTINESWITCH MULTISWITCH DIPSWITCH DIPSWITCH2 DIPSWITCH3 TECHSWITCH LIGHTSWITCH2 713 // LIGHTSWITCH2+1 @@ -119,7 +121,7 @@ tilegroup "Exploding stuff" } } -tilegroup "Letters" +tilegroup "Letters and numbers" { hotkey "L" @@ -127,4 +129,6 @@ tilegroup "Letters" tilerange 2929 3022 tilerange 3072 3135 tilerange 3162 3165 + tilerange 640 649 + tilerange 2472 2481 }