Win64 fixes - I don't think that they introduced any bugs yet, but I want to be sure. Please report problems.
This commit is contained in:
@@ -909,7 +909,7 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
|
||||
glShadeModel(GL_SMOOTH);
|
||||
|
||||
for (i=0,eve=em->verts.first; eve; eve= eve->next)
|
||||
eve->tmp.l = (long) i++;
|
||||
eve->tmp.l = (intptr_t) i++;
|
||||
|
||||
#define PASSATTRIB(efa, eve, vert) { \
|
||||
if(attribs.totorco) { \
|
||||
|
||||
@@ -178,7 +178,7 @@ void detectBitmapFont(ImBuf *ibuf)
|
||||
{
|
||||
unsigned char * rect;
|
||||
unsigned short version;
|
||||
long i;
|
||||
int i;
|
||||
|
||||
if (ibuf != NULL) {
|
||||
// bitmap must have an x size that is a power of two
|
||||
|
||||
@@ -626,7 +626,7 @@ void CustomData_merge(const struct CustomData *source, struct CustomData *dest,
|
||||
number++;
|
||||
|
||||
if(layer->flag & CD_FLAG_NOCOPY) continue;
|
||||
else if(!(mask & (1 << type))) continue;
|
||||
else if(!((int)mask & (int)(1 << (int)type))) continue;
|
||||
else if(number < CustomData_number_of_layers(dest, type)) continue;
|
||||
|
||||
if((alloctype == CD_ASSIGN) && (layer->flag & CD_FLAG_NOFREE))
|
||||
@@ -1144,7 +1144,7 @@ void CustomData_set_only_copy(const struct CustomData *data,
|
||||
int i;
|
||||
|
||||
for(i = 0; i < data->totlayer; ++i)
|
||||
if(!(mask & (1 << data->layers[i].type)))
|
||||
if(!((int)mask & (int)(1 << (int)data->layers[i].type)))
|
||||
data->layers[i].flag |= CD_FLAG_NOCOPY;
|
||||
}
|
||||
|
||||
|
||||
@@ -937,7 +937,7 @@ void filldisplist(ListBase *dispbase, ListBase *to)
|
||||
DispList *dlnew=0, *dl;
|
||||
float *f1;
|
||||
int colnr=0, charidx=0, cont=1, tot, a, *index;
|
||||
long totvert;
|
||||
intptr_t totvert;
|
||||
|
||||
if(dispbase==0) return;
|
||||
if(dispbase->first==0) return;
|
||||
|
||||
@@ -1131,7 +1131,7 @@ static int iv_finddata(struct IvNode *iv, char *field, int fieldnr)
|
||||
float *fp;
|
||||
int len, stackcount, skipdata=0;
|
||||
char *cpa, terminator, str[64];
|
||||
long i;
|
||||
intptr_t i;
|
||||
|
||||
len= strlen(field);
|
||||
|
||||
@@ -2592,7 +2592,7 @@ static void write_videoscape_mesh(Object *ob, char *str)
|
||||
unsigned int kleur[32];
|
||||
float co[3];
|
||||
int a;
|
||||
long tot;
|
||||
intptr_t tot;
|
||||
char *cp;
|
||||
|
||||
if(ob && ob->type==OB_MESH);
|
||||
@@ -2642,17 +2642,17 @@ static void write_videoscape_mesh(Object *ob, char *str)
|
||||
|
||||
if(evl->v4==0) {
|
||||
fprintf(fp, "3 %ld %ld %ld 0x%x\n",
|
||||
(long int) evl->v1->tmp.l,
|
||||
(long int) evl->v2->tmp.l,
|
||||
(long int) evl->v3->tmp.l,
|
||||
(intptr_t) evl->v1->tmp.l,
|
||||
(intptr_t) evl->v2->tmp.l,
|
||||
(intptr_t) evl->v3->tmp.l,
|
||||
kleur[evl->mat_nr]);
|
||||
}
|
||||
else {
|
||||
fprintf(fp, "4 %ld %ld %ld %ld 0x%x\n",
|
||||
(long int) evl->v1->tmp.l,
|
||||
(long int) evl->v2->tmp.l,
|
||||
(long int) evl->v3->tmp.l,
|
||||
(long int) evl->v4->tmp.l,
|
||||
(intptr_t) evl->v1->tmp.l,
|
||||
(intptr_t) evl->v2->tmp.l,
|
||||
(intptr_t) evl->v3->tmp.l,
|
||||
(intptr_t) evl->v4->tmp.l,
|
||||
kleur[evl->mat_nr]);
|
||||
}
|
||||
evl= evl->next;
|
||||
|
||||
@@ -1131,7 +1131,7 @@ struct chartrans *text_to_curve(Object *ob, int mode)
|
||||
ct= chartransdata;
|
||||
if (cu->sepchar==0) {
|
||||
for (i= 0; i<slen; i++) {
|
||||
cha = (unsigned long) mem[i];
|
||||
cha = (uintptr_t) mem[i];
|
||||
info = &(cu->strinfo[i]);
|
||||
if (info->mat_nr > (ob->totcol)) {
|
||||
/* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef struct VFontData {
|
||||
typedef struct VChar {
|
||||
struct VChar *next, *prev;
|
||||
ListBase nurbsbase;
|
||||
unsigned long index;
|
||||
intptr_t index;
|
||||
float resol;
|
||||
float width;
|
||||
float *points;
|
||||
|
||||
@@ -241,7 +241,7 @@ void update_string(Curve *cu)
|
||||
wcs2utf8s(cu->str, textbuf);
|
||||
}
|
||||
|
||||
static int insert_into_textbuf(Curve *cu, unsigned long c)
|
||||
static int insert_into_textbuf(Curve *cu, uintptr_t c)
|
||||
{
|
||||
if (cu->len<MAXTEXT-1) {
|
||||
int x;
|
||||
@@ -620,12 +620,12 @@ int mat_to_sel(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void do_textedit(unsigned short event, short val, unsigned long _ascii)
|
||||
void do_textedit(unsigned short event, short val, uintptr_t _ascii)
|
||||
{
|
||||
Curve *cu;
|
||||
static int accentcode= 0;
|
||||
int x, doit=0, cursmove=0;
|
||||
unsigned long ascii = _ascii;
|
||||
uintptr_t ascii = _ascii;
|
||||
short kern;
|
||||
|
||||
cu= G.obedit->data;
|
||||
|
||||
@@ -334,7 +334,7 @@ typedef struct UndoTile {
|
||||
typedef struct UndoElem {
|
||||
struct UndoElem *next, *prev;
|
||||
char name[MAXUNDONAME];
|
||||
unsigned long undosize;
|
||||
uintptr_t undosize;
|
||||
|
||||
ImBuf *ibuf;
|
||||
ListBase tiles;
|
||||
@@ -478,12 +478,12 @@ static void undo_imagepaint_push_begin(char *name)
|
||||
static void undo_imagepaint_push_end()
|
||||
{
|
||||
UndoElem *uel;
|
||||
unsigned long totmem, maxmem;
|
||||
uintptr_t totmem, maxmem;
|
||||
|
||||
if(U.undomemory != 0) {
|
||||
/* limit to maximum memory (afterwards, we can't know in advance) */
|
||||
totmem= 0;
|
||||
maxmem= ((unsigned long)U.undomemory)*1024*1024;
|
||||
maxmem= ((uintptr_t)U.undomemory)*1024*1024;
|
||||
|
||||
uel= undobase.last;
|
||||
while(uel) {
|
||||
|
||||
@@ -2695,7 +2695,7 @@ static float cotan_weight(float *v1, float *v2, float *v3)
|
||||
return Inpf(a, b)/clen;
|
||||
}
|
||||
|
||||
void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, long e1, long e2, long e3)
|
||||
void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, int e1, int e2, int e3)
|
||||
{
|
||||
/* Angle opposite e1 */
|
||||
float t1= cotan_weight(v1->co, v2->co, v3->co) / e2;
|
||||
|
||||
Reference in New Issue
Block a user