raze/source/core/automap.h
Mitchell Richters 059f15c786 - Refactor floatified vector math to use inline wrapped around TVector2's Rotated() method.
* This will be used extensively in Duke and the other game as we finalise this conversion.
2022-10-14 18:13:49 +02:00

42 lines
1 KiB
C++

#pragma once
#include "tarray.h"
#include "build.h"
#include "c_cvars.h"
#include "palentry.h"
class FSerializer;
struct event_t;
extern bool automapping;
extern bool gFullMap;
extern BitArray show2dsector;
extern BitArray show2dwall;
void SerializeAutomap(FSerializer& arc);
void ClearAutomap();
void MarkSectorSeen(sectortype* sect);
void DrawOverheadMap(int pl_x, int pl_y, const DAngle pl_angle, double const smoothratio);
bool AM_Responder(event_t* ev, bool last);
void drawlinergb(const double x1, const double y1, const double x2, const double y2, PalEntry p);
inline void drawlinergb(int32_t x1, int32_t y1, int32_t x2, int32_t y2, PalEntry p)
{
drawlinergb(x1 / 4096., y1 / 4096., x2 / 4096., y2 / 4096., p);
}
inline DVector2 OutAutomapVector(const DVector2& pos, const double sine, const double cosine, const DVector2& xydim, const double zoom = 1.)
{
return pos.Rotated(cosine, sine).Rotated90CW() * zoom + xydim;
}
enum AM_Mode
{
am_off,
am_overlay,
am_full,
am_count
};
extern int automapMode;
EXTERN_CVAR(Bool, am_followplayer)