Use diagnostic_message directly

This commit is contained in:
Kp 2013-06-23 22:06:52 +00:00
parent 7dc8ba6765
commit 880627b771

View file

@ -634,37 +634,27 @@ int SetPlayerFromCursegMinusOne()
int ToggleLighting(void)
{
char outstr[80] = "[shift-L] ";
int chindex;
Lighting_on++;
if (Lighting_on >= 2)
Lighting_on = 0;
Update_flags |= UF_GAME_VIEW_CHANGED;
//if (keypress == KEY_L + KEY_SHIFTED)
chindex = 0;
//else
// chindex = 10;
switch (Lighting_on) {
case 0:
strcpy(&outstr[chindex],"Lighting off.");
diagnostic_message("Lighting off.");
break;
case 1:
strcpy(&outstr[chindex],"Static lighting.");
diagnostic_message("Static lighting.");
break;
case 2:
strcpy(&outstr[chindex],"Ship lighting.");
diagnostic_message("Ship lighting.");
break;
case 3:
strcpy(&outstr[chindex],"Ship and static lighting.");
diagnostic_message("Ship and static lighting.");
break;
}
diagnostic_message(outstr);
return Lighting_on;
}