Mercurial > hg > old > magoroku_racing
view libps2.h @ 122:5219bf3d5e71
title_draw
author | e085768 |
---|---|
date | Mon, 27 Jun 2011 19:44:46 +0900 |
parents | b6dc70f6aa7e |
children | 6ef3b0efdeaf |
line wrap: on
line source
#ifndef LIBPS2_H #define LIBPS2_H #include "SceneGraph.h" //dummy file typedef float FVECTOR[4] __attribute__((aligned (16))); //typedef float FMATRIX[4][4] __attribute__((aligned (16))); typedef float** FMATRIX; //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 よりコピー cerium 側にあわせる 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 よりコピー //本当はSceneGraphで代用? 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; */ typedef SceneGraph OBJECT; /* class OBJECT : public SceneGraph{ public: FMATRIX transfer; // transfer matrix // SceanGraph 内の matrix }; */ // 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