100 u_int end[4] = {0x11000000, 0, 0, 0};
101 float uv_base[4] = {320.0f, SCREEN_QUARTER_HEIGHT_F, 0.0f, 0.0f};
102 u_int first_kick[4] = {0, 0, 0, 0x14000000};
103 u_int kick[4] = {0, 0, 0, 0x17000000};
104 u_int unpack[4] = {0, 0, 0, 0x6C008000};
105 sceVu0FVECTOR row_step;
106 sceVu0FVECTOR column_step;
107 sceVu0FMATRIX local_to_world;
108 sceVu0FMATRIX local_to_screen;
109 sceVu0FVECTOR vertices[64][64];
110 sceVu0FVECTOR uvs[64][64];
111 sceVu0FVECTOR position;
114 frame.GetLWMatrix(local_to_world);
115 sceVu0MulMatrix(local_to_screen, info->
view_screen, local_to_world);
117 for (i = 0; i < 3; i++) {
122 row_step[3] = column_step[3] = 0.0f;
123 row_step[1] = column_step[1] = 0.0f;
124 pretest(local_to_screen, column_step);
129 for (i = 0, row_f = 0.0f; i <
rows; i++, row_f += 1.0f) {
130 position[0] =
vertex[0][0] + row_f * row_step[0];
131 position[1] =
vertex[0][1] + row_f * row_step[1];
132 position[2] =
vertex[0][2] + row_f * row_step[2];
144 for (j = 0; j <
columns; j++) {
145 Trans_AddCell(*out++, position);
147 (*uv)[0] = uv_base[0] +
distortion * (*above - *here);
148 (*uv)[1] = uv_base[1] +
distortion * (here[0] - here[1]);
155 texture = TexManager.GetTexture(TexManager.GetTextureHandle(
"work", -1));
162 word += SetTEX0(output, *(u_long *) &tex0, 0);
167 for (i = 0, row_f = 0.0f; i <
rows - 1; i++, row_f += 1.0f) {
177 top = (u_long128 *) vertices[i];
178 bottom = (u_long128 *) vertices[i + 1];
179 uv_top = (u_long128 *) uvs[i];
180 uv_bottom = (u_long128 *) uvs[i + 1];
189 vertex_count = count * 2;
193 *(u_long128 *) &output[word] = *(u_long128 *) unpack;
196 unpack_word = word + 3;
202 nloop = vertex_count | 0x8000;
203 tag = &output[word + 4];
213 output[word] = vertex_count;
218 xyz = (u_long128 *) &output[word];
219 rgbaq = xyz + vertex_count;
220 st = rgbaq + vertex_count;
222 for (k = 0; k < count; k++) {
225 *rgbaq++ = *(u_long128 *) rgba;
226 *rgbaq++ = *(u_long128 *) rgba;
228 *st++ = *uv_bottom++;
245 output[unpack_word] |= qwc << 16;
248 *(u_long128 *) &output[word] = *(u_long128 *) first_kick;
251 *(u_long128 *) &output[word] = *(u_long128 *) kick;
263 *(u_long128 *) &output[word] = *(u_long128 *) end;
304 sceVu0FVECTOR box[2];
305 sceVu0FVECTOR corner[4];
311 VectorMaxMin(box[0], box[1], corner[0], corner[1], corner[2], corner[3]);
312 return MGClipBox((
CBoxVu0 *) box);