mirror of
https://github.com/MaddyThorson/StrawberryBF.git
synced 2025-07-18 19:41:54 +08:00
Rendering fixes. Console started
This commit is contained in:
@ -189,6 +189,8 @@ namespace Strawberry
|
||||
Time.PreviousElapsed = Time.Elapsed;
|
||||
Time.Elapsed += Time.Delta;
|
||||
}
|
||||
|
||||
Strawberry.Console.Update();
|
||||
}
|
||||
|
||||
private void Render()
|
||||
@ -204,6 +206,9 @@ namespace Strawberry
|
||||
{
|
||||
if (Scene != null)
|
||||
Scene.Draw();
|
||||
|
||||
if (Console.Enabled)
|
||||
Strawberry.Console.Draw();
|
||||
}
|
||||
|
||||
public Scene Scene
|
||||
@ -231,7 +236,7 @@ namespace Strawberry
|
||||
if (Directory.Exists(root))
|
||||
LoadSpritesDir(root);
|
||||
else
|
||||
Console.WriteLine("Content/Sprites folder does not exist!");
|
||||
Calc.Log("Content/Sprites folder does not exist!");
|
||||
}
|
||||
|
||||
private void LoadSpritesDir(String directory)
|
||||
|
@ -394,9 +394,9 @@ namespace Strawberry
|
||||
{
|
||||
for (int p = 0, int b = 0; p < len; p++, b += 4)
|
||||
{
|
||||
pixels[p].R = (uint8)((int)bytes[b + 0] * bytes[b + 3] / 255);
|
||||
pixels[p].G = (uint8)((int)bytes[b + 1] * bytes[b + 3] / 255);
|
||||
pixels[p].B = (uint8)((int)bytes[b + 2] * bytes[b + 3] / 255);
|
||||
pixels[p].R = (uint8)((int)bytes[b + 0] * (int)bytes[b + 3] / 255);
|
||||
pixels[p].G = (uint8)((int)bytes[b + 1] * (int)bytes[b + 3] / 255);
|
||||
pixels[p].B = (uint8)((int)bytes[b + 2] * (int)bytes[b + 3] / 255);
|
||||
pixels[p].A = bytes[b + 3];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user