Mise à jour du dépôt en fonction du .gitignore
This commit is contained in:
parent
1f0f033fad
commit
4a59748e67
224 changed files with 6785 additions and 0 deletions
28
LandblockExtraction/Tools/MathOperations.cs
Normal file
28
LandblockExtraction/Tools/MathOperations.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using AC2RE.Definitions;
|
||||
using System.Numerics;
|
||||
|
||||
namespace LandblockExtraction.Tools {
|
||||
public static class MathOperations {
|
||||
public static uint GetXLandblock(uint landblock) {
|
||||
return (landblock & 0xFF000000) >> 24;
|
||||
}
|
||||
public static uint GetYLandblock(uint landblock) {
|
||||
return (landblock & 0x00FF0000) >> 16;
|
||||
}
|
||||
public static uint GetTerrainInCellInfo(uint cellInfo) {
|
||||
return (cellInfo >> 0) & (0x7f);
|
||||
}
|
||||
public static uint GetRoadInCellInfo(uint cellInfo) {
|
||||
return (cellInfo >> 24) & (0xff);
|
||||
}
|
||||
public static uint GetColorInCellInfo(uint cellInfo) {
|
||||
return (cellInfo >> 16) & (0xff);
|
||||
}
|
||||
public static uint GetSceneInCellInfo(uint cellInfo) {
|
||||
return (cellInfo >> 7) & (0x1f);
|
||||
}
|
||||
public static Vector4 RGBAColorToVector4(RGBAColor color) {
|
||||
return new Vector4(color.r, color.g, color.b, color.a);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue