2010-09-01 10:37:10 +00:00
|
|
|
#ifndef Preferences_h
|
|
|
|
#define Preferences_h
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 08:35:25 +00:00
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
extern id preferences_i;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
extern float lightaxis[3];
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
// these are personal preferences saved in NeXT defaults, not project
|
|
|
|
// parameters saved in the quake.qe_project file
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
@interface Preferences: NSObject
|
2010-09-11 23:14:08 +00:00
|
|
|
{
|
2010-09-29 20:09:11 +00:00
|
|
|
id bspSound_i; // actual sound object
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
// internal state
|
2010-10-09 00:49:35 +00:00
|
|
|
NSString *projectpath;
|
|
|
|
NSString *bspSound;
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
BOOL brushOffset;
|
|
|
|
BOOL showBSP;
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
float xlight;
|
|
|
|
float ylight;
|
|
|
|
float zlight; // 0.0 - 1.0
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
int startwad; // 0 - 2
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2003-03-18 19:48:24 +00:00
|
|
|
// UI targets
|
2010-09-29 20:09:11 +00:00
|
|
|
id startproject_i; // TextField
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
id bspSoundField_i; // TextField of bspSound
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
id brushOffset_i; // Brush Offset checkbox
|
|
|
|
id showBSP_i; // Show BSP Output checkbox
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
id startwad_i; // which wad to load at startup
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
id xlight_i; // X-side lighting
|
|
|
|
id ylight_i; // Y-side lighting
|
|
|
|
id zlight_i; // Z-side lighting
|
2010-09-11 12:08:21 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
NSUserDefaults *prefs;
|
2003-03-18 19:48:24 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) readDefaults;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// validate and set methods called by UI or defaults
|
|
|
|
//
|
2010-10-09 01:02:05 +00:00
|
|
|
- (id) setProjectPath: (NSString *)path;
|
2010-10-09 00:49:35 +00:00
|
|
|
- (id) setBspSoundPath: (NSString *)path; // set the path of the soundfile
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) setShowBSP: (int)state; // set the state of ShowBSP
|
|
|
|
- (id) setBrushOffset: (int)state; // set the state of BrushOffset
|
|
|
|
- (id) setStartWad: (int)value; // set start wad (0-2)
|
|
|
|
- (id) setXlight: (float)value; // set Xlight value for CameraView
|
|
|
|
- (id) setYlight: (float)value; // set Ylight value for CameraView
|
|
|
|
- (id) setZlight: (float)value; // set Zlight value for CameraView
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// UI targets
|
|
|
|
//
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) setBspSound: sender; // use OpenPanel to select sound
|
|
|
|
- (id) setCurrentProject: sender; // make current project the default
|
|
|
|
- (id) UIChanged: sender; // target for all checks and fields
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// methods used by other objects to retreive defaults
|
|
|
|
//
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) playBspSound;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-10-09 00:49:35 +00:00
|
|
|
- (NSString *) getProjectPath;
|
2010-09-29 20:09:11 +00:00
|
|
|
- (int) getBrushOffset; // get the state
|
|
|
|
- (int) getShowBSP; // get the state
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (float) getXlight; // get Xlight value
|
|
|
|
- (float) getYlight; // get Ylight value
|
|
|
|
- (float) getZlight; // get Zlight value
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (int) getStartWad;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
@end
|
2010-09-11 10:06:04 +00:00
|
|
|
#endif // Preferences_h
|