mirror of
https://github.com/kwsch/NHSE.git
synced 2026-08-06 01:40:27 -05:00
Lossless v1->v2 upgrade
This commit is contained in:
parent
22e7571e80
commit
caab4f5512
|
|
@ -36,8 +36,12 @@ public Item DoorDecoItemName
|
|||
public VillagerHouse2 Upgrade()
|
||||
{
|
||||
var data = new byte[VillagerHouse2.SIZE];
|
||||
var empty = Item.NONE.ToBytes();
|
||||
Data.CopyTo(data, 0);
|
||||
return new VillagerHouse2(data) { DoorDecoItemName = Item.NO_ITEM };
|
||||
for (int i = 0; i < 236; i++)
|
||||
empty.CopyTo(data, 0x1D8 + (i * 0xC));
|
||||
VillagerHouse2.Footer.CopyTo(data, 0x1270);
|
||||
return new VillagerHouse2(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,18 @@ public VillagerHouse1 Downgrade()
|
|||
Data.CopyTo(result, 0);
|
||||
return new VillagerHouse1(result);
|
||||
}
|
||||
|
||||
internal static readonly byte[] Footer =
|
||||
{
|
||||
0x4B, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x9B, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x00, 0xF8, 0x00, 0x40,
|
||||
0x10, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFE, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
}
|
||||
|
||||
#pragma warning disable CS8618, CA1815, CA1819, IDE1006, RCS1170
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user