mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 19:50:45 +00:00
Mapster32: pull out some code from M32_InsertPoint() into M32_MarkPointInsertion().
git-svn-id: https://svn.eduke32.com/eduke32@5810 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
edd7a82be8
commit
eda5300b33
1 changed files with 25 additions and 15 deletions
|
@ -2936,25 +2936,11 @@ static int32_t bakframe_fillandfade(char **origframeptr, int32_t sectnum, const
|
||||||
return ask_if_sure(querystr, 0);
|
return ask_if_sure(querystr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// High-level insert point, handles TROR constrained walls too
|
|
||||||
// onewnumwalls: old numwalls + drawn walls.
|
|
||||||
// <mapwallnum>: see insertpoint()
|
|
||||||
// Returns:
|
|
||||||
// 0 if wall limit would be reached.
|
|
||||||
// 1 if inserted point on a plain white or 2 points on a plain red wall.
|
|
||||||
// N >= 2 if inserted N points on TROR-constrained wall.
|
|
||||||
// N|(EXPECTED<<16) if inserted N points but EXPECTED walls were expected.
|
|
||||||
static int32_t M32_InsertPoint(int32_t thewall, int32_t dax, int32_t day, int32_t onewnumwalls, int32_t *mapwallnum)
|
|
||||||
{
|
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
|
static void M32_MarkPointInsertion(int32_t thewall)
|
||||||
|
{
|
||||||
|
int32_t i, tmpcf;
|
||||||
int32_t nextw = wall[thewall].nextwall;
|
int32_t nextw = wall[thewall].nextwall;
|
||||||
int32_t i, j, k, m, tmpcf;
|
|
||||||
|
|
||||||
if (yax_islockedwall(thewall) || (nextw>=0 && yax_islockedwall(nextw)))
|
|
||||||
{
|
|
||||||
// yax'ed wall -- first find out which walls are affected
|
|
||||||
for (i=0; i<numwalls; i++)
|
|
||||||
wall[i].cstat &= ~(1<<14);
|
|
||||||
|
|
||||||
// round 1
|
// round 1
|
||||||
for (YAX_ITER_WALLS(thewall, i, tmpcf))
|
for (YAX_ITER_WALLS(thewall, i, tmpcf))
|
||||||
|
@ -2970,6 +2956,30 @@ static int32_t M32_InsertPoint(int32_t thewall, int32_t dax, int32_t day, int32_
|
||||||
for (YAX_ITER_WALLS(nextw, i, tmpcf))
|
for (YAX_ITER_WALLS(nextw, i, tmpcf))
|
||||||
if (wall[i].nextwall >= 0 && (wall[wall[i].nextwall].cstat&(1<<14))==0)
|
if (wall[i].nextwall >= 0 && (wall[wall[i].nextwall].cstat&(1<<14))==0)
|
||||||
wall[wall[i].nextwall].cstat |= (1<<14);
|
wall[wall[i].nextwall].cstat |= (1<<14);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// High-level insert point, handles TROR constrained walls too
|
||||||
|
// onewnumwalls: old numwalls + drawn walls.
|
||||||
|
// <mapwallnum>: see insertpoint()
|
||||||
|
// Returns:
|
||||||
|
// 0 if wall limit would be reached.
|
||||||
|
// 1 if inserted point on a plain white or 2 points on a plain red wall.
|
||||||
|
// N >= 2 if inserted N points on TROR-constrained wall.
|
||||||
|
// N|(EXPECTED<<16) if inserted N points but EXPECTED walls were expected.
|
||||||
|
static int32_t M32_InsertPoint(int32_t thewall, int32_t dax, int32_t day, int32_t onewnumwalls, int32_t *mapwallnum)
|
||||||
|
{
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
int32_t nextw = wall[thewall].nextwall;
|
||||||
|
int32_t i, j, k, m;
|
||||||
|
|
||||||
|
if (yax_islockedwall(thewall) || (nextw>=0 && yax_islockedwall(nextw)))
|
||||||
|
{
|
||||||
|
// yax'ed wall -- first find out which walls are affected
|
||||||
|
for (i=0; i<numwalls; i++)
|
||||||
|
wall[i].cstat &= ~(1<<14);
|
||||||
|
|
||||||
|
M32_MarkPointInsertion(thewall);
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
for (i=0; i<numwalls; i++)
|
for (i=0; i<numwalls; i++)
|
||||||
|
|
Loading…
Reference in a new issue