Dynamically decide about window size based on information from the windowing system. Looks well on bigger displays, yet kind of sucks with network play. Lubomir Rintel <lkundrak@v3.sk> --- koules1.4/xlib/init.c.mode 2007-10-28 02:31:47.000000000 +0100 +++ koules1.4/xlib/init.c 2007-10-28 02:31:55.000000000 +0100 @@ -362,6 +362,12 @@ printf ("could not open display\n"); exit (0); } + + if (MAPWIDTH == 0) { + GAMEWIDTH = MAPWIDTH = DisplayWidth (dp, DefaultScreen (dp)) * 0.8; + GAMEHEIGHT = MAPHEIGHT = DisplayHeight (dp, DefaultScreen (dp)) * 0.8; + } + XSetCloseDownMode (dp, DestroyAll); screen = DefaultScreen (dp); fadeenable = 1; @@ -634,10 +640,8 @@ int c; XEvent event; nrockets = 1; - GAMEWIDTH = 640; - GAMEHEIGHT = 460; - MAPWIDTH = 640; - MAPHEIGHT = 460; + GAMEWIDTH = MAPWIDTH = 0; + GAMEHEIGHT = MAPHEIGHT = 0; DIV = 1; #ifdef MITSHM shm = 1; @@ -819,6 +823,11 @@ #ifdef NETSUPPORT if (server) { + if (MAPWIDTH == 0) { + GAMEWIDTH = MAPWIDTH = 640; + GAMEHEIGHT = MAPHEIGHT = 460; + DIV = 1; + } init_server (); server_loop (); }