Mercurial > hg > old > magoroku_racing
view libps2.h @ 93:3731dd016e1b
halfway_3
author | Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 26 May 2011 15:01:13 +0900 |
parents | cb6c6de125dc |
children | b0249b856488 |
line wrap: on
line source
#ifndef LIBPS2_H #define LIBPS2_H //dummy file typedef float FVECTOR[4] __attribute__((aligned (16))); typedef float FMATRIX[4][4] __attribute__((aligned (16))); //object.h よりコピー typedef struct texture { int width; // texture's width size int height; // texture's height size char *name; // texture's name // TexEnv *texenv; char *free_texenv; // pointer for free texenv char *free_image; // pointer for free actual image data // struct ps2_image g_img; // this struct must not be alignmented by 128bit } TEXTURE; //また object.h よりコピー typedef struct surface { int size; char *surf_name; // object's surface name char *tex_name; // surface's texture name TEXTURE *texture; // pointer of this surface's texture // ps2_giftag giftag; // own GIFtag data // ps2_dmatag *packet; // pointer of actual object data char *free_packet; // pointer for free object data struct surface *next; } SURFACE; //またまた object.h よりコピー 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; /* 構造体 PolygonInfo が見当たらないので自作 作りは適当 */ typedef struct popygon { int siz; FVECTOR pnts; } PolygonInfo; extern int malloc_align16(void *head, void *aligned, int size); #endif