Field render, and field option for image texture, had error due to
returns in middle of calls... this bug was there already for long
while, not much used eh ;)
This commit is contained in:
Ton Roosendaal 2004-10-14 23:03:12 +00:00
parent 24cd65efb0
commit 6346486995

@ -608,10 +608,6 @@ int imagewrap(Tex *tex, float *texvec)
if (ima->ok) {
ibuf = ima->ibuf;
if( (R.flag & R_SEC_FIELD) && (ibuf->flags & IB_fields) ) {
ibuf->rect+= (ibuf->x*ibuf->y);
}
if(tex->imaflag & TEX_IMAROT) {
fy= texvec[0];
fx= texvec[1];
@ -674,9 +670,18 @@ int imagewrap(Tex *tex, float *texvec)
}
}
/* warning, no return before setting back! */
if( (R.flag & R_SEC_FIELD) && (ibuf->flags & IB_fields) ) {
ibuf->rect+= (ibuf->x*ibuf->y);
}
ofs = y * ibuf->x + x;
rect = (char *)( ibuf->rect+ ofs);
if( (R.flag & R_SEC_FIELD) && (ibuf->flags & IB_fields) ) {
ibuf->rect-= (ibuf->x*ibuf->y);
}
Talpha= 0;
if(tex->imaflag & TEX_USEALPHA) {
if(tex->imaflag & TEX_CALCALPHA);
@ -719,9 +724,6 @@ int imagewrap(Tex *tex, float *texvec)
if(tex->flag & TEX_NEGALPHA) Ta= 1.0f-Ta;
if( (R.flag & R_SEC_FIELD) && (ibuf->flags & IB_fields) ) {
ibuf->rect-= (ibuf->x*ibuf->y);
}
}
if(tex->nor) return 3;
@ -1259,10 +1261,6 @@ int imagewraposa(Tex *tex, float *texvec, float *dxt, float *dyt)
ibuf = ima->ibuf;
if( (R.flag & R_SEC_FIELD) && (ibuf->flags & IB_fields) ) {
ibuf->rect+= (ibuf->x*ibuf->y);
}
Talpha= 0;
if(tex->imaflag & TEX_USEALPHA) {
if(tex->imaflag & TEX_CALCALPHA);
@ -1278,7 +1276,6 @@ int imagewraposa(Tex *tex, float *texvec, float *dxt, float *dyt)
fy= texvec[1];
}
if(ibuf->flags & IB_fields) {
if(R.r.mode & R_FIELDS) { /* field render */
if(R.flag & R_SEC_FIELD) { /* correction for 2nd field */
@ -1404,6 +1401,11 @@ int imagewraposa(Tex *tex, float *texvec, float *dxt, float *dyt)
else if(fy<0.0) fy+= 1-(int)(fy);
}
}
/* warning no return! */
if( (R.flag & R_SEC_FIELD) && (ibuf->flags & IB_fields) ) {
ibuf->rect+= (ibuf->x*ibuf->y);
}
/* choice: */
if(tex->imaflag & TEX_MIPMAP) {