struct LogClassMapping {
sgDebugClass c;
string name;
+ LogClassMapping(sgDebugClass cc, string nname) { c = cc; name = nname; }
};
LogClassMapping log_class_mappings [] = {
- {SG_NONE, "none"},
- {SG_TERRAIN, "terrain"},
- {SG_ASTRO, "astro"},
- {SG_FLIGHT, "flight"},
- {SG_INPUT, "input"},
- {SG_GL, "gl"},
- {SG_VIEW, "view"},
- {SG_COCKPIT, "cockpit"},
- {SG_GENERAL, "general"},
- {SG_MATH, "math"},
- {SG_EVENT, "event"},
- {SG_AIRCRAFT, "aircraft"},
- {SG_AUTOPILOT, "autopilot"},
- {SG_IO, "io"},
- {SG_CLIPPER, "clipper"},
- {SG_NETWORK, "network"},
- {SG_UNDEFD, ""}
+ LogClassMapping(SG_NONE, "none"),
+ LogClassMapping(SG_TERRAIN, "terrain"),
+ LogClassMapping(SG_ASTRO, "astro"),
+ LogClassMapping(SG_FLIGHT, "flight"),
+ LogClassMapping(SG_INPUT, "input"),
+ LogClassMapping(SG_GL, "gl"),
+ LogClassMapping(SG_VIEW, "view"),
+ LogClassMapping(SG_COCKPIT, "cockpit"),
+ LogClassMapping(SG_GENERAL, "general"),
+ LogClassMapping(SG_MATH, "math"),
+ LogClassMapping(SG_EVENT, "event"),
+ LogClassMapping(SG_AIRCRAFT, "aircraft"),
+ LogClassMapping(SG_AUTOPILOT, "autopilot"),
+ LogClassMapping(SG_IO, "io"),
+ LogClassMapping(SG_CLIPPER, "clipper"),
+ LogClassMapping(SG_NETWORK, "network"),
+ LogClassMapping(SG_UNDEFD, "")
};
FGFX::init ()
{
FGSoundMgr * mgr = globals->get_soundmgr();
+ int i;
//
// Create and add engine-related sounds.
//
- for (int i = 0; i < MAX_ENGINES; i++) {
+ for (i = 0; i < MAX_ENGINES; i++) {
// Engine
_engine[i] =
new FGSimpleSound(fgGetString("/sim/sounds/engine/path",
// Grab some properties.
////////////////////////////////////////////////////////////////////
- for (int i = 0; i < MAX_ENGINES; i++) {
+ for (i = 0; i < MAX_ENGINES; i++) {
char buf[100];
sprintf(buf, "/engines/engine[%d]/running", i);
_engine_running_prop[i] = fgGetNode(buf, true);
FGFX::update ()
{
FGSoundMgr * mgr = globals->get_soundmgr();
-
+ int i;
////////////////////////////////////////////////////////////////////
// Update the engine sound.
////////////////////////////////////////////////////////////////////
- for (int i = 0; i < MAX_ENGINES; i++) {
+ for (i = 0; i < MAX_ENGINES; i++) {
if (cur_fdm_state->get_num_engines() > 0 &&
_engine_running_prop[i]->getBoolValue()) {
// FIXME: take rotational velocities
// into account as well.
- for (int i = 0; i < totalGear; i++) {
+ for (i = 0; i < totalGear; i++) {
if (cur_fdm_state->get_gear_unit(i)->GetWoW()) {
gearOnGround++;
if (!_gear_on_ground[i]) {