ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
packet.h
Go to the documentation of this file.
1 
6 #ifndef __PACKET_H__
7 #define __PACKET_H__
8 
9 #include <tamtypes.h>
10 
12 #define QWC_MAX 65535
13 
14 #define PACKET_NORMAL 0x00
15 #define PACKET_UCAB 0x01
16 #define PACKET_SPR 0x02
23 typedef struct {
27  qword_t *data __attribute__((aligned(64)));
28 } packet_t;
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
35 packet_t *packet_init(int qwords, int type);
36 
39 
42 
45 
48 {
49  return packet->data;
50 }
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif /* __PACKET_H__ */
packet_t packet
Definition: font.c:24
u32 data
Definition: libmouse.c:36
packet_t * packet_init(int qwords, int type)
Definition: packet.c:8
void packet_free(packet_t *packet)
Definition: packet.c:63
void packet_reset(packet_t *packet)
Definition: packet.c:89
static qword_t * packet_get_qword(packet_t *packet)
Definition: packet.h:47
qword_t * packet_increment_qwc(packet_t *packet, int num)
u16 type
Definition: packet.h:26
u16 qwc
Definition: packet.h:25
u32 qwords
Definition: packet.h:24
qword_t * data
Definition: packet.h:27
unsigned int u32
Definition: tamtypes.h:30
unsigned short u16
Definition: tamtypes.h:24