# HG changeset patch # User e085768 # Date 1310022621 -32400 # Node ID d9e3137e70a0562d2526c1ed4b0269183f4652c9 # Parent f129e644ec29db06499304915ed3c36b5ea8b9c0 xml name change diff -r f129e644ec29 -r d9e3137e70a0 #libps2.h# --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/#libps2.h# Thu Jul 07 16:10:21 2011 +0900 @@ -0,0 +1,130 @@ + +#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[4][4]; +//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; //’¥Ý’¥ê’¥´’¥ó’¡© + + // SceneGraph’Æâ’¤Îmatrix’¤Ë’ÅÏ’¤¹ + FMATRIX transfer; + +} OBJECT; + + + +//typedef SceneGraph OBJECT; + +/* +class OBJECT : public SceneGraph{ + public: + FMATRIX transfer; // transfer matrix SceanGraph ’Æ⒤Πmatrix + + void setTransfer(void) + { + memcpy(transfer, this->matrix, sizeof(FMATRIX) ); + } + + void setMatrix(void) + { + memcpy(transfer, this->matrix, sizeof(FMATRIX) ); + } + +}; +*/ + +// 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;