2 Copyright (C) 1999-2006 Id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 Camera plugin for GtkRadiant
24 Copyright (C) 2002 Splash Damage Ltd.
27 #include "globaldefs.h"
29 void Sys_ERROR( char* text, ... );
30 char* UnixToDosPath( char* path );
31 void ExtractFilePath( const char *path, char *dest );
32 const char* ExtractFilename( const char* path );
33 bool FileExists( const char *filename );
34 int Q_stricmp( const char *s1, const char *s2 );
36 typedef int fileHandle_t;
40 void Cbuf_AddText( const char *text );
41 void Cbuf_Execute( void );
52 void CDECL Com_Error( int level, const char *error, ... );
53 void CDECL Com_Printf( const char *msg, ... );
54 void CDECL Com_DPrintf( const char *msg, ... );
55 void *Com_Allocate( int bytes );
56 void Com_Dealloc( void *ptr );
59 int FS_Read( void *buffer, int len, fileHandle_t f );
60 int FS_Write( const void *buffer, int len, fileHandle_t h );
61 int FS_ReadFile( const char *qpath, void **buffer );
62 void FS_FreeFile( void *buffer );
63 int FS_FOpenFileRead( const char *filename, fileHandle_t *file, bool uniqueFILE );
64 fileHandle_t FS_FOpenFileWrite( const char *filename );
65 void FS_FCloseFile( fileHandle_t f );
69 #define DotProduct4( x,y ) ( ( x )[0] * ( y )[0] + ( x )[1] * ( y )[1] + ( x )[2] * ( y )[2] + ( x )[3] * ( y )[3] )
70 #define VectorSubtract4( a,b,c ) ( ( c )[0] = ( a )[0] - ( b )[0],( c )[1] = ( a )[1] - ( b )[1],( c )[2] = ( a )[2] - ( b )[2],( c )[3] = ( a )[3] - ( b )[3] )
71 #define VectorAdd4( a,b,c ) ( ( c )[0] = ( a )[0] + ( b )[0],( c )[1] = ( a )[1] + ( b )[1],( c )[2] = ( a )[2] + ( b )[2],( c )[3] = ( a )[3] + ( b )[3] )
72 #define VectorCopy4( a,b ) ( ( b )[0] = ( a )[0],( b )[1] = ( a )[1],( b )[2] = ( a )[2],( b )[3] = ( a )[3] )
73 #define VectorScale4( v, s, o ) ( ( o )[0] = ( v )[0] * ( s ),( o )[1] = ( v )[1] * ( s ),( o )[2] = ( v )[2] * ( s ),( o )[3] = ( v )[3] * ( s ) )
74 #define VectorMA4( v, s, b, o ) ( ( o )[0] = ( v )[0] + ( b )[0] * ( s ),( o )[1] = ( v )[1] + ( b )[1] * ( s ),( o )[2] = ( v )[2] + ( b )[2] * ( s ),( o )[3] = ( v )[3] + ( b )[3] * ( s ) )
76 #define Vector4Copy( a,b ) ( ( b )[0] = ( a )[0],( b )[1] = ( a )[1],( b )[2] = ( a )[2],( b )[3] = ( a )[3] )
78 #define SnapVector( v ) {v[0] = (int)v[0]; v[1] = (int)v[1]; v[2] = (int)v[2]; }