Mercurial > hg > forks > yadex
diff src/things.cc @ 85:dd99c66ed169
More cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 26 Sep 2011 18:19:59 +0300 |
parents | a68786b9c74b |
children | 20aa5a515896 |
line wrap: on
line diff
--- a/src/things.cc Mon Sep 26 18:17:57 2011 +0300 +++ b/src/things.cc Mon Sep 26 18:19:59 2011 +0300 @@ -106,7 +106,7 @@ things_table[n].sprite = CUR_THINGDEF->sprite; } -// Sort the table by increasing thing type + // Sort the table by increasing thing type qsort(things_table, nthings, sizeof *things_table, things_table_cmp); #if 0 @@ -298,29 +298,22 @@ */ const char *GetAngleName(int angle) { - static char buf[30]; + static char buf[32]; switch (angle) { - case 0: - return "East"; - case 45: - return "North-east"; - case 90: - return "North"; - case 135: - return "North-west"; - case 180: - return "West"; - case 225: - return "South-west"; - case 270: - return "South"; - case 315: - return "South-east"; + case 0: return "East"; + case 45: return "North-east"; + case 90: return "North"; + case 135: return "North-west"; + case 180: return "West"; + case 225: return "South-west"; + case 270: return "South"; + case 315: return "South-east"; + default: + sprintf(buf, "ILLEGAL (%d)", angle); + return buf; } - sprintf(buf, "ILLEGAL (%d)", angle); - return buf; } @@ -331,9 +324,9 @@ const char *GetWhenName(int when) { static char buf[16 + 3 + 1]; -// "N" is a Boom extension ("not in deathmatch") -// "C" is a Boom extension ("not in cooperative") -// "F" is an MBF extension ("friendly") + // "N" is a Boom extension ("not in deathmatch") + // "C" is a Boom extension ("not in cooperative") + // "F" is an MBF extension ("friendly") const char *flag_chars = "????" "????" "FCNM" "D431"; int n;