White space changes.
This commit is contained in:
parent
1dfe83dfd4
commit
f77877ffa8
3 changed files with 1518 additions and 1636 deletions
src/Cockpit
|
@ -173,7 +173,7 @@ static instr_item * readTBI( const SGPropertyNode * node);
|
|||
void fgHUDalphaInit( void );
|
||||
|
||||
class locRECT {
|
||||
public:
|
||||
public:
|
||||
RECT rect;
|
||||
|
||||
locRECT( UINT left, UINT top, UINT right, UINT bottom);
|
||||
|
@ -210,14 +210,13 @@ void drawOneLine( RECT &rect)
|
|||
//
|
||||
// The following code deals with painting the "instrument" on the display
|
||||
//
|
||||
/* textString - Bitmap font string */
|
||||
/* textString - Bitmap font string */
|
||||
|
||||
void textString( int x, int y, char *msg, void *font,int digit) //suma
|
||||
{
|
||||
|
||||
if(*msg)
|
||||
{
|
||||
// puDrawString ( NULL, msg, x, y );
|
||||
if(*msg) {
|
||||
// puDrawString ( NULL, msg, x, y );
|
||||
glRasterPos2f(x, y);
|
||||
while (*msg) {
|
||||
glutBitmapCharacter(font, *msg);
|
||||
|
@ -236,8 +235,7 @@ void strokeString(int x, int y, char *msg, void *font, float theta)
|
|||
float sintheta,costheta;
|
||||
|
||||
|
||||
if(*msg)
|
||||
{
|
||||
if(*msg) {
|
||||
glPushMatrix();
|
||||
glRotatef(theta * SGD_RADIANS_TO_DEGREES, 0.0, 0.0, 1.0);
|
||||
sintheta = sin(theta);
|
||||
|
@ -255,8 +253,7 @@ void strokeString(int x, int y, char *msg, void *font, float theta)
|
|||
|
||||
int getStringWidth ( char *str )
|
||||
{
|
||||
if ( HUDtext && str )
|
||||
{
|
||||
if ( HUDtext && str ) {
|
||||
float r, l ;
|
||||
guiFntHandle->getBBox ( str, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
|
||||
return FloatToInt( r - l );
|
||||
|
@ -369,44 +366,35 @@ readCard(const SGPropertyNode * node)
|
|||
SG_LOG(SG_INPUT, SG_INFO, "Done reading instrument " << name);
|
||||
|
||||
|
||||
if(type=="gauge")
|
||||
if(type=="gauge") {
|
||||
span_units = maxValue - minValue;
|
||||
}
|
||||
|
||||
if(loadfn=="anzg")
|
||||
if (loadfn=="anzg") {
|
||||
load_fn = get_anzg;
|
||||
else
|
||||
if(loadfn=="heading")
|
||||
} else if (loadfn=="heading") {
|
||||
load_fn = get_heading;
|
||||
else
|
||||
if(loadfn=="aoa")
|
||||
} else if (loadfn=="aoa") {
|
||||
load_fn = get_aoa;
|
||||
else
|
||||
if(loadfn=="climb")
|
||||
} else if (loadfn=="climb") {
|
||||
load_fn = get_climb_rate;
|
||||
else
|
||||
if(loadfn=="altitude")
|
||||
} else if (loadfn=="altitude") {
|
||||
load_fn = get_altitude;
|
||||
else
|
||||
if(loadfn=="agl")
|
||||
} else if (loadfn=="agl") {
|
||||
load_fn = get_agl;
|
||||
else
|
||||
if(loadfn=="speed")
|
||||
} else if (loadfn=="speed") {
|
||||
load_fn = get_speed;
|
||||
else
|
||||
if(loadfn=="view_direction")
|
||||
} else if (loadfn=="view_direction") {
|
||||
load_fn = get_view_direction;
|
||||
else
|
||||
if(loadfn=="aileronval")
|
||||
} else if (loadfn=="aileronval") {
|
||||
load_fn = get_aileronval;
|
||||
else
|
||||
if(loadfn=="elevatorval")
|
||||
} else if (loadfn=="elevatorval") {
|
||||
load_fn = get_elevatorval;
|
||||
else
|
||||
if(loadfn=="rudderval")
|
||||
} else if (loadfn=="rudderval") {
|
||||
load_fn = get_rudderval;
|
||||
else
|
||||
if(loadfn=="throttleval")
|
||||
} else if (loadfn=="throttleval") {
|
||||
load_fn = get_throttleval;
|
||||
}
|
||||
|
||||
|
||||
if ( (type == "dial") | (type == "tape") ) {
|
||||
|
@ -778,13 +766,10 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
|
|||
path.append(hud_path);
|
||||
|
||||
ifstream input(path.c_str());
|
||||
if (!input.good())
|
||||
{
|
||||
if (!input.good()) {
|
||||
SG_LOG(SG_INPUT, SG_ALERT,
|
||||
"Cannot read Hud configuration from " << path.str());
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
readHud(input);
|
||||
input.close();
|
||||
}
|
||||
|
@ -811,8 +796,7 @@ int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
|
|||
if (!input.good()) {
|
||||
SG_LOG(SG_INPUT, SG_ALERT,
|
||||
"Cannot read Hud configuration from " << path.str());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
readHud(input);
|
||||
input.close();
|
||||
}
|
||||
|
@ -1101,7 +1085,7 @@ void fgUpdateHUD( GLfloat x_start, GLfloat y_start,
|
|||
|
||||
if( antialiased_node->getBoolValue() ) {
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
// glEnable(GL_BLEND);
|
||||
// glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
|
||||
glHint(GL_LINE_SMOOTH_HINT,GL_DONT_CARE);
|
||||
glLineWidth(1.5);
|
||||
|
|
|
@ -70,13 +70,13 @@ SG_USING_NAMESPACE(std);
|
|||
// some of Norman's crazy optimizations. :-)
|
||||
|
||||
#ifndef WIN32
|
||||
typedef struct {
|
||||
typedef struct {
|
||||
int x, y;
|
||||
} POINT;
|
||||
} POINT;
|
||||
|
||||
typedef struct {
|
||||
typedef struct {
|
||||
int top, bottom, left, right;
|
||||
} RECT;
|
||||
} RECT;
|
||||
#endif
|
||||
|
||||
// View mode definitions
|
||||
|
@ -248,7 +248,7 @@ enum hudinstype{ HUDno_instr,
|
|||
HUDdual_inst,
|
||||
HUDmoving_scale,
|
||||
HUDtbi
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct gltagRGBTRIPLE { // rgbt
|
||||
GLfloat Blue;
|
||||
|
@ -309,8 +309,7 @@ public:
|
|||
|
||||
int getStringWidth ( char *str )
|
||||
{
|
||||
if ( HUDtext && str )
|
||||
{
|
||||
if ( HUDtext && str ) {
|
||||
float r, l ;
|
||||
guiFntHandle->getBBox ( str, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
|
||||
return FloatToInt( r - l );
|
||||
|
@ -320,8 +319,7 @@ public:
|
|||
|
||||
int StringWidth (void )
|
||||
{
|
||||
if ( HUDtext && strlen( msg ))
|
||||
{
|
||||
if ( HUDtext && strlen( msg )) {
|
||||
float r, l ;
|
||||
guiFntHandle->getBBox ( msg, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
|
||||
return FloatToInt( r - l );
|
||||
|
@ -339,9 +337,9 @@ public:
|
|||
char *t=msg;
|
||||
int p=4;
|
||||
|
||||
if(t[0]=='-') //if negative value then increase the c and p values for '-' sign.
|
||||
{
|
||||
c++;
|
||||
if(t[0]=='-') {
|
||||
//if negative value then increase the c and p values
|
||||
//for '-' sign. c++;
|
||||
p++;
|
||||
}
|
||||
char *tmp=msg;
|
||||
|
@ -404,7 +402,7 @@ public:
|
|||
}
|
||||
glEnd();
|
||||
}
|
||||
/* void draw( void ) {
|
||||
/* void draw( void ) {
|
||||
vector < fgLineSeg2D > :: iterator curSeg;
|
||||
vector < fgLineSeg2D > :: iterator lastSeg;
|
||||
curSeg = List.begin();
|
||||
|
@ -475,7 +473,7 @@ extern fgLineList HUD_StippleLineList;
|
|||
|
||||
|
||||
class instr_item { // An Abstract Base Class (ABC)
|
||||
private:
|
||||
private:
|
||||
static UINT instances; // More than 64K instruments? Nah!
|
||||
static int brightness;
|
||||
static glRGBTRIPLE color;
|
||||
|
@ -492,7 +490,7 @@ class instr_item { // An Abstract Base Class (ABC)
|
|||
POINT mid_span; //
|
||||
int digits; //suma
|
||||
|
||||
public:
|
||||
public:
|
||||
instr_item( int x,
|
||||
int y,
|
||||
UINT height,
|
||||
|
@ -524,7 +522,9 @@ class instr_item { // An Abstract Base Class (ABC)
|
|||
UINT huds_vert (UINT options) { return( options & HUDS_VERT ); }
|
||||
UINT huds_left (UINT options) { return( options & HUDS_LEFT ); }
|
||||
UINT huds_right (UINT options) { return( options & HUDS_RIGHT ); }
|
||||
UINT huds_both (UINT options) { return( (options & HUDS_BOTH) == HUDS_BOTH ); }
|
||||
UINT huds_both (UINT options) {
|
||||
return( (options & HUDS_BOTH) == HUDS_BOTH );
|
||||
}
|
||||
UINT huds_noticks (UINT options) { return( options & HUDS_NOTICKS ); }
|
||||
UINT huds_notext (UINT options) { return( options & HUDS_NOTEXT ); }
|
||||
UINT huds_top (UINT options) { return( options & HUDS_TOP ); }
|
||||
|
@ -553,8 +553,7 @@ class instr_item { // An Abstract Base Class (ABC)
|
|||
}
|
||||
int getStringWidth ( char *str )
|
||||
{
|
||||
if ( HUDtext && str )
|
||||
{
|
||||
if ( HUDtext && str ) {
|
||||
float r, l ;
|
||||
guiFntHandle->getBBox ( str, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
|
||||
return FloatToInt( r - l );
|
||||
|
@ -591,7 +590,7 @@ extern int HUD_style;
|
|||
|
||||
|
||||
class instr_label : public instr_item {
|
||||
private:
|
||||
private:
|
||||
const char *pformat;
|
||||
const char *pre_str;
|
||||
const char *post_str;
|
||||
|
@ -603,7 +602,7 @@ class instr_label : public instr_item {
|
|||
bool lon;
|
||||
bool lbox;
|
||||
|
||||
public:
|
||||
public:
|
||||
instr_label( int x,
|
||||
int y,
|
||||
UINT width,
|
||||
|
@ -634,7 +633,7 @@ typedef instr_label * pInstlabel;
|
|||
|
||||
|
||||
class lat_label : public instr_item {
|
||||
private:
|
||||
private:
|
||||
const char *pformat;
|
||||
const char *pre_str;
|
||||
const char *post_str;
|
||||
|
@ -643,7 +642,7 @@ class lat_label : public instr_item {
|
|||
int blink;
|
||||
char format_buffer[80];
|
||||
|
||||
public:
|
||||
public:
|
||||
lat_label( int x,
|
||||
int y,
|
||||
UINT width,
|
||||
|
@ -670,7 +669,7 @@ class lat_label : public instr_item {
|
|||
typedef lat_label * pLatlabel;
|
||||
|
||||
class lon_label : public instr_item {
|
||||
private:
|
||||
private:
|
||||
const char *pformat;
|
||||
const char *pre_str;
|
||||
const char *post_str;
|
||||
|
@ -679,7 +678,7 @@ class lon_label : public instr_item {
|
|||
int blink;
|
||||
char format_buffer[80];
|
||||
|
||||
public:
|
||||
public:
|
||||
lon_label( int x,
|
||||
int y,
|
||||
UINT width,
|
||||
|
@ -713,7 +712,7 @@ typedef lon_label * pLonlabel;
|
|||
//
|
||||
|
||||
class instr_scale : public instr_item {
|
||||
private:
|
||||
private:
|
||||
float range_shown; // Width Units.
|
||||
float Maximum_value; // ceiling.
|
||||
float Minimum_value; // Representation floor.
|
||||
|
@ -723,7 +722,7 @@ class instr_scale : public instr_item {
|
|||
UINT Modulo; // Roll over point
|
||||
int signif_digits; // digits to show to the right.
|
||||
|
||||
public:
|
||||
public:
|
||||
instr_scale( int x,
|
||||
int y,
|
||||
UINT width,
|
||||
|
@ -760,7 +759,7 @@ class instr_scale : public instr_item {
|
|||
// line.
|
||||
|
||||
class hud_card : public instr_scale {
|
||||
private:
|
||||
private:
|
||||
float val_span;
|
||||
string type;
|
||||
float half_width_units;
|
||||
|
@ -786,7 +785,7 @@ class hud_card : public instr_scale {
|
|||
UINT Min_div; //suma
|
||||
|
||||
|
||||
public:
|
||||
public:
|
||||
hud_card( int x,
|
||||
int y,
|
||||
UINT width,
|
||||
|
@ -824,7 +823,7 @@ class hud_card : public instr_scale {
|
|||
~hud_card();
|
||||
hud_card( const hud_card & image);
|
||||
hud_card & operator = (const hud_card & rhs );
|
||||
// virtual void display_enable( bool setting );
|
||||
// virtual void display_enable( bool setting );
|
||||
virtual void draw( void ); // Required method in base class
|
||||
void circles(float,float,float); // suma
|
||||
void fixed(float,float,float,float,float,float); //suma
|
||||
|
@ -834,7 +833,7 @@ class hud_card : public instr_scale {
|
|||
typedef hud_card * pCardScale;
|
||||
|
||||
class gauge_instr : public instr_scale {
|
||||
public:
|
||||
public:
|
||||
gauge_instr( int x,
|
||||
int y,
|
||||
UINT width,
|
||||
|
@ -862,10 +861,10 @@ typedef gauge_instr * pGaugeInst;
|
|||
// for both panel and HUD Turn Bank Indicators.
|
||||
|
||||
class dual_instr_item : public instr_item {
|
||||
private:
|
||||
private:
|
||||
FLTFNPTR alt_data_source;
|
||||
|
||||
public:
|
||||
public:
|
||||
dual_instr_item ( int x,
|
||||
int y,
|
||||
UINT width,
|
||||
|
@ -886,14 +885,14 @@ class dual_instr_item : public instr_item {
|
|||
|
||||
class fgTBI_instr : public dual_instr_item
|
||||
{
|
||||
private:
|
||||
private:
|
||||
UINT BankLimit;
|
||||
UINT SlewLimit;
|
||||
UINT scr_hole;
|
||||
bool tsi; //suma
|
||||
float rad; //suma
|
||||
|
||||
public:
|
||||
public:
|
||||
fgTBI_instr( int x,
|
||||
int y,
|
||||
UINT width,
|
||||
|
@ -921,7 +920,7 @@ class fgTBI_instr : public dual_instr_item
|
|||
typedef fgTBI_instr * pTBI;
|
||||
|
||||
class HudLadder : public dual_instr_item {
|
||||
private:
|
||||
private:
|
||||
UINT width_units;
|
||||
int div_units;
|
||||
UINT minor_div;
|
||||
|
@ -951,7 +950,7 @@ class HudLadder : public dual_instr_item {
|
|||
fgLineList LineList;
|
||||
fgLineList StippleLineList;
|
||||
|
||||
public:
|
||||
public:
|
||||
HudLadder( string name,
|
||||
int x,
|
||||
int y,
|
||||
|
|
|
@ -82,14 +82,14 @@ hud_card( int x,
|
|||
divisions=divs; //suma
|
||||
zoom = zooms; //suma
|
||||
|
||||
// UINT options = get_options();
|
||||
// huds_both = (options & HUDS_BOTH) == HUDS_BOTH;
|
||||
// huds_right = options & HUDS_RIGHT;
|
||||
// huds_left = options & HUDS_LEFT;
|
||||
// huds_vert = options & HUDS_VERT;
|
||||
// huds_notext = options & HUDS_NOTEXT;
|
||||
// huds_top = options & HUDS_TOP;
|
||||
// huds_bottom = options & HUDS_BOTTOM;
|
||||
// UINT options = get_options();
|
||||
// huds_both = (options & HUDS_BOTH) == HUDS_BOTH;
|
||||
// huds_right = options & HUDS_RIGHT;
|
||||
// huds_left = options & HUDS_LEFT;
|
||||
// huds_vert = options & HUDS_VERT;
|
||||
// huds_notext = options & HUDS_NOTEXT;
|
||||
// huds_top = options & HUDS_TOP;
|
||||
// huds_bottom = options & HUDS_BOTTOM;
|
||||
}
|
||||
|
||||
hud_card ::
|
||||
|
@ -118,14 +118,14 @@ hud_card( const hud_card & image):
|
|||
Min_div(image.Min_div)//suma
|
||||
|
||||
{
|
||||
// UINT options = get_options();
|
||||
// huds_both = (options & HUDS_BOTH) == HUDS_BOTH;
|
||||
// huds_right = options & HUDS_RIGHT;
|
||||
// huds_left = options & HUDS_LEFT;
|
||||
// huds_vert = options & HUDS_VERT;
|
||||
// huds_notext = options & HUDS_NOTEXT;
|
||||
// huds_top = options & HUDS_TOP;
|
||||
// huds_bottom = options & HUDS_BOTTOM;
|
||||
// UINT options = get_options();
|
||||
// huds_both = (options & HUDS_BOTH) == HUDS_BOTH;
|
||||
// huds_right = options & HUDS_RIGHT;
|
||||
// huds_left = options & HUDS_LEFT;
|
||||
// huds_vert = options & HUDS_VERT;
|
||||
// huds_notext = options & HUDS_NOTEXT;
|
||||
// huds_top = options & HUDS_TOP;
|
||||
// huds_bottom = options & HUDS_BOTTOM;
|
||||
}
|
||||
|
||||
hud_card & hud_card ::
|
||||
|
@ -191,8 +191,7 @@ draw( void ) // (HUD_scale * pscale )
|
|||
|
||||
//begin suma
|
||||
// if type=gauge then display dial
|
||||
if(type=="gauge")
|
||||
{
|
||||
if(type=="gauge") {
|
||||
float x,y;
|
||||
float i;
|
||||
int decimal, sign;
|
||||
|
@ -202,8 +201,8 @@ draw( void ) // (HUD_scale * pscale )
|
|||
glPointSize(3.0);
|
||||
|
||||
float incr= 360.0/divisions;
|
||||
for(i=0.0;i<360.0;i+=incr)
|
||||
{ float i1=i*SGD_DEGREES_TO_RADIANS;
|
||||
for(i=0.0;i<360.0;i+=incr) {
|
||||
float i1=i*SGD_DEGREES_TO_RADIANS;
|
||||
float x1=x+radius*cos(i1);
|
||||
float y1=y+radius*sin(i1);
|
||||
|
||||
|
@ -215,8 +214,7 @@ draw( void ) // (HUD_scale * pscale )
|
|||
glDisable(GL_POINT_SMOOTH);
|
||||
|
||||
|
||||
if(data_available())
|
||||
{
|
||||
if(data_available()) {
|
||||
float offset = 90.0*SGD_DEGREES_TO_RADIANS;
|
||||
float r1=10.0; //size of carrot
|
||||
float theta= get_value();
|
||||
|
@ -245,19 +243,15 @@ draw( void ) // (HUD_scale * pscale )
|
|||
|
||||
}
|
||||
|
||||
} //end type=gauge
|
||||
else // if its not explicitly a gauge default to tape
|
||||
{
|
||||
if(pointer)
|
||||
{
|
||||
if(pointer_type=="moving")
|
||||
{
|
||||
//end type=gauge
|
||||
} else {
|
||||
// if its not explicitly a gauge default to tape
|
||||
if(pointer) {
|
||||
if(pointer_type=="moving") {
|
||||
vmin = minValue;
|
||||
vmax = maxValue;
|
||||
}
|
||||
else // default to fixed
|
||||
{
|
||||
|
||||
} else {
|
||||
// default to fixed
|
||||
vmin = cur_value - half_width_units; // width units == needle travel
|
||||
vmax = cur_value + half_width_units; // or picture unit span.
|
||||
text_x = mid_scr.x;
|
||||
|
@ -270,7 +264,6 @@ draw( void ) // (HUD_scale * pscale )
|
|||
text_y = mid_scr.y;
|
||||
}
|
||||
|
||||
|
||||
// Draw the basic markings for the scale...
|
||||
|
||||
if( huds_vert(options) ) { // Vertical scale
|
||||
|
@ -325,12 +318,9 @@ draw( void ) // (HUD_scale * pscale )
|
|||
// marker_xe, mid_scr.y - scrn_rect.right / 6);
|
||||
|
||||
// draw pointer
|
||||
if(pointer)
|
||||
{
|
||||
if(pointer_type=="moving")
|
||||
{
|
||||
if(zoom == 0)
|
||||
{
|
||||
if(pointer) {
|
||||
if(pointer_type=="moving") {
|
||||
if(zoom == 0) {
|
||||
//Code for Moving Type Pointer included by suma.
|
||||
static float ycentre, ypoint,xpoint;
|
||||
static int range,wth;
|
||||
|
@ -357,8 +347,8 @@ draw( void ) // (HUD_scale * pscale )
|
|||
drawOneLine(xpoint-marker_offset,ypoint,xpoint-5.0,ypoint+5.0);
|
||||
drawOneLine(xpoint-marker_offset,ypoint,xpoint-5.0,ypoint-5.0);
|
||||
}//zoom=0
|
||||
} else // default to fixed
|
||||
{
|
||||
} else {
|
||||
// default to fixed
|
||||
fixed(marker_offset+marker_xe, text_y + scrn_rect.right / 6,
|
||||
marker_offset+marker_xs, text_y,marker_offset+marker_xe,
|
||||
text_y - scrn_rect.right / 6);
|
||||
|
@ -383,12 +373,10 @@ draw( void ) // (HUD_scale * pscale )
|
|||
// marker_xe, mid_scr.y);
|
||||
|
||||
// draw pointer
|
||||
if(pointer)
|
||||
{
|
||||
if(pointer_type=="moving")
|
||||
{
|
||||
if(zoom == 0) //type-fixed & zoom=1, behaviour to be defined
|
||||
{
|
||||
if(pointer) {
|
||||
if(pointer_type=="moving") {
|
||||
if(zoom == 0) {
|
||||
//type-fixed & zoom=1, behaviour to be defined
|
||||
// Code for Moving Type Pointer included by suma.
|
||||
static float ycentre, ypoint,xpoint;
|
||||
static int range,wth;
|
||||
|
@ -414,14 +402,13 @@ draw( void ) // (HUD_scale * pscale )
|
|||
drawOneLine(xpoint+marker_offset,ypoint,xpoint+5.0,ypoint+5.0);
|
||||
drawOneLine(xpoint+marker_offset,ypoint,xpoint+5.0,ypoint-5.0);
|
||||
}
|
||||
}
|
||||
else // default to fixed
|
||||
{
|
||||
} else {
|
||||
// default to fixed
|
||||
fixed( -marker_offset+scrn_rect.left, text_y + scrn_rect.right / 6,
|
||||
-marker_offset+marker_xe, text_y,-marker_offset+scrn_rect.left,
|
||||
text_y - scrn_rect.right / 6);
|
||||
}
|
||||
}//if pointer
|
||||
} //if pointer
|
||||
} //end vertical/right
|
||||
|
||||
// At this point marker x_start and x_end values are transposed.
|
||||
|
@ -440,15 +427,10 @@ draw( void ) // (HUD_scale * pscale )
|
|||
last = FloatToInt(vmax)+1;
|
||||
i = FloatToInt(vmin);
|
||||
|
||||
if(zoom ==1)
|
||||
{
|
||||
if(zoom ==1) {
|
||||
zoomed_scale(vmin,vmax); //suma
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
for( ; i <last ; i++ )
|
||||
{
|
||||
} else {
|
||||
for( ; i <last ; i++ ) {
|
||||
condition = true;
|
||||
if( !modulo()) {
|
||||
if( i < min_val()) {
|
||||
|
@ -476,39 +458,31 @@ draw( void ) // (HUD_scale * pscale )
|
|||
k = i;
|
||||
|
||||
// Minor ticks
|
||||
if( div_min())
|
||||
{
|
||||
if( div_min()) {
|
||||
// if( (i%div_min()) == 0) {
|
||||
if( !(k%(int)div_min()))
|
||||
{
|
||||
if( !(k%(int)div_min())) {
|
||||
/* if((( marker_ys - 5) > scrn_rect.top ) &&
|
||||
(( marker_ys + 5) < (height))){ */
|
||||
|
||||
//vertical/left OR vertical/right
|
||||
if( huds_both(options) )
|
||||
{
|
||||
if(tick_type=="line")
|
||||
{
|
||||
if(tick_length=="variable")
|
||||
{
|
||||
if( huds_both(options) ) {
|
||||
if(tick_type=="line") {
|
||||
if(tick_length=="variable") {
|
||||
drawOneLine( scrn_rect.left, marker_ys,
|
||||
marker_xs, marker_ys );
|
||||
drawOneLine( marker_xe, marker_ys,
|
||||
width, marker_ys );
|
||||
} else {
|
||||
drawOneLine( scrn_rect.left, marker_ys,
|
||||
marker_xs, marker_ys );
|
||||
drawOneLine( marker_xe, marker_ys,
|
||||
width, marker_ys );
|
||||
}
|
||||
else
|
||||
{
|
||||
drawOneLine( scrn_rect.left, marker_ys,
|
||||
marker_xs, marker_ys );
|
||||
drawOneLine( marker_xe, marker_ys,
|
||||
width, marker_ys );
|
||||
}
|
||||
}
|
||||
else if(tick_type=="circle") // begin suma this func. is written below
|
||||
} else if(tick_type=="circle") // begin suma this func. is written below
|
||||
circles(scrn_rect.left,(float)marker_ys,3.0); //end suma
|
||||
|
||||
else // if neither line nor circle draw default as line
|
||||
{
|
||||
else {
|
||||
// if neither line nor circle draw default as line
|
||||
drawOneLine( scrn_rect.left, marker_ys,
|
||||
marker_xs, marker_ys );
|
||||
drawOneLine( marker_xe, marker_ys,
|
||||
|
@ -523,45 +497,33 @@ draw( void ) // (HUD_scale * pscale )
|
|||
// anything other than huds_both
|
||||
} else {
|
||||
if( huds_left(options) ) {
|
||||
if(tick_type=="line")
|
||||
{
|
||||
if(tick_length=="variable")
|
||||
{
|
||||
if(tick_type=="line") {
|
||||
if(tick_length=="variable") {
|
||||
drawOneLine( marker_xs + 4, marker_ys,
|
||||
marker_xe, marker_ys );
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
drawOneLine( marker_xs , marker_ys,
|
||||
marker_xe, marker_ys );
|
||||
}
|
||||
}
|
||||
else if(tick_type=="circle") // begin suma
|
||||
} else if(tick_type=="circle") // begin suma
|
||||
circles((float)marker_xs + 4, (float)marker_ys,3.0); //end suma
|
||||
|
||||
else
|
||||
{
|
||||
else {
|
||||
drawOneLine( marker_xs + 4, marker_ys,
|
||||
marker_xe, marker_ys );
|
||||
}
|
||||
} else {
|
||||
if(tick_type=="line")
|
||||
{
|
||||
if(tick_length=="variable")
|
||||
{
|
||||
if(tick_type=="line") {
|
||||
if(tick_length=="variable") {
|
||||
drawOneLine( marker_xs, marker_ys,
|
||||
marker_xe - 4, marker_ys );
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
drawOneLine( marker_xs, marker_ys,
|
||||
marker_xe , marker_ys );
|
||||
}
|
||||
}
|
||||
else if(tick_type=="circle") //begin suma
|
||||
} else if(tick_type=="circle") //begin suma
|
||||
circles((float)marker_xe - 4, (float)marker_ys,3.0); //end suma
|
||||
else
|
||||
{
|
||||
else {
|
||||
drawOneLine( marker_xs, marker_ys,
|
||||
marker_xe - 4, marker_ys );
|
||||
}
|
||||
|
@ -571,8 +533,7 @@ draw( void ) // (HUD_scale * pscale )
|
|||
} //end minor ticks
|
||||
|
||||
// Major ticks
|
||||
if( div_max() )
|
||||
{
|
||||
if( div_max() ) {
|
||||
|
||||
if( !(k%(int)div_max()) ) {
|
||||
if(modulo()) {
|
||||
|
@ -591,25 +552,21 @@ draw( void ) // (HUD_scale * pscale )
|
|||
/* if(( (marker_ys - 8 ) > scrn_rect.top ) &&
|
||||
( (marker_ys + 8) < (height))){ */ //suma
|
||||
// huds_both
|
||||
if( huds_both(options) )
|
||||
{
|
||||
if( huds_both(options) ) {
|
||||
// drawOneLine( scrn_rect.left, marker_ys,
|
||||
// marker_xs, marker_ys);
|
||||
// drawOneLine( marker_xs, marker_ys,
|
||||
// scrn_rect.left + scrn_rect.right,
|
||||
// marker_ys);
|
||||
if(tick_type=="line")
|
||||
{
|
||||
if(tick_type=="line") {
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2f( scrn_rect.left, marker_ys );
|
||||
glVertex2f( marker_xs, marker_ys);
|
||||
glVertex2f( width, marker_ys);
|
||||
glEnd();
|
||||
}
|
||||
else if(tick_type=="circle") //begin suma
|
||||
} else if(tick_type=="circle") //begin suma
|
||||
circles(scrn_rect.left, (float)marker_ys,5.0); //end suma
|
||||
else
|
||||
{
|
||||
else {
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2f( scrn_rect.left, marker_ys );
|
||||
glVertex2f( marker_xs, marker_ys);
|
||||
|
@ -621,32 +578,23 @@ draw( void ) // (HUD_scale * pscale )
|
|||
textString ( marker_xs + 2, marker_ys,
|
||||
TextScale, GLUT_BITMAP_8_BY_13,0 );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//begin suma
|
||||
/* Changes are made to draw a circle when tick_type="circle" */
|
||||
// anything other than huds_both
|
||||
else
|
||||
{
|
||||
if(tick_type=="line")
|
||||
{
|
||||
if(tick_type=="line") {
|
||||
drawOneLine( marker_xs, marker_ys, marker_xe, marker_ys );
|
||||
}
|
||||
else if(tick_type=="circle")
|
||||
} else if(tick_type=="circle")
|
||||
circles((float)marker_xs + 4, (float)marker_ys,5.0);//end suma
|
||||
else
|
||||
{
|
||||
else {
|
||||
drawOneLine( marker_xs, marker_ys, marker_xe, marker_ys );
|
||||
}
|
||||
if( !huds_notext(options) )
|
||||
{
|
||||
if( huds_left(options) )
|
||||
{
|
||||
if( !huds_notext(options) ) {
|
||||
if( huds_left(options) ) {
|
||||
textString( marker_xs - 8 * lenstr - 2,
|
||||
marker_ys - 4,
|
||||
TextScale, GLUT_BITMAP_8_BY_13,0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
textString( marker_xe + 3 * lenstr,
|
||||
marker_ys - 4,
|
||||
TextScale, GLUT_BITMAP_8_BY_13,0 );
|
||||
|
@ -658,8 +606,9 @@ draw( void ) // (HUD_scale * pscale )
|
|||
} // End condition
|
||||
} // End for
|
||||
} //end of zoom
|
||||
} // End if VERTICAL SCALE TYPE (tape loop yet to be closed)
|
||||
else { // Horizontal scale by default
|
||||
// End if VERTICAL SCALE TYPE (tape loop yet to be closed)
|
||||
} else {
|
||||
// Horizontal scale by default
|
||||
// left tick bar
|
||||
if (draw_tick_left) {
|
||||
drawOneLine( scrn_rect.left, scrn_rect.top,
|
||||
|
@ -705,12 +654,9 @@ draw( void ) // (HUD_scale * pscale )
|
|||
// drawOneLine( mid_scr.x, marker_ye,
|
||||
// mid_scr.x + scrn_rect.bottom / 4, scrn_rect.top);
|
||||
// draw pointer
|
||||
if(pointer)
|
||||
{
|
||||
if(pointer_type=="moving")
|
||||
{
|
||||
if (zoom ==0)
|
||||
{
|
||||
if(pointer) {
|
||||
if(pointer_type=="moving") {
|
||||
if (zoom ==0) {
|
||||
//Code for Moving Type Pointer included by suma.
|
||||
static float xcentre,xpoint,ypoint;
|
||||
static int range;
|
||||
|
@ -725,9 +671,8 @@ draw( void ) // (HUD_scale * pscale )
|
|||
drawOneLine(xpoint,ypoint+marker_offset,xpoint+5.0,ypoint+5.0);
|
||||
drawOneLine(xpoint,ypoint+marker_offset,xpoint-5.0,ypoint+5.0);
|
||||
}
|
||||
}
|
||||
else //default to fixed
|
||||
{
|
||||
} else {
|
||||
//default to fixed
|
||||
fixed( marker_xs - scrn_rect.bottom / 4, scrn_rect.top,
|
||||
marker_xs, marker_ye, marker_xs + scrn_rect.bottom / 4,scrn_rect.top);
|
||||
}
|
||||
|
@ -752,12 +697,9 @@ draw( void ) // (HUD_scale * pscale )
|
|||
// mid_scr.x , marker_ys );
|
||||
|
||||
// draw pointer
|
||||
if(pointer)
|
||||
{
|
||||
if(pointer_type=="moving")
|
||||
{
|
||||
if(zoom == 0)
|
||||
{
|
||||
if(pointer) {
|
||||
if(pointer_type=="moving") {
|
||||
if(zoom == 0) {
|
||||
//Code for Moving Type Pointer included by suma.
|
||||
static float xcentre,xpoint,ypoint;
|
||||
static int range,hgt;
|
||||
|
@ -773,9 +715,7 @@ draw( void ) // (HUD_scale * pscale )
|
|||
drawOneLine(xpoint,ypoint-marker_offset,xpoint+5.0,ypoint-5.0);
|
||||
drawOneLine(xpoint,ypoint-marker_offset,xpoint-5.0,ypoint-5.0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
fixed( marker_xs + scrn_rect.bottom / 4, height, marker_xs, marker_ys,
|
||||
marker_xs - scrn_rect.bottom / 4, height);
|
||||
}
|
||||
|
@ -793,13 +733,10 @@ draw( void ) // (HUD_scale * pscale )
|
|||
// last = FloatToInt(vmax)+1;
|
||||
// i = FloatToInt(vmin);
|
||||
|
||||
if(zoom ==1)
|
||||
{
|
||||
if(zoom ==1) {
|
||||
zoomed_scale(vmin,vmax); //suma
|
||||
}
|
||||
else //default to zoom=0
|
||||
{
|
||||
|
||||
} else {
|
||||
//default to zoom=0
|
||||
last = (int)vmax + 1;
|
||||
i = (int)vmin;
|
||||
for(; i <last ; i++ ) {
|
||||
|
@ -821,7 +758,7 @@ draw( void ) // (HUD_scale * pscale )
|
|||
else
|
||||
k = i;
|
||||
|
||||
if( div_min()){
|
||||
if( div_min()) {
|
||||
// if( (i%(int)div_min()) == 0 ) {
|
||||
//draw minor ticks
|
||||
if( !(k%(int)div_min() )) {
|
||||
|
@ -829,17 +766,13 @@ draw( void ) // (HUD_scale * pscale )
|
|||
/*if((( marker_xs - 5) > scrn_rect.left ) &&
|
||||
(( marker_xs + 5 )< (scrn_rect.left + scrn_rect.right))){ */ //suma
|
||||
|
||||
if( huds_both(options) )
|
||||
{
|
||||
if(tick_length=="variable")
|
||||
{
|
||||
if( huds_both(options) ) {
|
||||
if(tick_length=="variable") {
|
||||
drawOneLine( marker_xs, scrn_rect.top,
|
||||
marker_xs, marker_ys - 4);
|
||||
drawOneLine( marker_xs, marker_ye + 4,
|
||||
marker_xs, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
drawOneLine( marker_xs, scrn_rect.top,
|
||||
marker_xs, marker_ys);
|
||||
drawOneLine( marker_xs, marker_ye,
|
||||
|
@ -852,8 +785,8 @@ draw( void ) // (HUD_scale * pscale )
|
|||
// glVertex2f( marker_xs, scrn_rect.top + scrn_rect.bottom);
|
||||
// glEnd();
|
||||
} else {
|
||||
if( huds_top(options))
|
||||
{ //draw minor ticks
|
||||
if( huds_top(options)) {
|
||||
//draw minor ticks
|
||||
if(tick_length=="variable")
|
||||
drawOneLine(marker_xs,marker_ys,marker_xs,marker_ye-4);
|
||||
else
|
||||
|
@ -976,10 +909,8 @@ zoomed_scale(int first, int last)
|
|||
|
||||
int a=0;
|
||||
|
||||
while(first <= last)
|
||||
{
|
||||
if((first % (int)Maj_div) == 0)
|
||||
{
|
||||
while(first <= last) {
|
||||
if((first % (int)Maj_div) == 0) {
|
||||
data[a] = first;
|
||||
a++ ;
|
||||
}
|
||||
|
@ -988,8 +919,7 @@ zoomed_scale(int first, int last)
|
|||
int centre =a/2;
|
||||
|
||||
|
||||
if( huds_vert(options) )
|
||||
{
|
||||
if( huds_vert(options) ) {
|
||||
|
||||
x=scrn_rect.left;
|
||||
y=scrn_rect.top;
|
||||
|
@ -1024,20 +954,17 @@ zoomed_scale(int first, int last)
|
|||
wth=scrn_rect.left+scrn_rect.right;
|
||||
|
||||
if(cur_value <= data[centre+1])
|
||||
if(cur_value > data[centre])
|
||||
{
|
||||
if(cur_value > data[centre]) {
|
||||
ypoint = ycent + ((cur_value - data[centre]) * hgt/Maj_div);
|
||||
}
|
||||
|
||||
if(cur_value >= data[centre-1])
|
||||
if(cur_value <= data[centre])
|
||||
{
|
||||
if(cur_value <= data[centre]) {
|
||||
ypoint = ycent - ((data[centre]-cur_value) * hgt/Maj_div);
|
||||
}
|
||||
|
||||
if(cur_value < data[centre-1])
|
||||
if(cur_value >= minValue)
|
||||
{
|
||||
if(cur_value >= minValue) {
|
||||
float diff = minValue - data[centre-1];
|
||||
float diff1 = cur_value - data[centre-1];
|
||||
float val = (diff1 * hgt1) / diff;
|
||||
|
@ -1047,8 +974,7 @@ zoomed_scale(int first, int last)
|
|||
|
||||
|
||||
if(cur_value > data[centre+1])
|
||||
if(cur_value <= maxValue)
|
||||
{
|
||||
if(cur_value <= maxValue) {
|
||||
float diff = maxValue - data[centre+1];
|
||||
float diff1 = cur_value - data[centre+1];
|
||||
float val = (diff1 * hgt1) / diff;
|
||||
|
@ -1056,21 +982,18 @@ zoomed_scale(int first, int last)
|
|||
ypoint = ycent + hgt + val;
|
||||
}
|
||||
|
||||
if(huds_left(options))
|
||||
{
|
||||
if(huds_left(options)) {
|
||||
xstart = w;
|
||||
|
||||
drawOneLine( xstart, ycentre, xstart - 5.0, ycentre); //centre tick
|
||||
|
||||
sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling()));
|
||||
|
||||
if( !huds_notext(options))
|
||||
{
|
||||
if( !huds_notext(options)) {
|
||||
textString (x, ycentre, TextScale, GLUT_BITMAP_8_BY_13,0 );
|
||||
}
|
||||
|
||||
for(i=1;i<5;i++)
|
||||
{
|
||||
for(i=1;i<5;i++) {
|
||||
yfirst += factor;
|
||||
ycentre += factor;
|
||||
circles(xstart-2.5,yfirst, 3.0);
|
||||
|
@ -1079,8 +1002,7 @@ zoomed_scale(int first, int last)
|
|||
|
||||
yfirst = mid_scr.y - hgt;
|
||||
|
||||
for(i=0;i<=incr;i++)
|
||||
{
|
||||
for(i=0;i<=incr;i++) {
|
||||
drawOneLine( xstart, yfirst, xstart - 5.0, yfirst);
|
||||
drawOneLine( xstart,ysecond, xstart - 5.0,ysecond);
|
||||
|
||||
|
@ -1103,8 +1025,7 @@ zoomed_scale(int first, int last)
|
|||
//begin
|
||||
xpoint = wth + 10.0;
|
||||
|
||||
if(pointer_type == "moving")
|
||||
{
|
||||
if(pointer_type == "moving") {
|
||||
drawOneLine(xpoint,ycent,xpoint,ypoint);
|
||||
drawOneLine(xpoint,ypoint,xpoint-10.0,ypoint);
|
||||
drawOneLine(xpoint-10.0,ypoint,xpoint-5.0,ypoint+5.0);
|
||||
|
@ -1112,23 +1033,19 @@ zoomed_scale(int first, int last)
|
|||
}
|
||||
//end
|
||||
|
||||
}
|
||||
else //huds_right
|
||||
{
|
||||
|
||||
} else {
|
||||
//huds_right
|
||||
xstart = (x+w)/2;
|
||||
|
||||
drawOneLine( xstart, ycentre, xstart + 5.0, ycentre); //centre tick
|
||||
|
||||
sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling()));
|
||||
|
||||
if( !huds_notext(options))
|
||||
{
|
||||
if( !huds_notext(options)) {
|
||||
textString (w, ycentre, TextScale, GLUT_BITMAP_8_BY_13,0 );
|
||||
}
|
||||
|
||||
for(i=1;i<5;i++)
|
||||
{
|
||||
for(i=1;i<5;i++) {
|
||||
yfirst += factor;
|
||||
ycentre += factor;
|
||||
circles(xstart+2.5,yfirst, 3.0);
|
||||
|
@ -1137,8 +1054,7 @@ zoomed_scale(int first, int last)
|
|||
|
||||
yfirst = mid_scr.y - hgt;
|
||||
|
||||
for(i=0;i<=incr;i++)
|
||||
{
|
||||
for(i=0;i<=incr;i++) {
|
||||
drawOneLine( xstart, yfirst, xstart + 5.0, yfirst);
|
||||
drawOneLine( xstart,ysecond, xstart + 5.0,ysecond);
|
||||
|
||||
|
@ -1161,8 +1077,7 @@ zoomed_scale(int first, int last)
|
|||
//begin
|
||||
xpoint = scrn_rect.left;
|
||||
|
||||
if(pointer_type == "moving")
|
||||
{
|
||||
if(pointer_type == "moving") {
|
||||
drawOneLine(xpoint,ycent,xpoint,ypoint);
|
||||
drawOneLine(xpoint,ypoint,xpoint+10.0,ypoint);
|
||||
drawOneLine(xpoint+10.0,ypoint,xpoint+5.0,ypoint+5.0);
|
||||
|
@ -1170,9 +1085,9 @@ zoomed_scale(int first, int last)
|
|||
}
|
||||
//end
|
||||
}//end huds_right /left
|
||||
} //end of vertical scale
|
||||
else //horizontal scale
|
||||
{
|
||||
//end of vertical scale
|
||||
} else {
|
||||
//horizontal scale
|
||||
x=scrn_rect.left;
|
||||
y=scrn_rect.top;
|
||||
w=scrn_rect.left+scrn_rect.right;
|
||||
|
@ -1203,20 +1118,17 @@ zoomed_scale(int first, int last)
|
|||
xcent = mid_scr.x;
|
||||
|
||||
if(cur_value <= data[centre+1])
|
||||
if(cur_value > data[centre])
|
||||
{
|
||||
if(cur_value > data[centre]) {
|
||||
xpoint = xcent + ((cur_value - data[centre]) * hgt/Maj_div);
|
||||
}
|
||||
|
||||
if(cur_value >= data[centre-1])
|
||||
if(cur_value <= data[centre])
|
||||
{
|
||||
if(cur_value <= data[centre]) {
|
||||
xpoint = xcent - ((data[centre]-cur_value) * hgt/Maj_div);
|
||||
}
|
||||
|
||||
if(cur_value < data[centre-1])
|
||||
if(cur_value >= minValue)
|
||||
{
|
||||
if(cur_value >= minValue) {
|
||||
float diff = minValue - data[centre-1];
|
||||
float diff1 = cur_value - data[centre-1];
|
||||
float val = (diff1 * hgt1) / diff;
|
||||
|
@ -1226,8 +1138,7 @@ zoomed_scale(int first, int last)
|
|||
|
||||
|
||||
if(cur_value > data[centre+1])
|
||||
if(cur_value <= maxValue)
|
||||
{
|
||||
if(cur_value <= maxValue) {
|
||||
float diff = maxValue - data[centre+1];
|
||||
float diff1 = cur_value - data[centre+1];
|
||||
float val = (diff1 * hgt1) / diff;
|
||||
|
@ -1236,8 +1147,7 @@ zoomed_scale(int first, int last)
|
|||
}
|
||||
|
||||
//end
|
||||
if(huds_top(options))
|
||||
{
|
||||
if(huds_top(options)) {
|
||||
|
||||
ystart =h;
|
||||
|
||||
|
@ -1245,13 +1155,11 @@ zoomed_scale(int first, int last)
|
|||
|
||||
sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling()));
|
||||
|
||||
if( !huds_notext(options))
|
||||
{
|
||||
if( !huds_notext(options)) {
|
||||
textString (xcentre-10.0, y, TextScale, GLUT_BITMAP_8_BY_13,0 );
|
||||
}
|
||||
|
||||
for(i=1;i<5;i++)
|
||||
{
|
||||
for(i=1;i<5;i++) {
|
||||
xfirst += factor;
|
||||
xcentre += factor;
|
||||
circles(xfirst, ystart-2.5, 3.0);
|
||||
|
@ -1260,8 +1168,7 @@ zoomed_scale(int first, int last)
|
|||
|
||||
xfirst = mid_scr.x - hgt;
|
||||
|
||||
for(i=0;i<=incr;i++)
|
||||
{
|
||||
for(i=0;i<=incr;i++) {
|
||||
drawOneLine( xfirst, ystart, xfirst, ystart - 5.0);
|
||||
drawOneLine( xsecond, ystart, xsecond, ystart - 5.0);
|
||||
|
||||
|
@ -1285,19 +1192,15 @@ zoomed_scale(int first, int last)
|
|||
|
||||
ypoint = scrn_rect.top + scrn_rect.bottom + 10.0;
|
||||
|
||||
if(pointer_type == "moving")
|
||||
{
|
||||
if(pointer_type == "moving") {
|
||||
drawOneLine(xcent, ypoint,xpoint,ypoint);
|
||||
drawOneLine(xpoint,ypoint,xpoint,ypoint-10.0);
|
||||
drawOneLine(xpoint,ypoint-10.0,xpoint+5.0,ypoint-5.0);
|
||||
drawOneLine(xpoint,ypoint-10.0,xpoint-5.0,ypoint-5.0);
|
||||
}
|
||||
//end
|
||||
|
||||
} //end of top option
|
||||
else //else huds_bottom
|
||||
{
|
||||
|
||||
//end of top option
|
||||
} else {
|
||||
//else huds_bottom
|
||||
ystart = (y+h)/2;
|
||||
|
||||
//drawOneLine( xstart, yfirst, xstart - 5.0, yfirst );
|
||||
|
@ -1305,13 +1208,11 @@ zoomed_scale(int first, int last)
|
|||
|
||||
sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling()));
|
||||
|
||||
if( !huds_notext(options))
|
||||
{
|
||||
if( !huds_notext(options)) {
|
||||
textString (xcentre-10.0, h, TextScale, GLUT_BITMAP_8_BY_13,0 );
|
||||
}
|
||||
|
||||
for(i=1;i<5;i++)
|
||||
{
|
||||
for(i=1;i<5;i++) {
|
||||
xfirst += factor;
|
||||
xcentre += factor;
|
||||
circles(xfirst, ystart+2.5, 3.0);
|
||||
|
@ -1320,8 +1221,7 @@ zoomed_scale(int first, int last)
|
|||
|
||||
xfirst = mid_scr.x - hgt;
|
||||
|
||||
for(i=0;i<=incr;i++)
|
||||
{
|
||||
for(i=0;i<=incr;i++) {
|
||||
drawOneLine( xfirst, ystart, xfirst, ystart + 5.0);
|
||||
drawOneLine( xsecond,ystart, xsecond,ystart + 5.0);
|
||||
|
||||
|
@ -1344,8 +1244,7 @@ zoomed_scale(int first, int last)
|
|||
//begin
|
||||
|
||||
ypoint = scrn_rect.top - 10.0;
|
||||
if(pointer_type == "moving")
|
||||
{
|
||||
if(pointer_type == "moving") {
|
||||
drawOneLine(xcent, ypoint,xpoint,ypoint);
|
||||
drawOneLine(xpoint,ypoint,xpoint,ypoint+10.0);
|
||||
drawOneLine(xpoint,ypoint+10.0,xpoint+5.0,ypoint+5.0);
|
||||
|
|
Loading…
Add table
Reference in a new issue