Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2010-02-25 09:05:56 +0300
committerDalai Felinto <dfelinto@gmail.com>2010-02-25 09:05:56 +0300
commit4d3accd0cb1088849d468163152905b668737724 (patch)
treea9b02966a18d695fd80f3bf34f2876a810dce765 /source/gameengine/GamePlayer/ghost
parentf696d57af711fecee718d5ca350ae3cb0217dc25 (diff)
BGE Dome: BlenderPlayer Console arguments: warpdata working now (only with absolute path)
I forgot to say in the last commit that those arguments are only for the BlenderPlayer. we can now set external warpdata files. 2Do: (1) convert relative to absolute paths for warpdata files (2) investigate weird bug on lack of light in blenderplayer with warpmesh ... [old 2Do] (3) documentation (4) preserve scene settings (at least scene->gm.dome) even if you load a new file inside the game (e.g. Yo Frankie loading new levels)
Diffstat (limited to 'source/gameengine/GamePlayer/ghost')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index ce80036de8f..95370beeeb3 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -65,6 +65,7 @@ extern "C"
#include "BLO_readfile.h"
#include "BLO_readblenfile.h"
#include "IMB_imbuf.h"
+#include "BKE_text.h"
int GHOST_HACK_getFirstFile(char buf[]);
@@ -197,9 +198,9 @@ void usage(const char* program)
printf(" depending on the type of stereo you want\n\n");
printf(" -D: start player in dome mode\n");
printf(" --Optional parameters--\n");
- printf(" angle = field of view in degrees\n");
- printf(" tilt = tilt angle in degrees\n");
- printf(" warpdata = a file to use for warping the image\n");
+ printf(" angle = field of view in degrees\n");
+ printf(" tilt = tilt angle in degrees\n");
+ printf(" warpdata = a file to use for warping the image (absolute path)\n");
printf(" mode: fisheye (Fisheye)\n");
printf(" truncatedfront (Front-Truncated)\n");
printf(" truncatedrear (Rear-Truncated)\n");
@@ -326,6 +327,7 @@ int main(int argc, char** argv)
int domeTilt = -200;
int domeMode = 0;
char* domeWarp = NULL;
+ Text *domeText = NULL;
int windowLeft = 100;
int windowTop = 100;
int windowWidth = 640;
@@ -615,7 +617,7 @@ int main(int argc, char** argv)
}
break;
default:
- printf("Unkown argument: %s\n", argv[i++]);
+ printf("Unknown argument: %s\n", argv[i++]);
break;
}
}
@@ -786,8 +788,12 @@ int main(int argc, char** argv)
scene->gm.dome.mode = domeMode;
if (domeWarp)
{
- printf("using external file as dome warping. Not implemented yet");
- //scene->gm.dome.warptext
+ //XXX to do: convert relative to absolute path
+ domeText= add_text(domeWarp, "");
+ if(!domeText)
+ printf("error: invalid warpdata text file - %s\n", domeWarp);
+ else
+ scene->gm.dome.warptext = domeText;
}
}