Page 1 of 1

A version of Celestia that reloads files

Posted: 25.12.2004, 07:44
by Brendan
This version of Celestia displays extra information about some bodies and allows mass reloads of dscs, star data files along with ssc files, the asterisms file and the boundaries file or all of those.
The zip file has a ssc file that adds extra information about bodies, the modified source files and a Windows executable. Diff can show where the code was changed.

http://www.rit.edu/~bjr5096/celestia/BCelestia.html

Things seem to work for me, but go ahead and test it if you want to.

Happy holidays. :-D

Brendan

Posted: 26.12.2004, 03:07
by Brendan
I uploaded the zip file again to fix the mesage printed when the time rate is increased. I accidently messed up the string for the message, but fixed it. :oops:

Brendan

Posted: 26.12.2004, 06:41
by Brendan
Now that I have done my xmas partying, I'll write about how I changed the source to get Celestia to reload files without needing to restart.
I took pieces of code out of celestiacore.cpp's initSimulation function and put them in several functions that each loaded different things. One loaded star and ssc files, one load dsc files and two more each loaded asterisms and boundaries. There is also a function that reloads all of those.
Each of them has a boolean value argument that is used to determine if celestia.cfg should be reloaded or not. If it is true, another function, loadConfig, is called to reload celestia.cfg.
The initSimulation function uses false for the arguments because it had already called loadConfig. There is code in winmain.cpp that calls these functions when the reload options in the file menu are selected. The argument true is used to cause celestia.cfg to be reloaded when those functions are called through the menu.
I toyed around with the parameters for a star. I made my K0 star into a O5 star and then a M9 supergiant without closing and reopening Celestia. 8) When I made it a T9 body thousands of light years away with a very negative magnitude, it wasn't drawn because it ended up being almost a million light years in radius. It engulfed the entire galaxy! :o Celestia showed the surface temperature as 750 K and the temperatures calculated for the planets inside it was trillions and trillions K, as hot as the early universe. 8O

Brendan

Posted: 26.12.2004, 13:14
by maxim
That sounds like a very usefull functionality.
Is there any reason why this can't go into celestias CVS code?

maxim

Posted: 29.12.2004, 00:01
by Brendan
It would be nice if we could also select which files to reload. Now it would be easy to have menu items to reload files listed in celestia.cfg and to reload those in the extras directory. To select which extras directories to reload, a new dialog box would be needed.

Brendan

Posted: 29.12.2004, 17:05
by kikinho
The extra information should be added to the next Celestia versions. :D
The extra information doesn't occupate much of the screen. Only when using low resolution.

Posted: 30.12.2004, 03:36
by Brendan
Sometime, someone could try making a new dialog box for a custom info display mode that lets us select what to display and in what order.

Brendan

Posted: 14.01.2005, 09:01
by Brendan
I made a new BCelestia that uses the star flare texture specified by the FlareTexture option in celestia.cfg and can reload the flare texture. It's much quicker to compare different flares now.
The main changes were made in the render, celestiacore and configfile cpp files.

http://www.rit.edu/~bjr5096/celestia/BCelestia.html

Brendan

Posted: 14.01.2005, 10:35
by maxim
I wonder if this is to go into default celestias code, or if you are doing a parallel development.

maxim

Posted: 14.01.2005, 11:33
by Toti
This seems to be a very useful feature, specially when tweaking user-made trajectories, placing objects at specific positions, etc.
Since this is a trial and error procedure, having to close and reopen Celestia each time for the changes to take effect is tiresome.
Also, it could be the basis for activating/deactivating addon packages and sets of addons from inside the program (e.g. using a dialog box).

Posted: 14.01.2005, 21:22
by Brendan
Currently, it is a parallel development becuase Chris didn't tell me anything about putting it into the cvs version.
Yeah, it would be nice to have a dialog box, so I'll look at the dialog boxes already in Celestia and uses those as examples.

Brendan

Posted: 14.01.2005, 23:43
by maxim
You should ask chris to check it.

maxim