[Change] Just some standardization

This commit is contained in:
Allanis 2013-02-27 23:03:48 +00:00
parent d77fc45e7f
commit f181a7bec6
2 changed files with 6 additions and 6 deletions

View File

@ -13,8 +13,6 @@
#define vect_dist(v,u) MOD((v)->x-(u)->x, (v)->y-(u)->y) #define vect_dist(v,u) MOD((v)->x-(u)->x, (v)->y-(u)->y)
#define vect_odist(v) MOD((v)->x, (v)->y) #define vect_odist(v) MOD((v)->x, (v)->y)
// Misc
double angle_diff(const double ref, double a);
// Base of 2D vectors. // Base of 2D vectors.
typedef struct Vec2_ { typedef struct Vec2_ {
@ -22,6 +20,8 @@ typedef struct Vec2_ {
double mod, angle; // Polar values. double mod, angle; // Polar values.
} Vec2; } Vec2;
// Misc
double angle_diff(const double ref, double a);
void limit_speed(Vec2* vel, const double speed, const double dt); void limit_speed(Vec2* vel, const double speed, const double dt);
// Vector manupulation. // Vector manupulation.

View File

@ -608,10 +608,10 @@ static Fleet* fleet_parse(const xmlNodePtr parent) {
} while((cur = cur->next)); } while((cur = cur->next));
} }
} while((node = node->next)); } while((node = node->next));
#define MELEMENT(o,s) if((o) == NULL) WARN("Fleet '%s' missing '"s"' element", tmp->name) #define MELEMENT(o,s) if(o) WARN("Fleet '%s' missing '"s"' element", tmp->name)
MELEMENT(tmp->ai, "ai"); MELEMENT(tmp->ai==NULL, "ai");
MELEMENT(tmp->faction, "faction"); MELEMENT(tmp->faction==NULL, "faction");
MELEMENT(tmp->pilots, "pilots"); MELEMENT(tmp->pilots==NULL, "pilots");
#undef MELEMENT #undef MELEMENT
return tmp; return tmp;