+static void DrawLaserLines(struct XY *points, int num_points, int mode)
+{
+ Pixel pixel_drawto = (mode == DL_LASER_ENABLED ? pen_ray : pen_bg);
+ Pixel pixel_buffer = (mode == DL_LASER_ENABLED ? WHITE_PIXEL : BLACK_PIXEL);
+
+ DrawLines(drawto, points, num_points, pixel_drawto);
+
+ BEGIN_NO_HEADLESS
+ {
+ DrawLines(laser_bitmap, points, num_points, pixel_buffer);
+ }
+ END_NO_HEADLESS
+}
+
+static boolean CheckLaserPixel(int x, int y)
+{
+ Pixel pixel;
+
+ BEGIN_NO_HEADLESS
+ {
+ pixel = ReadPixel(laser_bitmap, x, y);
+ }
+ END_NO_HEADLESS
+
+ return (pixel == WHITE_PIXEL);
+}
+