1 /*------------------------------------------------------------------
2 object.h: Model Data, Object, and Object-List managment struct & functions
4 XINVADERS 3D - 3d Shoot'em up
5 Copyright (C) 2000 Don Llopis
7 This program 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 This program 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 this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 ------------------------------------------------------------------*/
25 typedef struct MODELSTRUCT MODEL
;
26 typedef struct OBJECTSTRUCT OBJECT
;
27 typedef struct OBJLISTSTRUCT OBJLIST
;
29 typedef void (*PFV1
) ( OBJECT
* );
30 typedef void (*PFV2
) ( OBJECT
*, MATRIX4
);
32 /*------------------------------------------------------------------
34 * Model data management Struct & Funtions
36 ------------------------------------------------------------------*/
47 /*------------------------------------------------------------------
49 * Object Managment Struct & Funtions
51 ------------------------------------------------------------------*/
83 extern OBJECT
* Object_new ( void );
84 extern void Object_delete ( OBJECT
* );
85 extern void Object_init ( OBJECT
* );
87 extern void Object_set_actionfn ( OBJECT
*, PFV1
);
88 extern void Object_set_drawfn ( OBJECT
*, PFV2
);
90 extern void Object_set_model ( OBJECT
*, MODEL
* );
92 extern void Object_set_pos ( OBJECT
*, VECTOR4
);
93 extern void Object_get_pos ( OBJECT
*, VECTOR4
);
95 extern void Object_set_dir ( OBJECT
*, VECTOR4
);
96 extern void Object_get_dir ( OBJECT
*, VECTOR4
);
98 extern void Object_draw ( OBJECT
* );
101 /*------------------------------------------------------------------
103 * gobject list managment struct & routines
105 ------------------------------------------------------------------*/
114 extern void Objlist_clear ( OBJLIST
* );
115 extern void Objlist_add ( OBJLIST
*, OBJECT
* );
116 extern void Objlist_del ( OBJLIST
*, OBJECT
* );
117 extern int Objlist_count ( OBJLIST
* );