difficulty: formatting
This commit is contained in:
parent
6938b0f8a8
commit
ea5374bbc6
2 changed files with 7 additions and 7 deletions
|
@ -28,7 +28,7 @@ static DiffDef diffs[] = {
|
|||
{ "Extra", "difficulty/lunatic", { 0.5, 1.0, 1.0, 1.0 } },
|
||||
};
|
||||
|
||||
static inline DiffDef* get_diff_def(Difficulty diff) {
|
||||
static inline DiffDef *get_diff_def(Difficulty diff) {
|
||||
uint idx = diff - D_Easy;
|
||||
|
||||
if(idx < sizeof(diffs)/sizeof(*diffs)) {
|
||||
|
@ -38,17 +38,17 @@ static inline DiffDef* get_diff_def(Difficulty diff) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const char* difficulty_name(Difficulty diff) {
|
||||
const char *difficulty_name(Difficulty diff) {
|
||||
DiffDef *d = get_diff_def(diff);
|
||||
return d ? d->name : "Unknown";
|
||||
}
|
||||
|
||||
const char* difficulty_sprite_name(Difficulty diff) {
|
||||
const char *difficulty_sprite_name(Difficulty diff) {
|
||||
DiffDef *d = get_diff_def(diff);
|
||||
return d ? d->spr_name : "difficulty/unknown";
|
||||
}
|
||||
|
||||
const Color* difficulty_color(Difficulty diff) {
|
||||
const Color *difficulty_color(Difficulty diff) {
|
||||
static Color unknown_clr = { 0.5, 0.5, 0.5, 1.0 };
|
||||
DiffDef *d = get_diff_def(diff);
|
||||
return d ? &d->color : &unknown_clr;
|
||||
|
|
|
@ -22,13 +22,13 @@ typedef enum {
|
|||
|
||||
#define NUM_SELECTABLE_DIFFICULTIES D_Lunatic
|
||||
|
||||
const char* difficulty_name(Difficulty diff)
|
||||
const char *difficulty_name(Difficulty diff)
|
||||
attr_pure attr_returns_nonnull;
|
||||
|
||||
const char* difficulty_sprite_name(Difficulty diff)
|
||||
const char *difficulty_sprite_name(Difficulty diff)
|
||||
attr_pure attr_returns_nonnull;
|
||||
|
||||
const Color* difficulty_color(Difficulty diff)
|
||||
const Color *difficulty_color(Difficulty diff)
|
||||
attr_pure attr_returns_nonnull;
|
||||
|
||||
void difficulty_preload(void);
|
||||
|
|
Loading…
Reference in a new issue