]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/camera/camera.h
my own uncrustify run
[xonotic/netradiant.git] / contrib / camera / camera.h
index 4c7f6cb2c1a316cf62b141229dbd8a8956538551..896ca1be704687b94a6aee7453471df4ef530927 100644 (file)
@@ -1,28 +1,28 @@
 /*
-Copyright (C) 1999-2006 Id Software, Inc. and contributors.
-For a list of contributors, see the accompanying CONTRIBUTORS file.
+   Copyright (C) 1999-2006 Id Software, Inc. and contributors.
+   For a list of contributors, see the accompanying CONTRIBUTORS file.
 
-This file is part of GtkRadiant.
+   This file is part of GtkRadiant.
 
-GtkRadiant is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+   GtkRadiant is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
 
-GtkRadiant is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   GtkRadiant is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-You should have received a copy of the GNU General Public License
-along with GtkRadiant; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
+   You should have received a copy of the GNU General Public License
+   along with GtkRadiant; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
 
 /*
-Camera plugin for GtkRadiant
-Copyright (C) 2002 Splash Damage Ltd.
-*/
+   Camera plugin for GtkRadiant
+   Copyright (C) 2002 Splash Damage Ltd.
+ */
 
 #ifndef _CAMERA_H_
 #define _CAMERA_H_
@@ -59,17 +59,17 @@ class CCamera;
 #include "renderer.h"
 #include "listener.h"
 
-extern _QERFuncTable_1    g_FuncTable;
-extern _QERQglTable       g_QglTable;
-extern _QERUITable        g_UITable;
-extern _QERCameraTable         g_CameraTable;
+extern _QERFuncTable_1 g_FuncTable;
+extern _QERQglTable g_QglTable;
+extern _QERUITable g_UITable;
+extern _QERCameraTable g_CameraTable;
 
 extern CRenderer          *Renderer;
 extern CListener          *Listener;
 
 // splinelib
 #define CAMERA_PLUGIN
-#define DotProduct(a,b)                        ((a)[0]*(b)[0]+(a)[1]*(b)[1]+(a)[2]*(b)[2])
+#define DotProduct( a,b )         ( ( a )[0] * ( b )[0] + ( a )[1] * ( b )[1] + ( a )[2] * ( b )[2] )
 
 #include "splines/splines.h"
 
@@ -77,7 +77,7 @@ extern CListener          *Listener;
 #define MAX_CAMERAS 64
 extern idCameraDef camera[MAX_CAMERAS];
 
-extern "C" qboolean loadCamera(int camNum, const       char *name);
+extern "C" qboolean loadCamera( int camNum, const char *name );
 
 #ifndef PATH_MAX
 #define PATH_MAX 260
@@ -89,64 +89,66 @@ extern "C" qboolean loadCamera(int camNum, const    char *name);
 
 class CCamera {
 public:
-  CCamera( int i ) {
-    cam = &camera[i];
-    camnum = i;
-    Init();
-  }
-  ~CCamera();
-
-  void Init() {
-    next = prev = NULL;
-    fileName[0] = '\0';
-               hasbeensaved = 0;
-  }
-
-  idCameraDef *GetCam() {
-    return( cam );
-  }
-  int GetCamNum() {
-    return( camnum );
-  }
-
-  char *GetFileName() {
-    return( fileName );
-  }
-  void SetFileName( const char *name, bool save ) {
-    strcpy( fileName, name );
-    if( save )
-      hasbeensaved = 1;
-  }
-
-  CCamera *GetNext() {
-    return( next );
-  }
-
-  CCamera *GetPrev() {
-    return( prev );
-  }
-
-  void SetNext( CCamera *camera ) {
-    next = camera;
-  }
-  void SetPrev( CCamera *camera ) {
-    prev = camera;
-  }
-
-       int HasBeenSaved() {
-               return( hasbeensaved );
+CCamera( int i ) {
+       cam = &camera[i];
+       camnum = i;
+       Init();
+}
+~CCamera();
+
+void Init() {
+       next = prev = NULL;
+       fileName[0] = '\0';
+       hasbeensaved = 0;
+}
+
+idCameraDef *GetCam() {
+       return( cam );
+}
+int GetCamNum() {
+       return( camnum );
+}
+
+char *GetFileName() {
+       return( fileName );
+}
+void SetFileName( const char *name, bool save ) {
+       strcpy( fileName, name );
+       if ( save ) {
+               hasbeensaved = 1;
        }
-       void HasBeenModified() {
-               if( hasbeensaved )
-                       hasbeensaved = 2;
+}
+
+CCamera *GetNext() {
+       return( next );
+}
+
+CCamera *GetPrev() {
+       return( prev );
+}
+
+void SetNext( CCamera *camera ) {
+       next = camera;
+}
+void SetPrev( CCamera *camera ) {
+       prev = camera;
+}
+
+int HasBeenSaved() {
+       return( hasbeensaved );
+}
+void HasBeenModified() {
+       if ( hasbeensaved ) {
+               hasbeensaved = 2;
        }
+}
 
 protected:
-  idCameraDef *cam;
-  int camnum;
-  CCamera *next, *prev;
-  char fileName[PATH_MAX];
-       int hasbeensaved;       // 0:never saved 1:saved 2:saved, but modified
+idCameraDef *cam;
+int camnum;
+CCamera *next, *prev;
+char fileName[PATH_MAX];
+int hasbeensaved;       // 0:never saved 1:saved 2:saved, but modified
 };
 
 CCamera *AllocCam();