Skip to content

Commit b79cef5

Browse files
authored
Update Sudden Attack 2 Support (#127)
* Support newer version * Update README.md
1 parent 26d1b67 commit b79cef5

4 files changed

Lines changed: 64 additions & 14 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ UELib supports these kinds of content, but may vary from game to game:
247247
| [Might & Magic Heroes VII](https://en.wikipedia.org/wiki/Might_%26_Magic_Heroes_VII) | 12161 | 868/004 | (Signature and custom features are not supported) ||
248248
| Bombshell | 11767 | 870/000 | ||
249249
| Orcs Must Die! Unchained | 20430 | 870/000 | ||
250-
| Sudden Attack 2 | 10897 | 870/108 | ||||
250+
| Sudden Attack 2 | 10897 | 870/108-109 | ||||
251251
| Gal\*Gun: Double Peace | 10897 | 871/000 | ||
252252
| Battleborn | 8623/1055 | 874/078 | ||
253253
| A Hat in Time | 12097 | 877-893/005 | Contributed by @Un-Drew ||

src/Branch/UE3/SA2/Classes/UInt64Property.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class UInt64Property : UProperty
77
{
88
public override string GetFriendlyType()
99
{
10-
return "int64";
10+
return "Int64";
1111
}
1212
}
1313
}

src/Core/Tokens/CastTokens.cs

Lines changed: 60 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public override string Decompile()
155155

156156
// IntToInt64
157157
case 0x62:
158-
castTypeName = "int64";
158+
castTypeName = "Int64";
159159
break;
160160

161161
// Int64ToInt
@@ -165,7 +165,7 @@ public override string Decompile()
165165

166166
// StringToInt64
167167
case 0x64:
168-
castTypeName = "int64";
168+
castTypeName = "Int64";
169169
break;
170170

171171
// Int64ToByte
@@ -193,24 +193,74 @@ public override string Decompile()
193193
castTypeName = "short";
194194
break;
195195

196-
// IntToMemCrypt
196+
// XIntToInt
197197
case 0x6A:
198-
castTypeName = "MemCrypt<int>";
198+
castTypeName = "int";
199199
break;
200200

201-
// FloatToMemCrypt
201+
// XIntToFloat
202202
case 0x6B:
203-
castTypeName = "MemCrypt<float>";
203+
castTypeName = "float";
204204
break;
205205

206-
// StringToMemCrypt
206+
// XIntToString
207207
case 0x6C:
208-
castTypeName = "MemCrypt<string>";
208+
castTypeName = "string";
209209
break;
210210

211-
// Int64ToMemCrypt
211+
// IntToXInt
212212
case 0x6D:
213-
castTypeName = "MemCrypt<int64>";
213+
castTypeName = "XInt";
214+
break;
215+
216+
// XVectorToVector
217+
case 0x6E:
218+
castTypeName = "Vector";
219+
break;
220+
221+
// XVectorToString
222+
case 0x6F:
223+
castTypeName = "string";
224+
break;
225+
226+
// VectorToXVector
227+
case 0x70:
228+
castTypeName = "XVector";
229+
break;
230+
231+
// XFloatToFloat
232+
case 0x71:
233+
castTypeName = "float";
234+
break;
235+
236+
// XFloatToString
237+
case 0x72:
238+
castTypeName = "string";
239+
break;
240+
241+
// FloatToXFloat
242+
case 0x73:
243+
castTypeName = "XFloat";
244+
break;
245+
246+
// XRotatorToRotator
247+
case 0x74:
248+
castTypeName = "Rotator";
249+
break;
250+
251+
// XRotatorToString
252+
case 0x75:
253+
castTypeName = "string";
254+
break;
255+
256+
// XRotatorToBool
257+
case 0x76:
258+
castTypeName = "bool";
259+
break;
260+
261+
// RotatorToXRotator
262+
case 0x77:
263+
castTypeName = "XRotator";
214264
break;
215265
}
216266
}

src/UnrealPackage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,9 @@ public enum BuildName
891891
/// <summary>
892892
/// Sudden Attack 2
893893
///
894-
/// 870/108
894+
/// 870/108:109
895895
/// </summary>
896-
[Build(870, 108u, BuildGeneration.UE3)]
896+
[Build(870, 870, 108u, 109u, BuildGeneration.UE3)]
897897
[BuildEngineBranch(typeof(EngineBranchSA2))]
898898
SA2,
899899

0 commit comments

Comments
 (0)