Display credits screen on exit properly

This commit is contained in:
2025-07-15 17:49:01 -03:00
parent 9aa1b46f80
commit 6a2b3f3638
2 changed files with 19 additions and 21 deletions

View File

@@ -39,27 +39,6 @@ typedef struct {
static creditsmenu_t s_credits;
/*
=================
UI_CreditMenu_Key
=================
*/
static sfxHandle_t UI_CreditMenu_Key( int key ) {
if( key & K_CHAR_FLAG ) {
return 0;
}
s_credits.frame++;
if (s_credits_frame == 1) {
s_credits.menu.draw = UI_CreditMenu_Draw;
} else {
trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" );
}
return 0;
}
/*
===============
UI_CreditMenu_Draw
@@ -89,6 +68,24 @@ static void UI_CreditMenu_Draw( void ) {
UI_DrawString( 320, 459, "http://illusion-arena.twilightparadox.com/", UI_CENTER|UI_SMALLFONT, color_yellow );
}
/*
=================
UI_CreditMenu_Key
=================
*/
static sfxHandle_t UI_CreditMenu_Key( int key ) {
if( key & K_CHAR_FLAG ) {
return 0;
}
s_credits.frame++;
if (s_credits.frame == 1) {
s_credits.menu.draw = UI_CreditMenu_Draw;
} else {
trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" );
}
return 0;
}
/*
===============

View File

@@ -186,6 +186,7 @@ typedef int clipHandle_t;
#define MAX_QINT 0x7fffffff
#define MIN_QINT (-MAX_QINT-1)
#define ARRAY_LEN(x) (sizeof(x) / sizeof(*(x)))
// angle indexes
#define PITCH 0 // up / down