Author Topic: compiling a demo version...  (Read 2762 times)

0 Members and 1 Guest are viewing this topic.

compiling a demo version...
Hello,

Just wondering if I can compile the demo version out of the sources? I tried doing so, by first: defining FS2_DEMO in the project's settings. And when compiling, I get an error saying that there are too many initalizers in the file Stats/medal.cpp in the following line (pay attention to the constant NUM_MEDALS):

// coords for indiv medal bitmaps
int Medal_coords[GR_NUM_RESOLUTIONS][NUM_MEDALS][2] = {
   {            // GR_640
      { 89, 47 },               // eps. peg. lib
      { 486, 47 },            // imp. order o' vasuda
      { 129, 130 },            // dist flying cross
      { 208, 132 },            // soc service
      { 361, 131 },            // dist intel cross
      { 439, 130 },            // order of galatea
      { 64, 234 },            // meritorious unit comm.
      { 153, 234 },            // medal of valor
      { 239, 241 },            // gtva leg of honor
      { 326, 240 },            // allied defense citation
      { 411, 234 },            // neb campaign victory
      { 494, 234 },            // ntf campaign victory
      { 189, 80 },            // rank
      { 283, 91 },            // wings
      { 372, 76 },            // bronze kills badge
      { 403, 76 },            // silver kills badge
      { 435, 76 },            // gold kills badge
      { 300, 152 },            // SOC unit crest
   },
   {            // GR_1024
      { 143, 75 },            // eps. peg. lib
      { 777, 75 },            // imp. order o' vasuda
      { 206, 208 },            // dist flying cross
      { 333, 212 },            // soc service
      { 578, 210 },            // dist intel cross
      { 703, 208 },            // order of galatea
      { 103, 374 },            // meritorious unit comm.
      { 245, 374 },            // medal of valor
      { 383, 386 },            // gtva leg of honor
      { 522, 384 },            // allied defense citation
      { 658, 374 },            // neb campaign victory
      { 790, 374 },            // ntf campaign victory
      { 302, 128 },            // rank
      { 453, 146 },            // wings
      { 595, 121 },            // bronze kills badge
      { 646, 121 },            // silver kills badge
      { 696, 121 },            // gold kills badge
      { 480, 244 },            // SOC unit crest
   }
};

after checking out the constants:

#ifdef FS2_DEMO
   #define NUM_MEDALS      16
   #define NUM_MEDALS_FS1      16
#else
   #define NUM_MEDALS      18
   #define NUM_MEDALS_FS1      16
#endif

I noticed the difference in the numbers. I changed it so from 16 to 18 and recompiled (does that make a difference in the game?). The compilation then when fine. But when running the game from the demo data files, I get a splash screen and then a debugging error:

-----------------------------------
Warning: medals.tbl(55):
Error: Required token = [$Wavefile Base:], found [$Wavefile 1: 1_badge_a.wav].

File:C:\fs2_open\code\Parse\PARSELO.CPP
Line: 329

Call stack:
------------------------------------------------------------------
    required_string()    parse_medal_tbl()    game_init()    WinMainSub()    WinMain()    WinMainCRTStartup()    kernel32.dll 77e7eb69()
------------------------------------------------------------------
-------------------------------------------------

I would appreciate if someone could help me fix the thing.

Thanks in advance.

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
compiling a demo version...
Hi dkharrat, welcome to the HLPBB :) :yes: :nod:

I guess I'm a little puzzled why you would want to try to compile the "demo mode" in the first place.  It was a stripped-down teaser package, so people would purchase the full, retail version of FS2.

As such, the demo has a lot of the features disabled; can't recall all of them, but I'm pretty sure medals were not present in the demo (kinda tough to award medals in a campaign with two missions...)  HUD configuration was another missing piece, and maybe the tech room too.  The game engine itself is pretty much fully-functional though.

Anyhow, all this being said, there's really no reason at all to make a "demo build," since (from an engine point of view) identical to the "full" version, with certain features disabled.  You can build the full version and still play the FS2 Demo campaign.  The only thing I can think of is that if you have the FS2 demo version already (and not the retail version) -- the demo VP files probably only contain the screen bitmaps and other elements for the screens that exist in FS2 demo -- i.e., no HUD config screen, etc.

To get back to your original question (build problems), I don't know why you would encounter problems compiling with FS2_DEMO turned on, unless[list=1]
  • There are some other undertermined dependencies within the code (e.g., if you define FS2_DEMO, you have to define and/or undefine a few other things)
  • The code we have will not generate a demo -- this is possible, since the demo was released several months prior to the retail release, and some later changes may have "broken" the FS2_DEMO, but were either not noticed, or deemed not worth fixing by :v:
  • We (the FSSCP) did something to break it -- very likely, since preserving that aspect was never a high priority to me, nor to any of the other developers I assume.
Any of the above are equally likely, IMO.

In fact, in an earlier post, I was advocating eliminating FS2_DEMO and a few other unnecessary build options (INTERPLAY_QA, PRESS_TOUR_BUILD, etc.)

Sorry for the long-winded answer, I guess the short answer is "I don't know" ;)
your source code slave

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
compiling a demo version...
There is a reason-with a demo build, the entire package could be distributed free of charge. Short of the Babylon Project remaking the rest of Freespace 2's multimedia files, I don't see any other way to accomplish this.
-C

  
compiling a demo version...
We solved this problem in our tree.  It requires adding a few more things into the codebase that were apparently removed by Volition somewhere along the way.  I don't remember the exact changes but you can check our cvsweb:

http://cvs.icculus.org/horde/chora/diff.php/src/stats/medals.cpp?rt=freespace2&r1=1.4&r2=1.5&f=h

That link might be a good place to start, it fixes the immediate problem you are facing I think. ("Error: Required token = [$Wavefile Base:], found [$Wavefile 1: 1_badge_a.wav].")