diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2004-03-23 01:02:18 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2004-03-23 01:02:18 +0300 |
commit | 00291b5cf4a0f16ddca425b74ed30e8ac35d40e2 (patch) | |
tree | 952bb1c2f6fd8c2f34b950597ed0fa73a4ea7594 /source/blender | |
parent | 5b90aafbd6815e29343f8e9aba9e3e20f85b3cc0 (diff) |
[GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics.
[SCons] Build with Solid as default when enabling the gameengine in the build process
[SCons] Build solid and qhull from the extern directory and link statically against them
That was about it.
There are a few things that needs double checking:
* Makefiles
* Projectfiles
* All the other systems than Linux and Windows on which the build (with scons) has been successfully tested.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 4 | ||||
-rw-r--r-- | source/blender/include/BIF_resources.h | 70 | ||||
-rw-r--r-- | source/blender/include/butspace.h | 51 | ||||
-rw-r--r-- | source/blender/include/mydevice.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 51 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 26 | ||||
-rw-r--r-- | source/blender/src/buttons_logic.c | 213 | ||||
-rw-r--r-- | source/blender/src/buttons_scene.c | 4 | ||||
-rw-r--r-- | source/blender/src/editobject.c | 2 | ||||
-rw-r--r-- | source/blender/src/editsound.c | 2 |
11 files changed, 365 insertions, 62 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 30221bc21dd..b8fb750e74c 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -217,7 +217,7 @@ Mesh *add_mesh() me->size[0]= me->size[1]= me->size[2]= 1.0; me->smoothresh= 30; - me->texflag= ME_AUTOSPACE; + me->texflag= AUTOSPACE; me->flag= ME_TWOSIDED; me->subdiv= 1; me->subdivr = 1; @@ -398,7 +398,7 @@ void tex_space_mesh(Mesh *me) boundbox_mesh(me, loc, size); - if(me->texflag & ME_AUTOSPACE) { + if(me->texflag & AUTOSPACE) { if(me->key) { kb= me->key->refkey; if (kb) { diff --git a/source/blender/include/BIF_resources.h b/source/blender/include/BIF_resources.h index 8900df470ca..2fa361a985e 100644 --- a/source/blender/include/BIF_resources.h +++ b/source/blender/include/BIF_resources.h @@ -258,8 +258,72 @@ typedef enum { #define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1) } BIFIconID; +typedef enum { +#define BIFCOLORSHADE_FIRST (COLORSHADE_DARK) + COLORSHADE_DARK, + COLORSHADE_GREY, + COLORSHADE_MEDIUM, + COLORSHADE_HILITE, + COLORSHADE_LIGHT, + COLORSHADE_WHITE, +#define BIFCOLORSHADE_LAST (COLORSHADE_WHITE) +#define BIFNCOLORSHADES (BIFCOLORSHADE_LAST-BIFCOLORSHADE_FIRST + 1) +} BIFColorShade; + +typedef enum { +#define BIFCOLORID_FIRST (BUTGREY) + BUTGREY = 0, + BUTGREEN, + BUTBLUE, + BUTSALMON, + MIDGREY, + BUTPURPLE, + BUTYELLOW, + REDALERT, + BUTRUST, + BUTWHITE, + BUTDBLUE, + BUTPINK, + BUTDPINK, + BUTMACTIVE, -/* ---------- theme ----------- */ + BUTIPO, + BUTAUDIO, + BUTCAMERA, + BUTRANDOM, + BUTEDITOBJECT, + BUTPROPERTY, + BUTSCENE, + BUTMOTION, + BUTMESSAGE, + BUTACTION, + BUTCD, + BUTGAME, + BUTVISIBILITY, + BUTYUCK, + BUTSEASICK, + BUTCHOKE, + BUTIMPERIAL, + + BUTTEXTCOLOR, + BUTTEXTPRESSED, + BUTSBACKGROUND, + + VIEWPORTBACKCOLOR, + VIEWPORTGRIDCOLOR, + VIEWPORTACTIVECOLOR, + VIEWPORTSELECTEDCOLOR, + VIEWPORTUNSELCOLOR, + + EDITVERTSEL, + EDITVERTUNSEL, + EDITEDGESEL, + EDITEDGEUNSEL, + +#define BIFCOLORID_LAST (EDITEDGEUNSEL) +#define BIFNCOLORIDS (BIFCOLORID_LAST-BIFCOLORID_FIRST + 1) + +} BIFColorID; enum { TH_AUTO, /* for buttons, to signal automatic color assignment */ @@ -355,6 +419,8 @@ void BIF_InitTheme(void); void BIF_SetTheme(struct ScrArea *sa); void BIF_resources_init (void); void BIF_resources_free (void); +void BIF_colors_init (void); +void BIF_load_ui_colors (void); // icon API @@ -368,4 +434,6 @@ char *BIF_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid); char *BIF_ThemeColorsPup(int spacetype); +void BIF_def_color (BIFColorID colorid, unsigned char r, unsigned char g, unsigned char b); + #endif /* BIF_ICONS_H */ diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h index 63dcd0376c9..a2e153ef519 100644 --- a/source/blender/include/butspace.h +++ b/source/blender/include/butspace.h @@ -74,6 +74,9 @@ extern void do_mballbuts(unsigned short event); extern void do_latticebuts(unsigned short event); extern void do_fpaintbuts(unsigned short event); +/* dont like it here , rather make a BIF_Buttons_Editing.h or so BM*/ +extern int Buttons_Editing_GetFaceShadows(); + /* shading */ extern void material_panels(void); extern void do_matbuts(unsigned short event); @@ -97,6 +100,9 @@ extern void do_scriptbuts(unsigned short event); /* ipowindow */ extern void do_ipobuts(unsigned short event); // drawipo.c (bad! ton) +/* uvautocalculation */ +void do_uvautocalculationbuts(unsigned short event); +void get_uvautocalculationsettings(float *radius,float *cubesize, int *mapdir, int *mapalign); /* butspace.c */ void test_meshpoin_but(char *name, struct ID **idpp); void test_obpoin_but(char *name, struct ID **idpp); @@ -337,6 +343,14 @@ enum { #define B_VERTEXSMOOTH 2080 #define B_MAKESTICKY 2082 #define B_MAKEVERTCOL 2083 +#define B_CHROMADEPTH 2084 +#define B_ISDEFLECTOR 2085 +#define B_PDEFDAMPING 2086 +#define B_GRAVITY 2087 +#define B_GRAVSTRENGTH 2088 +#define B_GRAVPOWER 2089 +#define B_PDEFRDAMP 2090 +#define B_PDEFPERM 2091 /* *********************** */ #define B_CURVEBUTS 2200 @@ -416,6 +430,12 @@ enum { #define B_SOUNDACT_BROWSE 2712 +#define B_SETSECTOR 2713 +#define B_SETPROP 2714 +#define B_SETACTOR 2715 +#define B_SETMAINACTOR 2716 +#define B_SETDYNA 2717 + /* *********************** */ #define B_FPAINTBUTS 2900 @@ -508,8 +528,37 @@ enum { B_CONSTRAINT_ADD_LOCLIKE, B_CONSTRAINT_ADD_ACTION, B_CONSTRAINT_ADD_LOCKTRACK, - B_CONSTRAINT_ADD_FOLLOWPATH + B_CONSTRAINT_ADD_FOLLOWPATH, + B_CONSTRAINT_ADD_DISTANCELIMIT }; + +/*+++ BM */ +/* *********************** */ +#define B_UVAUTOCALCBUTS 3400 +enum { + B_UVAUTO_REDRAW = 3301, + B_UVAUTO_SPHERE, + B_UVAUTO_CYLINDER, + B_UVAUTO_CYLRADIUS, + B_UVAUTO_WINDOW, + B_UVAUTO_CUBE, + B_UVAUTO_CUBESIZE, + B_UVAUTO_STD1, + B_UVAUTO_STD2, + B_UVAUTO_STD4, + B_UVAUTO_STD8, + B_UVAUTO_BOUNDS1, + B_UVAUTO_BOUNDS2, + B_UVAUTO_BOUNDS4, + B_UVAUTO_BOUNDS8, + B_UVAUTO_TOP, + B_UVAUTO_FACE, + B_UVAUTO_OBJECT, + B_UVAUTO_ALIGNX, + B_UVAUTO_ALIGNY +}; +/* *********************** */ +/*--- BM */ /* *********************** */ diff --git a/source/blender/include/mydevice.h b/source/blender/include/mydevice.h index aad025fa759..6b8c2d305a0 100644 --- a/source/blender/include/mydevice.h +++ b/source/blender/include/mydevice.h @@ -217,6 +217,7 @@ #define REDRAWBUTSSCRIPT 0x401A #define REDRAWBUTSLOGIC 0x401B #define REDRAWBUTSSHADING 0x401C +#define REDRAWBUTSGAME 0x401D #define REDRAWINFO 0x4021 #define RENDERPREVIEW 0x4022 @@ -234,6 +235,7 @@ #define REDRAWTEXT 0x402E #define REDRAWSOUND 0x402F #define REDRAWACTION 0x4030 +#define REDRAWBUTSCONSTRAINT 0x4034 #define REDRAWNLA 0x4031 #define REDRAWSCRIPT 0x4032 diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index d48e18c177a..568baf80845 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -79,8 +79,8 @@ typedef struct bKinematicConstraint{ typedef struct bTrackToConstraint{ Object *tar; - int reserved1; /* Track Axis */ - int reserved2; /* Up Axis */ + int reserved1; /* I'll be using reserved1 and reserved2 as Track and Up flags, not sure if that's what they were intented for anyway. Not sure either if it would create backward incompatibility if I were to rename them. - theeth*/ + int reserved2; char subtarget[32]; } bTrackToConstraint; @@ -126,6 +126,17 @@ typedef struct bFollowPathConstraint{ int upflag; } bFollowPathConstraint; +/* Distance Limiting constraints */ +typedef struct bDistanceLimitConstraint{ + Object *tar; + char subtarget[32]; + float pad1; + float pad2; + float distance; + float offset[3]; +} bDistanceLimitConstraint; + + /* Zero-target constraints */ typedef struct bRotationConstraint{ float xmin, xmax; @@ -133,6 +144,8 @@ typedef struct bRotationConstraint{ float zmin, zmax; } bRotationConstraint; + + /* bConstraint.type */ #define CONSTRAINT_TYPE_NULL 0 #define CONSTRAINT_TYPE_CHILDOF 1 /* Unimplemented */ @@ -148,6 +161,7 @@ typedef struct bRotationConstraint{ #define CONSTRAINT_TYPE_PYTHON 11 /* Unimplemented */ #define CONSTRAINT_TYPE_ACTION 12 #define CONSTRAINT_TYPE_LOCKTRACK 13 /* New Tracking constraint that locks an axis in place - theeth */ +#define CONSTRAINT_TYPE_DISTANCELIMIT 14 /* bConstraint.flag */ #define CONSTRAINT_EXPAND 0x00000001 @@ -167,6 +181,39 @@ typedef struct bRotationConstraint{ #define LOCLIKE_X 0x00000001 #define LOCLIKE_Y 0x00000002 #define LOCLIKE_Z 0x00000004 +#define LOCSPACE 0x00000008 + +/* Tracking flags */ +#define LOCK_X 0x00000000 +#define LOCK_Y 0x00000001 +#define LOCK_Z 0x00000002 + +#define UP_X 0x00000000 +#define UP_Y 0x00000001 +#define UP_Z 0x00000002 + +#define TRACK_X 0x00000000 +#define TRACK_Y 0x00000001 +#define TRACK_Z 0x00000002 +#define TRACK_nX 0x00000003 +#define TRACK_nY 0x00000004 +#define TRACK_nZ 0x00000005 + +/* Tracking flags */ +#define LOCK_X 0x00000000 +#define LOCK_Y 0x00000001 +#define LOCK_Z 0x00000002 + +#define UP_X 0x00000000 +#define UP_Y 0x00000001 +#define UP_Z 0x00000002 + +#define TRACK_X 0x00000000 +#define TRACK_Y 0x00000001 +#define TRACK_Z 0x00000002 +#define TRACK_nX 0x00000003 +#define TRACK_nY 0x00000004 +#define TRACK_nZ 0x00000005 /* Tracking flags */ #define LOCK_X 0x00000000 diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index ebfa3818ef8..8198e5329cd 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -100,7 +100,7 @@ typedef struct Mesh { /* **************** MESH ********************* */ /* texflag */ -#define ME_AUTOSPACE 1 +#define AUTOSPACE 1 /* me->flag */ #define ME_ISDONE 1 diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index c5fa7aeafd5..45536964351 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -64,6 +64,18 @@ typedef struct BoundBox { float vec[8][3]; } BoundBox; +/* OcInfo and LBuf structs are for the Enji gameengine */ + +typedef struct OcInfo { + float dvec[3]; + float size[3]; +} OcInfo; + +typedef struct LBuf { + short tot, max; + int pad; + struct Object **ob; +} LBuf; typedef struct Object { ID id; @@ -153,6 +165,7 @@ typedef struct Object { * bit 8: Friction is anisotropic * bit 9: Object is a ghost * bit 10: Do rigid body dynamics. + * bit 11: Use bounding object for physics */ int gameflag; /** @@ -165,6 +178,13 @@ typedef struct Object { ListBase constraints; ListBase nlastrips; + + struct Life *life; + + LBuf lbuf; + LBuf port; + + float toonedge, pad2; } Object; /* this work object is defined in object.c */ @@ -250,6 +270,11 @@ extern Object workob; #define OB_SOLID 3 #define OB_SHADED 4 #define OB_TEXTURE 5 +#define OB_TOON_MONO 6 +#define OB_TOON_COLOR 7 +#define OB_TOON_TRANSP 8 +#define OB_TOON_FLAT 9 +#define OB_TOON_SMOOTH 10 /* dtx: flags */ #define OB_AXIS 2 @@ -291,6 +316,7 @@ extern Object workob; #define OB_ANISOTROPIC_FRICTION 256 #define OB_GHOST 512 #define OB_RIGID_BODY 1024 +#define OB_BOUNDS 2048 #define OB_COLLISION_RESPONSE 4096 #define OB_SECTOR 8192 diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 9781d3ea1f8..3d6987fe9b7 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -63,6 +63,8 @@ #include "DNA_sound_types.h" #include "DNA_text_types.h" #include "DNA_view3d_types.h" +#include "DNA_mesh_types.h" +#include "DNA_world_types.h" #include "BKE_library.h" #include "BKE_global.h" @@ -87,7 +89,6 @@ #include "nla.h" /* For __NLA : Important, do not remove */ #include "butspace.h" // own module - /* internals */ /****/ @@ -346,7 +347,31 @@ void do_logic_buts(unsigned short event) if(ob==0) return; switch(event) { + + case B_SETSECTOR: + /* check for inconsistant types */ + ob->gameflag &= ~(OB_PROP|OB_MAINACTOR|OB_DYNAMIC|OB_ACTOR); + ob->dtx |= OB_BOUNDBOX; + allqueue(REDRAWBUTSGAME, 0); + allqueue(REDRAWVIEW3D, 0); + break; + case B_SETPROP: + /* check for inconsistant types */ + ob->gameflag &= ~(OB_SECTOR|OB_MAINACTOR|OB_DYNAMIC|OB_ACTOR); + allqueue(REDRAWBUTSGAME, 0); + allqueue(REDRAWVIEW3D, 0); + break; + + case B_SETACTOR: + case B_SETDYNA: + case B_SETMAINACTOR: + ob->gameflag &= ~(OB_SECTOR|OB_PROP); + allqueue(REDRAWBUTSGAME, 0); + allqueue(REDRAWVIEW3D, 0); + break; + + case B_ADD_PROP: prop= new_property(PROP_FLOAT); make_unique_prop_names(prop->name); @@ -2246,12 +2271,128 @@ static uiBlock *actuator_menu(void *arg_unused) return block; } + +void buttons_enji(uiBlock *block, Object *ob) +{ + uiDefBut(block, TOG|INT|BIT|13, B_SETSECTOR, "Sector", + 10,205,65,19, &ob->gameflag, 0, 0, 0, 0, + "All game elements should be in the Sector boundbox"); + uiDefBut(block, TOG|INT|BIT|14, B_SETPROP, "Prop", + 75,205,65,19, &ob->gameflag, 0, 0, 0, 0, + "An Object fixed within a sector"); + uiBlockSetCol(block, BUTPURPLE); + uiDefBut(block, TOG|INT|BIT|2, B_SETACTOR, "Actor", + 140,205,65,19, &ob->gameflag, 0, 0, 0, 0, + "Objects that are evaluated by the engine "); + if(ob->gameflag & OB_ACTOR) { + uiDefBut(block, TOG|INT|BIT|0, B_SETDYNA, "Dynamic", + 205,205,75,19, &ob->gameflag, 0, 0, 0, 0, + "Motion defined by laws of physics"); + uiDefBut(block, TOG|INT|BIT|15, B_SETMAINACTOR, "MainActor", + 280,205,70,19, &ob->gameflag, 0, 0, 0, 0, ""); + + if(ob->gameflag & OB_DYNAMIC) { + uiDefBut(block, TOG|INT|BIT|6, B_DIFF, "Do Fh", + 10,185,50,19, &ob->gameflag, 0, 0, 0, 0, + "Use Fh settings in Materials"); + uiDefBut(block, TOG|INT|BIT|7, B_DIFF, "Rot Fh", + 60,185,50,19, &ob->gameflag, 0, 0, 0, 0, + "Use face normal to rotate Object"); + + uiBlockSetCol(block, BUTGREY); + uiDefBut(block, NUM|FLO, B_DIFF, "Mass:", + 110, 185, 120, 19, &ob->mass, 0.01, 100.0, 10, 0, + "The mass of the Object"); + uiDefBut(block, NUM|FLO, REDRAWVIEW3D, "Size:", + 230, 185, 120, 19, &ob->inertia, 0.01, 10.0, 10, 0, + "Bounding sphere size"); + uiDefBut(block, NUM|FLO, B_DIFF, "Damp:", + 10, 165, 100, 19, &ob->damping, 0.0, 1.0, 10, 0, + "General movement damping"); + uiDefBut(block, NUM|FLO, B_DIFF, "RotDamp:", + 110, 165, 120, 19, &ob->rdamping, 0.0, 1.0, 10, 0, + "General rotation damping"); + } + } + +} + +void buttons_ketsji(uiBlock *block, Object *ob) +{ + uiDefButI(block, TOG|BIT|2, B_REDR, "Actor", + 10,205,75,19, &ob->gameflag, 0, 0, 0, 0, + "Objects that are evaluated by the engine "); + if(ob->gameflag & OB_ACTOR) { + uiDefButI(block, TOG|BIT|9, B_REDR, "Ghost", 85,205,65,19, + &ob->gameflag, 0, 0, 0, 0, + "Objects that don't restitute collisions (like a ghost)"); + uiDefButI(block, TOG|BIT|0, B_REDR, "Dynamic", 150,205,65,19, + &ob->gameflag, 0, 0, 0, 0, + "Motion defined by laws of physics"); + + if(ob->gameflag & OB_DYNAMIC) { + uiDefButI(block, TOG|BIT|10, B_REDR, "Rigid Body", 215,205,135,19, + &ob->gameflag, 0, 0, 0, 0, + "Enable rolling physics"); + uiDefButI(block, TOG|BIT|6, B_DIFF, "Do Fh", 10,185,50,19, + &ob->gameflag, 0, 0, 0, 0, + "Use Fh settings in Materials"); + uiDefButI(block, TOG|BIT|7, B_DIFF, "Rot Fh", 60,185,50,19, + &ob->gameflag, 0, 0, 0, 0, + "Use face normal to rotate Object"); + uiDefButF(block, NUM, B_DIFF, "Mass:", 110, 185, 80, 19, + &ob->mass, 0.01, 100.0, 10, 0, + "The mass of the Object"); + uiDefButF(block, NUM, REDRAWVIEW3D, "Size:", 190, 185, 80, 19, + &ob->inertia, 0.01, 10.0, 10, 0, + "Bounding sphere size"); + uiDefButF(block, NUM, B_DIFF, "Form:", 270, 185, 80, 19, + &ob->formfactor, 0.01, 100.0, 10, 0, + "Form factor"); + + uiDefButF(block, NUM, B_DIFF, "Damp:", 10, 165, 100, 19, + &ob->damping, 0.0, 1.0, 10, 0, + "General movement damping"); + uiDefButF(block, NUM, B_DIFF, "RotDamp:", 110, 165, 120, 19, + &ob->rdamping, 0.0, 1.0, 10, 0, + "General rotation damping"); + uiDefButI(block, TOG|BIT|8, B_REDR, "Anisotropic", + 230, 165, 120, 19, + &ob->gameflag, 0.0, 1.0, 10, 0, + "Enable anisotropic friction"); + } + + if (ob->gameflag & OB_ANISOTROPIC_FRICTION) { + uiDefButF(block, NUM, B_DIFF, "x friction:", 10, 145, 114, 19, + &ob->anisotropicFriction[0], 0.0, 1.0, 10, 0, + "Relative friction coefficient in the x-direction."); + uiDefButF(block, NUM, B_DIFF, "y friction:", 124, 145, 113, 19, + &ob->anisotropicFriction[1], 0.0, 1.0, 10, 0, + "Relative friction coefficient in the y-direction."); + uiDefButF(block, NUM, B_DIFF, "z friction:", 237, 145, 113, 19, + &ob->anisotropicFriction[2], 0.0, 1.0, 10, 0, + "Relative friction coefficient in the z-direction."); + } + } + + if (!(ob->gameflag & OB_GHOST)) { + uiDefButI(block, TOG|BIT|11, B_REDR, "Bounds", 10, 125, 75, 19, + &ob->gameflag, 0, 0,0, 0, + "Specify a bounds object for physics"); + if (ob->gameflag & OB_BOUNDS) { + uiDefButS(block, MENU, REDRAWVIEW3D, "Boundary Display%t|Box%x0|Sphere%x1|Cylinder%x2|Cone%x3|Polyheder%x4", + 85, 125, 100, 19, &ob->boundtype, 0, 0, 0, 0, "Selects the boundary display type"); + } + } +} + /* never used, see CVS 1.134 for the code */ /* static FreeCamera *new_freecamera(void) */ /* never used, see CVS 1.120 for the code */ /* static uiBlock *freecamera_menu(void) */ + void logic_buts(void) { ID **idar; @@ -2262,11 +2403,15 @@ void logic_buts(void) bActuator *act; uiBlock *block; uiBut *but; + World *wrld; int a; short xco, yco, count, width, ycoo; char *pupstr, name[32]; int butreturn = 0; + wrld= G.scene->world; + if(wrld==0) return; + ob= OBACT; if(ob==0) return; @@ -2277,47 +2422,13 @@ void logic_buts(void) uiBlockSetCol(block, TH_BUT_SETTING2); - uiDefButI(block, TOG|BIT|2, B_REDR, "Actor", - 25,205,60,19, &ob->gameflag, 0, 0, 0, 0, - "Objects that are evaluated by the engine "); - - if(ob->gameflag & OB_ACTOR) { - uiDefButI(block, TOG|BIT|9, B_REDR, "Ghost", 85,205,65,19, &ob->gameflag, 0, 0, 0, 0, "Objects that don't restitute collisions (like a ghost)"); - uiDefButI(block, TOG|BIT|0, B_REDR, "Dynamic", 150,205,65,19, &ob->gameflag, 0, 0, 0, 0, "Motion defined by laws of physics"); - - if(ob->gameflag & OB_DYNAMIC) { - - uiDefButI(block, TOG|BIT|10, B_REDR, "Rigid Body", 215,205,135,19, &ob->gameflag, 0, 0, 0, 0, ""); - - uiDefButI(block, TOG|BIT|6, B_DIFF, "Do Fh", 10,185,50,19, &ob->gameflag, 0, 0, 0, 0, "Use Fh settings in Materials"); - uiDefButI(block, TOG|BIT|7, B_DIFF, "Rot Fh", 60,185,50,19, &ob->gameflag, 0, 0, 0, 0, "Use face normal to rotate Object"); - - uiDefButF(block, NUM, B_DIFF, "Mass:", 110, 185, 80, 19, &ob->mass, 0.01, 100.0, 10, 0, "The mass of the Object"); - uiDefButF(block, NUM, REDRAWVIEW3D, "Size:", 190, 185, 80, 19, &ob->inertia, 0.01, 10.0, 10, 0, "Bounding sphere size"); - uiDefButF(block, NUM, B_DIFF, "Form:", 270, 185, 80, 19, &ob->formfactor, 0.01, 100.0, 10, 0, "Form factor"); - - uiDefButF(block, NUM, B_DIFF, "Damp:", 10, 165, 100, 19, &ob->damping, 0.0, 1.0, 10, 0, "General movement damping"); - uiDefButF(block, NUM, B_DIFF, "RotDamp:", 110, 165, 120, 19, &ob->rdamping, 0.0, 1.0, 10, 0, "General rotation damping"); - uiDefButI(block, TOG|BIT|8, B_REDR, "Anisotropic", 230, 165, 120, 19, - &ob->gameflag, 0.0, 1.0, 10, 0, - "Enable anisotropic friction"); - } - } - - if (ob->gameflag & OB_ANISOTROPIC_FRICTION) { - uiDefButF(block, NUM, B_DIFF, "x friction:", 10, 145, 114, 19, - &ob->anisotropicFriction[0], 0.0, 1.0, 10, 0, - "Relative friction coefficient in the x-direction."); - uiDefButF(block, NUM, B_DIFF, "y friction:", 124, 145, 113, 19, - &ob->anisotropicFriction[1], 0.0, 1.0, 10, 0, - "Relative friction coefficient in the y-direction."); - uiDefButF(block, NUM, B_DIFF, "z friction:", 237, 145, 113, 19, - &ob->anisotropicFriction[2], 0.0, 1.0, 10, 0, - "Relative friction coefficient in the z-direction."); - } - + if (wrld->physicsEngine == 1) + buttons_enji(block, ob); + if ( (wrld->physicsEngine == 4) || (wrld->physicsEngine == 2) ) + buttons_ketsji(block, ob); + uiBlockSetCol(block, TH_AUTO); - uiDefBut(block, BUT, B_ADD_PROP, "ADD property", 10, 110, 340, 24, + uiDefBut(block, BUT, B_ADD_PROP, "ADD property", 10, 90, 340, 24, NULL, 0.0, 100.0, 100, 0, ""); @@ -2327,10 +2438,10 @@ void logic_buts(void) prop= ob->prop.first; while(prop) { - but= uiDefBut(block, BUT, 1, "Del", 10, (short)(90-20*a), 40, 19, NULL, 0.0, 0.0, 1, (float)a, ""); + but= uiDefBut(block, BUT, 1, "Del", 10, (short)(70-20*a), 40, 19, NULL, 0.0, 0.0, 1, (float)a, ""); uiButSetFunc(but, del_property, prop, NULL); - uiDefButS(block, MENU, B_CHANGE_PROP, pupstr, 50, (short)(90-20*a), 60, 19, &prop->type, 0, 0, 0, 0, ""); - but= uiDefBut(block, TEX, 1, "Name:", 110, (short)(90-20*a), 105, 19, prop->name, 0, 31, 0, 0, ""); + uiDefButS(block, MENU, B_CHANGE_PROP, pupstr, 50, (short)(70-20*a), 60, 19, &prop->type, 0, 0, 0, 0, ""); + but= uiDefBut(block, TEX, 1, "Name:", 110, (short)(70-20*a), 105, 19, prop->name, 0, 31, 0, 0, ""); uiButSetFunc(but, make_unique_prop_names_cb, prop->name, (void*) 1); if (strcmp(prop->name, "Text") == 0) { @@ -2340,19 +2451,19 @@ void logic_buts(void) } if(prop->type==PROP_BOOL) { - uiDefButI(block, TOG|BIT|0, B_REDR, "True", 215, (short)(90-20*a), 55, 19, &prop->data, 0, 0, 0, 0, ""); - uiDefButI(block, TOGN|BIT|0, B_REDR, "False", 270, (short)(90-20*a), 55, 19, &prop->data, 0, 0, 0, 0, ""); + uiDefButI(block, TOG|BIT|0, B_REDR, "True", 215, (short)(70-20*a), 55, 19, &prop->data, 0, 0, 0, 0, ""); + uiDefButI(block, TOGN|BIT|0, B_REDR, "False", 270, (short)(70-20*a), 55, 19, &prop->data, 0, 0, 0, 0, ""); } else if(prop->type==PROP_INT) - uiDefButI(block, NUM, butreturn, "", 215, (short)(90-20*a), 110, 19, &prop->data, -10000, 10000, 0, 0, ""); + uiDefButI(block, NUM, butreturn, "", 215, (short)(70-20*a), 110, 19, &prop->data, -10000, 10000, 0, 0, ""); else if(prop->type==PROP_FLOAT) - uiDefButF(block, NUM, butreturn, "", 215, (short)(90-20*a), 110, 19, (float*) &prop->data, -10000, 10000, 100, 0, ""); + uiDefButF(block, NUM, butreturn, "", 215, (short)(70-20*a), 110, 19, (float*) &prop->data, -10000, 10000, 100, 0, ""); else if(prop->type==PROP_STRING) - uiDefBut(block, TEX, butreturn, "", 215, (short)(90-20*a), 110, 19, prop->poin, 0, 127, 0, 0, ""); + uiDefBut(block, TEX, butreturn, "", 215, (short)(70-20*a), 110, 19, prop->poin, 0, 127, 0, 0, ""); else if(prop->type==PROP_TIME) - uiDefButF(block, NUM, butreturn, "", 215, (short)(90-20*a), 110, 19, (float*) &prop->data, -10000, 10000, 0, 0, ""); + uiDefButF(block, NUM, butreturn, "", 215, (short)(70-20*a), 110, 19, (float*) &prop->data, -10000, 10000, 0, 0, ""); - uiDefButS(block, TOG|BIT|0, 0, "D", 325, (short)(90-20*a), 20, 19, &prop->flag, 0, 0, 0, 0, "Print Debug info"); + uiDefButS(block, TOG|BIT|0, 0, "D", 325, (short)(70-20*a), 20, 19, &prop->flag, 0, 0, 0, 0, "Print Debug info"); a++; prop= prop->next; diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 950e880f037..70bd128686b 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -1066,10 +1066,10 @@ static void render_panel_render(void) uiDefButI(block, TOG|BIT|7,0,"x", 665,50,20,23,&G.scene->r.mode, 0, 0, 0, 0, "Disables time difference in field calculations"); uiDefButI(block, TOG|BIT|17,0,"Gauss", 564,30,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Gaussian sampling filter for antialiasing"); - uiDefButF(block, NUM,B_DIFF,"", 624,30,60,20,&G.scene->r.gauss,0.5, 1.5, 100, 2, "Sets the Gaussian filter size)"); + uiDefButF(block, NUM,B_DIFF,"", 624,30,60,20,&G.scene->r.gauss,0.5, 1.5, 100, 2, "Sets the Gaussian filter size"); uiDefButI(block, TOG|BIT|9,REDRAWVIEWCAM, "Border", 564,10,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Render a small cut-out of the image"); - uiDefButI(block, TOG|BIT|2,B_REDR, "Gamma", 624,10,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable gamma correction"); + uiDefButI(block, TOG|BIT|2,0, "Gamma", 624,10,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable gamma correction"); } diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 27d319df53b..39a451ae74e 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -3229,7 +3229,7 @@ void ob_to_tex_transob(Object *ob, TransOb *tob) if(id==0); else if( GS(id->name)==ID_ME) { me= ob->data; - me->texflag &= ~ME_AUTOSPACE; + me->texflag &= ~AUTOSPACE; tob->loc= me->loc; tob->rot= me->rot; tob->size= me->size; diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c index 150a9eca289..2e7a2375ce4 100644 --- a/source/blender/src/editsound.c +++ b/source/blender/src/editsound.c @@ -991,7 +991,7 @@ void sound_init_audio(void) hSystem = SYS_GetSystem(); noaudio = SYS_GetCommandLineInt(hSystem,"noaudio",0); - if (1)/*(noaudio) intrr: disable game engine audio (openal) */ + if (noaudio)/*(noaudio) intrr: disable game engine audio (openal) */ SND_SetDeviceType(snd_e_dummydevice); ghAudioDeviceInterface = SND_GetAudioDevice(); |