A version of Celestia that reloads files

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

A version of Celestia that reloads files

Post #1by Brendan » 25.12.2004, 07:44

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

Topic author
Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #2by Brendan » 26.12.2004, 03:07

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

Topic author
Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #3by Brendan » 26.12.2004, 06:41

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

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #4by maxim » 26.12.2004, 13:14

That sounds like a very usefull functionality.
Is there any reason why this can't go into celestias CVS code?

maxim

Topic author
Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #5by Brendan » 29.12.2004, 00:01

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

kikinho
Posts: 330
Joined: 18.09.2004
With us: 20 years 2 months
Location: Eden, a planet in Etheral Universe

Post #6by kikinho » 29.12.2004, 17:05

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.
One day we will swim in the subsurface ocean of Europa and take shower in ethane lakes of Titan.

Topic author
Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #7by Brendan » 30.12.2004, 03:36

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

Topic author
Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #8by Brendan » 14.01.2005, 09:01

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

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #9by maxim » 14.01.2005, 10:35

I wonder if this is to go into default celestias code, or if you are doing a parallel development.

maxim

Toti
Developer
Posts: 338
Joined: 10.02.2004
With us: 20 years 9 months

Post #10by Toti » 14.01.2005, 11:33

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).

Topic author
Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #11by Brendan » 14.01.2005, 21:22

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

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #12by maxim » 14.01.2005, 23:43

You should ask chris to check it.

maxim


Return to “Development”