Browse Source

avoid overflowing

master
milang 2 months ago
parent
commit
6324b32867
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/space.c

+ 4
- 3
src/space.c View File

@@ -75,8 +75,8 @@ void fe_vertex_translate(fe_ivertex * v)
}
else
{
v->translated.x*=32768*sgn(v->translated.z);
v->translated.y*=32768*sgn(v->translated.z);
v->translated.x*=256*sgn(v->translated.z);
v->translated.y*=256*sgn(v->translated.z);
}
//(v->translated.x*1024)/v->translated.z;
//(v->translated.y*1024)/v->translated.z;
@@ -86,7 +86,8 @@ void fe_vertex_translate(fe_ivertex * v)

#ifdef USE_LIBLOG
char str[50];
sprintf(str, "Vrtx X:%d Y:%d Z:%d",
sprintf(str, "Vrtx %p\n >> X:%d Y:%d Z:%d\n",
v,
v->translated.x,
v->translated.y,
v->translated.z);

Loading…
Cancel
Save