1 //******************************************************************************************** 2 //* 3 //* This file is part of Egoboo. 4 //* 5 //* Egoboo is free software: you can redistribute it and/or modify it 6 //* under the terms of the GNU General Public License as published by 7 //* the Free Software Foundation, either version 3 of the License, or 8 //* (at your option) any later version. 9 //* 10 //* Egoboo is distributed in the hope that it will be useful, but 11 //* WITHOUT ANY WARRANTY; without even the implied warranty of 12 //* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 //* General Public License for more details. 14 //* 15 //* You should have received a copy of the GNU General Public License 16 //* along with Egoboo. If not, see <http://www.gnu.org/licenses/>. 17 //* 18 //******************************************************************************************** 19 20 /// @file egoboo_object.c 21 /// @brief Implementation of Egoboo "object" control routines 22 /// @details 23 24 #include "egoboo_object.h" 25 26 #include "egoboo_strutil.h" 27 28 //-------------------------------------------------------------------------------------------- 29 //-------------------------------------------------------------------------------------------- ego_object_ctor(obj_data_t * pbase)30obj_data_t * ego_object_ctor( obj_data_t * pbase ) 31 { 32 if ( NULL == pbase ) return pbase; 33 34 memset( pbase, 0, sizeof( *pbase ) ); 35 36 pbase->_name[0] = CSTR_END; 37 pbase->state = ego_object_invalid; 38 39 return pbase; 40 } 41 42 //-------------------------------------------------------------------------------------------- ego_object_dtor(obj_data_t * pbase)43obj_data_t * ego_object_dtor( obj_data_t * pbase ) 44 { 45 if ( NULL == pbase ) return pbase; 46 47 memset( pbase, 0, sizeof( *pbase ) ); 48 49 pbase->_name[0] = CSTR_END; 50 pbase->state = ego_object_invalid; 51 52 return pbase; 53 }