removed as it should be part of the consumer end of library.

This commit is contained in:
Harrison Deng 2019-01-21 23:36:40 -06:00
parent 8c54d7e12d
commit 010c66aa0e
3 changed files with 0 additions and 129 deletions

View File

@ -1,17 +0,0 @@
namespace RecrownedAthenaeum.ContentSystem.ContentResolvers
{
class FontContentResolver : IContentPathModifier
{
readonly ResolutionContentResolver rcr;
public FontContentResolver(ResolutionContentResolver rcr)
{
this.rcr = rcr;
}
public string Modify(string assetName)
{
return rcr.Modify("fonts/" + assetName);
}
}
}

View File

@ -1,10 +0,0 @@
namespace RecrownedAthenaeum.ContentSystem.ContentResolvers
{
class NormalContentResolver : IContentPathModifier
{
public string Modify(string assetName)
{
return assetName;
}
}
}

View File

@ -1,102 +0,0 @@
using RecrownedAthenaeum.SpecialTypes;
namespace RecrownedAthenaeum.ContentSystem.ContentResolvers
{
class ResolutionContentResolver : IContentPathModifier
{
int width, height;
bool updated;
Resolution bestResolution;
public int Width
{
get
{
return width;
}
set
{
updated = true;
width = value;
}
}
public int Height
{
get
{
return height;
}
set
{
updated = true;
height = value;
}
}
Resolution[] resolutions = {
new Resolution(1920, 1080),
new Resolution(2560, 1440),
new Resolution(3840, 2160)
};
Resolution ChooseRounded()
{
updated = false;
Resolution best = resolutions[0];
int leastDifference = -1;
int w = Width, h = Height;
if (w > h)
{
for (int i = 0; i < resolutions.Length; i++)
{
int currentDiff = h - resolutions[i].Height;
if (currentDiff < 0)
{
currentDiff = currentDiff * -1;
}
if ((currentDiff < leastDifference) || leastDifference == -1)
{
best = resolutions[i];
leastDifference = currentDiff;
}
}
}
else
{
for (int i = 0; i < resolutions.Length; i++)
{
int currentDiff = w - resolutions[i].Width;
if (currentDiff < 0)
{
currentDiff = currentDiff * -1;
}
if (currentDiff < leastDifference || leastDifference == -1)
{
best = resolutions[i];
leastDifference = currentDiff;
}
}
}
return best;
}
public string Modify(string path)
{
if (updated)
{
bestResolution = ChooseRounded();
}
return bestResolution + "/" + path;
}
}
}