Some compile fixes.

Not enough, but covers Object->NSObject and header file protection.
This commit is contained in:
Bill Currie 2010-09-01 19:37:10 +09:00
parent f666f8d27a
commit fe4bf28335
23 changed files with 97 additions and 11 deletions

View file

@ -1,3 +1,6 @@
#ifndef CameraView_h
#define CameraView_h
#include <AppKit/AppKit.h>
#include "mathlib.h"
#include "SetBrush.h"
@ -59,3 +62,4 @@ extern BOOL timedrawing;
@end
#endif//CameraView_h

View file

@ -1,7 +1,9 @@
#ifndef Clipper_h
#define Clipper_h
extern id clipper_i;
@interface Clipper : Object
@interface Clipper : NSObject
{
int num;
vec3_t pos[3];
@ -22,3 +24,4 @@ extern id clipper_i;
@end
#endif//Clipper_h

View file

@ -1,3 +1,5 @@
#ifndef Dict_h
#define Dict_h
#include <AppKit/AppKit.h>
@ -45,3 +47,5 @@ int FindNonwhitespc(FILE *fp);
char *FindWhitespcInBuffer(char *buffer);
char *FindNonwhitespcInBuffer(char *buffer);
#endif//Dict_h

View file

@ -1,3 +1,5 @@
#ifndef DictList_h
#endif DictList_h
#include <AppKit/AppKit.h>
@ -10,3 +12,5 @@
- (id) findDictKeyword:(char *)key;
@end
#endif//DictList_h

View file

@ -1,3 +1,5 @@
#ifndef Entity_h
#define Entity_h
#define MAX_KEY 64
#define MAX_VALUE 128
@ -37,4 +39,4 @@ typedef struct epair_s
@end
#endif//Entity_h

View file

@ -1,3 +1,6 @@
#ifndef EntityClass_h
#define EntityClass_h
#include <AppKit/AppKit.h>
#include "mathlib.h"
@ -5,7 +8,7 @@ typedef enum {esize_model, esize_fixed} esize_t;
#define MAX_FLAGS 8
@interface EntityClass : Object
@interface EntityClass : NSObject
{
char *name;
esize_t esize;
@ -40,3 +43,4 @@ extern id entity_classes_i;
@end
#endif//EntityClass_h

View file

@ -1,3 +1,5 @@
#ifndef InspectorControl_h
#define InspectorControl_h
#include <AppKit/AppKit.h>
@ -17,7 +19,7 @@ typedef enum
extern id inspcontrol_i;
@interface InspectorControl:Object
@interface InspectorControl:NSObject
{
id inspectorView_i; // inspector view
id inspectorSubview_i; // inspector view's current subview (gets replaced)
@ -69,3 +71,5 @@ extern id inspcontrol_i;
@protocol InspectorControl
- windowResized;
@end
#endif//InspectorControl_h

View file

@ -1,3 +1,5 @@
#ifndef KeypairView_h
#define KeypairView_h
extern id keypairview_i;
@ -14,3 +16,5 @@ extern id keypairview_i;
#define LINEHEIGHT 16
@end
#endif//KeypairView_h

View file

@ -1,3 +1,5 @@
#ifndef Map_h
#define Map_h
// Map is a list of Entity objects
@ -66,3 +68,5 @@ extern id map_i;
- selectCompleteEntity: sender;
@end
#endif//Map_h

View file

@ -1,3 +1,6 @@
#ifndef PopScrollView_h
#define PopScrollView_h
#include <AppKit/AppKit.h>
@interface PopScrollView : NSScrollView
@ -9,3 +12,5 @@
- tile;
@end
#endif//PopScrollView_h

View file

@ -1,3 +1,5 @@
#ifndef Preferences_h
#define Preferences_h
extern id preferences_i;
@ -6,7 +8,7 @@ extern float lightaxis[3];
// these are personal preferences saved in NeXT defaults, not project
// parameters saved in the quake.qe_project file
@interface Preferences:Object
@interface Preferences:NSObject
{
id bspSound_i; // actual sound object
@ -76,3 +78,5 @@ extern float lightaxis[3];
@end
#endif//Preferences_h

View file

@ -1,3 +1,5 @@
#ifndef Project_h
#define Project_h
#include <AppKit/AppKit.h>
#include <sys/stat.h>
@ -19,7 +21,7 @@
extern id project_i;
@interface Project:Object
@interface Project:NSObject
{
id projectInfo; // dictionary storage of project info
@ -106,3 +108,5 @@ extern id project_i;
void changeString(char cf,char ct,char *string);
#endif//Project_h

View file

@ -1,3 +1,5 @@
#ifndef QuakeEd_h
#define QuakeEd_h
extern id quakeed_i;
@ -96,3 +98,4 @@ void qprintf (char *fmt, ...); // prints text to cmd_out_i
@end
#endif//QuakeEd_h

View file

@ -1,4 +1,5 @@
#ifndef SetBrush_h
#define SetBrush_h
#define MAX_FACES 16
@ -45,7 +46,7 @@ winding_t *CopyWinding (winding_t *w);
winding_t *NewWinding (int points);
@interface SetBrush : Object
@interface SetBrush : NSObject
{
BOOL regioned; // not active
BOOL selected;
@ -156,3 +157,4 @@ extern float sb_floor_dir, sb_floor_dist;
@end
#endif//SetBrush_h

View file

@ -1,3 +1,5 @@
#ifndef TexturePalette_h
#define TexturePalette_h
typedef union
{
@ -49,7 +51,7 @@ typedef struct
extern id texturepalette_i;
@interface TexturePalette:Object
@interface TexturePalette:NSObject
{
char currentwad[1024];
id textureList_i;
@ -111,3 +113,5 @@ extern id texturepalette_i;
- setDisplayFlag:(int)index to:(int)value;
@end
#endif//TexturePalette_h

View file

@ -1,4 +1,5 @@
#ifndef TextureView_h
#define TextureView_h
@interface TextureView:NSView
{
@ -10,3 +11,5 @@
- deselect;
@end
#endif//TextureView_h

View file

@ -1,3 +1,5 @@
#ifndef Things_h
#define Things_h
#include <AppKit/AppKit.h>
@ -5,7 +7,7 @@ extern id things_i;
#define ENTITYNAMEKEY "spawn"
@interface Things:Object
@interface Things:NSObject
{
id entity_browser_i; // browser
id entity_comment_i; // scrolling text window
@ -40,3 +42,5 @@ extern id things_i;
@end
#endif//Things_h

View file

@ -30,6 +30,9 @@
* which reference objective C methods.
*/
#ifndef UserPath_h
#define UserPath_h
#include <objc/objc.h>
#include <AppKit/NSGraphicsContext.h>
@ -70,3 +73,5 @@ void addPts(UserPath *up, float x, float y);
void addOp(UserPath *up, int op);
void add(UserPath *up, int op, float x, float y);
void checkBBox(UserPath *up, float x, float y);
#endif//UserPath_h

View file

@ -1,3 +1,5 @@
#ifndef XYView_h
#define XYView_h
#include <AppKit/AppKit.h>
#include "mathlib.h"
@ -64,3 +66,5 @@ typedef enum {dr_wire, dr_flat, dr_texture} drawmode_t;
- (float)snapToGrid: (float)f;
@end
#endif//XYView_h

View file

@ -1,3 +1,6 @@
#ifndef ZScrollView_h
#define ZScrollView_h
#include <AppKit/AppKit.h>
@interface ZScrollView : NSScrollView
@ -9,3 +12,5 @@
- tile;
@end
#endif//ZScrollView_h

View file

@ -1,3 +1,5 @@
#ifndef ZView_h
#define ZView_h
#include <AppKit/AppKit.h>
#include "mathlib.h"
@ -40,3 +42,4 @@ extern float zplanedir;
@end
#endif//ZView_h

View file

@ -1,3 +1,5 @@
#ifndef qedefs_h
#define qedefs_h
#include <AppKit/AppKit.h>
#include <ctype.h>
@ -55,3 +57,4 @@ void UngetToken ();
#define FN_CRASHSAVE "/qcache/ErrorSaveMap.map"
#define FN_DEVLOG "/qcache/devlog"
#endif//qedefs_h

View file

@ -1,3 +1,5 @@
#ifndef render_h
#define render_h
extern int r_width, r_height;
extern unsigned *r_picbuffer;
@ -11,3 +13,5 @@ void REN_DrawCameraFace (face_t *idpol);
void REN_DrawXYFace (face_t *idpol);
void REN_BeginCamera (void);
void REN_BeginXY (void);
#endif//render_h