]> git.mxchange.org Git - flightgear.git/commitdiff
- replace FGBFI::update with fgUpdateProps
authorcurt <curt>
Tue, 5 Jun 2001 22:12:28 +0000 (22:12 +0000)
committercurt <curt>
Tue, 5 Jun 2001 22:12:28 +0000 (22:12 +0000)
- switched to properties for calculating RPM for model selector
- no longer includes bfi.hxx
- no longer includes keyboard.hxx

src/Main/main.cxx

index 49e90a55c24e1e6f7f4b5430211ee7022960e71d..cfb2a382b8ee87951004f1eec5a9192f3df702d8 100644 (file)
@@ -123,11 +123,10 @@ int objc=0;
 
 #include "version.h"
 
-#include "bfi.hxx"
 #include "fg_init.hxx"
 #include "fg_io.hxx"
+#include "fg_props.hxx"
 #include "globals.hxx"
-#include "keyboard.hxx"
 #include "splash.hxx"
 
 #ifdef macintosh
@@ -314,8 +313,8 @@ void fgInitVisuals( void ) {
 
 // Update all Visuals (redraws anything graphics related)
 void fgRenderFrame( void ) {
-    // Update the BFI.
-    FGBFI::update();
+    // Update the default (kludged) properties.
+    fgUpdateProps();
 
     fgLIGHT *l = &cur_light_params;
     static double last_visibility = -9999;
@@ -646,9 +645,10 @@ void fgRenderFrame( void ) {
 
            if (prop_selector != NULL) {
              int propsel_mask = 0;
+             double rpm = fgGetDouble("/engines/engine0/rpm");
              for (int i = 0; i < acmodel_npropsettings; i++) {
-               if (FGBFI::getRPM() >= acmodel_proprpms[i][0] &&
-                   FGBFI::getRPM() <= acmodel_proprpms[i][1]) {
+               if (rpm >= acmodel_proprpms[i][0] &&
+                   rpm <= acmodel_proprpms[i][1]) {
                  propsel_mask |= 1 << i;
                }
              }