Totally agree on the 'dont touch a running system' maxime. I am in charge of a C-based software product that's been in existance for 10 years now, and I know how easy it is to break things... I also like 'refactoring' ,) Florian
-----Original Message----- From: fractdev-admin@mailman.xmission.com [mailto:fractdev-admin@mailman.xmission.com]On Behalf Of Rich Sent: Monday, March 10, 2003 2:04 AM To: fractdev@mailman.xmission.com Subject: Re: [Fractdev] Re: CVS
In article <3E6B8995.19900.21F2231@localhost>, Tim Wegner <twegner@swbell.net> writes:
These changes could probably be backported into the main source tree.
Agreed. They're not that extensive in the sense that they are mostly single line changes sprinkled throughout the source.
However there are some fractint features that are so closely coupled to video that they might pose a problem (e.g. orbits or inverse julia windows).
I'd have to double check the source to be sure, but I painstakingly studied every single piece of fractint source that did any video I/O. It all goes through a set of functions which in the DOS port are coded in assembly. That's how xfractint managed to get things ported to X11 -- they replaced all those assembly functions with C versions that did something X-ish. What I did was the same thing, just pushing it a little farther so that instead of calling a function directly, they call the function through a pointer to a struct containing function pointers, with the struct pointer being a global for the "current driver".
This at least gets you to the point where you could switch drivers on the fly.
I recall a story a while ago about an opinion of a fairly iconoclastic software mover and shaker (wish I could remember who it was) who said that legacy code should be treated with respect. It represents uncounted hours of development and debugging, and when people see its defects and bravely sugeest total rewrites, the effort is almost always under-estimated. The whole refinement effort has to be redone.
I totally agree with this sentiment, which is why I started that driver layer effort by studying the source code intensively. Its a huge pile of printout! However, doing this made me appreciate the size of the task and the necessity for "going slow, one step at a time" on the way towards a reincarnated fractint that behaved like a native application on window systems and like the traditional fractint on a DPMI DOS port.
On the other hand, whenever code is touched that area of code can be refactored. And one can make architectural changes - I've done it with fractint several times myself :-)
Refactoring is good! -- "The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ: <http://www.xmission.com/~legalize/book/> izfree: Open source tools for Windows Installer <http://izfree.sourceforge.net>
_______________________________________________ Fractdev mailing list Fractdev@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/fractdev