Revision: 27135
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27135
Author: dfelinto
Date: 2010-02-25 07:05:56 +0100 (Thu, 25 Feb 2010)
Log Message:
-----------
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)
Modified Paths:
--------------
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
2010-02-25 03:13:50 UTC (rev 27134)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
2010-02-25 06:05:56 UTC (rev 27135)
@@ -65,6 +65,7 @@
#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 @@
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 domeTilt = -200;
int domeMode = 0;
char* domeWarp = NULL;
+ Text *domeText = NULL;
int windowLeft = 100;
int windowTop = 100;
int windowWidth = 640;
@@ -615,7 +617,7 @@
}
break;
default:
- printf("Unkown argument: %s\n", argv[i++]);
+ printf("Unknown argument: %s\n", argv[i++]);
break;
}
}
@@ -786,8 +788,12 @@
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;
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs