add some refs on line rasterization

GitOrigin-RevId: 728b18264f1414b9bb3d8fb773331b69eca340d4
This commit is contained in:
Colin McMillen 2019-12-15 23:01:19 -05:00
parent 11da38ffa6
commit adaa9edc5e

View File

@ -38,6 +38,8 @@ namespace Jumpy {
Rectangle oldBbox = new Rectangle(oldPosition.X - spriteWidth, oldPosition.Y - 7, spriteWidth * 2, 26);
Rectangle playerBbox = new Rectangle(position.X - spriteWidth, position.Y - 7, spriteWidth * 2, 26);
bool standingOnGround = false;
// TODO: implement https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
// e.g. http://members.chello.at/~easyfilter/bresenham.html
foreach (var rect in collisionTargets) {
playerBbox = new Rectangle(position.X - spriteWidth, position.Y - 7, spriteWidth * 2, 26);