]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake2/qdata_heretic2/qcommon/reference.c
uncrustify! now the code is only ugly on the *inside*
[xonotic/netradiant.git] / tools / quake2 / qdata_heretic2 / qcommon / reference.c
index 3145c0523cf7f1dae250f56dbff0414471753ecb..7be9740dc4bb46ff0ba4556b5d5213f03395f55d 100644 (file)
@@ -1,23 +1,23 @@
 /*
-Copyright (C) 1999-2007 id Software, Inc. and contributors.
-For a list of contributors, see the accompanying CONTRIBUTORS file.
+   Copyright (C) 1999-2007 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
+ */
 
 #include <string.h>
 #include "reference.h"
@@ -27,25 +27,25 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 char *referenceRootNames[] =
 {
-       "elf_Lhandroot",//0
+       "elf_Lhandroot", //0
        "elf_Rhandroot",
        "elf_Rfootroot",
        "elf_Lfootroot",
        "elf_Bstaffroot",
        "elf_bladeroot",
        "elf_hellroot",
-       "StaffBone",//7
+       "StaffBone", //7
        "SwordBone",
        "SpearBone",
        "RFootBone",
        "LFootBone",
-       "hp_backroot",//12
+       "hp_backroot", //12
        "hp_staffroot",
        "hp_lhandroot",
        "hp_rhandroot",
        "hp_rfootroot",
        "hp_lfootroot",
-       "staffroot",//18
+       "staffroot", //18
        "rfootroot",
        "lfootroot",
        "rhandroot",
@@ -56,13 +56,13 @@ char *referenceRootNames[] =
 
 int referenceRootNameOffsets[NUM_REFERENCED] =
 {
-       0,      // CORVUS
-       7,      // INSECT
+       0,  // CORVUS
+       7,  // INSECT
        12, // HIGH PRIESTESS
-       18,     // MORCALAVIN
+       18, // MORCALAVIN
 };
 
-int numReferences[NUM_REFERENCED] = 
+int numReferences[NUM_REFERENCED] =
 {
        NUM_REFERENCES_CORVUS,
        NUM_REFERENCES_INSECT,
@@ -88,37 +88,33 @@ int *jointIDs[NUM_REFERENCED] =
 
 static ResourceManager_t ReferenceMngr;
 
-void InitReferenceMngr()
-{
-#define        REFERENCE_BLOCK_SIZE 8
+void InitReferenceMngr(){
+#define REFERENCE_BLOCK_SIZE 8
        char *dummystr = NULL;
-       
-       ResMngr_Con(&ReferenceMngr, sizeof(LERPedReferences_t), REFERENCE_BLOCK_SIZE, dummystr);
+
+       ResMngr_Con( &ReferenceMngr, sizeof( LERPedReferences_t ), REFERENCE_BLOCK_SIZE, dummystr );
 }
 
-void ReleaseReferenceMngr()
-{
-       ResMngr_Des(&ReferenceMngr);
+void ReleaseReferenceMngr(){
+       ResMngr_Des( &ReferenceMngr );
 }
 
-LERPedReferences_t *LERPedReferences_new(int init_refType)
-{
-       LERPedReferences_t      *newRefs;
+LERPedReferences_t *LERPedReferences_new( int init_refType ){
+       LERPedReferences_t  *newRefs;
 
-       newRefs = ResMngr_AllocateResource(&ReferenceMngr, sizeof(*newRefs));
+       newRefs = ResMngr_AllocateResource( &ReferenceMngr, sizeof( *newRefs ) );
        newRefs->refType = init_refType;
        newRefs->jointIDs = jointIDs[init_refType];
-       newRefs->lastUpdate = -(REF_MINCULLTIME*2.0);
+       newRefs->lastUpdate = -( REF_MINCULLTIME * 2.0 );
 
-       memset(newRefs->references, 0, MAX_REFPOINTS*sizeof(Reference_t));
-       memset(newRefs->oldReferences, 0, MAX_REFPOINTS*sizeof(Reference_t));
+       memset( newRefs->references, 0, MAX_REFPOINTS * sizeof( Reference_t ) );
+       memset( newRefs->oldReferences, 0, MAX_REFPOINTS * sizeof( Reference_t ) );
 
        return newRefs;
 }
 
-void LERPedReferences_delete(LERPedReferences_t *toDelete)
-{
-       ResMngr_DeallocateResource(&ReferenceMngr, toDelete, sizeof(*toDelete));
+void LERPedReferences_delete( LERPedReferences_t *toDelete ){
+       ResMngr_DeallocateResource( &ReferenceMngr, toDelete, sizeof( *toDelete ) );
 }
 
 // end