Preferences.h 1.8 KB

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