Skip to content

Commit

Permalink
Add some TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed Jul 4, 2024
1 parent 440cd3f commit 2591e43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion game.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ function renderSprites(display: Display, player: Player, sprites: Array<Sprite>)
const cy = display.backImageData.height*0.5;
const pdist = sprite.position.clone().sub(player.position).dot(dir);
if (pdist < NEAR_CLIPPING_PLANE) continue;
const spriteSize = display.backImageData.height/pdist*1.0;
// TODO: add an ability to positiion the sprite vertically
const spriteSize = display.backImageData.height/pdist*1.0; // TODO: make the size of sprite a parameter
const x1 = Math.floor(cx - spriteSize*0.5);
const x2 = Math.floor(x1 + spriteSize - 1);
const bx1 = Math.max(0, x1);
Expand Down

0 comments on commit 2591e43

Please sign in to comment.