pgtools 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +25 -25
- data/bin/bxm_decoder +2 -2
- data/bin/bxm_encoder +2 -2
- data/bin/clh_convert +2 -2
- data/bin/clp_convert +2 -2
- data/bin/clw_convert +2 -2
- data/bin/dat_creator +2 -2
- data/bin/dat_extractor +2 -2
- data/bin/dat_ls +2 -2
- data/bin/eff_idd_creator +2 -2
- data/bin/eff_idd_extractor +2 -2
- data/bin/exp_convert_wiiu_pc +2 -2
- data/bin/exp_tool +2 -2
- data/bin/mot_convert_wiiu_pc +2 -2
- data/bin/mot_tool +2 -2
- data/bin/pkz_extractor +2 -2
- data/bin/scr_creator +2 -2
- data/bin/scr_extractor +2 -2
- data/bin/wmb_cleanup +2 -2
- data/bin/wmb_common_bones +2 -2
- data/bin/wmb_convert_pc_switch +2 -2
- data/bin/wmb_convert_wiiu_pc +2 -2
- data/bin/wmb_export_assimp +2 -2
- data/bin/wmb_get_bone_map +2 -2
- data/bin/wmb_import_assimp +2 -2
- data/bin/wmb_import_nier +2 -2
- data/bin/wmb_import_wiiu +2 -2
- data/bin/wtb_convert_wiiu_pc +2 -2
- data/bin/wtx_creator +2 -2
- data/bin/wtx_extractor +2 -2
- data/lib/bayonetta/alignment.rb +0 -0
- data/lib/bayonetta/bone.rb +0 -0
- data/lib/bayonetta/bxm.rb +180 -180
- data/lib/bayonetta/clh.rb +159 -159
- data/lib/bayonetta/clp.rb +212 -212
- data/lib/bayonetta/clw.rb +166 -166
- data/lib/bayonetta/dat.rb +261 -261
- data/lib/bayonetta/eff.rb +314 -314
- data/lib/bayonetta/endianness.rb +0 -0
- data/lib/bayonetta/exp.rb +768 -768
- data/lib/bayonetta/linalg.rb +416 -416
- data/lib/bayonetta/material_database.yaml +2581 -2581
- data/lib/bayonetta/mot.rb +763 -763
- data/lib/bayonetta/pkz.rb +63 -63
- data/lib/bayonetta/scr.rb +0 -0
- data/lib/bayonetta/tools/bxm_decoder.rb +23 -23
- data/lib/bayonetta/tools/bxm_encoder.rb +37 -37
- data/lib/bayonetta/tools/clh_convert.rb +60 -60
- data/lib/bayonetta/tools/clp_convert.rb +70 -70
- data/lib/bayonetta/tools/clw_convert.rb +60 -60
- data/lib/bayonetta/tools/dat_creator.rb +57 -57
- data/lib/bayonetta/tools/dat_extractor.rb +94 -94
- data/lib/bayonetta/tools/dat_ls.rb +106 -106
- data/lib/bayonetta/tools/eff_idd_creator.rb +66 -66
- data/lib/bayonetta/tools/eff_idd_extractor.rb +73 -73
- data/lib/bayonetta/tools/exp_convert_wiiu_pc.rb +33 -33
- data/lib/bayonetta/tools/exp_tool.rb +48 -48
- data/lib/bayonetta/tools/mot_convert_wiiu_pc.rb +33 -33
- data/lib/bayonetta/tools/mot_tool.rb +0 -0
- data/lib/bayonetta/tools/pkz_extractor.rb +75 -75
- data/lib/bayonetta/tools/scr_creator.rb +63 -63
- data/lib/bayonetta/tools/scr_extractor.rb +78 -78
- data/lib/bayonetta/tools/wmb_cleanup.rb +250 -250
- data/lib/bayonetta/tools/wmb_common_bones.rb +45 -45
- data/lib/bayonetta/tools/wmb_convert_pc_switch.rb +35 -35
- data/lib/bayonetta/tools/wmb_convert_wiiu_pc.rb +33 -33
- data/lib/bayonetta/tools/wmb_export_assimp.rb +479 -479
- data/lib/bayonetta/tools/wmb_get_bone_map.rb +50 -50
- data/lib/bayonetta/tools/wmb_import_assimp.rb +735 -735
- data/lib/bayonetta/tools/wmb_import_geometry_wiiu_pc.rb +472 -472
- data/lib/bayonetta/tools/wmb_import_nier.rb +309 -309
- data/lib/bayonetta/tools/wtb_convert_wiiu_pc.rb +95 -95
- data/lib/bayonetta/tools/wtb_import_textures.rb +103 -103
- data/lib/bayonetta/tools/wtx_creator.rb +69 -69
- data/lib/bayonetta/tools/wtx_extractor.rb +85 -85
- data/lib/bayonetta/vertex_types.yaml +0 -0
- data/lib/bayonetta/vertex_types2.yaml +0 -0
- data/lib/bayonetta/vertex_types_nier.yaml +145 -145
- data/lib/bayonetta/wmb.rb +2455 -2443
- data/lib/bayonetta/wmb3.rb +759 -759
- data/lib/bayonetta/wtb.rb +481 -481
- data/lib/bayonetta.rb +60 -60
- metadata +2 -2
@@ -1,85 +1,85 @@
|
|
1
|
-
require 'optparse'
|
2
|
-
require 'yaml'
|
3
|
-
require_relative '../../bayonetta'
|
4
|
-
|
5
|
-
$options = {
|
6
|
-
output: nil
|
7
|
-
}
|
8
|
-
|
9
|
-
OptionParser.new do |opts|
|
10
|
-
opts.banner = <<EOF
|
11
|
-
Usage: wtx_extractor file [wtp_file]
|
12
|
-
EOF
|
13
|
-
opts.on("-h", "--help", "Prints this help") do
|
14
|
-
puts opts
|
15
|
-
exit
|
16
|
-
end
|
17
|
-
|
18
|
-
opts.on("-o", "--output=dirname", "directory to output result") do |name|
|
19
|
-
$options[:output] = name
|
20
|
-
end
|
21
|
-
|
22
|
-
end.parse!
|
23
|
-
|
24
|
-
save_pwd = Dir.pwd
|
25
|
-
|
26
|
-
filename = ARGV[0]
|
27
|
-
raise "Invalid file: #{filename}!" unless filename && File.exist?(filename)
|
28
|
-
wtp_name = ARGV[1]
|
29
|
-
raise "Invalid file: #{filename}!" if wtp_name && !File.exist?(wtp_name)
|
30
|
-
|
31
|
-
directory = File.dirname(filename)
|
32
|
-
name = File.basename(filename)
|
33
|
-
ext_name = File.extname(name)
|
34
|
-
|
35
|
-
raise "Invalid file: #{filename}!" unless ext_name == ".wta" || ext_name == ".wtb"
|
36
|
-
|
37
|
-
f = File::open(filename, "rb")
|
38
|
-
|
39
|
-
Dir.chdir(directory)
|
40
|
-
tex_name = File.basename(name, ext_name)
|
41
|
-
if ext_name == ".wta"
|
42
|
-
wtp_name = tex_name + ".wtp" unless wtp_name
|
43
|
-
f_wtp = File::open(wtp_name, "rb")
|
44
|
-
dir_name = tex_name + "_wta"
|
45
|
-
else
|
46
|
-
f_wtp = nil
|
47
|
-
dir_name = tex_name + "_wtb"
|
48
|
-
end
|
49
|
-
if $options[:output]
|
50
|
-
Dir.chdir(save_pwd)
|
51
|
-
Dir.chdir($options[:output])
|
52
|
-
end
|
53
|
-
Dir.mkdir(dir_name) unless Dir.exist?(dir_name)
|
54
|
-
Dir.chdir(dir_name)
|
55
|
-
|
56
|
-
wtb = Bayonetta::WTBFile::new(f, true, f_wtp)
|
57
|
-
|
58
|
-
wtb.each.each_with_index { |info_f, i|
|
59
|
-
info, f = info_f
|
60
|
-
ext, _, _ = info
|
61
|
-
File::open("#{tex_name}_#{"%03d"%i}#{ext}", "wb") { |f2|
|
62
|
-
f.rewind
|
63
|
-
f2.write(f.read)
|
64
|
-
}
|
65
|
-
}
|
66
|
-
Dir.mkdir(".metadata") unless Dir.exist?(".metadata")
|
67
|
-
Dir.chdir(".metadata")
|
68
|
-
File::open("texture_flags.yaml", "w") { |fl|
|
69
|
-
fl.print YAML::dump( wtb.texture_flags )
|
70
|
-
}
|
71
|
-
File::open("texture_idx.yaml", "w") { |fl|
|
72
|
-
fl.print YAML::dump( wtb.texture_idx )
|
73
|
-
}
|
74
|
-
File::open("texture_infos.yaml", "w") { |fl|
|
75
|
-
fl.print YAML::dump( wtb.texture_infos )
|
76
|
-
}
|
77
|
-
File::open("big.yaml","w") { |fl|
|
78
|
-
fl.print YAML::dump( wtb.big )
|
79
|
-
}
|
80
|
-
File::open("unknown.yaml","w") { |fl|
|
81
|
-
fl.print YAML::dump( wtb.unknown )
|
82
|
-
}
|
83
|
-
File::open("extension.yaml", "w") { |fl|
|
84
|
-
fl.print YAML::dump( ext_name )
|
85
|
-
}
|
1
|
+
require 'optparse'
|
2
|
+
require 'yaml'
|
3
|
+
require_relative '../../bayonetta'
|
4
|
+
|
5
|
+
$options = {
|
6
|
+
output: nil
|
7
|
+
}
|
8
|
+
|
9
|
+
OptionParser.new do |opts|
|
10
|
+
opts.banner = <<EOF
|
11
|
+
Usage: wtx_extractor file [wtp_file]
|
12
|
+
EOF
|
13
|
+
opts.on("-h", "--help", "Prints this help") do
|
14
|
+
puts opts
|
15
|
+
exit
|
16
|
+
end
|
17
|
+
|
18
|
+
opts.on("-o", "--output=dirname", "directory to output result") do |name|
|
19
|
+
$options[:output] = name
|
20
|
+
end
|
21
|
+
|
22
|
+
end.parse!
|
23
|
+
|
24
|
+
save_pwd = Dir.pwd
|
25
|
+
|
26
|
+
filename = ARGV[0]
|
27
|
+
raise "Invalid file: #{filename}!" unless filename && File.exist?(filename)
|
28
|
+
wtp_name = ARGV[1]
|
29
|
+
raise "Invalid file: #{filename}!" if wtp_name && !File.exist?(wtp_name)
|
30
|
+
|
31
|
+
directory = File.dirname(filename)
|
32
|
+
name = File.basename(filename)
|
33
|
+
ext_name = File.extname(name)
|
34
|
+
|
35
|
+
raise "Invalid file: #{filename}!" unless ext_name == ".wta" || ext_name == ".wtb"
|
36
|
+
|
37
|
+
f = File::open(filename, "rb")
|
38
|
+
|
39
|
+
Dir.chdir(directory)
|
40
|
+
tex_name = File.basename(name, ext_name)
|
41
|
+
if ext_name == ".wta"
|
42
|
+
wtp_name = tex_name + ".wtp" unless wtp_name
|
43
|
+
f_wtp = File::open(wtp_name, "rb")
|
44
|
+
dir_name = tex_name + "_wta"
|
45
|
+
else
|
46
|
+
f_wtp = nil
|
47
|
+
dir_name = tex_name + "_wtb"
|
48
|
+
end
|
49
|
+
if $options[:output]
|
50
|
+
Dir.chdir(save_pwd)
|
51
|
+
Dir.chdir($options[:output])
|
52
|
+
end
|
53
|
+
Dir.mkdir(dir_name) unless Dir.exist?(dir_name)
|
54
|
+
Dir.chdir(dir_name)
|
55
|
+
|
56
|
+
wtb = Bayonetta::WTBFile::new(f, true, f_wtp)
|
57
|
+
|
58
|
+
wtb.each.each_with_index { |info_f, i|
|
59
|
+
info, f = info_f
|
60
|
+
ext, _, _ = info
|
61
|
+
File::open("#{tex_name}_#{"%03d"%i}#{ext}", "wb") { |f2|
|
62
|
+
f.rewind
|
63
|
+
f2.write(f.read)
|
64
|
+
}
|
65
|
+
}
|
66
|
+
Dir.mkdir(".metadata") unless Dir.exist?(".metadata")
|
67
|
+
Dir.chdir(".metadata")
|
68
|
+
File::open("texture_flags.yaml", "w") { |fl|
|
69
|
+
fl.print YAML::dump( wtb.texture_flags )
|
70
|
+
}
|
71
|
+
File::open("texture_idx.yaml", "w") { |fl|
|
72
|
+
fl.print YAML::dump( wtb.texture_idx )
|
73
|
+
}
|
74
|
+
File::open("texture_infos.yaml", "w") { |fl|
|
75
|
+
fl.print YAML::dump( wtb.texture_infos )
|
76
|
+
}
|
77
|
+
File::open("big.yaml","w") { |fl|
|
78
|
+
fl.print YAML::dump( wtb.big )
|
79
|
+
}
|
80
|
+
File::open("unknown.yaml","w") { |fl|
|
81
|
+
fl.print YAML::dump( wtb.unknown )
|
82
|
+
}
|
83
|
+
File::open("extension.yaml", "w") { |fl|
|
84
|
+
fl.print YAML::dump( ext_name )
|
85
|
+
}
|
File without changes
|
File without changes
|
@@ -1,145 +1,145 @@
|
|
1
|
-
---
|
2
|
-
14:
|
3
|
-
- - - :position
|
4
|
-
- :position_t
|
5
|
-
- - :tangents
|
6
|
-
- :tangents_t
|
7
|
-
- - :mapping
|
8
|
-
- :mapping_t
|
9
|
-
- - :mapping2
|
10
|
-
- :mapping_t
|
11
|
-
- - :color
|
12
|
-
- :color_t
|
13
|
-
- - - :normal
|
14
|
-
- :hnormal_t
|
15
|
-
- - :mapping3
|
16
|
-
- :mapping_t
|
17
|
-
- - :mapping4
|
18
|
-
- :mapping_t
|
19
|
-
12:
|
20
|
-
- - - :position
|
21
|
-
- :position_t
|
22
|
-
- - :tangents
|
23
|
-
- :tangents_t
|
24
|
-
- - :mapping
|
25
|
-
- :mapping_t
|
26
|
-
- - :bone_infos
|
27
|
-
- :bone_infos_t
|
28
|
-
- - :mapping2
|
29
|
-
- :mapping_t
|
30
|
-
- - :color
|
31
|
-
- :color_t
|
32
|
-
- - - :normal
|
33
|
-
- :hnormal_t
|
34
|
-
- - :mapping3
|
35
|
-
- :mapping_t
|
36
|
-
- - :mapping4
|
37
|
-
- :mapping_t
|
38
|
-
- - :mapping5
|
39
|
-
- :mapping_t
|
40
|
-
11:
|
41
|
-
- - - :position
|
42
|
-
- :position_t
|
43
|
-
- - :tangents
|
44
|
-
- :tangents_t
|
45
|
-
- - :mapping
|
46
|
-
- :mapping_t
|
47
|
-
- - :bone_infos
|
48
|
-
- :bone_infos_t
|
49
|
-
- - - :mapping2
|
50
|
-
- :mapping_t
|
51
|
-
- - :color
|
52
|
-
- :color_t
|
53
|
-
- - :normal
|
54
|
-
- :hnormal_t
|
55
|
-
- - :mapping3
|
56
|
-
- :mapping_t
|
57
|
-
10:
|
58
|
-
- - - :position
|
59
|
-
- :position_t
|
60
|
-
- - :tangents
|
61
|
-
- :tangents_t
|
62
|
-
- - :mapping
|
63
|
-
- :mapping_t
|
64
|
-
- - :bone_infos
|
65
|
-
- :bone_infos_t
|
66
|
-
- - - :mapping2
|
67
|
-
- :mapping_t
|
68
|
-
- - :color
|
69
|
-
- :color_t
|
70
|
-
- - :normal
|
71
|
-
- :hnormal_t
|
72
|
-
7:
|
73
|
-
- - - :position
|
74
|
-
- :position_t
|
75
|
-
- - :tangents
|
76
|
-
- :tangents_t
|
77
|
-
- - :mapping
|
78
|
-
- :mapping_t
|
79
|
-
- - :bone_infos
|
80
|
-
- :bone_infos_t
|
81
|
-
- - - :mapping2
|
82
|
-
- :mapping_t
|
83
|
-
- - :normal
|
84
|
-
- :hnormal_t
|
85
|
-
5:
|
86
|
-
- - - :position
|
87
|
-
- :position_t
|
88
|
-
- - :tangents
|
89
|
-
- :tangents_t
|
90
|
-
- - :mapping
|
91
|
-
- :mapping_t
|
92
|
-
- - :bone_infos
|
93
|
-
- :bone_infos_t
|
94
|
-
- - :mapping2
|
95
|
-
- :mapping_t
|
96
|
-
- - :color
|
97
|
-
- :color_t
|
98
|
-
- - - :normal
|
99
|
-
- :hnormal_t
|
100
|
-
- - :mapping3
|
101
|
-
- :mapping_t
|
102
|
-
4:
|
103
|
-
- - - :position
|
104
|
-
- :position_t
|
105
|
-
- - :tangents
|
106
|
-
- :tangents_t
|
107
|
-
- - :mapping
|
108
|
-
- :mapping_t
|
109
|
-
- - :mapping2
|
110
|
-
- :mapping_t
|
111
|
-
- - :color
|
112
|
-
- :color_t
|
113
|
-
- - - :normal
|
114
|
-
- :hnormal_t
|
115
|
-
3:
|
116
|
-
- - - :position
|
117
|
-
- :position_t
|
118
|
-
- - :tangents
|
119
|
-
- :tangents_t
|
120
|
-
- - :mapping
|
121
|
-
- :mapping_t
|
122
|
-
- - :color
|
123
|
-
- :color_t
|
124
|
-
- - - :normal
|
125
|
-
- :hnormal_t
|
126
|
-
1:
|
127
|
-
- - - :position
|
128
|
-
- :position_t
|
129
|
-
- - :tangents
|
130
|
-
- :tangents_t
|
131
|
-
- - :mapping
|
132
|
-
- :mapping_t
|
133
|
-
- - :mapping2
|
134
|
-
- :mapping_t
|
135
|
-
- - - :normal
|
136
|
-
- :hnormal_t
|
137
|
-
0:
|
138
|
-
- - - :position
|
139
|
-
- :position_t
|
140
|
-
- - :tangents
|
141
|
-
- :tangents_t
|
142
|
-
- - :mapping
|
143
|
-
- :mapping_t
|
144
|
-
- - :normal
|
145
|
-
- :hnormal_t
|
1
|
+
---
|
2
|
+
14:
|
3
|
+
- - - :position
|
4
|
+
- :position_t
|
5
|
+
- - :tangents
|
6
|
+
- :tangents_t
|
7
|
+
- - :mapping
|
8
|
+
- :mapping_t
|
9
|
+
- - :mapping2
|
10
|
+
- :mapping_t
|
11
|
+
- - :color
|
12
|
+
- :color_t
|
13
|
+
- - - :normal
|
14
|
+
- :hnormal_t
|
15
|
+
- - :mapping3
|
16
|
+
- :mapping_t
|
17
|
+
- - :mapping4
|
18
|
+
- :mapping_t
|
19
|
+
12:
|
20
|
+
- - - :position
|
21
|
+
- :position_t
|
22
|
+
- - :tangents
|
23
|
+
- :tangents_t
|
24
|
+
- - :mapping
|
25
|
+
- :mapping_t
|
26
|
+
- - :bone_infos
|
27
|
+
- :bone_infos_t
|
28
|
+
- - :mapping2
|
29
|
+
- :mapping_t
|
30
|
+
- - :color
|
31
|
+
- :color_t
|
32
|
+
- - - :normal
|
33
|
+
- :hnormal_t
|
34
|
+
- - :mapping3
|
35
|
+
- :mapping_t
|
36
|
+
- - :mapping4
|
37
|
+
- :mapping_t
|
38
|
+
- - :mapping5
|
39
|
+
- :mapping_t
|
40
|
+
11:
|
41
|
+
- - - :position
|
42
|
+
- :position_t
|
43
|
+
- - :tangents
|
44
|
+
- :tangents_t
|
45
|
+
- - :mapping
|
46
|
+
- :mapping_t
|
47
|
+
- - :bone_infos
|
48
|
+
- :bone_infos_t
|
49
|
+
- - - :mapping2
|
50
|
+
- :mapping_t
|
51
|
+
- - :color
|
52
|
+
- :color_t
|
53
|
+
- - :normal
|
54
|
+
- :hnormal_t
|
55
|
+
- - :mapping3
|
56
|
+
- :mapping_t
|
57
|
+
10:
|
58
|
+
- - - :position
|
59
|
+
- :position_t
|
60
|
+
- - :tangents
|
61
|
+
- :tangents_t
|
62
|
+
- - :mapping
|
63
|
+
- :mapping_t
|
64
|
+
- - :bone_infos
|
65
|
+
- :bone_infos_t
|
66
|
+
- - - :mapping2
|
67
|
+
- :mapping_t
|
68
|
+
- - :color
|
69
|
+
- :color_t
|
70
|
+
- - :normal
|
71
|
+
- :hnormal_t
|
72
|
+
7:
|
73
|
+
- - - :position
|
74
|
+
- :position_t
|
75
|
+
- - :tangents
|
76
|
+
- :tangents_t
|
77
|
+
- - :mapping
|
78
|
+
- :mapping_t
|
79
|
+
- - :bone_infos
|
80
|
+
- :bone_infos_t
|
81
|
+
- - - :mapping2
|
82
|
+
- :mapping_t
|
83
|
+
- - :normal
|
84
|
+
- :hnormal_t
|
85
|
+
5:
|
86
|
+
- - - :position
|
87
|
+
- :position_t
|
88
|
+
- - :tangents
|
89
|
+
- :tangents_t
|
90
|
+
- - :mapping
|
91
|
+
- :mapping_t
|
92
|
+
- - :bone_infos
|
93
|
+
- :bone_infos_t
|
94
|
+
- - :mapping2
|
95
|
+
- :mapping_t
|
96
|
+
- - :color
|
97
|
+
- :color_t
|
98
|
+
- - - :normal
|
99
|
+
- :hnormal_t
|
100
|
+
- - :mapping3
|
101
|
+
- :mapping_t
|
102
|
+
4:
|
103
|
+
- - - :position
|
104
|
+
- :position_t
|
105
|
+
- - :tangents
|
106
|
+
- :tangents_t
|
107
|
+
- - :mapping
|
108
|
+
- :mapping_t
|
109
|
+
- - :mapping2
|
110
|
+
- :mapping_t
|
111
|
+
- - :color
|
112
|
+
- :color_t
|
113
|
+
- - - :normal
|
114
|
+
- :hnormal_t
|
115
|
+
3:
|
116
|
+
- - - :position
|
117
|
+
- :position_t
|
118
|
+
- - :tangents
|
119
|
+
- :tangents_t
|
120
|
+
- - :mapping
|
121
|
+
- :mapping_t
|
122
|
+
- - :color
|
123
|
+
- :color_t
|
124
|
+
- - - :normal
|
125
|
+
- :hnormal_t
|
126
|
+
1:
|
127
|
+
- - - :position
|
128
|
+
- :position_t
|
129
|
+
- - :tangents
|
130
|
+
- :tangents_t
|
131
|
+
- - :mapping
|
132
|
+
- :mapping_t
|
133
|
+
- - :mapping2
|
134
|
+
- :mapping_t
|
135
|
+
- - - :normal
|
136
|
+
- :hnormal_t
|
137
|
+
0:
|
138
|
+
- - - :position
|
139
|
+
- :position_t
|
140
|
+
- - :tangents
|
141
|
+
- :tangents_t
|
142
|
+
- - :mapping
|
143
|
+
- :mapping_t
|
144
|
+
- - :normal
|
145
|
+
- :hnormal_t
|