1 // HUD_tape.cxx -- HUD Tape Instrument
3 // Written by Michele America, started September 1997.
5 // Copyright (C) 1997 Michele F. America [micheleamerica#geocities:com]
6 // Copyright (C) 2006 Melchior FRANZ [mfranz#aon:at]
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 HUD::Tape::Tape(HUD *hud, const SGPropertyNode *n, float x, float y) :
27 _draw_tick_bottom(n->getBoolValue("tick-bottom", false)),
28 _draw_tick_top(n->getBoolValue("tick-top", false)),
29 _draw_tick_right(n->getBoolValue("tick-right", false)),
30 _draw_tick_left(n->getBoolValue("tick-left", false)),
31 _draw_cap_bottom(n->getBoolValue("cap-bottom", false)),
32 _draw_cap_top(n->getBoolValue("cap-top", false)),
33 _draw_cap_right(n->getBoolValue("cap-right", false)),
34 _draw_cap_left(n->getBoolValue("cap-left", false)),
35 _marker_offset(n->getFloatValue("marker-offset", 0.0)),
36 _label_gap(n->getFloatValue("label-gap-width", 0.0)),
37 _pointer(n->getBoolValue("enable-pointer", true)),
38 _zoom(n->getIntValue("zoom"))
40 _half_width_units = range_to_show() / 2.0;
43 s = n->getStringValue("pointer-type");
44 _pointer_type = strcmp(s, "moving") ? FIXED : MOVING; // "fixed", "moving"
46 s = n->getStringValue("tick-type");
47 _tick_type = strcmp(s, "circle") ? LINE : CIRCLE; // "circle", "line"
49 s = n->getStringValue("tick-length"); // "variable", "constant"
50 _tick_length = strcmp(s, "constant") ? VARIABLE : CONSTANT;
54 void HUD::Tape::draw(void) // (HUD_scale * pscale)
56 if (!_input.isValid())
59 float vmin = 0.0, vmax = 0.0;
65 const int BUFSIZE = 80;
68 // int k; //odd or even values for ticks // FIXME odd scale
70 float cur_value = _input.getFloatValue();
72 if (int(floorf(_input.max() + 0.5)) & 1)
73 oddtype = 1; //draw ticks at odd values
75 oddtype = 0; //draw ticks at even values
78 float right = _x + _w;
82 vmin = cur_value - _half_width_units; // width units == needle travel
83 vmax = cur_value + _half_width_units; // or picture unit span.
86 } else if (_pointer_type == MOVING) {
91 vmin = cur_value - _half_width_units; // width units == needle travel
92 vmax = cur_value + _half_width_units; // or picture unit span.
97 ///////////////////////////////////////////////////////////////////////////////
99 ///////////////////////////////////////////////////////////////////////////////
101 // Draw the basic markings for the scale...
103 if (option_vert()) { // Vertical scale
105 if (_draw_tick_bottom)
106 draw_line(_x, _y, right, _y);
110 draw_line(_x, top, right, top);
112 marker_xs = _x; // x start
113 marker_xe = right; // x extent
116 // We do not use else in the following so that combining the
117 // two options produces a "caged" display with double
118 // carrots. The same is done for horizontal card indicators.
120 // begin vertical/left
121 //First draw capping lines and pointers
122 if (option_left()) { // Calculate x marker offset
125 draw_line(marker_xe, _y, marker_xe, marker_ye);
127 marker_xs = marker_xe - _w / 3.0;
129 // draw_line(marker_xs, _center_y, marker_xe, _center_y + _w / 6);
130 // draw_line(marker_xs, _center_y, marker_xe, _center_y - _w / 6);
134 if (_pointer_type == MOVING) {
136 //Code for Moving Type Pointer
137 float ycentre, ypoint, xpoint;
140 if (_input.min() >= 0.0)
142 else if (_input.max() + _input.min() == 0.0)
145 ycentre = _y + (1.0 - _input.min()) * _h / (_input.max() - _input.min());
147 ycentre = _y + _input.min() * _h / (_input.max() - _input.min());
153 ypoint = ycentre + ((cur_value - 1.0) * range / _val_span);
155 ypoint = ycentre + (cur_value * range / _val_span);
157 xpoint = right + _marker_offset;
158 draw_line(xpoint, ycentre, xpoint, ypoint);
159 draw_line(xpoint, ypoint, xpoint - _marker_offset, ypoint);
160 draw_line(xpoint - _marker_offset, ypoint, xpoint - 5.0, ypoint + 5.0);
161 draw_line(xpoint - _marker_offset, ypoint, xpoint - 5.0, ypoint - 5.0);
166 draw_fixed_pointer(_marker_offset + marker_xe, text_y + _w / 6,
167 _marker_offset + marker_xs, text_y, _marker_offset + marker_xe,
169 } // end pointer type
171 } // end vertical/left
174 // begin vertical/right
175 // First draw capping lines and pointers
176 if (option_right()) {
179 draw_line(_x, _y, _x, marker_ye);
181 marker_xe = _x + _w / 3.0;
183 // draw_line(_x, _center_y + _w / 6, marker_xe, _center_y);
184 // draw_line(_x, _center_y - _w / 6, marker_xe, _center_y);
188 if (_pointer_type == MOVING) {
190 // type-fixed & _zoom=1, behaviour to be defined
191 // Code for Moving Type Pointer
192 float ycentre, ypoint, xpoint;
195 if (_input.min() >= 0.0)
197 else if (_input.max() + _input.min() == 0.0)
200 ycentre = _y + (1.0 - _input.min()) * _h / (_input.max() - _input.min());
202 ycentre = _y + _input.min() * _h / (_input.max() - _input.min());
207 ypoint = ycentre + ((cur_value - 1.0) * range / _val_span);
209 ypoint = ycentre + (cur_value * range / _val_span);
211 xpoint = _x - _marker_offset;
212 draw_line(xpoint, ycentre, xpoint, ypoint);
213 draw_line(xpoint, ypoint, xpoint + _marker_offset, ypoint);
214 draw_line(xpoint + _marker_offset, ypoint, xpoint + 5.0, ypoint + 5.0);
215 draw_line(xpoint + _marker_offset, ypoint, xpoint + 5.0, ypoint - 5.0);
220 draw_fixed_pointer(-_marker_offset + _x, text_y + _w / 6,
221 -_marker_offset + marker_xe, text_y, -_marker_offset + _x,
225 } // end vertical/right
228 // At this point marker x_start and x_end values are transposed.
229 // To keep this from confusing things they are now swapped.
231 marker_ye = marker_xs, marker_xs = marker_xe, marker_xe = marker_ye;
235 // Work through from bottom to top of scale. Calculating where to put
236 // minor and major ticks.
238 // draw scale or tape
240 zoomed_scale((int)vmin, (int)vmax);
244 if (_minor_divs != 0.0f)
245 div_ratio = int(_major_divs / _minor_divs + 0.5f);
247 div_ratio = 0, _minor_divs = _major_divs; // FIXME move that into Scale/Constructor ?
249 float vstart = floorf(vmin / _major_divs) * _major_divs;
250 float min_diff = _w / 6.0; // length difference between major & minor tick
252 // FIXME consider oddtype
253 for (int i = 0; ; i++) {
254 float v = vstart + i * _minor_divs;
257 if (v < _input.min())
259 else if (v > _input.max())
262 float y = _y + (v - vmin) * factor();
269 if (div_ratio && i % div_ratio) { // minor div
271 if (_tick_type == LINE) {
272 if (_tick_length == VARIABLE) {
273 draw_line(_x, y, marker_xs, y);
274 draw_line(marker_xe, y, right, y);
276 draw_line(_x, y, marker_xs, y);
277 draw_line(marker_xe, y, right, y);
280 } else { // _tick_type == CIRCLE
281 draw_bullet(_x, y, 3.0);
284 } else if (option_left()) {
285 if (_tick_type == LINE) {
286 if (_tick_length == VARIABLE) {
287 draw_line(marker_xs + min_diff, y, marker_xe, y);
289 draw_line(marker_xs, y, marker_xe, y);
291 } else { // _tick_type == CIRCLE
292 draw_bullet(marker_xs + 4, y, 3.0);
295 } else { // if (option_right())
296 if (_tick_type == LINE) {
297 if (_tick_length == VARIABLE) {
298 draw_line(marker_xs, y, marker_xe - min_diff, y);
300 draw_line(marker_xs, y, marker_xe, y);
303 } else { // _tick_type == CIRCLE
304 draw_bullet(marker_xe - 4, y, 3.0);
308 } else { // major div
309 int display_value = int(v);
311 display_value %= _modulo;
313 snprintf(buf, BUFSIZE, "%d", display_value);
316 if (_tick_type == LINE) {
317 draw_line(_x, y, marker_xs, y);
318 draw_line(marker_xs, y, right, y);
320 } else { // _tick_type == CIRCLE
321 draw_bullet(_x, y, 5.0);
324 if (!option_notext())
325 draw_text(marker_xs, y, buf, HUDText::CENTER);
328 if (_tick_type == LINE)
329 draw_line(marker_xs, y, marker_xe, y);
330 else // _tick_type == CIRCLE
331 draw_bullet(marker_xs + 4, y, 5.0);
333 if (!option_notext()) {
335 draw_text(marker_xs, y, buf, HUDText::RIGHT|HUDText::VCENTER);
337 draw_text(marker_xe + 1.0, y, buf, HUDText::LEFT|HUDText::VCENTER);
339 } // End if huds-both
345 ///////////////////////////////////////////////////////////////////////////////
347 ///////////////////////////////////////////////////////////////////////////////
353 draw_line(_x, _y, _x, top);
356 if (_draw_tick_right)
357 draw_line(right, _y, right, top);
359 marker_ys = _y; // Starting point for
360 marker_ye = top; // tick y location calcs
362 marker_xs = _x + ((cur_value - vmin) * factor());
365 if (_draw_cap_bottom)
366 draw_line(_x, _y, right, _y);
369 marker_ye = _y + _h / 2;
371 // draw_line(_center_x, marker_ye, _center_x - _h / 4, _y);
372 // draw_line(_center_x, marker_ye, _center_x + _h / 4, _y);
375 if (_pointer_type == MOVING) {
377 //Code for Moving Type Pointer
379 float xcentre = _center_x;
381 float xpoint = xcentre + (cur_value * range / _val_span);
382 float ypoint = _y - _marker_offset;
383 draw_line(xcentre, ypoint, xpoint, ypoint);
384 draw_line(xpoint, ypoint, xpoint, ypoint + _marker_offset);
385 draw_line(xpoint, ypoint + _marker_offset, xpoint + 5.0, ypoint + 5.0);
386 draw_line(xpoint, ypoint + _marker_offset, xpoint - 5.0, ypoint + 5.0);
391 draw_fixed_pointer(marker_xs - _h / 4, _y, marker_xs,
392 marker_ye, marker_xs + _h / 4, _y);
395 } // End Horizontal scale/top
397 if (option_bottom()) {
399 draw_line(_x, top, right, top);
402 marker_ys = top - _h / 2;
404 // draw_line(_center_x + _h / 4, _y + _h, _center_x, marker_ys);
405 // draw_line(_center_x - _h / 4, _y + _h, _center_x , marker_ys);
409 if (_pointer_type == MOVING) {
411 //Code for Moving Type Pointer
413 float xcentre = _center_x;
416 float xpoint = xcentre + (cur_value * range / _val_span);
417 float ypoint = hgt + _marker_offset;
418 draw_line(xcentre, ypoint, xpoint, ypoint);
419 draw_line(xpoint, ypoint, xpoint, ypoint - _marker_offset);
420 draw_line(xpoint, ypoint - _marker_offset, xpoint + 5.0, ypoint - 5.0);
421 draw_line(xpoint, ypoint - _marker_offset, xpoint - 5.0, ypoint - 5.0);
424 draw_fixed_pointer(marker_xs + _h / 4, top, marker_xs, marker_ys,
425 marker_xs - _h / 4, top);
428 } //end horizontal scale bottom
432 zoomed_scale((int)vmin,(int)vmax);
434 int div_ratio; // FIXME abstract that out of hor/vert
435 if (_minor_divs != 0.0f)
436 div_ratio = int(_major_divs / _minor_divs + 0.5f);
438 div_ratio = 0, _minor_divs = _major_divs; // FIXME move that into Scale/Constructor ?
440 float vstart = floorf(vmin / _major_divs) * _major_divs;
441 float min_diff = _h / 6.0; // length difference between major & minor tick
443 // FIXME consider oddtype
444 for (int i = 0; ; i++) {
445 float v = vstart + i * _minor_divs;
448 if (v < _input.min())
450 else if (v > _input.max())
453 float x = _x + (v - vmin) * factor();
460 if (div_ratio && i % div_ratio) { // minor div
462 if (_tick_length == VARIABLE) {
463 draw_line(x, _y, x, marker_ys - 4);
464 draw_line(x, marker_ye + 4, x, top);
466 draw_line(x, _y, x, marker_ys);
467 draw_line(x, marker_ye, x, top);
473 if (_tick_length == VARIABLE)
474 draw_line(x, marker_ys, x, marker_ye - min_diff);
476 draw_line(x, marker_ys, x, marker_ye);
478 } else if (_tick_length == VARIABLE) {
479 draw_line(x, marker_ys + 4, x, marker_ye);
481 draw_line(x, marker_ys, x, marker_ye);
485 } else { // major divs
486 int display_value = int(v);
488 display_value %= _modulo;
490 snprintf(buf, BUFSIZE, "%d", display_value);
492 // Draw major ticks and text only if far enough from the edge. // FIXME
493 if (x < _x + 10 || x + 10 > _x + _w)
497 draw_line(x, _y, x, marker_ye);
498 draw_line(x, marker_ye, x, _y + _h);
500 if (!option_notext())
501 draw_text(x, marker_ys, buf, HUDText::CENTER);
504 draw_line(x, marker_ys, x, marker_ye);
506 if (!option_notext()) {
508 draw_text(x, top, buf, HUDText::TOP|HUDText::HCENTER);
510 draw_text(x, _y, buf, HUDText::BOTTOM|HUDText::HCENTER);
516 } // end horizontal/vertical scale
520 void HUD::Tape::draw_fixed_pointer(float x1, float y1, float x2, float y2, float x3, float y3)
522 glBegin(GL_LINE_STRIP);
530 void HUD::Tape::zoomed_scale(int first, int last)
532 const int BUFSIZE = 80;
536 float x, y, w, h, bottom;
537 float cur_value = _input.getFloatValue();
540 while (first <= last) {
541 if ((first % (int)_major_divs) == 0) {
556 float xstart, yfirst, ycentre, ysecond;
558 float hgt = bottom * 20.0 / 100.0; // 60% of height should be zoomed
559 yfirst = _center_y - hgt;
561 ysecond = _center_y + hgt;
562 float range = hgt * 2;
565 float factor = range / 10.0;
567 float hgt1 = bottom * 30.0 / 100.0;
568 int incrs = int((_val_span - _major_divs * 2.0) / _major_divs);
569 int incr = incrs / 2;
570 float factors = hgt1 / incr;
572 // moving type pointer
573 float ypoint, xpoint;
574 float ycent = _center_y;
575 float right = _x + _w;
577 if (cur_value <= data[centre + 1])
578 if (cur_value > data[centre]) {
579 ypoint = ycent + ((cur_value - data[centre]) * hgt / _major_divs);
582 if (cur_value >= data[centre - 1])
583 if (cur_value <= data[centre]) {
584 ypoint = ycent - ((data[centre] - cur_value) * hgt / _major_divs);
587 if (cur_value < data[centre - 1])
588 if (cur_value >= _input.min()) {
589 float diff = _input.min() - data[centre - 1];
590 float diff1 = cur_value - data[centre - 1];
591 float val = (diff1 * hgt1) / diff;
593 ypoint = ycent - hgt - val;
596 if (cur_value > data[centre + 1])
597 if (cur_value <= _input.max()) {
598 float diff = _input.max() - data[centre + 1];
599 float diff1 = cur_value - data[centre + 1];
600 float val = (diff1 * hgt1) / diff;
602 ypoint = ycent + hgt + val;
608 draw_line(xstart, ycentre, xstart - 5.0, ycentre); //centre tick
610 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre] * _input.factor())); // was data_scaling() ... makes not sense at all
612 if (!option_notext())
613 draw_text(x, ycentre, buf, 0);
615 for (i = 1; i < 5; i++) {
618 draw_bullet(xstart - 2.5, yfirst, 3.0);
619 draw_bullet(xstart - 2.5, ycentre, 3.0);
622 yfirst = _center_y - hgt;
624 for (i = 0; i <= incr; i++) {
625 draw_line(xstart, yfirst, xstart - 5.0, yfirst);
626 draw_line(xstart, ysecond, xstart - 5.0, ysecond);
628 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre - i - 1] * _input.factor())); // was data_scaling() ... makes no sense at all
630 if (!option_notext())
631 draw_text(x, yfirst, buf, 0);
633 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre + i + 1] * _input.factor())); // was data_scaling() ... makes no sense at all
635 if (!option_notext())
636 draw_text(x, ysecond, buf, 0);
643 //to draw moving type pointer for left option
645 xpoint = right + 10.0;
647 if (_pointer_type == MOVING) {
648 draw_line(xpoint, ycent, xpoint, ypoint);
649 draw_line(xpoint, ypoint, xpoint - 10.0, ypoint);
650 draw_line(xpoint - 10.0, ypoint, xpoint - 5.0, ypoint + 5.0);
651 draw_line(xpoint - 10.0, ypoint, xpoint - 5.0, ypoint - 5.0);
657 xstart = (x + w) / 2;
659 draw_line(xstart, ycentre, xstart + 5.0, ycentre); //centre tick
661 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre] * _input.factor())); // was data_scaling() ... makes no sense at all
663 if (!option_notext())
664 draw_text(w, ycentre, buf, 0);
666 for (i = 1; i < 5; i++) {
669 draw_bullet(xstart + 2.5, yfirst, 3.0);
670 draw_bullet(xstart + 2.5, ycentre, 3.0);
673 yfirst = _center_y - hgt;
675 for (i = 0; i <= incr; i++) {
676 draw_line(xstart, yfirst, xstart + 5.0, yfirst);
677 draw_line(xstart, ysecond, xstart + 5.0, ysecond);
679 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre - i - 1] * _input.factor())); // was data_scaling() ... makes no sense at all
681 if (!option_notext())
682 draw_text(w, yfirst, buf, 0);
684 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre + i + 1] * _input.factor()));
686 if (!option_notext())
687 draw_text(w, ysecond, buf, 0);
694 // to draw moving type pointer for right option
698 if (_pointer_type == MOVING) {
699 draw_line(xpoint, ycent, xpoint, ypoint);
700 draw_line(xpoint, ypoint, xpoint + 10.0, ypoint);
701 draw_line(xpoint + 10.0, ypoint, xpoint + 5.0, ypoint + 5.0);
702 draw_line(xpoint + 10.0, ypoint, xpoint + 5.0, ypoint - 5.0);
705 }//end option_right /left
706 //end of vertical scale
716 float ystart, xfirst, xcentre, xsecond;
718 float hgt = bottom * 20.0 / 100.0; // 60% of height should be zoomed
719 xfirst = _center_x - hgt;
721 xsecond = _center_x + hgt;
722 float range = hgt * 2;
725 float factor = range / 10.0;
727 float hgt1 = bottom * 30.0 / 100.0;
728 int incrs = int((_val_span - _major_divs * 2.0) / _major_divs);
729 int incr = incrs / 2;
730 float factors = hgt1 / incr;
733 // Code for Moving Type Pointer
734 float, xpoint, ypoint;
735 float xcent = _center_x;
737 if (cur_value <= data[centre + 1]) {
738 if (cur_value > data[centre]) {
739 xpoint = xcent + ((cur_value - data[centre]) * hgt / _major_divs);
743 if (cur_value >= data[centre - 1]) {
744 if (cur_value <= data[centre]) {
745 xpoint = xcent - ((data[centre] - cur_value) * hgt / _major_divs);
749 if (cur_value < data[centre - 1]) {
750 if (cur_value >= _input.min()) {
751 float diff = _input.min() - data[centre - 1];
752 float diff1 = cur_value - data[centre - 1];
753 float val = (diff1 * hgt1) / diff;
755 xpoint = xcent - hgt - val;
759 if (cur_value > data[centre + 1]) {
760 if (cur_value <= _input.max()) {
761 float diff = _input.max() - data[centre + 1];
762 float diff1 = cur_value - data[centre + 1];
763 float val = (diff1 * hgt1) / diff;
765 xpoint = xcent + hgt + val;
768 // end moving pointer
772 draw_line(xcentre, ystart, xcentre, ystart - 5.0); //centre tick
774 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre] * _input.factor())); // was data_scaling() ... makes no sense at all
776 if (!option_notext())
777 draw_text(xcentre - 10.0, y, buf, 0);
779 for (i = 1; i < 5; i++) {
782 draw_bullet(xfirst, ystart - 2.5, 3.0);
783 draw_bullet(xcentre, ystart - 2.5, 3.0);
786 xfirst = _center_x - hgt;
788 for (i = 0; i <= incr; i++) {
789 draw_line(xfirst, ystart, xfirst, ystart - 5.0);
790 draw_line(xsecond, ystart, xsecond, ystart - 5.0);
792 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre - i - 1] * _input.factor())); // was data_scaling() ... makes no sense at all
794 if (!option_notext())
795 draw_text(xfirst - 10.0, y, buf, 0);
797 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre + i + 1] * _input.factor())); // was data_scaling() ... makes no sense at all
799 if (!option_notext())
800 draw_text(xsecond - 10.0, y, buf, 0);
807 // moving pointer for top option
808 ypoint = _y + _h + 10.0;
810 if (_pointer_type == MOVING) {
811 draw_line(xcent, ypoint, xpoint, ypoint);
812 draw_line(xpoint, ypoint, xpoint, ypoint - 10.0);
813 draw_line(xpoint, ypoint - 10.0, xpoint + 5.0, ypoint - 5.0);
814 draw_line(xpoint, ypoint - 10.0, xpoint - 5.0, ypoint - 5.0);
820 ystart = (y + h) / 2;
822 //draw_line(xstart, yfirst, xstart - 5.0, yfirst);
823 draw_line(xcentre, ystart, xcentre, ystart + 5.0); //centre tick
825 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre] * _input.factor())); // was data_scaling() ... makes no sense at all
827 if (!option_notext())
828 draw_text(xcentre - 10.0, h, buf, 0);
830 for (i = 1; i < 5; i++) {
833 draw_bullet(xfirst, ystart + 2.5, 3.0);
834 draw_bullet(xcentre, ystart + 2.5, 3.0);
837 xfirst = _center_x - hgt;
839 for (i = 0; i <= incr; i++) {
840 draw_line(xfirst, ystart, xfirst, ystart + 5.0);
841 draw_line(xsecond, ystart, xsecond, ystart + 5.0);
843 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre - i - 1] * _input.factor())); // was data_scaling() ... makes no sense at all
845 if (!option_notext())
846 draw_text(xfirst - 10.0, h, buf, 0);
848 snprintf(buf, BUFSIZE, "%3.0f\n", float(data[centre + i + 1] * _input.factor())); // was data_scaling() ... makes no sense at all
850 if (!option_notext())
851 draw_text(xsecond - 10.0, h, buf, 0);
857 // movimg pointer for bottom option
859 if (_pointer_type == MOVING) {
860 draw_line(xcent, ypoint, xpoint, ypoint);
861 draw_line(xpoint, ypoint, xpoint, ypoint + 10.0);
862 draw_line(xpoint, ypoint + 10.0, xpoint + 5.0, ypoint + 5.0);
863 draw_line(xpoint, ypoint + 10.0, xpoint - 5.0, ypoint + 5.0);
865 }//end hud_top or hud_bottom
866 } //end of horizontal/vertical scales