mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Mapster32: add cvar/mapster32.cfg option "keeptexturestretch".
If enabled, dragging wall vertices will correct the xrepeat after the mouse button is released, so that the pre-drag absolute stretching is restored. git-svn-id: https://svn.eduke32.com/eduke32@3398 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8bca521ef4
commit
dc9f4eb360
4 changed files with 24 additions and 6 deletions
|
@ -141,6 +141,8 @@ extern int32_t getinvdisplacement(int32_t *dx, int32_t *dy, int32_t dz) ATTRIBUT
|
|||
extern int32_t getscreenvdisp(int32_t bz, int32_t zoome);
|
||||
extern void setup_sideview_sincos(void);
|
||||
|
||||
extern int8_t keeptexturestretch;
|
||||
|
||||
extern int32_t wallength(int16_t i);
|
||||
extern void fixrepeats(int16_t i);
|
||||
extern uint32_t getlenbyrep(int32_t len, int32_t repeat);
|
||||
|
|
|
@ -199,6 +199,7 @@ int32_t pk_turnaccel=16;
|
|||
int32_t pk_turndecel=12;
|
||||
int32_t pk_uedaccel=3;
|
||||
|
||||
int8_t keeptexturestretch = 1;
|
||||
int8_t sideview_reversehrot = 0;
|
||||
|
||||
char lastpm16buf[156];
|
||||
|
@ -5185,7 +5186,7 @@ end_autoredwall:
|
|||
if (dragwall[i] < 0)
|
||||
break;
|
||||
|
||||
if (olen[i] != 0)
|
||||
if (keeptexturestretch && olen[i] != 0)
|
||||
{
|
||||
#ifndef YAX_ENABLE
|
||||
j = dragwall[i];
|
||||
|
|
|
@ -266,13 +266,14 @@ int32_t loadsetup(const char *fn)
|
|||
|
||||
if (readconfig(fp, "turndecel", val, VL) > 0) pk_turndecel = atoi_safe(val);
|
||||
|
||||
// if (readconfig(fp, "autosave", val, VL) > 0) autosave = atoi_safe(val)*60;
|
||||
if (readconfig(fp, "autosavesec", val, VL) > 0) autosave = max(0, atoi_safe(val));
|
||||
if (readconfig(fp, "autocorruptchecksec", val, VL) > 0) autocorruptcheck = max(0, atoi_safe(val));
|
||||
if (readconfig(fp, "corruptcheck_noalreadyrefd", val, VL) > 0)
|
||||
corruptcheck_noalreadyrefd = !!atoi_safe(val);
|
||||
if (readconfig(fp, "fixmaponsave_sprites", val, VL) > 0)
|
||||
fixmaponsave_sprites = !!atoi_safe(val);
|
||||
if (readconfig(fp, "keeptexturestretch", val, VL) > 0)
|
||||
keeptexturestretch = !!atoi_safe(val);
|
||||
|
||||
if (readconfig(fp, "showheightindicators", val, VL) > 0)
|
||||
showheightindicators = clamp(atoi_safe(val), 0, 2);
|
||||
|
@ -488,6 +489,9 @@ int32_t writesetup(const char *fn)
|
|||
"; Fix sprite sectnums when saving a map or entering 3D mode\n"
|
||||
"fixmaponsave_sprites = %d\n"
|
||||
"\n"
|
||||
"; Keep texture stretching when dragging wall vertices\n"
|
||||
"keeptexturestretch = %d\n"
|
||||
"\n"
|
||||
"; Height indicators (0:none, 1:only 2-sided&different, 2:all)\n"
|
||||
"showheightindicators = %d\n"
|
||||
"\n"
|
||||
|
@ -497,8 +501,8 @@ int32_t writesetup(const char *fn)
|
|||
"; TROR: Automatic grayout of plain (non-extended) sectors,\n"
|
||||
"; toggled with Ctrl-A:\n"
|
||||
"autogray = %d\n"
|
||||
"; TROR: Show inner gray walls, toggled with Ctrl-Alt-A:\n"
|
||||
"showinnergray = %d\n"
|
||||
// "; TROR: Show inner gray walls, toggled with Ctrl-Alt-A:\n"
|
||||
// "showinnergray = %d\n"
|
||||
"\n"
|
||||
"; 2D mode display type (0:classic, 1:textured, 2:textured/animated)\n"
|
||||
"graphicsmode = %d\n"
|
||||
|
@ -598,8 +602,9 @@ int32_t writesetup(const char *fn)
|
|||
msens, unrealedlook, pk_uedaccel, quickmapcycling,
|
||||
sideview_reversehrot,
|
||||
revertCTRL,scrollamount,pk_turnaccel,pk_turndecel,autosave,autocorruptcheck,
|
||||
corruptcheck_noalreadyrefd, fixmaponsave_sprites, showheightindicators,showambiencesounds,
|
||||
autogray,showinnergray,
|
||||
corruptcheck_noalreadyrefd, fixmaponsave_sprites, keeptexturestretch,
|
||||
showheightindicators,showambiencesounds,
|
||||
autogray, //showinnergray,
|
||||
graphicsmode,
|
||||
MixRate,AmbienceToggle,ParentalLock, !!m32_osd_tryscript,
|
||||
#if 1
|
||||
|
|
|
@ -9105,6 +9105,14 @@ static int32_t osdcmd_vars_pk(const osdfuncparm_t *parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
if (!Bstrcasecmp(parm->name, "keeptexturestretch"))
|
||||
{
|
||||
keeptexturestretch = !keeptexturestretch;
|
||||
OSD_Printf("Keep texture stretching when dragging wall vertices: %s\n",
|
||||
ONOFF(keeptexturestretch));
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
if (!Bstrcasecmp(parm->name, "corruptcheck"))
|
||||
{
|
||||
if (parm->numparms >= 1)
|
||||
|
@ -9501,6 +9509,8 @@ static int32_t registerosdcommands(void)
|
|||
OSD_RegisterFunction("show_heightindicators", "show_heightindicators {0, 1 or 2}: sets display of height indicators in 2D mode", osdcmd_vars_pk);
|
||||
OSD_RegisterFunction("show_ambiencesounds", "show_ambiencesounds {0, 1 or 2}>: sets display of MUSICANDSFX circles in 2D mode", osdcmd_vars_pk);
|
||||
OSD_RegisterFunction("corruptcheck_noalreadyrefd", "corruptcheck_noalreadyrefd: toggles ignoring of one-to-many red wall connections", osdcmd_vars_pk);
|
||||
OSD_RegisterFunction("keeptexturestretch", "toggles keeping texture stretching when dragging wall vertices", osdcmd_vars_pk);
|
||||
|
||||
OSD_RegisterFunction("corruptcheck", "corruptcheck {<seconds>|now|tryfix}: sets auto corruption check interval if <seconds> given, otherwise as indicated", osdcmd_vars_pk);
|
||||
#ifdef USE_OPENGL
|
||||
OSD_RegisterFunction("tint", "tint <pal> <r> <g> <b> <flags>: queries or sets hightile tinting", osdcmd_tint);
|
||||
|
|
Loading…
Reference in a new issue