Mercurial > hg > old > magoroku_racing
view libps2.h @ 112:5106d8d12ded
Changing Magoroku.cc
author | Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 09 Jun 2011 14:59:24 +0900 |
parents | 67c843471b77 |
children | 8c96cadde050 |
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; // sprite.hから typedef struct { //__u64 rgbaq; // __u64 rgbaq_addr; // __u64 st; // __u64 st_addr; // __u64 xyz; // __u64 xyz_addr; int xyz_addr; } GsPrim; typedef struct { //ps2_giftag giftag; //__u64 prim; //__u64 prim_addr; GsPrim primData[4]; int x; } GsSpritePacket; //ps2 依存関係内の libps2.h からもってきた typedef struct { GsSpritePacket* gs_packet; unsigned char r, g, b, a; unsigned short cx, cy; unsigned short x, y, w, h; unsigned short tex_x, tex_y, tex_w, tex_h; unsigned long priority; float scale; float rot; } SPRITE; /* 構造体 PolygonInfo が見当たらないので自作 作りは適当 */ typedef struct popygon { int siz; FVECTOR pnts; } PolygonInfo; int malloc_align16(void *head, void *aligned, int size); #endif