Commit a6765d8f authored by Steven Fuller's avatar Steven Fuller

Implemented New Game.

parent 76c58062
complete: complete:
07/22/01 disable escape 07/22/01 disable escape
07/22/01 fix cmap problem at 8bit (Want to change cmaps when going into/from gtk+ menu) 07/22/01 fix cmap problem at 8bit (Want to change cmaps when going into/from gtk+ menu)
07/23/01 New Game
------------------ ------------------
New Game finished double buffered gtk+ image
Save Game, Load Game Save Game, Load Game
find keyboard way of changing focus find keyboard way of changing focus
fix sprite snapping fix sprite snapping
...@@ -25,10 +26,12 @@ music (what format?, mp3 - there's smpeg?) ...@@ -25,10 +26,12 @@ music (what format?, mp3 - there's smpeg?)
options dialog: sound enabled, music enabled options dialog: sound enabled, music enabled
options file options file
input config input config
keyboard shortcuts (for menu, and things like loading)
.wolf3d/{macfull,macshare} ? .wolf3d/{macfull,macshare} ?
command line options command line options
verify other todo lists are also complete verify other todo lists are also complete
make sure all desired options have been added make sure all desired options have been added
screenshot key
check bigendianesss check bigendianesss
try to speed drawing up try to speed drawing up
play through testing play through testing
...@@ -40,6 +43,7 @@ configure (automake, autoconf, etc?) ...@@ -40,6 +43,7 @@ configure (automake, autoconf, etc?)
website (no sourceforge this time) website (no sourceforge this time)
finish opengl version finish opengl version
in game menus instead of gtk+ gui in game menus instead of gtk+ gui
level editor
TODO: TODO:
* See TODO in src/TODO * See TODO in src/TODO
......
...@@ -364,7 +364,7 @@ void PlayLoop(void) ...@@ -364,7 +364,7 @@ void PlayLoop(void)
LastTicCount = ReadTick(); LastTicCount = ReadTick();
do { do {
if (!SlowDown) if (SlowDown)
Delay = 4; /* 15 Hz */ Delay = 4; /* 15 Hz */
else else
Delay = 2; /* 30 Hz */ Delay = 2; /* 30 Hz */
......
...@@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <setjmp.h>
#include <ctype.h> #include <ctype.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
...@@ -29,7 +30,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -29,7 +30,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "wolfdef.h" #include "wolfdef.h"
Byte *gfxbuf; extern jmp_buf ResetJmp;
static Byte *gfxbuf;
static GtkWidget *win; static GtkWidget *win;
static GtkWidget *main_vbox; static GtkWidget *main_vbox;
...@@ -61,11 +64,16 @@ void destroy(GtkWidget *widget, gpointer data) ...@@ -61,11 +64,16 @@ void destroy(GtkWidget *widget, gpointer data)
Quit(NULL); Quit(NULL);
} }
static void menu_quit(GtkWidget *w, gpointer data) static void menu_file_quit(GtkWidget *w, gpointer data)
{ {
destroy(w, data); destroy(w, data);
} }
static void menu_file_newgame(GtkWidget *w, gpointer data)
{
longjmp(ResetJmp, EX_NEWGAME);
}
void RestoreColors() void RestoreColors()
{ {
int i; int i;
...@@ -125,7 +133,8 @@ static void draw_default(GtkWidget *widget, gpointer user_data) ...@@ -125,7 +133,8 @@ static void draw_default(GtkWidget *widget, gpointer user_data)
static GtkItemFactoryEntry menu_items[] = { static GtkItemFactoryEntry menu_items[] = {
{ "/_File", NULL, NULL, 0, "<Branch>" }, { "/_File", NULL, NULL, 0, "<Branch>" },
{ "/File/Quit", "<control>Q", menu_quit, 0, NULL }, { "/File/New Game", NULL, menu_file_newgame, 0, NULL },
{ "/File/Quit", "<control>Q", menu_file_quit, 0, NULL }
}; };
int main(int argc, char *argv[]) int main(int argc, char *argv[])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment