Fixed vehicle license plates rendering

This commit is contained in:
dexy 2019-01-11 20:40:13 +11:00
parent 8dafe56db0
commit f3c7538d78
3 changed files with 9 additions and 1 deletions

View File

@ -10,6 +10,8 @@ namespace CodeWalker.GameFiles
[TypeConverter(typeof(ExpandableObjectConverter))] [TypeConverter(typeof(ExpandableObjectConverter))]
public class VehicleLayoutsFile : GameFile, PackedFile public class VehicleLayoutsFile : GameFile, PackedFile
{ {
public string Xml { get; set; }
public VehicleLayoutsFile() : base(null, GameFileType.VehicleLayouts) public VehicleLayoutsFile() : base(null, GameFileType.VehicleLayouts)
{ } { }
public VehicleLayoutsFile(RpfFileEntry entry) : base(entry, GameFileType.VehicleLayouts) public VehicleLayoutsFile(RpfFileEntry entry) : base(entry, GameFileType.VehicleLayouts)
@ -22,9 +24,11 @@ namespace CodeWalker.GameFiles
Name = entry.Name; Name = entry.Name;
FilePath = Name; FilePath = Name;
//TODO
//always XML .meta //always XML .meta
Xml = Encoding.UTF8.GetString(data);
//TODO: parse CVehicleMetadataMgr XML
Loaded = true; Loaded = true;

View File

@ -1534,6 +1534,8 @@ namespace CodeWalker.GameFiles
if (entry.NameLower.StartsWith("vehiclelayouts") && entry.NameLower.EndsWith(".meta")) if (entry.NameLower.StartsWith("vehiclelayouts") && entry.NameLower.EndsWith(".meta"))
{ {
var lf = RpfMan.GetFile<VehicleLayoutsFile>(entry); var lf = RpfMan.GetFile<VehicleLayoutsFile>(entry);
if (lf.Xml != null)
{ }
allVehicleLayouts.Add(lf); allVehicleLayouts.Add(lf);
} }
} }

View File

@ -543,9 +543,11 @@ namespace CodeWalker.Rendering
switch (ihash) switch (ihash)
{ {
case MetaName.DiffuseSampler: case MetaName.DiffuseSampler:
case MetaName.PlateBgSampler:
texture = itex; texture = itex;
break; break;
case MetaName.BumpSampler: case MetaName.BumpSampler:
case MetaName.PlateBgBumpSampler:
bumptex = itex; bumptex = itex;
break; break;
case MetaName.SpecSampler: case MetaName.SpecSampler: