-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sprite sizes #1604
Fix sprite sizes #1604
Conversation
Fixes #936
Subtracting 1 might not be accurate, but it is done anyway in the rest of the code regarding sprites. Just for the record, implementing correct texture coordinate handling for sprites might need reverting this.
The g[s]SPObjRectangle GBI draws texture for the rectangle area defined by the upper left hand corner screen coordinate (objX, objY), and lower right hand corner screen coordinate (objX+imageW/scaleW-1, objY+imageH/scaleH-1). The drawn texture region will be defined by upper left hand corner (0,0) and lower right hand corner (imageW-1, imageH-1). If scaleW and scaleH are 1 << 10, texture will be drawn with equal proportions, without scaling. the texture for the rectangle is -1. https://level42.ca/projects/ultra64/Documentation/man/pro-man/pro25/index25.5.html |
@olivieryuyu Yes, however OpenGL takes the coordinate on the right side of the pixel which is |
I put this fix to 'fix_sprite_size' branch. It needs testing. I foresee regressions in 2D games. Good if I'm wrong. |
Debug build with this branch: |
Appears to fix Magical Tetris Challenge #246: |
done some tests and if regresssion there is, it is not obvious. |
I'll include it to next WIP build. May be somebody will find something wrong. Otherwise it will be put to master. |
Merged: 8940622 |
HLE sprite sizes were 1pixel smaller than LLE sprite sizes when not in copy mode.
Fixes #936
Edit: I made a mistake while testing yesterday. A second commit was necessary.