162
162
consoleoption = "";
165
printf("usage: %s [-w [-p l t w h]] %s[-g gamengineoptions] "
165
printf("usage: %s [-w [w h l t]] [-f [fw fh fb ff]] %s[-g gamengineoptions] "
166
166
"[-s stereomode] filename.blend\n", program, consoleoption);
167
printf(" -h: Prints this command summary\n");
167
printf(" -h: Prints this command summary\n\n");
168
168
printf(" -w: display in a window\n");
169
printf(" -p: specify window position\n");
169
printf(" --Optional parameters--\n");
170
printf(" w = window width\n");
171
printf(" h = window height\n\n");
170
172
printf(" l = window left coordinate\n");
171
173
printf(" t = window top coordinate\n");
172
printf(" w = window width\n");
173
printf(" h = window height\n");
174
printf(" Note: If w or h is defined, both must be defined.\n");
175
printf(" Also, if l or t is defined, all options must be used.\n\n");
174
176
printf(" -f: start game in full screen mode\n");
177
printf(" --Optional parameters--\n");
175
178
printf(" fw = full screen mode pixel width\n");
176
printf(" fh = full screen mode pixel height\n");
179
printf(" fh = full screen mode pixel height\n\n");
177
180
printf(" fb = full screen mode bits per pixel\n");
178
181
printf(" ff = full screen mode frequency\n");
182
printf(" Note: If fw or fh is defined, both must be defined.\n");
183
printf(" Also, if fb is used, fw and fh must be used. ff requires all options.\n\n");
179
184
printf(" -s: start player in stereo\n");
180
185
printf(" stereomode: hwpageflip (Quad buffered shutter glasses)\n");
181
186
printf(" syncdoubling (Above Below)\n");
182
187
printf(" sidebyside (Left Right)\n");
183
188
printf(" anaglyph (Red-Blue glasses)\n");
184
189
printf(" vinterlace (Vertical interlace for autostereo display)\n");
185
printf(" depending on the type of stereo you want\n");
190
printf(" depending on the type of stereo you want\n\n");
187
printf(" -i: parent windows ID \n");
192
printf(" -i: parent windows ID \n\n");
190
printf(" -c: keep console window open\n");
195
printf(" -c: keep console window open\n\n");
192
printf(" -d: turn debugging on\n");
193
printf(" -g: game engine options:\n");
194
printf(" Name Default Description\n");
195
printf(" ----------------------------------------\n");
196
printf(" fixedtime 0 Do the same timestep each frame \"Enable all frames\"\n");
197
printf(" nomipmap 0 Disable mipmaps\n");
198
printf(" show_framerate 0 Show the frame rate\n");
199
printf(" show_properties 0 Show debug properties\n");
200
printf(" show_profile 0 Show profiling information\n");
201
printf(" blender_material 0 Enable material settings\n");
203
printf("example: %s -p 10 10 320 200 -g noaudio c:\\loadtest.blend\n", program);
197
printf(" -d: turn debugging on\n\n");
198
printf(" -g: game engine options:\n\n");
199
printf(" Name Default Description\n");
200
printf(" ------------------------------------------------------------------------\n");
201
printf(" fixedtime 0 \"Enable all frames\"\n");
202
printf(" nomipmap 0 Disable mipmaps\n");
203
printf(" show_framerate 0 Show the frame rate\n");
204
printf(" show_properties 0 Show debug properties\n");
205
printf(" show_profile 0 Show profiling information\n");
206
printf(" blender_material 0 Enable material settings\n");
207
printf(" ignore_deprecation_warnings 1 Ignore deprecation warnings\n");
209
printf(" - : all arguments after this are ignored, allowing python to access them from sys.argv\n");
211
printf("example: %s -w 320 200 10 10 -g noaudio c:\\loadtest.blend\n", program);
204
212
printf("example: %s -g show_framerate = 0 c:\\loadtest.blend\n", program);
431
446
G.f |= G_DEBUG; /* std output printf's */
432
447
MEM_set_memory_debug();
436
// Parse window position and size options
437
if (argv[i][2] == 0) {
441
windowLeft = atoi(argv[i++]);
442
windowTop = atoi(argv[i++]);
443
windowWidth = atoi(argv[i++]);
444
windowHeight = atoi(argv[i++]);
445
windowParFound = true;
450
printf("error: too few options for window argument.\n");
452
} else { /* mac specific */
454
if (strncmp(argv[i], "-psn_", 5)==0)
455
i++; /* skip process serial number */
460
452
fullScreen = true;
461
453
fullScreenParFound = true;
462
if ((i + 2) < argc && argv[i][0] != '-' && argv[i+1][0] != '-')
454
if ((i + 2) <= argc && argv[i][0] != '-' && argv[i+1][0] != '-')
464
456
fullScreenWidth = atoi(argv[i++]);
465
457
fullScreenHeight = atoi(argv[i++]);
466
if ((i + 1) < argc && argv[i][0] != '-')
458
if ((i + 1) <= argc && argv[i][0] != '-')
468
460
fullScreenBpp = atoi(argv[i++]);
469
if ((i + 1) < argc && argv[i][0] != '-')
461
if ((i + 1) <= argc && argv[i][0] != '-')
470
462
fullScreenFrequency = atoi(argv[i++]);
475
467
// Parse window position and size options
470
windowParFound = true;
472
if ((i + 2) <= argc && argv[i][0] != '-' && argv[i+1][0] != '-')
478
fullScreenParFound = true;
474
windowWidth = atoi(argv[i++]);
475
windowHeight = atoi(argv[i++]);
476
if ((i +2) <= argc && argv[i][0] != '-' && argv[i+1][0] != '-')
478
windowLeft = atoi(argv[i++]);
479
windowTop = atoi(argv[i++]);
700
702
// GPG_Application app (system, maggie, startscenename);
701
app.SetGameEngineData(maggie, scene);
703
app.SetGameEngineData(maggie, scene, argc, argv); /* this argc cant be argc_py_clamped, since python uses it */
703
705
BLI_strncpy(pathname, maggie->name, sizeof(pathname));
704
706
BLI_strncpy(G.sce, maggie->name, sizeof(G.sce));
707
setGamePythonPath(G.sce);
706
709
if (firstTimeRunning)
708
setGamePythonPath(G.sce);
709
711
firstTimeRunning = false;