X-Git-Url: https://git.draconx.ca/gitweb/rrace.git/blobdiff_plain/683ddffaa0940d7c8b792d790c617e6950ce7a1a..2529a9651d160ab3a17118d778f5e5584d040765:/src/motif.c?ds=sidebyside diff --git a/src/motif.c b/src/motif.c index cce9f3f..96d8e08 100644 --- a/src/motif.c +++ b/src/motif.c @@ -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;