- add tire temperature info in ssggraph

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7883 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ba9731c5f4439e3b8203dc1cdf6640a45c88ad74
Former-commit-id: 697952ea5fcf86ea39232078d50f988822c50c27
This commit is contained in:
torcs-ng 2022-01-08 00:01:10 +00:00
parent aa61bf84b7
commit 134ef75073

View file

@ -609,8 +609,20 @@ cGrBoard::grDispGGraph()
glVertex2f(X2, Y2);
glEnd();
}
if (GFlag == 2)
{
char buf[BUFSIZE];
snprintf(buf, sizeof(buf), "T: %3.2f°", car_->_tyreT_mid(0) - 273.0);
GfuiDrawString(buf, normal_color_, GFUI_FONT_SMALL_C, X1 - 50.00, Y1 + 5.0);
snprintf(buf, sizeof(buf), "T: %3.2f°", car_->_tyreT_mid(1) - 273.0);
GfuiDrawString(buf, normal_color_, GFUI_FONT_SMALL_C, X1 + 10.00, Y1 + 5.0);
snprintf(buf, sizeof(buf), "T: %3.2f°", car_->_tyreT_mid(2) - 273.0);
GfuiDrawString(buf, normal_color_, GFUI_FONT_SMALL_C, X1 - 50.00, Y1 - 15.0);
snprintf(buf, sizeof(buf), "T: %3.2f°", car_->_tyreT_mid(3) - 273.0);
GfuiDrawString(buf, normal_color_, GFUI_FONT_SMALL_C, X1 + 10.00, Y1 - 15.0);
}
}
void
cGrBoard::grDrawGauge(tdble X1, tdble Y1, tdble H,