mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
m32: have default grid size in configuration
git-svn-id: https://svn.eduke32.com/eduke32@1621 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0c63340d4a
commit
32a86d8fce
4 changed files with 16 additions and 17 deletions
|
@ -112,7 +112,7 @@ extern int16_t searchsector, searchwall, searchstat; //search output
|
|||
int32_t osearchx, osearchy; //old search input
|
||||
|
||||
extern int16_t pointhighlight, linehighlight, highlightcnt;
|
||||
int32_t grid = 3, gridlock = 1, showtags = 1;
|
||||
int32_t grid = 3, autogrid = 0, gridlock = 1, showtags = 1;
|
||||
int32_t zoom = 768, gettilezoom = 1;
|
||||
int32_t lastpm16time = 0;
|
||||
|
||||
|
|
|
@ -64,7 +64,8 @@ extern char keys[NUMBUILDKEYS];
|
|||
extern char remap[256];
|
||||
extern int32_t remapinit;
|
||||
extern double msens;
|
||||
extern int32_t editorgridextent;
|
||||
extern int32_t editorgridextent, grid, autogrid;
|
||||
static int32_t default_grid=3;
|
||||
extern int32_t showheightindicators;
|
||||
extern int32_t graphicsmode;
|
||||
extern int32_t AmbienceToggle;
|
||||
|
@ -139,6 +140,13 @@ int32_t loadsetup(const char *fn)
|
|||
if (readconfig(fp, "bpp", val, VL) > 0) bppgame = Batoi(val);
|
||||
if (readconfig(fp, "vsync", val, VL) > 0) vsync = Batoi(val)?1:0;
|
||||
if (readconfig(fp, "editorgridextent", val, VL) > 0) editorgridextent = max(min(524288,Batoi(val)),65536);
|
||||
if (readconfig(fp, "grid", val, VL) > 0)
|
||||
{
|
||||
grid = Batoi(val);
|
||||
default_grid = grid;
|
||||
autogrid = (grid==9);
|
||||
grid = min(max(0, grid), 8);
|
||||
}
|
||||
#ifdef POLYMER
|
||||
if (readconfig(fp, "rendmode", val, VL) > 0) { i = Batoi(val); glrendmode = i; }
|
||||
#endif
|
||||
|
@ -306,6 +314,8 @@ int32_t writesetup(const char *fn)
|
|||
#endif
|
||||
"; Grid limits\n"
|
||||
"editorgridextent = %d\n"
|
||||
"; Startup grid size (0-8, 9 is automatic)\n"
|
||||
"grid = %d\n"
|
||||
"\n"
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
"; OpenGL mode options\n"
|
||||
|
@ -453,7 +463,7 @@ int32_t writesetup(const char *fn)
|
|||
#ifdef POLYMER
|
||||
glrendmode,
|
||||
#endif
|
||||
editorgridextent,
|
||||
editorgridextent, min(max(0, default_grid), 9),
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
usemodels, usehightile,
|
||||
glusetexcache, gltexfiltermode, glanisotropy,
|
||||
|
|
|
@ -7733,8 +7733,6 @@ static void Keys2d(void)
|
|||
}
|
||||
|
||||
{
|
||||
static int32_t autogrid = 0;
|
||||
|
||||
if (keystatus[KEYSC_G]) // G (grid on/off)
|
||||
{
|
||||
if (autogrid)
|
||||
|
@ -7749,17 +7747,8 @@ static void Keys2d(void)
|
|||
grid += eitherSHIFT?-1:1;
|
||||
if (grid == -1 || grid == 9)
|
||||
{
|
||||
switch (grid)
|
||||
{
|
||||
case -1:
|
||||
autogrid = 1;
|
||||
grid = 8;
|
||||
break;
|
||||
case 9:
|
||||
autogrid = 1;
|
||||
grid = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (autogrid) Bsprintf(tempbuf,"Grid size: 9 (autosize)");
|
||||
|
|
|
@ -106,7 +106,7 @@ void SetSLIMEPalette();
|
|||
void SetWATERPalette();
|
||||
void SetGAMEPalette();
|
||||
|
||||
extern int32_t grid;
|
||||
extern int32_t grid, autogrid;
|
||||
|
||||
static void EditSpriteData(int16_t spritenum);
|
||||
static void EditWallData(int16_t wallnum);
|
||||
|
|
Loading…
Reference in a new issue