22 lines
818 B
C
22 lines
818 B
C
// Direct port of the FS2 dial-needle pixel-list tables. Each list is
|
|
// a sequence of (col-offset, run-length) bytes followed by a sentinel
|
|
// byte with the high bit set ($FF). Driven by `needleDraw` below.
|
|
|
|
#ifndef NEEDLE_DATA_H
|
|
#define NEEDLE_DATA_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include "framebuffer.h"
|
|
#include "palette.h"
|
|
|
|
// Render a dial needle at (cx, cy) for a given byte angle. The
|
|
// pixel-list shapes are picked from the original FS2 thin or thick
|
|
// needle tables, and the four-quadrant transform from chunk4's
|
|
// `DrawIndicatorDialNeedle` is applied so the same 23 pre-rendered
|
|
// shapes cover all 360 deg.
|
|
//
|
|
// `byteAngle` follows the simulator convention (0 = up, +ve = CW).
|
|
void needleDraw(FramebufferT *fb, int16_t cx, int16_t cy, uint8_t byteAngle, bool thick, ColorE color);
|
|
|
|
#endif
|