minor c90 compat edits. (no functional changes).
This commit is contained in:
@@ -317,19 +317,19 @@ IF(UNIX AND NOT APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
||||
ENDIF(WITH_OPENMP)
|
||||
|
||||
SET(PLATFORM_LINKFLAGS "-pthread")
|
||||
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
|
||||
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
|
||||
SET(PLATFORM_LINKFLAGS "-pthread")
|
||||
|
||||
# Better warnings
|
||||
# note: -Wunused-parameter is added below for all GCC compilers
|
||||
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
|
||||
SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
|
||||
|
||||
INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
|
||||
# Better warnings
|
||||
# note: -Wunused-parameter is added below for all GCC compilers
|
||||
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
|
||||
SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
ENDIF(UNIX AND NOT APPLE)
|
||||
|
||||
|
||||
|
@@ -32,7 +32,6 @@
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h> // for read close
|
||||
#include <sys/param.h> // for MAXPATHLEN
|
||||
#else
|
||||
#include <io.h> // for open close read
|
||||
#define open _open
|
||||
|
@@ -1562,13 +1562,15 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
|
||||
unsigned int i = 0;
|
||||
float spring_air = clmd->sim_parms->Cvi * 0.01f; /* viscosity of air scaled in percent */
|
||||
float gravity[3] = {0.0f, 0.0f, 0.0f};
|
||||
float tm2[3][3] = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}};
|
||||
float tm2[3][3] = {{0}};
|
||||
MFace *mfaces = cloth->mfaces;
|
||||
unsigned int numverts = cloth->numverts;
|
||||
LinkNode *search = cloth->springs;
|
||||
lfVector *winvec;
|
||||
EffectedPoint epoint;
|
||||
|
||||
tm2[0][0]= tm2[1][1]= tm2[2][2]= -spring_air;
|
||||
|
||||
/* global acceleration (gravitation) */
|
||||
if(clmd->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) {
|
||||
VECCOPY(gravity, clmd->scene->physics_settings.gravity);
|
||||
|
@@ -1073,7 +1073,12 @@ static void create_old_vert_edge_map(ListBase **map, IndexNode **mem, const Mult
|
||||
static MultiresFace *find_old_face(ListBase *map, MultiresFace *faces, int v1, int v2, int v3, int v4)
|
||||
{
|
||||
IndexNode *n1;
|
||||
int v[4] = {v1, v2, v3, v4}, i, j;
|
||||
int v[4], i, j;
|
||||
|
||||
v[0]= v1;
|
||||
v[1]= v2;
|
||||
v[2]= v3;
|
||||
v[3]= v4;
|
||||
|
||||
for(n1 = map[v1].first; n1; n1 = n1->next) {
|
||||
int fnd[4] = {0, 0, 0, 0};
|
||||
|
@@ -4454,7 +4454,11 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
|
||||
|
||||
|
||||
void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys) {
|
||||
ParticleSimulationData sim = {scene, ob, psys, psys_get_modifier(ob, psys)};
|
||||
ParticleSimulationData sim= {0};
|
||||
sim.scene= scene;
|
||||
sim.ob= ob;
|
||||
sim.psys= psys;
|
||||
sim.psmd= psys_get_modifier(ob, psys);
|
||||
|
||||
psys->lattice = psys_get_lattice(&sim);
|
||||
|
||||
|
@@ -1705,9 +1705,10 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
|
||||
r_phase = PSYS_FRAND(p + 20);
|
||||
|
||||
if(part->from==PART_FROM_PARTICLE){
|
||||
ParticleSimulationData tsim = {sim->scene, psys->target_ob ? psys->target_ob : ob, NULL, NULL};
|
||||
float speed;
|
||||
|
||||
ParticleSimulationData tsim= {0};
|
||||
tsim.scene= sim->scene;
|
||||
tsim.ob= psys->target_ob ? psys->target_ob : ob;
|
||||
tsim.psys = BLI_findlink(&tsim.ob->particlesystem, sim->psys->target_psys-1);
|
||||
|
||||
state.time = pa->time;
|
||||
@@ -2057,12 +2058,14 @@ void psys_count_keyed_targets(ParticleSimulationData *sim)
|
||||
static void set_keyed_keys(ParticleSimulationData *sim)
|
||||
{
|
||||
ParticleSystem *psys = sim->psys;
|
||||
ParticleSimulationData ksim = {sim->scene, NULL, NULL, NULL};
|
||||
ParticleSimulationData ksim= {0};
|
||||
ParticleTarget *pt;
|
||||
PARTICLE_P;
|
||||
ParticleKey *key;
|
||||
int totpart = psys->totpart, k, totkeys = psys->totkeyed;
|
||||
|
||||
ksim.scene= sim->scene;
|
||||
|
||||
/* no proper targets so let's clear and bail out */
|
||||
if(psys->totkeyed==0) {
|
||||
free_keyed_keys(psys);
|
||||
@@ -3989,7 +3992,7 @@ static int hair_needs_recalc(ParticleSystem *psys)
|
||||
* then advances in to actual particle calculations depending on particle type */
|
||||
void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
|
||||
{
|
||||
ParticleSimulationData sim = {scene, ob, psys, NULL, NULL};
|
||||
ParticleSimulationData sim= {0};
|
||||
ParticleSettings *part = psys->part;
|
||||
float cfra;
|
||||
|
||||
@@ -4000,6 +4003,10 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
|
||||
return;
|
||||
|
||||
cfra= BKE_curframe(scene);
|
||||
|
||||
sim.scene= scene;
|
||||
sim.ob= ob;
|
||||
sim.psys= psys;
|
||||
sim.psmd= psys_get_modifier(ob, psys);
|
||||
|
||||
/* system was already updated from modifier stack */
|
||||
|
@@ -49,14 +49,9 @@
|
||||
#include "BKE_subsurf.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_editVert.h"
|
||||
|
||||
|
||||
|
||||
/* Util macros */
|
||||
#define TO_STR(a) #a
|
||||
#define JOIN(a,b) a##b
|
||||
|
||||
#define OUT_OF_MEMORY() ((void)printf("Shrinkwrap: Out of memory\n"))
|
||||
|
||||
/* Benchmark macros */
|
||||
@@ -90,7 +85,7 @@ typedef void ( *Shrinkwrap_ForeachVertexCallback) (DerivedMesh *target, float *c
|
||||
DerivedMesh *object_get_derived_final(struct Scene *scene, Object *ob, CustomDataMask dataMask)
|
||||
{
|
||||
Mesh *me= ob->data;
|
||||
EditMesh *em = BKE_mesh_get_editmesh(me);
|
||||
struct EditMesh *em = BKE_mesh_get_editmesh(me);
|
||||
|
||||
if (em)
|
||||
{
|
||||
|
@@ -39,7 +39,6 @@
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h> // for read close
|
||||
#include <sys/param.h> // for MAXPATHLEN
|
||||
#else
|
||||
#include <io.h> // for open close read
|
||||
#include "winsock2.h"
|
||||
|
Reference in New Issue
Block a user