Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 8970157db614ef79e9afceea1529bfe7 > files > 7

magicmaze-1.0.2-6.fc16.src.rpm

--- maze_src/src/3d.cpp	2002-01-30 18:12:18.000000000 +0100
+++ maze_src.new/src/3d.cpp	2008-01-18 22:47:05.000000000 +0100
@@ -165,11 +165,11 @@
    set_projection_viewport(x, y, w, h);
    set_clip_rect(bmp, x, y, x+w-1, y+h-1);
 
-   float base = distance * cos(pitch);
+   float base = distance * cos(fix(pitch));
 
-   xpos = - base * sin (rotation);
-   ypos = base * cos (rotation);
-   zpos = - distance * sin (pitch);
+   xpos = - base * sin (fix(rotation));
+   ypos = base * cos (fix(rotation));
+   zpos = - distance * sin (fix(pitch));
 
    xfront = -xpos;
    yfront = -ypos;
@@ -180,10 +180,10 @@
    xpos += xtarget;
    ypos += ytarget;
 
-   base = - sin (pitch);
-   xup = - base * sin (rotation);
-   yup = base * cos (rotation);
-   zup = - cos (pitch);
+   base = - sin (fix(pitch));
+   xup = - base * sin (fix(rotation));
+   yup = base * cos (fix(rotation));
+   zup = - cos (fix(pitch));
 
 /*   get_vector_rotation_matrix_f(&roller, xfront, yfront, zfront, roll*128.0/M_PI);
    apply_matrix_f(&roller, 0, -1, 0, &xup, &yup, &zup);
diff -up magicmaze/src/maze_ai.cpp~ magicmaze/src/maze_ai.cpp
--- magicmaze/src/maze_ai.cpp~	2008-02-05 20:08:01.000000000 +0100
+++ magicmaze/src/maze_ai.cpp	2008-02-05 20:08:01.000000000 +0100
@@ -4,6 +4,7 @@
  */
 #include "maze_ai.h"
 #include <stdlib.h>
+#include <string.h>
 #include <memory>
 
 void initMap (map_type &map, int &rest_card, int map_size)