Skip to content

Commit

Permalink
Automap|Fixed: Key marker SVG was drawn rotated 180 degrees
Browse files Browse the repository at this point in the history
Take #2 - the reason these were rotated is because the original
game always draws them at a fixed angle, not that of the mobj.

This reverts commit 7651c70.
  • Loading branch information
danij-deng committed Jan 29, 2012
1 parent 7651c70 commit 3806f35
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
16 changes: 8 additions & 8 deletions doomsday/plugins/common/src/g_game.c
Expand Up @@ -685,14 +685,14 @@ void R_LoadVectorGraphics(void)
{
#define R (1.0f)
const SvgLine keysquare[] = {
{ {0, 0}, {-R / 4, R / 2} },
{ {-R / 4, R / 2}, {-R / 2, R / 2} },
{ {-R / 2, R / 2}, {-R / 2, -R / 2} },
{ {-R / 2, -R / 2}, {-R / 4, -R / 2} },
{ {-R / 4, -R / 2}, {0, 0} }, // Handle part type thing.
{ {0, 0}, {R, 0} }, // Stem.
{ {R, 0}, {R, R / 2} }, // End lockpick part.
{ {3 * R / 4, 0}, {3 * R / 4, R / 4} }
{ {0, 0}, {R / 4, -R / 2} },
{ {R / 4, -R / 2}, {R / 2, -R / 2} },
{ {R / 2, -R / 2}, {R / 2, R / 2} },
{ {R / 2, R / 2}, {R / 4, R / 2} },
{ {R / 4, R / 2}, {0, 0} }, // Handle part type thing.
{ {0, 0}, {-R, 0} }, // Stem.
{ {-R, 0}, {-R, -R / 2} }, // End lockpick part.
{ {-3 * R / 4, 0}, {-3 * R / 4, -R / 4} }
};
const SvgLine thintriangle_guy[] = {
{ {-R / 2, R - R / 2}, {R, 0} }, // >
Expand Down
7 changes: 5 additions & 2 deletions doomsday/plugins/common/src/hu_automap.c
Expand Up @@ -989,7 +989,7 @@ static int rendThingPoint(mobj_t* mo, void* context)
{
svgid_t vgId = p->vgId;
boolean isVisible = false;
float* color = p->rgb;
float* color = p->rgb, angle;
float keyColorRGB[3];

if(p->flags & AMF_REND_KEYS)
Expand All @@ -1000,18 +1000,21 @@ static int rendThingPoint(mobj_t* mo, void* context)
R_GetColorPaletteRGBf(0, keyColor, keyColorRGB, false);
vgId = VG_KEYSQUARE;
color = keyColorRGB;
angle = 0;
isVisible = true;
}
}

// Something else?
if(!isVisible)
{
isVisible = !!(p->flags & AMF_REND_THINGS);
angle = (mo->visAngle << 16) / (float) ANGLE_MAX * 360; // In degrees.
}

if(isVisible)
{
/* $unifiedangles */
const float angle = (mo->visAngle << 16) / (float) ANGLE_MAX * 360; // In degrees.
const float radius = 16;
float origin[3];
Mobj_OriginSmoothed(mo, origin);
Expand Down

0 comments on commit 3806f35

Please sign in to comment.