/* Copyright (C) 1997-2001 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // // m_sp_savegame.c // #include "m_local.h" /* ============================================================================= SAVEGAME MENU ============================================================================= */ typedef struct m_saveGameMenu_s { // Menu items uiFrameWork_t frameWork; uiImage_t banner; uiAction_t actions[MAX_SAVEGAMES]; uiAction_t back_action; } m_saveGameMenu_t; static m_saveGameMenu_t m_saveGameMenu; static void SaveGameCallback (void *self) { uiAction_t *a = (uiAction_t *) self; cgi.Cbuf_AddText (Q_VarArgs ("save save%i\n", a->generic.localData[0])); M_ForceMenuOff (); } /* ============= SaveGameMenu_Init ============= */ static void SaveGameMenu_Init (void) { int i; UI_StartFramework (&m_saveGameMenu.frameWork, FWF_CENTERHEIGHT); Create_Savestrings (); m_saveGameMenu.banner.generic.type = UITYPE_IMAGE; m_saveGameMenu.banner.generic.flags = UIF_NOSELECT|UIF_CENTERED; m_saveGameMenu.banner.generic.name = NULL; m_saveGameMenu.banner.shader = uiMedia.banners.saveGame; UI_AddItem (&m_saveGameMenu.frameWork, &m_saveGameMenu.banner); // Don't include the autosave slot for (i=0 ; i