The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
December 11, 2024, 12:38:56 am
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  Questions about the source code
« previous next »
Pages: [1] Print
Author Topic: Questions about the source code  (Read 2344 times)
Anarchy_Balsac
Zebranky food
*
Offline Offline

Posts: 8



View Profile
Questions about the source code
« on: December 16, 2005, 04:21:37 am »

1). Do you need all 3 of the files specified in the downloads section to modify and compile it, or just one?

2). Does anyone know what the function that defines the kohr-ah death march looks like or is called?

3). Same as #2, but this time I'm looking for the one that periodically subtracts fuel as your travelling.
Logged
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Questions about the source code
« Reply #1 on: December 16, 2005, 09:39:12 am »

1). Do you need all 3 of the files specified in the downloads section to modify and compile it, or just one?
If you mean SDL, SDL_image and libogg/libvorbis, the answer is yes.

Quote
2). Does anyone know what the function that defines the kohr-ah death march looks like or is called?
src/sc2code/gameev.c contains a lot of code related to the Kohr-Ah death march (especially black_urquan_genocide). src/sc2code/globdata.h contains the constant YEARS_TO_KOHRAH_VICTORY that defines when it starts.

Quote
3). Same as #2, but this time I'm looking for the one that periodically subtracts fuel as your travelling.
MoveSIS in src/sc2code/hyper.c calls DeltaSISGauges to decrement fuel.
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Anarchy_Balsac
Zebranky food
*
Offline Offline

Posts: 8



View Profile
Re: Questions about the source code
« Reply #2 on: December 17, 2005, 05:09:08 am »

Hmm, these appear to be libraries rather than actual programs. What programming language do I need then? C or C++? I have C++(though not with me at the moment), but could easily get C if I had to. Still, I need to know which.
Logged
JonoPorter
Enlightened
*****
Offline Offline

Gender: Male
Posts: 656


Don't mess with the US.


View Profile WWW
Re: Questions about the source code
« Reply #3 on: December 17, 2005, 07:37:32 am »

Hmm, these appear to be libraries rather than actual programs. What programming language do I need then? C or C++? I have C++(though not with me at the moment), but could easily get C if I had to. Still, I need to know which.
It's written in C.
Logged

There are none so blind as those who will not see. — Jonathan Swift

My Remake of UQM.
My 2D physics engine
Both are written in C#.
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Questions about the source code
« Reply #4 on: December 17, 2005, 01:58:02 pm »

Hmm, these appear to be libraries rather than actual programs. What programming language do I need then? C or C++? I have C++(though not with me at the moment), but could easily get C if I had to. Still, I need to know which.
I'm assuming "I have C++" means "I have [insert brand here] C++ compiler". Practically every C++ compiler can compile C just fine, so you shouldn't have any problems with that.
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Anarchy_Balsac
Zebranky food
*
Offline Offline

Posts: 8



View Profile
Re: Questions about the source code
« Reply #5 on: December 18, 2005, 01:37:40 am »

Alright, So far I've found these:

if (dx == 0 && dy == 0)
         {
            // Arrived at the victim's home world. Cleanse it.
            TemplatePtr->ShipInfo.ship_flags &= ~(GOOD_GUY | BAD_GUY);
            TemplatePtr->ShipInfo.actual_strength = 0;
         }

if (best_dist < 0 && best_dx == 0 && best_dy == 0)
   {
      // All spheres of influence are gone - game over.
      GLOBAL (CurrentActivity) &= ~IN_BATTLE;
      GLOBAL_SIS (CrewEnlisted) = (COUNT)~0;

      SET_GAME_STATE (KOHR_AH_KILLED_ALL, 1);
   }

Those are the main problem. Although I should be able to eliminate the function altogether without problem.

Lastly, I may as well ask how to make sure my compiler compiles the whole source code, instead of just one file. Oh and where the game decrements fuel when landing on planets(cus that's annoying too).
« Last Edit: December 18, 2005, 01:51:02 am by Anarchy_Balsac » Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!