tweaked the difficulty menu/display
This commit is contained in:
parent
0bac4b6c98
commit
e14c239356
4 changed files with 16 additions and 12 deletions
|
@ -19,6 +19,16 @@ const char* difficulty_name(Difficulty diff) {
|
|||
}
|
||||
}
|
||||
|
||||
const char* difficulty_tex(Difficulty diff) {
|
||||
switch(diff) {
|
||||
case D_Easy: return "difficulty/easy"; break;
|
||||
case D_Normal: return "difficulty/normal"; break;
|
||||
case D_Hard: return "difficulty/hard"; break;
|
||||
case D_Lunatic: return "difficulty/lunatic"; break;
|
||||
case D_Extra: return "difficulty/lunatic"; break;
|
||||
}
|
||||
}
|
||||
|
||||
Color difficulty_color(Difficulty diff) {
|
||||
switch(diff) {
|
||||
case D_Easy: return rgb(0.5, 1.0, 0.5);
|
||||
|
|
|
@ -25,6 +25,7 @@ typedef enum {
|
|||
#define NUM_SELECTABLE_DIFFICULTIES D_Lunatic
|
||||
|
||||
const char* difficulty_name(Difficulty diff);
|
||||
const char* difficulty_tex(Difficulty diff);
|
||||
Color difficulty_color(Difficulty diff);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -37,10 +37,10 @@ void draw_difficulty_menu(MenuData *menu) {
|
|||
|
||||
glColor4f(0.1*menu->drawdata[0],0,0,0.7);
|
||||
glPushMatrix();
|
||||
glTranslatef(SCREEN_W/2+50 - 25*menu->drawdata[0], SCREEN_H/3 + 90*(0.7*menu->drawdata[0]),0);
|
||||
glRotatef(4*menu->drawdata[0],0,0,1);
|
||||
glTranslatef(SCREEN_W/2+30 - 25*menu->drawdata[0], SCREEN_H/3 + 90*(0.7*menu->drawdata[0]),0);
|
||||
glRotatef(4*menu->drawdata[0]-4,0,0,1);
|
||||
glPushMatrix();
|
||||
glScalef(SCREEN_W*1.5,100,1);
|
||||
glScalef(SCREEN_W*1.5,120,1);
|
||||
draw_quad();
|
||||
glPopMatrix();
|
||||
glColor3f(1,1,1);
|
||||
|
|
11
src/stage.c
11
src/stage.c
|
@ -338,23 +338,16 @@ void draw_hud(void) {
|
|||
draw_texture(SCREEN_W/2.0, SCREEN_H/2.0, "hud");
|
||||
|
||||
char buf[16];
|
||||
const char *diff;
|
||||
int i;
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(615,0,0);
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef((SCREEN_W - 615) * 0.25, 20, 0);
|
||||
glTranslatef((SCREEN_W - 615) * 0.25, SCREEN_H-170, 0);
|
||||
glScalef(0.6, 0.6, 0);
|
||||
|
||||
parse_color_call(derive_color(difficulty_color(global.diff), CLRMASK_A, rgba(0, 0, 0, 0.7f)), glColor4f);
|
||||
|
||||
diff = difficulty_name(global.diff);
|
||||
draw_text(AL_Center, 1, 1, diff, _fonts.mainmenu);
|
||||
draw_text(AL_Center, 2, 2, diff, _fonts.mainmenu);
|
||||
glColor4f(1,1,1,1);
|
||||
draw_text(AL_Center, 0, 0, diff, _fonts.mainmenu);
|
||||
draw_texture(0,0,difficulty_tex(global.diff));
|
||||
glPopMatrix();
|
||||
|
||||
if(global.stage->type == STAGE_SPELL) {
|
||||
|
|
Loading…
Reference in a new issue