tavli
diff src/main.cc @ 17:16a420432aa3
pieces on the board
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 28 Jun 2015 23:04:37 +0300 |
parents | e48b40a3c82a |
children |
line diff
1.1 --- a/src/main.cc Sun Jun 28 08:48:25 2015 +0300 1.2 +++ b/src/main.cc Sun Jun 28 23:04:37 2015 +0300 1.3 @@ -8,6 +8,7 @@ 1.4 #include <GL/glut.h> 1.5 #endif 1.6 #include "game.h" 1.7 +#include "opt.h" 1.8 1.9 static void display(); 1.10 static void reshape(int x, int y); 1.11 @@ -19,10 +20,19 @@ 1.12 int main(int argc, char **argv) 1.13 { 1.14 glutInit(&argc, argv); 1.15 - glutInitWindowSize(1280, 800); 1.16 + 1.17 + if(!init_options(argc, argv)) { 1.18 + return 1; 1.19 + } 1.20 + 1.21 + glutInitWindowSize(opt.xres, opt.yres); 1.22 glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE | GLUT_MULTISAMPLE); 1.23 glutCreateWindow("Tavli"); 1.24 1.25 + if(opt.fullscreen) { 1.26 + glutFullScreen(); 1.27 + } 1.28 + 1.29 glutDisplayFunc(display); 1.30 glutReshapeFunc(reshape); 1.31 glutKeyboardFunc(keypress);