MCPcopy Create free account
hub / github.com/Meridian59/Meridian59 / DrawMapArrow

Method DrawMapArrow

roomedit/source/mapdc.cpp:709–716  ·  view source on GitHub ↗

///////////////////////////////////////////////////// TMapDC ------ draw an arrow on the screen from map coords and angle (0 - 65535) TODO: Need to add clipping and scaling

Source from the content-addressed store, hash-verified

707// draw an arrow on the screen from map coords and angle (0 - 65535)
708// TODO: Need to add clipping and scaling
709void
710TMapDC::DrawMapArrow(SHORT mapXstart, SHORT mapYstart, USHORT angle, USHORT len)
711{
712 // NOTE: 10430,... = 65535 / (2 * PI)
713 SHORT mapXend = mapXstart + (SHORT) (len * cos(angle / 10430.37835));
714 SHORT mapYend = mapYstart + (SHORT) (len * sin(angle / 10430.37835));
715 DrawMapVector (mapXstart, mapYstart, mapXend, mapYend);
716}
717
718
719

Callers 1

HighlightObjectFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected