mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Mapster32: properly reset highlights in undo/redo.
git-svn-id: https://svn.eduke32.com/eduke32@2943 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
eba4a3b722
commit
13178b7cda
3 changed files with 23 additions and 15 deletions
|
@ -240,6 +240,8 @@ void getpoint(int32_t searchxe, int32_t searchye, int32_t *x, int32_t *y);
|
||||||
int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point);
|
int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point);
|
||||||
void update_highlight(void);
|
void update_highlight(void);
|
||||||
void update_highlightsector(void);
|
void update_highlightsector(void);
|
||||||
|
void reset_highlightsector(void);
|
||||||
|
void reset_highlight(void);
|
||||||
void ovh_whiteoutgrab(int32_t restoreredwalls);
|
void ovh_whiteoutgrab(int32_t restoreredwalls);
|
||||||
|
|
||||||
int32_t inside_editor_curpos(int16_t sectnum);
|
int32_t inside_editor_curpos(int16_t sectnum);
|
||||||
|
|
|
@ -2460,6 +2460,7 @@ static int32_t compare_wall_coords(const void *w1, const void *w2)
|
||||||
#undef GETWALCOORD
|
#undef GETWALCOORD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// VARIOUS RESETTING FUNCTIONS
|
||||||
#define RESET_EDITOR_VARS() do { \
|
#define RESET_EDITOR_VARS() do { \
|
||||||
sectorhighlightstat = -1; \
|
sectorhighlightstat = -1; \
|
||||||
newnumwalls = -1; \
|
newnumwalls = -1; \
|
||||||
|
@ -2468,6 +2469,18 @@ static int32_t compare_wall_coords(const void *w1, const void *w2)
|
||||||
circlepoints = 7; \
|
circlepoints = 7; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
void reset_highlightsector(void)
|
||||||
|
{
|
||||||
|
Bmemset(hlsectorbitmap, 0, sizeof(hlsectorbitmap));
|
||||||
|
update_highlightsector();
|
||||||
|
}
|
||||||
|
|
||||||
|
void reset_highlight(void) // walls and sprites
|
||||||
|
{
|
||||||
|
Bmemset(show2dwall, 0, sizeof(show2dwall));
|
||||||
|
Bmemset(show2dsprite, 0, sizeof(show2dsprite));
|
||||||
|
update_highlight();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
static int32_t collnumsects[2];
|
static int32_t collnumsects[2];
|
||||||
|
@ -4061,8 +4074,7 @@ rotate_hlsect_out:
|
||||||
yax_update(0);
|
yax_update(0);
|
||||||
yax_updategrays(pos.z);
|
yax_updategrays(pos.z);
|
||||||
|
|
||||||
Bmemset(hlsectorbitmap, 0, sizeof(hlsectorbitmap));
|
reset_highlightsector();
|
||||||
update_highlightsector();
|
|
||||||
|
|
||||||
if (sandwichbunch < 0)
|
if (sandwichbunch < 0)
|
||||||
message("Extended %ss of highlighted sectors, creating bunch %d",
|
message("Extended %ss of highlighted sectors, creating bunch %d",
|
||||||
|
@ -4254,9 +4266,7 @@ rotate_hlsect_out:
|
||||||
|
|
||||||
// clear wall & sprite highlights
|
// clear wall & sprite highlights
|
||||||
// TODO: see about consistency with update_highlight() after other ops
|
// TODO: see about consistency with update_highlight() after other ops
|
||||||
Bmemset(show2dwall, 0, sizeof(show2dwall));
|
reset_highlight();
|
||||||
Bmemset(show2dsprite, 0, sizeof(show2dsprite));
|
|
||||||
update_highlight();
|
|
||||||
|
|
||||||
// construct the loop!
|
// construct the loop!
|
||||||
i = AddLoopToSector(dstsect, &ofirstwallofs);
|
i = AddLoopToSector(dstsect, &ofirstwallofs);
|
||||||
|
@ -5703,8 +5713,7 @@ end_point_dragging:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Bmemset(hlsectorbitmap, 0, sizeof(hlsectorbitmap));
|
reset_highlightsector();
|
||||||
update_highlightsector();
|
|
||||||
|
|
||||||
yax_update(0);
|
yax_update(0);
|
||||||
yax_updategrays(pos.z);
|
yax_updategrays(pos.z);
|
||||||
|
@ -7081,11 +7090,8 @@ end_batch_insert_points:
|
||||||
yax_setbunch(j, YAX_FLOOR, -1);
|
yax_setbunch(j, YAX_FLOOR, -1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
Bmemset(hlsectorbitmap, 0, sizeof(hlsectorbitmap));
|
reset_highlightsector();
|
||||||
update_highlightsector();
|
reset_highlight();
|
||||||
|
|
||||||
Bmemset(show2dwall, 0, sizeof(show2dwall));
|
|
||||||
update_highlight();
|
|
||||||
|
|
||||||
newnumwalls = -1;
|
newnumwalls = -1;
|
||||||
asksave = 1;
|
asksave = 1;
|
||||||
|
|
|
@ -564,9 +564,9 @@ int32_t map_undoredo(int32_t dir)
|
||||||
map_revision = mapstate->revision;
|
map_revision = mapstate->revision;
|
||||||
|
|
||||||
Bmemset(show2dsector, 0, sizeof(show2dsector));
|
Bmemset(show2dsector, 0, sizeof(show2dsector));
|
||||||
Bmemset(show2dsprite, 0, sizeof(show2dsprite));
|
|
||||||
Bmemset(show2dwall, 0, sizeof(show2dwall));
|
reset_highlightsector();
|
||||||
Bmemset(hlsectorbitmap, 0, sizeof(hlsectorbitmap));
|
reset_highlight();
|
||||||
|
|
||||||
initspritelists();
|
initspritelists();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue