From 81d4fb2dd472eebde508260a52c43090b3e0538f Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 14 Feb 2021 18:09:38 +0100 Subject: [PATCH] also made additional data non-relative for data texture atlas --- MLEM.Data/DataTextureAtlas.cs | 4 ++-- Sandbox/Content/Textures/Furniture.atlas | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MLEM.Data/DataTextureAtlas.cs b/MLEM.Data/DataTextureAtlas.cs index e311b3b..1f94587 100644 --- a/MLEM.Data/DataTextureAtlas.cs +++ b/MLEM.Data/DataTextureAtlas.cs @@ -78,8 +78,8 @@ namespace MLEM.Data { if (match.Groups[8].Success) { for (var i = 0; i < match.Groups[8].Captures.Count; i++) { region.SetData(match.Groups[8].Captures[i].Value, new Vector2( - float.Parse(match.Groups[9].Captures[i].Value), - float.Parse(match.Groups[10].Captures[i].Value))); + float.Parse(match.Groups[9].Captures[i].Value) - (pivotRelative ? 0 : loc.X), + float.Parse(match.Groups[10].Captures[i].Value) - (pivotRelative ? 0 : loc.Y))); } } atlas.regions.Add(name, region); diff --git a/Sandbox/Content/Textures/Furniture.atlas b/Sandbox/Content/Textures/Furniture.atlas index c777c94..b7eb613 100644 --- a/Sandbox/Content/Textures/Furniture.atlas +++ b/Sandbox/Content/Textures/Furniture.atlas @@ -11,8 +11,8 @@ loc 96 0 16 32 LongTableUp loc 0 32 64 48 piv 16 48 -extraData1 12 14 -extraData2 129 4 +extraData1 12 50 +extraData2 40 60 LongTableRight loc 64 32 64 48