mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Fix Worms Armageddon
Rewrite https://github.com/gonetz/GLideN64/commit/feb0e53034d54095464687dbae1785 4c9dc3caa6 to fix Worms Armageddon. If upper left value is zero lower right value is scaled width minus one scaled texel. Example: Width = 10.0f, scale is 1.0f urx = 0.0f; lrx = 0.0f + 10.0f/1.0f - 1.0f/1.0f = 9.0f Resulting range is 0-9 for a 10 texel width texture.
This commit is contained in:
parent
e9becd4b8a
commit
c76daedfc0
|
@ -2072,8 +2072,9 @@ struct ObjCoordinates
|
||||||
|
|
||||||
ulx = frameX;
|
ulx = frameX;
|
||||||
uly = frameY;
|
uly = frameY;
|
||||||
lrx = frameX + min(imageW/scaleW, frameW);
|
// Lower right X position is 'X + widthX / scaleW - one_scaled_texelW'
|
||||||
lry = frameY + min(imageH/scaleH, frameH);
|
lrx = frameX + min(imageW/scaleW, frameW) - 1.0f/scaleW;
|
||||||
|
lry = frameY + min(imageH/scaleH, frameH) - 1.0f/scaleH;
|
||||||
|
|
||||||
uls = imageX;
|
uls = imageX;
|
||||||
ult = imageY;
|
ult = imageY;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user