gtdemo.h
3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/*
* Copyright 1995, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
*
* UNPUBLISHED -- Rights reserved under the copyright laws of the United
* States. Use of a copyright notice is precautionary only and does not
* imply publication or disclosure.
*
* U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
* in similar or successor clauses in the FAR, or the DOD or NASA FAR
* Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
* 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
*
* THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
* INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
* PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
* GRAPHICS, INC.
*
*/
/*
* File: gtdemo.h
* Creator: hsa@sgi.com
* Create Date: Tue Oct 31 14:21:46 PST 1995
*
*/
#define STATIC_SEGMENT 1
#define CFB_SEGMENT 1
#define SCREEN_HT 240
#define SCREEN_WD 320
#define STACKSIZE 0x2000
/*
* ifdef needed because this file is included by "spec"
*/
#ifdef _LANGUAGE_C
#include <PR/gt.h>
typedef struct {
float x, y, z;
} xyz_t;
/*
* each 'character' is composed of a hierarchical group of these nodes.
* each node describes an individual body part.
*/
typedef struct {
int id;
int flags;
char name[64];
struct Node_t *parent; /* pointer to parent */
struct Node_t *children; /* pointer to descendents */
struct Node_t *sibling; /* next equal-level node */
gtState obj_state;
float xtrns, ytrns, ztrns; /* holds transform information */
float xscl, yscl, zscl;
float xrot, yrot, zrot;
float my_locate[4][4]; /* modeling matrix really */
float my_transform[4][4]; /* movement matrix */
float my_cumulative[4][4];
xyz_t orig_centroid; /* for z-sort */
xyz_t centroid;
Vtx *vtx; /* my points */
gtTriN *tri; /* my triangles */
} Node_t;
/*
* Layout of our dynamic segment
*/
typedef struct {
float projection[4][4];
float viewing[4][4];
Mtx projectionL;
Mtx viewingL;
u16 perspNorm;
LookAt lookat[2];
Hilite hilite[2];
Mtx floor_model[9]; /* for tiled floor */
int free_node; /* next available node */
Node_t obj_nodes[64]; /* node pool */
Node_t *char_order[64]; /* node list in sorted order */
int char_control; /* which guy do we control? */
Node_t *characters[4]; /* "head" of character tree */
gtGfx gtlist[256]; /* turbo display list buffer */
Gfx glist[512]; /* fast display list buffer */
} Dynamic;
/*
* external variables:
*/
extern u64 rdp_output[];
extern u64 rdp_output_len;
extern Dynamic dynamic;
extern Gfx *glistp;
extern u32 frame_count;
extern unsigned short cfb_16_a[];
extern unsigned short cfb_16_b[];
extern unsigned short zbuffer[];
extern Gfx rspinit_dl[];
extern Gfx rdpinit_dl[];
extern Gfx floor_setup_dl[];
extern Gfx floor_geom_dl[];
extern gtState dpGlobalObj;
extern gtState dpFinalObj;
#endif /* _LANGUAGE_C */