mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Don't blow away wall cstat bit 14 for use as a temp flag in the editor
Patch from Nuke.YKT. git-svn-id: https://svn.eduke32.com/eduke32@7870 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/build.cpp
This commit is contained in:
parent
a949665f26
commit
c7e403619b
3 changed files with 17 additions and 10 deletions
|
@ -892,6 +892,8 @@ EXTERN char *faketiledata[MAXTILES];
|
|||
EXTERN char spritecol2d[MAXTILES][2];
|
||||
EXTERN uint8_t tilecols[MAXTILES];
|
||||
|
||||
EXTERN char editwall[(MAXWALLS+7)>>3];
|
||||
|
||||
extern uint8_t vgapal16[4*256];
|
||||
|
||||
extern uint32_t drawlinepat;
|
||||
|
|
|
@ -9497,6 +9497,7 @@ static void enginePrepareLoadBoard(buildvfs_kfd fil, vec3_t *dapos, int16_t *daa
|
|||
Bmemset(show2dsector, 0, sizeof(show2dsector));
|
||||
Bmemset(show2dsprite, 0, sizeof(show2dsprite));
|
||||
Bmemset(show2dwall, 0, sizeof(show2dwall));
|
||||
Bmemset(editwall, 0, sizeof(editwall));
|
||||
#ifdef USE_STRUCT_TRACKERS
|
||||
Bmemset(sectorchanged, 0, sizeof(sectorchanged));
|
||||
Bmemset(spritechanged, 0, sizeof(spritechanged));
|
||||
|
@ -11277,9 +11278,12 @@ void dragpoint(int16_t pointhighlight, int32_t dax, int32_t day, uint8_t flags)
|
|||
for (w=0; w<numwalls; w++)
|
||||
if (walbitmap[w>>3] & (1<<(w&7)))
|
||||
{
|
||||
wall[w].cstat |= (1<<14);
|
||||
editwall[w>>3] |= 1<<(w&7);
|
||||
if (flags&2)
|
||||
wall[lastwall(w)].cstat |= (1<<14);
|
||||
{
|
||||
int wn = lastwall(w);
|
||||
editwall[wn>>3] |= 1<<(wn&7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11296,10 +11300,11 @@ void dragpoint(int16_t pointhighlight, int32_t dax, int32_t day, uint8_t flags)
|
|||
|
||||
if (editstatus)
|
||||
{
|
||||
wall[pointhighlight].cstat |= (1<<14);
|
||||
editwall[pointhighlight>>3] |= 1<<(pointhighlight&7);
|
||||
if (linehighlight >= 0 && linehighlight < MAXWALLS)
|
||||
wall[linehighlight].cstat |= (1<<14);
|
||||
wall[lastwall(pointhighlight)].cstat |= (1<<14);
|
||||
editwall[linehighlight>>3] |= 1<<(linehighlight&7);
|
||||
int wn = lastwall(pointhighlight);
|
||||
editwall[wn>>3] |= 1<<(wn&7);
|
||||
}
|
||||
|
||||
do
|
||||
|
@ -11310,7 +11315,7 @@ void dragpoint(int16_t pointhighlight, int32_t dax, int32_t day, uint8_t flags)
|
|||
|
||||
wall[tempshort].x = dax;
|
||||
wall[tempshort].y = day;
|
||||
wall[tempshort].cstat |= (1<<14);
|
||||
editwall[tempshort>>3] |= 1<<(tempshort&7);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -11323,7 +11328,7 @@ void dragpoint(int16_t pointhighlight, int32_t dax, int32_t day, uint8_t flags)
|
|||
tempshort = wall[thelastwall].nextwall;
|
||||
wall[tempshort].x = dax;
|
||||
wall[tempshort].y = day;
|
||||
wall[tempshort].cstat |= (1<<14);
|
||||
editwall[tempshort>>3] |= 1<<(tempshort&7);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -723,10 +723,10 @@ const char *ExtGetWallCaption(int16_t wallnum)
|
|||
|
||||
Bmemset(tempbuf,0,sizeof(tempbuf));
|
||||
|
||||
if (wall[wallnum].cstat & (1<<14))
|
||||
if (editwall[wallnum>>3]&(1<<(wallnum&7)))
|
||||
{
|
||||
Bsprintf(tempbuf,"%d", wallength(wallnum));
|
||||
wall[wallnum].cstat &= ~(1<<14);
|
||||
editwall[wallnum>>3] &= ~(1<<(wallnum&7));
|
||||
return tempbuf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue