mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
disable undo/redo editor feature until I can debug the disappearing sprites
git-svn-id: https://svn.eduke32.com/eduke32@1973 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c0697e2e6b
commit
c8bf3682e0
3 changed files with 29 additions and 9 deletions
|
@ -115,6 +115,8 @@ int32_t yax_is121(int16_t bunchnum, int16_t getfloor);
|
|||
|
||||
extern int32_t kopen4loadfrommod(const char *filename, char searchfirst);
|
||||
|
||||
// set to 1 to enable:
|
||||
#define M32_UNDO 0
|
||||
extern int32_t map_revision;
|
||||
extern int32_t map_undoredo(int32_t dir);
|
||||
extern void map_undoredo_free(void);
|
||||
|
|
|
@ -6488,7 +6488,11 @@ CANCEL:
|
|||
m32_setkeyfilter(0);
|
||||
|
||||
keystatus[1] = 0;
|
||||
#if M32_UNDO
|
||||
_printmessage16("(N)ew, (L)oad, (S)ave, save (A)s, (T)est map, (U)ndo, (R)edo, (Q)uit");
|
||||
#else
|
||||
_printmessage16("(N)ew, (L)oad, (S)ave, save (A)s, (T)est map, (Q)uit");
|
||||
#endif
|
||||
showframe(1);
|
||||
bflushchars();
|
||||
bad = 1;
|
||||
|
@ -6541,8 +6545,9 @@ CANCEL:
|
|||
reset_default_mapstate();
|
||||
|
||||
Bstrcpy(boardfilename,"newboard.map");
|
||||
#if M32_UNDO
|
||||
map_undoredo_free();
|
||||
|
||||
#endif
|
||||
if (bakstat==0)
|
||||
{
|
||||
bakstat = restore_highlighted_map(&bakmap);
|
||||
|
@ -6707,6 +6712,7 @@ CANCEL:
|
|||
{
|
||||
test_map(0);
|
||||
}
|
||||
#if M32_UNDO
|
||||
else if (ch == 'u' || ch == 'U')
|
||||
{
|
||||
bad = 0;
|
||||
|
@ -6719,6 +6725,7 @@ CANCEL:
|
|||
if (map_undoredo(1)) printmessage16("Nothing to redo!");
|
||||
else printmessage16("Restored revision %d",map_revision-1);
|
||||
}
|
||||
#endif
|
||||
else if (ch == 'q' || ch == 'Q') //Q
|
||||
{
|
||||
bad = 0;
|
||||
|
@ -8796,8 +8803,11 @@ void printcoords16(int32_t posxe, int32_t posye, int16_t ange)
|
|||
int32_t i, m;
|
||||
int32_t v8 = (numsectors > MAXSECTORSV7 || numwalls > MAXWALLSV7 ||
|
||||
numsprites > MAXSPRITESV7 || numyaxbunches > 0);
|
||||
|
||||
#if M32_UNDO
|
||||
Bsprintf(snotbuf,"x:%d y:%d ang:%d r%d",posxe,posye,ange,map_revision-1);
|
||||
#else
|
||||
Bsprintf(snotbuf,"x:%d y:%d ang:%d",posxe,posye,ange);
|
||||
#endif
|
||||
i = 0;
|
||||
while ((snotbuf[i] != 0) && (i < 33))
|
||||
i++;
|
||||
|
|
|
@ -366,7 +366,7 @@ static void silentmessage(const char *fmt, ...)
|
|||
message_common1(tmpstr);
|
||||
}
|
||||
|
||||
|
||||
#if M32_UNDO
|
||||
typedef struct _mapundo
|
||||
{
|
||||
int32_t numsectors;
|
||||
|
@ -626,6 +626,7 @@ int32_t map_undoredo(int32_t dir)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define M32_NUM_SPRITE_MODES ((signed)(sizeof(SpriteMode)/sizeof(SpriteMode[0])))
|
||||
static const char *SpriteMode[]=
|
||||
|
@ -842,8 +843,9 @@ void ExtLoadMap(const char *mapname)
|
|||
|
||||
//////////
|
||||
Bsprintf(tempbuf, "Mapster32 - %s",mapname);
|
||||
|
||||
#if M32_UNDO
|
||||
map_undoredo_free();
|
||||
#endif
|
||||
wm_setapptitle(tempbuf);
|
||||
}
|
||||
|
||||
|
@ -7513,7 +7515,7 @@ static void Keys2d(void)
|
|||
}
|
||||
}
|
||||
searchsector = tcursectornum;
|
||||
|
||||
#if M32_UNDO
|
||||
if (eitherCTRL && PRESSED_KEYSC(Z)) // CTRL+Z
|
||||
{
|
||||
if (eitherSHIFT)
|
||||
|
@ -7527,7 +7529,7 @@ static void Keys2d(void)
|
|||
else message("Revision %d undone",map_revision);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
if (keystatus[KEYSC_TAB]) //TAB
|
||||
{
|
||||
if (eitherCTRL)
|
||||
|
@ -10964,7 +10966,7 @@ void ExtAnalyzeSprites(void)
|
|||
static void Keys2d3d(void)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
#if M32_UNDO
|
||||
if (mapstate == NULL)
|
||||
{
|
||||
// map_revision = 0;
|
||||
|
@ -10972,7 +10974,7 @@ static void Keys2d3d(void)
|
|||
// Bfree(mapstate->next);
|
||||
// mapstate = mapstate->prev;
|
||||
}
|
||||
|
||||
#endif
|
||||
if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(A)) // 'A
|
||||
{
|
||||
if (qsetmode == 200)
|
||||
|
@ -11179,7 +11181,11 @@ void ExtCheckKeys(void)
|
|||
|
||||
if (asksave == 1)
|
||||
asksave++;
|
||||
else if (asksave == 2 && (bstatus + lastbstatus) == 0 && mapstate)
|
||||
else if (asksave == 2 && (bstatus + lastbstatus) == 0
|
||||
#if M32_UNDO
|
||||
&& mapstate
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int32_t i;
|
||||
// check keys so that e.g. bulk deletions won't produce
|
||||
|
@ -11189,7 +11195,9 @@ void ExtCheckKeys(void)
|
|||
break;
|
||||
if (i==-1)
|
||||
{
|
||||
#if M32_UNDO
|
||||
create_map_snapshot();
|
||||
#endif
|
||||
asksave++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue