pspsdk-1.0+beta2
Main Page
Modules
Data Structures
Files
File List
Globals
guInternal.h
Go to the documentation of this file.
1
/*
2
* PSP Software Development Kit - http://www.pspdev.org
3
* -----------------------------------------------------------------------
4
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5
*
6
* Copyright (c) 2005 Jesper Svennevid
7
*/
8
9
#ifndef __guInternal_h__
10
#define __guInternal_h__
11
12
#include "
pspgu.h
"
13
14
typedef
void (*
GuCallback
)(int);
15
16
typedef
struct
17
{
18
GuCallback
sig
;
19
GuCallback
fin
;
20
short
signal_history[16];
21
int
signal_offset
;
22
int
kernel_event_flag
;
23
int
ge_callback_id
;
24
25
GuSwapBuffersCallback
swapBuffersCallback
;
26
int
swapBuffersBehaviour
;
27
}
GuSettings
;
28
29
typedef
struct
30
{
31
unsigned
int
*
start
;
32
unsigned
int
*
current
;
33
int
parent_context
;
34
}
GuDisplayList
;
35
36
typedef
struct
37
{
38
GuDisplayList
list
;
39
int
scissor_enable
;
40
int
scissor_start[2];
41
int
scissor_end[2];
42
int
near_plane
;
43
int
far_plane
;
44
int
depth_offset
;
45
int
fragment_2x
;
46
int
texture_function
;
47
int
texture_proj_map_mode
;
48
int
texture_map_mode
;
49
int
sprite_mode[4];
50
unsigned
int
clear_color
;
51
unsigned
int
clear_stencil
;
52
unsigned
int
clear_depth
;
53
int
texture_mode
;
54
}
GuContext
;
55
56
typedef
struct
57
{
58
int
pixel_size
;
59
int
frame_width
;
60
void
*
frame_buffer
;
61
void
*
disp_buffer
;
62
void
*
depth_buffer
;
63
int
depth_width
;
64
int
width
;
65
int
height
;
66
}
GuDrawBuffer
;
67
68
typedef
struct
69
{
70
/* row 0 */
71
72
unsigned
char
enable
;
// Light enable
73
unsigned
char
type
;
// Light type
74
unsigned
char
xpos
;
// X position
75
unsigned
char
ypos
;
// Y position
76
77
/* row 1 */
78
79
unsigned
char
zpos
;
// Z position
80
unsigned
char
xdir
;
// X direction
81
unsigned
char
ydir
;
// Y direction
82
unsigned
char
zdir
;
// Z direction
83
84
/* row 2 */
85
86
unsigned
char
ambient
;
// Ambient color
87
unsigned
char
diffuse
;
// Diffuse color
88
unsigned
char
specular
;
// Specular color
89
unsigned
char
constant
;
// Constant attenuation
90
91
/* row 3 */
92
93
unsigned
char
linear
;
// Linear attenuation
94
unsigned
char
quadratic
;
// Quadratic attenuation
95
unsigned
char
exponent
;
// Light exponent
96
unsigned
char
cutoff
;
// Light cutoff
97
}
GuLightSettings
;
98
99
extern
unsigned
int
gu_current_frame
;
100
extern
GuContext
gu_contexts
[3];
101
extern
int
ge_list_executed
[2];
102
extern
void
*
ge_edram_address
;
103
extern
GuSettings
gu_settings
;
104
extern
GuDisplayList
*
gu_list
;
105
extern
int
gu_curr_context
;
106
extern
int
gu_init
;
107
extern
int
gu_display_on
;
108
extern
int
gu_call_mode
;
109
extern
int
gu_states
;
110
extern
GuDrawBuffer
gu_draw_buffer
;
111
112
extern
unsigned
int
*
gu_object_stack
[];
113
extern
int
gu_object_stack_depth
;
114
115
extern
GuLightSettings
light_settings
[4];
116
117
void
sendCommandi
(
int
cmd,
int
argument);
118
void
sendCommandiStall
(
int
cmd,
int
argument);
119
void
sendCommandf
(
int
cmd,
float
argument);
120
121
void
callbackSig
(
int
id
,
void
* arg);
122
void
callbackFin
(
int
id
,
void
* arg);
123
void
resetValues
();
124
125
#endif
src
gu
guInternal.h
Generated on Sat Apr 9 2016 07:00:25 for pspsdk-1.0+beta2 by
1.8.1.2