Page 1 of 1

Celestia sound/overlay pack for Windows - DOWNLOAD LINK

Posted: 08.01.2006, 16:32
by Vincent
Hi all,

In order to give Windows users the possibility to test some new patches made by Victor (vhpgomes), Boux and DoctorJoe, I compiled a celestia_patch.exe file and I included it in a celestia_patch.zip pack that you can download here (4.14 Mo) : http://vincent.gian.club.fr/celestia/ce ... tch1.2.zip

The celestia_patch.zip pack contains :
- a celestia_patch.exe file (Jan 4th 2006 CVS - nearly v1.4.1) integrating :
*** Victor's sound patch.
> See : http://celestiaproject.net/forum/viewtopic.php?t=8624
*** Boux's updated overlay texture patch
> See : http://celestiaproject.net/forum/viewtopic.php?t=8620
*** Boux's patch to display semi-transparent constellations
> See : http://celestiaproject.net/forum/viewtopic.php?t=8575
*** Doctorjoe patch that displays start/finish dates for spacecrafts and moves to the start date if you press shift-G :
> See : http://www.gnacademy.org/twiki/bin/view ... Extensions
- a sound folder with 2 sound files : music.wav and comment.wav
- a script folder with the soundtest.cel file
- an alut.dll file from the OpenAL sound library
- a textures folder with the custom.png file
- a celestia.cfg_mod.txt file showing the changes that have to be done in the default celestia.cfg file to display the overlay texture.

How to install the pack :
- Unzip the celestia_patch.zip pack directly in your celestia main folder (it won't delete any of your files)
- Open your celestia.cfg file with a text editor and make the changes specified in the celestia.cfg_mod.txt file
- Download the OpenAL 1.1 Installer for Windows at : http://www.openal.org/openal_webstf/dow ... ALwEAX.exe
- Install the OpenAl library

How to test the new functions :
- Run Celestia from the celestia_patch.exe file
- To test the sound function : open the scripts/soundtest.cel file from the File Menu
- To test the overlay texture : Press the F9 key
- To test the start/finish dates function : select a spacecraft in the Solar system dialog box. Its start/finish dates are now displayed. Press [shift] + G to move to the start date.

Thanks to Boux, Victor, DoctorJoe and GlobeMaker !

Posted: 08.01.2006, 17:39
by GlobeMaker
As we look down through the windows,
we look at the Earth below us.
We begin to realize we have a home planet.
All members of humanity,
all the inhabitants of the planet Earth are one big family with us.

This is one small step for a programmer,
one giant leap for Celestiakind!

Posted: 10.01.2006, 17:13
by Vincent
Apparently, there is a little bug in Doctorjoe's start/end patch :
- When you select a spacecraft (or any object with a start/end date) from the Solar Sytem Dialog Box and you click on the 'Go To' button, you also go to the start date, whereas you should have to press [shift] + G to do this...
- On the other hand, this doesn't happen when you select the spacecraft with the 'OK' button, and then press G to go to this object.

Posted: 11.01.2006, 01:08
by fsgregs
Vincent and all of the developers of these new features.

THANKSSSSSSSSSS :D :D :D :D :D :D :D :D


Frank

Posted: 13.01.2006, 02:52
by fsgregs
Vincent:

Just found something in the patched exe file to point out. Dr. Joe's patch for start and stop dates for spacecraft, also seems to apply to anything that has a start or stop date, including planets and asteroids. Now, you might ask why a planet, moon or asteroid would have a start or stop date. The answer is that on occasion, add-on designers replace one texture of a planet with another, by using an ending date in the ssc file for the first planet view, and a beginning date for the 2nd planet view. Changes in a planet's appearance can be commanded very well by this method.

In my educational activities, for example, I replace our normal Earth with a dramatically different one hundreds of years in the future, simply by setting an ending date for Earth1, and a beginning date for Earth2.

Is there any way to add one line of code to limit the feature in Celestia of displaying the starting and stopping dates to only the class "spacecraft"? It looks funny to see a display in Earth's HUD display showing Earth "finishing" at a particular date 200 years from now.

??? :roll:

Frank

Posted: 13.01.2006, 20:24
by Vincent
Frank,

I was aware the start/finish dates display concerned all classes of objects with a beginning/end definition. And I also use this 'trick' to display different planets Earth with different inclination axis for my educational activity.

Although I'm not a programmer, I spent some time looking at the code and I think I managed to add a few lines to limit the display of start/end dates to spacecrafts only...

Here is the new celestia_pack_up.exe file to download :
http://vincent.gian.club.fr/celestia/ce ... ack_up.exe

Of course, although I've already tested it on my system, I recommend you to try this file for a while before you use it, to avoid bugs during your lessons... :wink:

Posted: 13.01.2006, 21:28
by Vincent
It would be nice if advanced programmers could confirm my changes... :wink:
Here are the lines I added to celestiacore.cpp :

Code: Select all

if (body.getClassification() == 16) {
...
}


By displaying the classification of every class of objects, I found out that the value 16 corresponded to the spacecraft class. If you could confirm... :wink:

Posted: 13.01.2006, 22:18
by selden
Vincent,

Using "magic numbers" is a very bad practice. The value can change at any time by an edit to an include file when more classes have to be added. You should use the equivalent named value, Body::Spacecraft

For example, you might use something like this construct that's in /celengine/render.cpp

Code: Select all

switch (body->getClassification())
        { ...
           case Body::Spacecraft:
                   ... ;
                   break;
         }

Posted: 13.01.2006, 22:25
by Vincent
Selden,

Thanks for your reply.

Before using the body.getClassification() call, I tried exactly the same piece of code you've written - that I also copied from render.cpp - but Celestia couldn't compile then... I'm gonna try it again, and post the error messages I get...

Posted: 13.01.2006, 22:31
by maxim
.... and a quibble:

If for any reason you /have to/ use /magic numbers/, then try to use it like

Code: Select all

if (body.getClassification() == 0x10) {
...
}


Every programmer will recognize this far better as the bitflag value it is - and will be aware of the possible implications as selden described them.

maxim

Posted: 13.01.2006, 22:38
by Vincent
Thanks Maxim, I found this 0x10 number in the spacecraft definition of the body.h file, but I haven't thought of using it... :wink:

Posted: 14.01.2006, 14:17
by Vincent
Selden,

I tried to use again the construct you have suggested :

Code: Select all

switch (body->getClassification())
        { ...
           case Body::Spacecraft:
                   ... ;
                   break;
         }


and I got the same error as the first time :
celestiacore.cpp
celestiacore.cpp(2777) : error C2819: type 'Body' does not have an overloaded member 'operator ->'
..\celengine\body.h(81) : see declaration of 'Body'
did you intend to use '.' instead?
celestiacore.cpp(2777) : error C2227: left of '->getClassification' must point to class/struct/union
type is 'Body'
did you intend to use '.' instead?

That's why I decided to use "magic numbers"...

Posted: 18.01.2006, 21:17
by Vincent
Hi all,

You can download an updated version called celestia_patch1.2.exe here : http://vincent.gian.club.fr/celestia/ce ... tch1.2.exe

This new version includes the following changes :
>> Concerning Victor's sound patch : I've updated the patch according to Victor's suggestion to make Celestia play also .au files.
>> Concerning Doctorjoe's patch that displays start/finish dates : I've added a piece of code to make the start/finish dates display only for spacecrafts and to remove the coma/point in the dates (for people who use the US/DE local setting).

I haven't changed Boux's overlay patch yet since Boux may add a Joystick/overlay toggling function via the F8 key. At the moment, the overlay toggling key is still F9.

As usual, feedbacks are very welcome since I make this version available in order to TEST these new functions... The zip file and the link in my first post have also been updated.