- added light temperature engine in ssggraph
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9174 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 458e9f3817b25cbce6d9947e28a09956b35b0941 Former-commit-id: 9c809d431b46e06839ca5be9d66b29728e9ccfa7
This commit is contained in:
parent
dcd8efe062
commit
02c44da4c6
1 changed files with 1731 additions and 1709 deletions
|
@ -2275,30 +2275,39 @@ void
|
|||
cGrBoard::grDispIndicators(const bool arcade)
|
||||
{
|
||||
// Only useful for humans - maybe robots should show that, too?
|
||||
if (car_->_driverType == RM_DRV_HUMAN) {
|
||||
if (car_->_driverType == RM_DRV_HUMAN)
|
||||
{
|
||||
bool abs = false; // Show ABS indicator?
|
||||
bool tcs = false; // Show TCS indicator?
|
||||
bool spd = false; // Show speed limiter indicator?
|
||||
bool eng = false; // Show engine temperature alert
|
||||
|
||||
// Parse control messages if they include ABS / TCS / SPD
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (car_->ctrl.msg[i]) {
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (car_->ctrl.msg[i])
|
||||
{
|
||||
abs = abs || strstr(car_->ctrl.msg[i], "ABS");
|
||||
tcs = tcs || strstr(car_->ctrl.msg[i], "TCS");
|
||||
spd = spd || strstr(car_->ctrl.msg[i], "Speed Limiter On");
|
||||
}
|
||||
}
|
||||
|
||||
eng = eng || (car_->_engineTempWater > car_->_engineMaxTempWater);
|
||||
|
||||
// Setup drawing area
|
||||
int dy = GfuiFontHeight(GFUI_FONT_MEDIUM_C);
|
||||
int dy2 = GfuiFontHeight(GFUI_FONT_SMALL_C);
|
||||
int dx = GfuiFontWidth(GFUI_FONT_MEDIUM_C, "SPD");
|
||||
|
||||
int x, y;
|
||||
if (arcade) {
|
||||
if (arcade)
|
||||
{
|
||||
x = leftAnchor + 15 + 30; // constant text left pos.
|
||||
y = BOTTOM_ANCHOR + dy2 * 8 + dy - 2; // first row top pos.
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
x = centerAnchor - 200; // constant text left pos.
|
||||
y = BOTTOM_ANCHOR + dy2 * 8 + dy + 5; // first row top pos.
|
||||
}
|
||||
|
@ -2323,10 +2332,23 @@ cGrBoard::grDispIndicators(const bool arcade)
|
|||
GfuiDrawString("SPD", emphasized_color_, GFUI_FONT_MEDIUM_C, x, y); //yellow
|
||||
else
|
||||
GfuiDrawString("SPD", inactive_color_, GFUI_FONT_MEDIUM_C, x, y); //grey
|
||||
|
||||
y -= dy;
|
||||
|
||||
if(eng)
|
||||
{
|
||||
if (car_-> _engineTempWater < car_->_engineMaxTempWater + 5.0)
|
||||
GfuiDrawString("ENG", emphasized_color_, GFUI_FONT_MEDIUM_C, x, y);
|
||||
else
|
||||
GfuiDrawString("ENG", danger_color_, GFUI_FONT_MEDIUM_C, x, y);
|
||||
}
|
||||
else
|
||||
GfuiDrawString("ENG", inactive_color_, GFUI_FONT_MEDIUM_C, x, y);
|
||||
|
||||
y -= dy;
|
||||
} // if human
|
||||
} // grDispIndicators
|
||||
|
||||
|
||||
void cGrBoard::ReadDashColor(void *hdle, const string &color_name, float **color) {
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf), "%s/%s/%s",
|
||||
|
|
Loading…
Reference in a new issue