mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 12:10:48 +00:00
you can now start a new single player game via the menus
This commit is contained in:
parent
e8f6fced0b
commit
d59e7d3da4
2 changed files with 28 additions and 2 deletions
|
@ -14,6 +14,11 @@ void () Menu_Quit = #0;
|
|||
void (integer x, integer y, string name) Draw_Pic = #0;
|
||||
void (integer x, integer y, string text) Draw_String = #0;
|
||||
|
||||
void (string text) Cbuf_AddText = #0;
|
||||
void (string text) Cbuf_InsertText = #0;
|
||||
void () Cbuf_Execute = #0;
|
||||
void () Cbuf_Execute_Sets = #0;
|
||||
|
||||
float () random = #0;
|
||||
string () gametype = #0;
|
||||
|
||||
|
@ -157,9 +162,28 @@ void () quit_draw =
|
|||
Draw_String (64, 108, quitMessage[quit_index *4 + 3]);
|
||||
};
|
||||
|
||||
void (string text, integer key) sp_start =
|
||||
{
|
||||
Menu_SelectMenu (NIL);
|
||||
Cbuf_AddText ("disconnect\n");
|
||||
Cbuf_AddText ("maxplayers 1\n");
|
||||
Cbuf_AddText ("coop 0\n");
|
||||
Cbuf_AddText ("deathmatch 0\n");
|
||||
Cbuf_AddText ("teamplay 0\n");
|
||||
Cbuf_AddText ("map start\n");
|
||||
};
|
||||
|
||||
void () single_player_menu =
|
||||
{
|
||||
Menu_Item (54, 32, "", quit_f);
|
||||
Menu_Begin (54, 32, "");
|
||||
Menu_Pic (16, 4, "gfx/qplaque.lmp");
|
||||
Menu_CenterPic (160, 4, "gfx/ttl_sgl.lmp");
|
||||
Menu_Pic (72, 32, "gfx/sp_menu.lmp");
|
||||
Menu_Cursor (spinner);
|
||||
Menu_Item (54, 32, "", sp_start);
|
||||
Menu_Item (54, 52, "", quit_f);
|
||||
Menu_Item (54, 72, "", quit_f);
|
||||
Menu_End ();
|
||||
};
|
||||
|
||||
void () multi_player_menu =
|
||||
|
|
|
@ -103,7 +103,8 @@ menu_free (void *_m, void *unused)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < m->num_items; i++)
|
||||
menu_free (m->items[i], 0);
|
||||
if (m->items[i]->func)
|
||||
menu_free (m->items[i], 0);
|
||||
free (m->items);
|
||||
}
|
||||
while (m->pics) {
|
||||
|
@ -314,6 +315,7 @@ Menu_Init (void)
|
|||
PR_AddBuiltin (&menu_pr_state, "Menu_SetQuit", bi_Menu_SetQuit, -1);
|
||||
PR_AddBuiltin (&menu_pr_state, "Menu_Quit", bi_Menu_Quit, -1);
|
||||
|
||||
Cbuf_Progs_Init (&menu_pr_state);
|
||||
PR_Cmds_Init (&menu_pr_state);
|
||||
R_Progs_Init (&menu_pr_state);
|
||||
|
||||
|
|
Loading…
Reference in a new issue