Fixing presets: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
= The Problem =
= The Problem =
The addition of Presets has caused a plethora of problems and many regressions, including breaking support for reset/re-init, but also for saving/loading flights.
The addition of Presets has caused a plethora of problems and many regressions, including breaking support for reset/re-init, but also for saving/loading flights.
{{cquote|
The original reset was a simple kludge that worked fine for a simple program; now that FlightGear is a lot more sophisticated, we need to refactor a bit
rather than just holding things together with scotch tape and bubble gum.
The problem is that right now we have two different approaches - a lot of stuff is handled cleanly in individual modules' update() methods, but a lot of stuff is still handled by hundreds of lines of BASIC-like, hard-to-read spaghetti code in main.cxx and fg_init.cxx (forget OO, it's not even functional programming).
That was the right idea to get started - I'm not a fan of wasting time on an initial OO design that you won't end up using -- but now we need to finish cleaning it up. We need to make this a high priority.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg06781.html|title= Crash on "Reset" function.|author=David Megginson |date=Thu, 06 Jun 2002 05:03:39 -0700}}</ref>|David Megginson}}


= Background =
= Background =

Navigation menu