diff object.h @ 0:01387a2e419e

initial version
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 07 Dec 2010 15:39:45 +0900
parents
children 972a7f233b23
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/object.h	Tue Dec 07 15:39:45 2010 +0900
@@ -0,0 +1,40 @@
+typedef float FVECTOR[4];
+typedef float FMATRIX[4][4];
+
+typedef struct width_height{
+  short w;
+  short h;
+} WX;;
+
+typedef struct surface {
+  int size;
+  char *name;
+  char *parent_name;
+  short w;
+  short h;
+  FVECTOR *data[4];
+  FVECTOR xyz;
+  FVECTOR angle;
+  int *texture;         // pointer of this surface's texture
+  char *image_name;
+  struct surface *next;
+  struct surface *child;
+  struct surface *parent;
+  struct surface *brother;
+} SURFACE;
+
+typedef struct object {
+  FVECTOR xyz;              // position
+  FVECTOR angle;            // angle
+  FMATRIX transfer;         // transfer matrix
+  char *name;               // object's name
+  char *free_me;            // pointer for free myself
+  SURFACE *surfaces;
+} OBJECT;
+
+void init_object(OBJECT *obj);
+void free_object(OBJECT *obj);
+OBJECT *font;
+OBJECT *chara;
+OBJECT *effect;
+OBJECT *boss;