home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / RESOURCES / KOOB / control / client / initialize.cs < prev    next >
Encoding:
Text File  |  2006-09-25  |  3.1 KB  |  82 lines

  1. //============================================================================
  2. // control/client/initialize.cs
  3. //
  4. //  client control initialization module for 3D2E Koob23 sample game
  5. //
  6. //  Copyright (c) 2003 by Kenneth C.  Finney.
  7. //============================================================================
  8. $pref::Audio::driver = "OpenAL";
  9. $pref::Audio::forceMaxDistanceUpdate = 0;
  10. $pref::Audio::environmentEnabled = 0;
  11. $pref::Audio::masterVolume   = 1.0;
  12. $pref::Audio::channelVolume1 = 1.0;
  13. $pref::Audio::channelVolume2 = 1.0;
  14. $pref::Audio::channelVolume3 = 1.0;
  15. $pref::Audio::channelVolume4 = 1.0;
  16. $pref::Audio::channelVolume5 = 1.0;
  17. $pref::Audio::channelVolume6 = 1.0;
  18. $pref::Audio::channelVolume7 = 1.0;
  19. $pref::Audio::channelVolume8 = 1.0;
  20. $pref::frameMessageLogSize = 40;
  21.  
  22. function InitializeClient()
  23. //----------------------------------------------------------------------------
  24. // Prepare some global client information, fire up the graphics engine,
  25. // and then connect to the server code that is already running in another
  26. // thread.
  27. //----------------------------------------------------------------------------
  28. {
  29.       $Client::GameTypeQuery = "3D2E";
  30.   $Client::MissionTypeQuery = "Any";
  31.  
  32.    Echo("\n++++++++++++ Initializing module: Koob23 client ++++++++++++");
  33.  
  34.    InitBaseClient(); // basic client features defined in the common modules
  35.  
  36.    // Make sure a canvas has been built before any interface definitions are
  37.    // loaded because most controls depend on the canvas to already exist when
  38.    // they are loaded.
  39.  
  40.    InitCanvas("Koob23 - 3D2E Sample Game"); // Start the graphics & audio system.
  41.    PlayMusic(AudioIntroMusicProfile);
  42.    // Interface definitions
  43.    Exec("./profiles.cs");
  44.    Exec("./default_profile.cs");
  45.    Exec("./interfaces/splashscreen.gui");
  46.    Exec("./interfaces/MenuScreen.gui");
  47.    Exec("./interfaces/loadscreen.gui");
  48.    Exec("./interfaces/playerinterface.gui");
  49.    Exec("./interfaces/serverscreen.gui");
  50. Exec("./interfaces/chatbox.gui");///***KCF***24/09/2006 6:11PM
  51. Exec("./interfaces/messagebox.gui");///***KCF***24/09/2006 6:11PM
  52. Exec("./interfaces/remapDlg.gui ");///***KCF***24/09/2006 6:11PM
  53.    Exec("./interfaces/settingsscreen.gui");   
  54.    
  55.    
  56.    Exec("./interfaces/HostScreen.gui");///***KCF***25/09/2006 12:36AM
  57.    Exec("./interfaces/SoloScreen.gui");///***KCF***25/09/2006 12:36AM
  58.  
  59.  
  60.    // Interface scripts
  61.    Exec("./misc/Screens.cs");
  62.       Exec("./misc/serverscreen.cs");
  63.    Exec("./misc/settingsscreen.cs");
  64.  
  65.    Exec("./config.cs");
  66.    Exec("./client.cs");
  67. exec("./misc/chatbox.cs");///***KCF***24/09/2006 6:11PM
  68. exec("./misc/messagebox.cs");///***KCF***24/09/2006 6:11PM
  69.    Exec("./misc/HostScreen.cs");///***KCF***25/09/2006 12:36AM
  70.    Exec("./misc/SoloScreen.cs");///***KCF***25/09/2006 12:35AM
  71.  
  72.  
  73.    // these modules rely on things defined in the common code
  74.    // that are activated in the InitBaseClient() function above
  75.    // so must be located after it has been called
  76.    Exec("./misc/transfer.cs");
  77.    Exec("./misc/connection.cs");
  78.    Exec("./misc/presetkeys.cs");
  79.  SetNetPort(0);
  80.    Canvas.setContent(SplashScreen);
  81. }
  82.