Advertisement
Guest User

Untitled

a guest
Sep 10th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. Index: fredrender.cpp
  2. ===================================================================
  3. --- fredrender.cpp (revision 9165)
  4. +++ fredrender.cpp (working copy)
  5. @@ -65,6 +65,7 @@
  6. #define MAX_FRAMETIME (F1_0/4) // Frametime gets saturated at this.
  7. #define MIN_FRAMETIME (F1_0/120)
  8. #define LOLLIPOP_SIZE 2.5f
  9. +#define CONVERT_DEGREES 57.29578f // conversion factor from radians to degrees
  10.  
  11. const float FRED_DEFAULT_HTL_FOV = 0.485f;
  12. const float FRED_BRIEFING_HTL_FOV = 0.325f;
  13. @@ -1447,7 +1448,7 @@
  14. int x, y, w, h, inst;
  15. vec3d pos;
  16. vertex v;
  17. - angles a;
  18. + angles a, a_deg; //a is in rads, a_deg is in degrees
  19.  
  20. g3_end_frame(); // ** Accounted for
  21.  
  22. @@ -1530,9 +1531,14 @@
  23. inst = Objects[Cursor_over].instance;
  24. if ((Objects[Cursor_over].type == OBJ_SHIP) || (Objects[Cursor_over].type == OBJ_START)) {
  25. vm_extract_angles_matrix(&a, &Objects[Cursor_over].orient);
  26. +
  27. + a_deg.h = a.h * CONVERT_DEGREES; // convert angles to more readable degrees
  28. + a_deg.p = a.p * CONVERT_DEGREES;
  29. + a_deg.b = a.b * CONVERT_DEGREES;
  30. +
  31. sprintf(buf, "%s\n%s\n( %.1f , %.1f , %.1f ) \nHeading: %.2f\nPitch: %.2f\nBank: %.2f",
  32. Ships[inst].ship_name, Ship_info[Ships[inst].ship_info_index].short_name,
  33. - pos.xyz.x, pos.xyz.y, pos.xyz.z, a.h, a.p, a.b);
  34. + pos.xyz.x, pos.xyz.y, pos.xyz.z, a_deg.h, a_deg.p, a_deg.b);
  35.  
  36. } else if (Objects[Cursor_over].type == OBJ_WAYPOINT) {
  37. int idx;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement