home *** CD-ROM | disk | FTP | other *** search
/ Superpower (Alt) / SUPERPOWER.iso / q / source / preferen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-08  |  1.8 KB  |  79 lines

  1.  
  2. extern    id    preferences_i;
  3.  
  4. extern    float        lightaxis[3];
  5.  
  6. // these are personal preferences saved in NeXT defaults, not project
  7. // parameters saved in the quake.qe_project file
  8.  
  9. @interface Preferences:Object
  10. {
  11.     id        bspSound_i;            // actual sound object
  12.  
  13. // internal state
  14.     char    projectpath[1024];
  15.     char    bspSound[1024];
  16.     
  17.     BOOL    brushOffset;
  18.     BOOL    showBSP;
  19.  
  20.     float    xlight;
  21.     float    ylight;
  22.     float    zlight;                // 0.0 - 1.0
  23.     
  24.     int        startwad;            // 0 - 2
  25.     
  26. // UI targets
  27.     id    startproject_i;            // TextField    
  28.  
  29.     id    bspSoundField_i;        // TextField of bspSound    
  30.  
  31.     id    brushOffset_i;            // Brush Offset checkbox
  32.     id    showBSP_i;                // Show BSP Output checkbox
  33.     
  34.     id    startwad_i;                // which wad to load at startup
  35.  
  36.     id    xlight_i;                // X-side lighting
  37.     id    ylight_i;                // Y-side lighting
  38.     id    zlight_i;                // Z-side lighting    
  39. }
  40.  
  41. - readDefaults;
  42.  
  43. //
  44. // validate and set methods called by UI or defaults
  45. //
  46. - setProjectPath:(char *)path;
  47. - setBspSoundPath:(char *)path;    // set the path of the soundfile externally
  48. - setShowBSP:(int)state;        // set the state of ShowBSP
  49. - setBrushOffset:(int)state;    // set the state of BrushOffset
  50. - setStartWad:(int)value;        // set start wad (0-2)
  51. - setXlight:(float)value;        // set Xlight value for CameraView
  52. - setYlight:(float)value;        // set Ylight value for CameraView
  53. - setZlight:(float)value;        // set Zlight value for CameraView
  54.  
  55. //
  56. // UI targets
  57. //
  58. - setBspSound:sender;            // use OpenPanel to select sound
  59. - setCurrentProject:sender;        // make current roject the default
  60. - UIChanged: sender;            // target for all checks and fields
  61.  
  62. //
  63. // methods used by other objects to retreive defaults
  64. //
  65. - playBspSound;
  66.  
  67. - (char *)getProjectPath;
  68. - (int)getBrushOffset;            // get the state
  69. - (int)getShowBSP;                // get the state
  70.  
  71. - (float)getXlight;                // get Xlight value
  72. - (float)getYlight;                // get Ylight value
  73. - (float)getZlight;                // get Zlight value
  74.  
  75. - (int)getStartWad;
  76.  
  77.  
  78. @end
  79.