diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2009-07-21 00:28:29 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2009-07-21 00:28:29 +0400 |
commit | 9a9d118bbf7786b1c5c412bef651885e33709553 (patch) | |
tree | 55f15ebe16824610b6209e3507e4698ce54c03ac /source/blender/makesdna | |
parent | 1b7f1bc72dbbf2051eb015d219f2c89d43439cad (diff) |
BGE panels: wip
Logic Panel:
- world settings (moved from world)
... that includes physic engine selection + gravity
- game player (from gamesettings, it wasn't wrapped)
- stereo/dome (from gamesettings, it wasn't wrapped)
... separated stereom into stereoflag and stereomode
- properties
... (didn't touch it)
Buttons Game Panel:
(wip panel)
- Physics (moved from Logic Panel)
... it will be a datablock in the future (right Campbell ?)
- Material Physics (not currently implemented)
... a datablock link to the materials of an object + the dynamic physic variables
* NOTE:
in readfile.c::do_version I couldn't do if(scene->world). There is something wrong with scenes with an unlinked world. So so far we are ignoring the old values....
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 88 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_world_types.h | 20 |
2 files changed, 83 insertions, 25 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 572913f10d0..31d7a63b31b 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -183,10 +183,10 @@ typedef struct RenderData { /** For UR edge rendering: give the edges this color */ float edgeR, edgeG, edgeB; - short fullscreen, xplay, yplay, freqplay; /* standalone player */ - short depth, attrib, rt1, rt2; /* standalone player */ + short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5 + short depth, attrib, rt1, rt2; /* standalone player */ // XXX deprecated since 2.5 - short stereomode; /* standalone player stereo settings */ + short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5 short dimensionspreset; /* for the dimensions presets menu */ @@ -327,12 +327,12 @@ typedef struct RenderData { short jp2_preset, jp2_depth; int rpad3; - /* Dome variables */ - short domeres, domemode; - short domeangle, dometilt; - float domeresbuf; - float pad2; - struct Text *dometext; + /* Dome variables */ // XXX deprecated since 2.5 + short domeres, domemode; // XXX deprecated since 2.5 + short domeangle, dometilt; // XXX deprecated since 2.5 + float domeresbuf; // XXX deprecated since 2.5 + float pad2; // XXX deprecated since 2.5 + struct Text *dometext; // XXX deprecated since 2.5 } RenderData; @@ -350,6 +350,20 @@ typedef struct RenderProfile { } RenderProfile; +typedef struct GameDome { + short res, mode; + short angle, tilt; + float resbuf, pad2; + struct Text *warptext; +} GameDome; + +#define DOME_FISHEYE 1 +#define DOME_TRUNCATED_FRONT 2 +#define DOME_TRUNCATED_REAR 3 +#define DOME_ENVMAP 4 +#define DOME_PANORAM_SPH 5 +#define DOME_NUM_MODES 6 + typedef struct GameFraming { float col[3]; char type, pad1, pad2, pad3; @@ -359,6 +373,56 @@ typedef struct GameFraming { #define SCE_GAMEFRAMING_EXTEND 1 #define SCE_GAMEFRAMING_SCALE 2 +typedef struct GameData { + + /* physics (it was in world)*/ + float gravity; /*Gravitation constant for the game world*/ + + /* + * Radius of the activity bubble, in Manhattan length. Objects + * outside the box are activity-culled. */ + float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!! + /* + * bit 3: (gameengine): Activity culling is enabled. + * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling + */ + short mode, pad11; + short occlusionRes; /* resolution of occlusion Z buffer in pixel */ + short physicsEngine; + short ticrate, maxlogicstep, physubstep, maxphystep; + + /* standalone player */ + struct GameFraming framing; + short pad9, pad10; + short fullscreen, xplay, yplay, freqplay; + short depth, attrib, rt1, rt2; + + /* stereo/dome mode */ + struct GameDome dome; + short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!! + float pad12; +} GameData; +#define STEREO_NOSTEREO 1 +#define STEREO_ENABLE 2 +#define STEREO_DOME 3 + +//#define STEREO_NOSTEREO 1 +#define STEREO_QUADBUFFERED 2 +#define STEREO_ABOVEBELOW 3 +#define STEREO_INTERLACED 4 +#define STEREO_ANAGLYPH 5 +#define STEREO_SIDEBYSIDE 6 +#define STEREO_VINTERLACE 7 +//#define STEREO_DOME 8 + +/* physicsEngine */ +#define WOPHY_NONE 0 +#define WOPHY_ENJI 1 +#define WOPHY_SUMO 2 +#define WOPHY_DYNAMO 3 +#define WOPHY_ODE 4 +#define WOPHY_BULLET 5 + typedef struct TimeMarker { struct TimeMarker *next, *prev; int frame; @@ -588,8 +652,6 @@ typedef struct Scene { struct Editing *ed; /* sequence editor data is allocated here */ - struct GameFraming framing; - struct ToolSettings *toolsettings; /* default allocated now */ struct SceneStats *stats; /* default allocated now */ @@ -617,6 +679,10 @@ typedef struct Scene { /* User-Defined KeyingSets */ int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */ ListBase keyingsets; /* KeyingSets for the given frame */ + + /* Game Settings */ + struct GameFraming framing; // XXX deprecated since 2.5 + struct GameData gm; } Scene; diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index 608a4ca982e..b6e387fbede 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -72,12 +72,12 @@ typedef struct World { /** * Gravitation constant for the game world */ - float gravity; + float gravity; // moved to scene->gamedata in 2.5 /** * Radius of the activity bubble, in Manhattan length. Objects * outside the box are activity-culled. */ - float activityBoxRadius; + float activityBoxRadius; // moved to scene->gamedata in 2.5 short skytype; /** @@ -89,10 +89,10 @@ typedef struct World { * bit 4: ambient occlusion * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling */ - short mode; - short occlusionRes; /* resolution of occlusion Z buffer in pixel */ - short physicsEngine; /* here it's aligned */ - short ticrate, maxlogicstep, physubstep, maxphystep; + short mode; // partially moved to scene->gamedata in 2.5 + short occlusionRes; /* resolution of occlusion Z buffer in pixel */ // moved to scene->gamedata in 2.5 + short physicsEngine; /* here it's aligned */ // moved to scene->gamedata in 2.5 + short ticrate, maxlogicstep, physubstep, maxphystep; // moved to scene->gamedata in 2.5 float misi, miststa, mistdist, misthi; @@ -181,14 +181,6 @@ typedef struct World { #define WOMAP_ZENDOWN 8 #define WOMAP_MIST 16 -/* physicsEngine */ -#define WOPHY_NONE 0 -#define WOPHY_ENJI 1 -#define WOPHY_SUMO 2 -#define WOPHY_DYNAMO 3 -#define WOPHY_ODE 4 -#define WOPHY_BULLET 5 - /* flag */ #define WO_DS_EXPAND (1<<0) |