]> git.draconx.ca Git - rrace.git/blobdiff - src/motif.c
Implement some basic gameplay.
[rrace.git] / src / motif.c
index cce9f3fac944c5e4910a83312933490d2264a7dd..96d8e086666633428bb0d9c54aba5629c9b6f185 100644 (file)
@@ -26,6 +26,7 @@
 #include "help.h"
 #include "motif.h"
 #include "options.h"
+#include "game.h"
 
 #define PROGNAME "rrace"
 static const char *progname = PROGNAME;
@@ -38,6 +39,7 @@ static char * const default_resources[] = {
        PROGNAME "*game.XmFrame.shadowThickness: 3",
        PROGNAME "*game.XmFrame.shadowType: shadow_in",
        PROGNAME "*goalArea.leftOffset: 1",
+       PROGNAME "*gameCanvas.background: #404040",
 
        NULL
 };
@@ -122,6 +124,7 @@ static Widget early_setup(XtAppContext *app, int argc, char **argv)
 
 static XtAppContext app_initialize(int argc, char **argv)
 {
+       static struct app_state state;
        XtAppContext app;
        Widget shell;
 
@@ -129,7 +132,9 @@ static XtAppContext app_initialize(int argc, char **argv)
                progname = argv[0];
 
        shell = early_setup(&app, argc, argv);
-       ui_initialize(shell);
+       ui_initialize(&state, shell);
+       x11_initialize(&state, XtScreen(shell));
+       game_reset(&state.board);
        XtRealizeWidget(shell);
 
        return app;