From: SourceForge.net <no...@so...> - 2005-05-15 13:32:16
|
Bugs item #1202288, was opened at 2005-05-15 16:10 Message generated for change (Comment added) made by e6y You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=103396&aid=1202288&group_id=3396 Category: OpenGL Group: None Status: Open Resolution: None Priority: 5 Submitted By: Andrey Budko (e6y) Assigned to: Nobody/Anonymous (nobody) Summary: wrong display of a middle texture if it exceeds the boundari Initial Comment: GLBoom bug: wrong display of a middle texture if it exceeds the boundaries of its floor and ceiling. Screenshots before and after my patch: http://www.geocities.com/e6y/files/doom/my/bugs/index. html The patch which corrects this bug: *** D:\gl_main.c Fri Sep 24 20:26:58 2004 --- C:\gl_main.c Sun May 15 16:01:52 2005 *************** void gld_AddWall(seg_t *seg) *** 2289,2294 **** --- 2289,2316 ---- ceiling_height=min(seg->frontsector- >ceilingheight,seg->backsector->ceilingheight)+(seg- >sidedef->rowoffset); floor_height=ceiling_height-(wall.gltexture- >realtexheight<<FRACBITS); } + // CALC_Y_VALUES(wall, lineheight, floor_height, ceiling_height); + // CALC_TEX_VALUES_MIDDLE2S( + // wall, seg, (LINE->flags & ML_DONTPEGBOTTOM)>0, + // segs[seg->iSegID].length, lineheight + // ); + { + int ceiling_height2, floor_height2; + ceiling_height2=min(ceiling_height, min(seg- >frontsector->ceilingheight,seg->backsector- >ceilingheight)); + floor_height2=max(floor_height, max(seg- >frontsector->floorheight, seg->backsector->floorheight)); + CALC_Y_VALUES(wall, lineheight, floor_height2, ceiling_height2); + { + float deltaceiling = (float)fabs((float) ceiling_height2-(float)ceiling_height)/(float)FRACUNIT; + float deltafloor = (float)fabs((float)floor_height2- (float)floor_height)/(float)FRACUNIT; + float linelength = segs[seg->iSegID].length; + wall.flag=GLDWF_M2S; + wall.ul=OU(wall,(seg))+(0.0f); + wall.ur=OU(wall,(seg))+((linelength)/(float)wall. gltexture->buffer_width); + wall.vt=deltaceiling/wall.gltexture->realtexheight; + wall.vb=1.0f-deltafloor/wall.gltexture- >realtexheight; + } + } + CALC_Y_VALUES(wall, lineheight, floor_height, ceiling_height); CALC_TEX_VALUES_MIDDLE2S( wall, seg, (LINE->flags & ML_DONTPEGBOTTOM)>0, ---------------------------------------------------------------------- >Comment By: Andrey Budko (e6y) Date: 2005-05-15 16:32 Message: Logged In: YES user_id=412504 fixed version of the patch ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=103396&aid=1202288&group_id=3396 |