Skip to content

Commit f3f3ac3

Browse files
committed
Cleanup VCL files > tabs to spaces and trim trailing spaces
1 parent 132f9c4 commit f3f3ac3

21 files changed

+2686
-2706
lines changed

vu1/clip_cull.i

Lines changed: 242 additions & 244 deletions
Large diffs are not rendered by default.

vu1/db_in_db_out.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
_in_buffer .assignc "_double"
3-
_out_buffer .assignc "_double"
2+
_in_buffer .assignc "_double"
3+
_out_buffer .assignc "_double"

vu1/db_in_sb_out.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
_in_buffer .assignc "_double"
3-
_out_buffer .assignc "_single"
2+
_in_buffer .assignc "_double"
3+
_out_buffer .assignc "_single"

vu1/fast.vcl

Lines changed: 149 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -1,183 +1,183 @@
1-
/* Copyright (C) 2000,2001,2002 Sony Computer Entertainment America
2-
3-
This file is subject to the terms and conditions of the GNU Lesser
4-
General Public License Version 2.1. See the file "COPYING" in the
5-
main directory of this archive for more details. */
6-
7-
#include "vu1_mem_linear.h"
8-
9-
.include "db_in_db_out.i"
10-
.include "math.i"
11-
.include "lighting.i"
12-
.include "clip_cull.i"
13-
.include "geometry.i"
14-
.include "io.i"
15-
16-
kInputQPerV .equ 3
17-
kOutputQPerV .equ 3
18-
19-
.init_vf_all
20-
.init_vi_all
21-
22-
.name vsmFast
23-
24-
--enter
25-
--endenter
26-
27-
; ------------------------ initialization ---------------------------------
28-
29-
; there should be from 0 to 3 directional lights, no other types
30-
31-
load_vert_xfrm vert_xform
32-
33-
; build a 3x3 matrix with light directions as the rows and a 3x3 matrix with
34-
; the 3 cols the light diffuse colors
35-
; find the constant color terms (sum of emissive and ambient terms)
36-
37-
load_mat_emm constant_color
38-
39-
; initialize the direction and diffuse color matrices
40-
move.xyz light_dirs[0], vf00
41-
move.xyz light_dirs[1], vf00
42-
move.xyz light_dirs[2], vf00
43-
move.xyz light_colors[0], vf00
44-
move.xyz light_colors[1], vf00
45-
move.xyz light_colors[2], vf00
46-
47-
init_dlt_loop
48-
load_mat_amb material_amb
49-
ibeq num_dir_lights, vi00, finish_init_lid
50-
51-
load_mat_diff material_diff
52-
load_o2wt obj_to_world_transpose
53-
54-
load_lt_pos light_dirs[0]
55-
mul_vec_mat_33 light_dirs[0], obj_to_world_transpose, light_dirs[0]
56-
load_lt_diff light_colors[0]
57-
mul.xyz light_colors[0], light_colors[0], material_diff
58-
load_lt_amb light_amb
59-
mul.xyz local_amb, material_amb, light_amb
60-
add.xyz constant_color, constant_color, local_amb
61-
62-
isubiu num_dir_lights, num_dir_lights, 1
63-
ibeq num_dir_lights, vi00, finish_init_lid
64-
next_dir_light
65-
load_lt_pos light_dirs[1]
66-
mul_vec_mat_33 light_dirs[1], obj_to_world_transpose, light_dirs[1]
67-
load_lt_diff light_colors[1]
68-
mul.xyz light_colors[1], light_colors[1], material_diff
69-
load_lt_amb light_amb
70-
mul.xyz local_amb, material_amb, light_amb
71-
add.xyz constant_color, constant_color, local_amb
72-
73-
isubiu num_dir_lights, num_dir_lights, 1
74-
ibeq num_dir_lights, vi00, finish_init_lid
75-
next_dir_light
76-
load_lt_pos light_dirs[2]
77-
mul_vec_mat_33 light_dirs[2], obj_to_world_transpose, light_dirs[2]
78-
load_lt_diff light_colors[2]
79-
mul.xyz light_colors[2], light_colors[2], material_diff
80-
load_lt_amb light_amb
81-
mul.xyz local_amb, material_amb, light_amb
82-
add.xyz constant_color, constant_color, local_amb
1+
/* Copyright (C) 2000,2001,2002 Sony Computer Entertainment America
2+
3+
This file is subject to the terms and conditions of the GNU Lesser
4+
General Public License Version 2.1. See the file "COPYING" in the
5+
main directory of this archive for more details. */
6+
7+
#include "vu1_mem_linear.h"
8+
9+
.include "db_in_db_out.i"
10+
.include "math.i"
11+
.include "lighting.i"
12+
.include "clip_cull.i"
13+
.include "geometry.i"
14+
.include "io.i"
15+
16+
kInputQPerV .equ 3
17+
kOutputQPerV .equ 3
18+
19+
.init_vf_all
20+
.init_vi_all
21+
22+
.name vsmFast
23+
24+
--enter
25+
--endenter
26+
27+
; ------------------------ initialization ---------------------------------
28+
29+
; there should be from 0 to 3 directional lights, no other types
30+
31+
load_vert_xfrm vert_xform
32+
33+
; build a 3x3 matrix with light directions as the rows and a 3x3 matrix with
34+
; the 3 cols the light diffuse colors
35+
; find the constant color terms (sum of emissive and ambient terms)
36+
37+
load_mat_emm constant_color
38+
39+
; initialize the direction and diffuse color matrices
40+
move.xyz light_dirs[0], vf00
41+
move.xyz light_dirs[1], vf00
42+
move.xyz light_dirs[2], vf00
43+
move.xyz light_colors[0], vf00
44+
move.xyz light_colors[1], vf00
45+
move.xyz light_colors[2], vf00
46+
47+
init_dlt_loop
48+
load_mat_amb material_amb
49+
ibeq num_dir_lights, vi00, finish_init_lid
50+
51+
load_mat_diff material_diff
52+
load_o2wt obj_to_world_transpose
53+
54+
load_lt_pos light_dirs[0]
55+
mul_vec_mat_33 light_dirs[0], obj_to_world_transpose, light_dirs[0]
56+
load_lt_diff light_colors[0]
57+
mul.xyz light_colors[0], light_colors[0], material_diff
58+
load_lt_amb light_amb
59+
mul.xyz local_amb, material_amb, light_amb
60+
add.xyz constant_color, constant_color, local_amb
61+
62+
isubiu num_dir_lights, num_dir_lights, 1
63+
ibeq num_dir_lights, vi00, finish_init_lid
64+
next_dir_light
65+
load_lt_pos light_dirs[1]
66+
mul_vec_mat_33 light_dirs[1], obj_to_world_transpose, light_dirs[1]
67+
load_lt_diff light_colors[1]
68+
mul.xyz light_colors[1], light_colors[1], material_diff
69+
load_lt_amb light_amb
70+
mul.xyz local_amb, material_amb, light_amb
71+
add.xyz constant_color, constant_color, local_amb
72+
73+
isubiu num_dir_lights, num_dir_lights, 1
74+
ibeq num_dir_lights, vi00, finish_init_lid
75+
next_dir_light
76+
load_lt_pos light_dirs[2]
77+
mul_vec_mat_33 light_dirs[2], obj_to_world_transpose, light_dirs[2]
78+
load_lt_diff light_colors[2]
79+
mul.xyz light_colors[2], light_colors[2], material_diff
80+
load_lt_amb light_amb
81+
mul.xyz local_amb, material_amb, light_amb
82+
add.xyz constant_color, constant_color, local_amb
8383

8484
finish_init_lid:
8585

86-
load_glob_amb global_amb
87-
mul.xyz local_amb, material_amb, global_amb
88-
add.xyz constant_color, constant_color, local_amb
86+
load_glob_amb global_amb
87+
mul.xyz local_amb, material_amb, global_amb
88+
add.xyz constant_color, constant_color, local_amb
8989

90-
transpose_33ip light_dirs
90+
transpose_33ip light_dirs
9191

92-
; the alpha of a vert is the material diffuse alpha
93-
load_mat_diff material_diff, w
94-
loi 128.0
95-
muli.w color, material_diff, i
96-
loi 255.0
97-
minii.w color, color, i
92+
; the alpha of a vert is the material diffuse alpha
93+
load_mat_diff material_diff, w
94+
loi 128.0
95+
muli.w color, material_diff, i
96+
loi 255.0
97+
minii.w color, color, i
9898

99-
; use constant_color add to do an ftoi0 on the color
100-
loi 12582912.0
101-
addi.xyz constant_color, constant_color, i
99+
; use constant_color add to do an ftoi0 on the color
100+
loi 12582912.0
101+
addi.xyz constant_color, constant_color, i
102102

103-
; convert alpha to 0-bit fixed point
104-
addi.w color, color, i
103+
; convert alpha to 0-bit fixed point
104+
addi.w color, color, i
105105

106-
init_constants
107-
init_clip_cnst
106+
init_constants
107+
init_clip_cnst
108108

109-
; make translation matrix
110-
sub trans[0], vf00, vf00
111-
sub trans[1], vf00, vf00
112-
sub trans[2], vf00, vf00
113-
maxw.x trans[0], trans[0], vf00
114-
maxw.y trans[1], trans[1], vf00
115-
maxw.z trans[2], trans[2], vf00
116-
move.xyz trans[3], gs_offsets
117-
move.w trans[3], vf00
109+
; make translation matrix
110+
sub trans[0], vf00, vf00
111+
sub trans[1], vf00, vf00
112+
sub trans[2], vf00, vf00
113+
maxw.x trans[0], trans[0], vf00
114+
maxw.y trans[1], trans[1], vf00
115+
maxw.z trans[2], trans[2], vf00
116+
move.xyz trans[3], gs_offsets
117+
move.w trans[3], vf00
118118

119-
; new xform
119+
; new xform
120120

121-
mul_vec_mat_44 new_xform[0], trans, vert_xform[0]
122-
mul_vec_mat_44 new_xform[1], trans, vert_xform[1]
123-
mul_vec_mat_44 new_xform[2], trans, vert_xform[2]
124-
mul_vec_mat_44 new_xform[3], trans, vert_xform[3]
121+
mul_vec_mat_44 new_xform[0], trans, vert_xform[0]
122+
mul_vec_mat_44 new_xform[1], trans, vert_xform[1]
123+
mul_vec_mat_44 new_xform[2], trans, vert_xform[2]
124+
mul_vec_mat_44 new_xform[3], trans, vert_xform[3]
125125

126-
--cont
126+
--cont
127127

128-
; -------------------- transform & texture loop ---------------------------
128+
; -------------------- transform & texture loop ---------------------------
129129

130-
main_loop_lid:
130+
main_loop_lid:
131131

132-
init_io_loop
133-
init_out_buf
132+
init_io_loop
133+
init_out_buf
134134

135-
set_strip_adcs
135+
set_strip_adcs
136136

137137
xform_loop_lid:
138-
--LoopCS 1,3
138+
--LoopCS 1,3
139139

140-
; xform/clip vertex
140+
; xform/clip vertex
141141

142-
load_vert vert
142+
load_vert vert
143143

144-
xform_vert xformed_vert, new_xform, vert
145-
ftoi4.xyz gs_vert, xformed_vert
144+
xform_vert xformed_vert, new_xform, vert
145+
ftoi4.xyz gs_vert, xformed_vert
146146

147-
load_strip_adc strip_adc
148-
set_adc_s gs_vert, strip_adc
147+
load_strip_adc strip_adc
148+
set_adc_s gs_vert, strip_adc
149149

150-
store_xyzf gs_vert
150+
store_xyzf gs_vert
151151

152-
; lighting
152+
; lighting
153153

154-
load_normal normal
155-
mul_vec_mat_33 cosines, light_dirs, normal
156-
max.xyz cosines, cosines, vf00
157-
mul_vec_mat_33 color, light_colors, cosines
158-
add.xyz color, color, constant_color
159-
miniw.xyz color, color, gs_offsets[w]
160-
store_rgba color
154+
load_normal normal
155+
mul_vec_mat_33 cosines, light_dirs, normal
156+
max.xyz cosines, cosines, vf00
157+
mul_vec_mat_33 color, light_colors, cosines
158+
add.xyz color, color, constant_color
159+
miniw.xyz color, color, gs_offsets[w]
160+
store_rgba color
161161

162-
; texture coords
162+
; texture coords
163163

164-
load_stq tex_stq
165-
xform_tex_stq tex_stq, tex_stq, q ; q is from normalize_3
166-
store_stq tex_stq
164+
load_stq tex_stq
165+
xform_tex_stq tex_stq, tex_stq, q ; q is from normalize_3
166+
store_stq tex_stq
167167

168-
next_io
169-
loop_io xform_loop_lid
168+
next_io
169+
loop_io xform_loop_lid
170170

171-
; -------------------- done! -------------------------------
171+
; -------------------- done! -------------------------------
172172

173-
done_lid:
173+
done_lid:
174174

175-
; ---------------- kick packet to GS -----------------------
175+
; ---------------- kick packet to GS -----------------------
176176

177-
kick_to_gs
177+
kick_to_gs
178178

179-
--cont
180-
181-
b main_loop_lid
179+
--cont
182180

183-
.END ; for gasp
181+
b main_loop_lid
182+
183+
.END ; for gasp

0 commit comments

Comments
 (0)