pgtools 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +25 -25
  3. data/bin/bxm_decoder +2 -2
  4. data/bin/bxm_encoder +2 -2
  5. data/bin/clh_convert +2 -2
  6. data/bin/clp_convert +2 -2
  7. data/bin/clw_convert +2 -2
  8. data/bin/dat_creator +2 -2
  9. data/bin/dat_extractor +2 -2
  10. data/bin/dat_ls +2 -2
  11. data/bin/eff_idd_creator +2 -2
  12. data/bin/eff_idd_extractor +2 -2
  13. data/bin/exp_convert_wiiu_pc +2 -2
  14. data/bin/exp_tool +2 -2
  15. data/bin/mot_convert_wiiu_pc +2 -2
  16. data/bin/mot_tool +2 -2
  17. data/bin/pkz_extractor +2 -2
  18. data/bin/scr_creator +2 -2
  19. data/bin/scr_extractor +2 -2
  20. data/bin/wmb_cleanup +2 -2
  21. data/bin/wmb_common_bones +2 -2
  22. data/bin/wmb_convert_pc_switch +2 -2
  23. data/bin/wmb_convert_wiiu_pc +2 -2
  24. data/bin/wmb_export_assimp +2 -2
  25. data/bin/wmb_get_bone_map +2 -2
  26. data/bin/wmb_import_assimp +2 -2
  27. data/bin/wmb_import_nier +2 -2
  28. data/bin/wmb_import_wiiu +2 -2
  29. data/bin/wtb_convert_wiiu_pc +2 -2
  30. data/bin/wtx_creator +2 -2
  31. data/bin/wtx_extractor +2 -2
  32. data/lib/bayonetta/alignment.rb +0 -0
  33. data/lib/bayonetta/bone.rb +0 -0
  34. data/lib/bayonetta/bxm.rb +180 -180
  35. data/lib/bayonetta/clh.rb +159 -159
  36. data/lib/bayonetta/clp.rb +212 -212
  37. data/lib/bayonetta/clw.rb +166 -166
  38. data/lib/bayonetta/dat.rb +261 -261
  39. data/lib/bayonetta/eff.rb +314 -314
  40. data/lib/bayonetta/endianness.rb +0 -0
  41. data/lib/bayonetta/exp.rb +768 -768
  42. data/lib/bayonetta/linalg.rb +416 -416
  43. data/lib/bayonetta/material_database.yaml +2581 -2581
  44. data/lib/bayonetta/mot.rb +763 -763
  45. data/lib/bayonetta/pkz.rb +63 -63
  46. data/lib/bayonetta/scr.rb +0 -0
  47. data/lib/bayonetta/tools/bxm_decoder.rb +23 -23
  48. data/lib/bayonetta/tools/bxm_encoder.rb +37 -37
  49. data/lib/bayonetta/tools/clh_convert.rb +60 -60
  50. data/lib/bayonetta/tools/clp_convert.rb +70 -70
  51. data/lib/bayonetta/tools/clw_convert.rb +60 -60
  52. data/lib/bayonetta/tools/dat_creator.rb +57 -57
  53. data/lib/bayonetta/tools/dat_extractor.rb +94 -94
  54. data/lib/bayonetta/tools/dat_ls.rb +106 -106
  55. data/lib/bayonetta/tools/eff_idd_creator.rb +66 -66
  56. data/lib/bayonetta/tools/eff_idd_extractor.rb +73 -73
  57. data/lib/bayonetta/tools/exp_convert_wiiu_pc.rb +33 -33
  58. data/lib/bayonetta/tools/exp_tool.rb +48 -48
  59. data/lib/bayonetta/tools/mot_convert_wiiu_pc.rb +33 -33
  60. data/lib/bayonetta/tools/mot_tool.rb +0 -0
  61. data/lib/bayonetta/tools/pkz_extractor.rb +75 -75
  62. data/lib/bayonetta/tools/scr_creator.rb +63 -63
  63. data/lib/bayonetta/tools/scr_extractor.rb +78 -78
  64. data/lib/bayonetta/tools/wmb_cleanup.rb +250 -250
  65. data/lib/bayonetta/tools/wmb_common_bones.rb +45 -45
  66. data/lib/bayonetta/tools/wmb_convert_pc_switch.rb +35 -35
  67. data/lib/bayonetta/tools/wmb_convert_wiiu_pc.rb +33 -33
  68. data/lib/bayonetta/tools/wmb_export_assimp.rb +479 -479
  69. data/lib/bayonetta/tools/wmb_get_bone_map.rb +50 -50
  70. data/lib/bayonetta/tools/wmb_import_assimp.rb +735 -735
  71. data/lib/bayonetta/tools/wmb_import_geometry_wiiu_pc.rb +472 -472
  72. data/lib/bayonetta/tools/wmb_import_nier.rb +309 -309
  73. data/lib/bayonetta/tools/wtb_convert_wiiu_pc.rb +95 -95
  74. data/lib/bayonetta/tools/wtb_import_textures.rb +103 -103
  75. data/lib/bayonetta/tools/wtx_creator.rb +69 -69
  76. data/lib/bayonetta/tools/wtx_extractor.rb +85 -85
  77. data/lib/bayonetta/vertex_types.yaml +0 -0
  78. data/lib/bayonetta/vertex_types2.yaml +0 -0
  79. data/lib/bayonetta/vertex_types_nier.yaml +145 -145
  80. data/lib/bayonetta/wmb.rb +2455 -2443
  81. data/lib/bayonetta/wmb3.rb +759 -759
  82. data/lib/bayonetta/wtb.rb +481 -481
  83. data/lib/bayonetta.rb +60 -60
  84. 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