mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-10 04:52:43 +02:00
adding command options
This commit is contained in:
parent
286c6e0e39
commit
1967526675
1 changed files with 15 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
//
|
||||
|
||||
#include <VoxelTree.h>
|
||||
#include <SharedUtil.h>
|
||||
|
||||
VoxelTree myTree;
|
||||
|
||||
|
@ -115,8 +116,20 @@ void addScene(VoxelTree * tree) {
|
|||
|
||||
int main(int argc, const char * argv[])
|
||||
{
|
||||
addScene(&myTree);
|
||||
myTree.writeToFileV2("voxels.hio2");
|
||||
const char* SAY_HELLO = "--sayHello";
|
||||
if (cmdOptionExists(argc, argv, SAY_HELLO)) {
|
||||
printf("I'm just saying hello...\n");
|
||||
}
|
||||
|
||||
const char* DONT_CREATE_FILE = "--dontCreateSceneFile";
|
||||
bool dontCreateFile = cmdOptionExists(argc, argv, DONT_CREATE_FILE);
|
||||
|
||||
if (dontCreateFile) {
|
||||
printf("You asked us not to create a scene file, so we will not.\n");
|
||||
} else {
|
||||
printf("Creating Scene File...\n");
|
||||
addScene(&myTree);
|
||||
myTree.writeToFileV2("voxels.hio2");
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue