- merged polyobject branch into trunk and made some adjustments for savegame compatibility.
SVN r2448 (trunk)
This commit is contained in:
parent
3a48da2c56
commit
4ac64b6df7
22 changed files with 1524 additions and 1010 deletions
|
|
@ -58,6 +58,7 @@
|
|||
|
||||
#include "am_map.h"
|
||||
#include "a_artifacts.h"
|
||||
#include "po_man.h"
|
||||
|
||||
struct AMColor
|
||||
{
|
||||
|
|
@ -177,6 +178,10 @@ CVAR (Color, am_ovthingcolor_friend, 0xe88800, CVAR_ARCHIVE);
|
|||
CVAR (Color, am_ovthingcolor_monster, 0xe88800, CVAR_ARCHIVE);
|
||||
CVAR (Color, am_ovthingcolor_item, 0xe88800, CVAR_ARCHIVE);
|
||||
|
||||
|
||||
CVAR(Int, am_showsubsector, -1, 0);
|
||||
|
||||
|
||||
// Disable the ML_DONTDRAW line flag if x% of all lines in a map are flagged with it
|
||||
// (To counter annoying mappers who think they are smart by making the automap unusable)
|
||||
bool am_showallenabled;
|
||||
|
|
@ -1614,6 +1619,64 @@ static bool AM_CheckSecret(line_t *line)
|
|||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// Polyobject debug stuff
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
void AM_drawSeg(seg_t *seg, const AMColor &color)
|
||||
{
|
||||
mline_t l;
|
||||
l.a.x = seg->v1->x >> FRACTOMAPBITS;
|
||||
l.a.y = seg->v1->y >> FRACTOMAPBITS;
|
||||
l.b.x = seg->v2->x >> FRACTOMAPBITS;
|
||||
l.b.y = seg->v2->y >> FRACTOMAPBITS;
|
||||
|
||||
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
|
||||
{
|
||||
AM_rotatePoint (&l.a.x, &l.a.y);
|
||||
AM_rotatePoint (&l.b.x, &l.b.y);
|
||||
}
|
||||
AM_drawMline(&l, color);
|
||||
}
|
||||
|
||||
void AM_showSS()
|
||||
{
|
||||
if (am_showsubsector >= 0 && am_showsubsector < numsubsectors)
|
||||
{
|
||||
AMColor yellow;
|
||||
yellow.FromRGB(255,255,0);
|
||||
AMColor red;
|
||||
red.FromRGB(255,0,0);
|
||||
|
||||
subsector_t *sub = &subsectors[am_showsubsector];
|
||||
for(unsigned int i=0;i<sub->numlines;i++)
|
||||
{
|
||||
AM_drawSeg(&segs[sub->firstline+i], yellow);
|
||||
}
|
||||
PO_LinkToSubsectors();
|
||||
|
||||
for(int i=0;i<po_NumPolyobjs;i++)
|
||||
{
|
||||
FPolyObj *po = &polyobjs[i];
|
||||
FPolyNode *pnode = po->subsectorlinks;
|
||||
|
||||
while (pnode != NULL)
|
||||
{
|
||||
if (pnode->subsector == sub)
|
||||
{
|
||||
for(unsigned j=0;j<pnode->segs.Size();j++)
|
||||
{
|
||||
AM_drawSeg(&pnode->segs[j], red);
|
||||
}
|
||||
}
|
||||
pnode = pnode->snext;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// Determines visible lines, draws them.
|
||||
|
|
@ -2166,6 +2229,8 @@ void AM_Drawer ()
|
|||
AM_drawCrosshair(XHairColor);
|
||||
|
||||
AM_drawMarks();
|
||||
|
||||
AM_showSS();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue