1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-19 20:38:09 +00:00

hyperpoint adjusted for 3D geometry

This commit is contained in:
?
2019-02-17 18:47:19 +01:00
committed by Zeno Rogue
parent c24fa20334
commit dd0f573ca9
7 changed files with 271 additions and 190 deletions

View File

@@ -444,7 +444,7 @@ void drawTexturedTriangle(SDL_Surface *s, int *px, int *py, glvertex *tv, color_
miny = min(miny, py[i]), maxy = max(maxy, py[i]);
for(int mx=minx; mx<maxx; mx++)
for(int my=miny; my<maxy; my++) {
hyperpoint h = isource * hpxyz(mx, my, 1);
hyperpoint h = isource * point3(mx, my, 1);
if(h[0] >= -1e-7 && h[1] >= -1e-7 && h[2] >= -1e-7) {
hyperpoint ht = target * h;
int tw = texture::config.data.twidth;