diff --git a/DiscOut/Avolonia/DiscWindow.axaml b/DiscOut/Avolonia/DiscWindow.axaml
index e83bfb1..03f5e2f 100644
--- a/DiscOut/Avolonia/DiscWindow.axaml
+++ b/DiscOut/Avolonia/DiscWindow.axaml
@@ -5,15 +5,14 @@
xmlns:controls="clr-namespace:DiscOut.Avalonia"
Width="640" Height="720"
x:Class="DiscOut.Avalonia.DiscWindow"
- Title="DISCout" Background="Black">
-
-
-
-
+ Title="DISCout" Margin="0" Padding="0" Background="Gray" Icon="/build_assets/icon.ico">
+
+
+
-
+
\ No newline at end of file
diff --git a/DiscOut/Avolonia/DiscWindow.axaml.cs b/DiscOut/Avolonia/DiscWindow.axaml.cs
index 1ecf8ea..05e15ee 100644
--- a/DiscOut/Avolonia/DiscWindow.axaml.cs
+++ b/DiscOut/Avolonia/DiscWindow.axaml.cs
@@ -10,115 +10,117 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
-namespace DiscOut.Avalonia;
-public partial class DiscWindow : Window
+namespace DiscOut.Avalonia
{
- private readonly HashSet keys = new();
- private static readonly WaveOutEvent MusicPlayer = new();
- private readonly ScoreBoard ScoreBoard;
- private int CurrentLevel = 1;
- private bool GameRestart = false;
- private readonly DispatcherTimer ticker = new() { Interval = new TimeSpan(0, 0, 0, 0, 1000 / 60) };
+ public partial class DiscWindow : Window
+ {
+ private readonly HashSet keys = new HashSet();
+ private static readonly WaveOutEvent MusicPlayer = new WaveOutEvent();
+ private readonly ScoreBoard ScoreBoard;
+ private int CurrentLevel = 1;
+ private bool GameRestart = false;
+ private readonly DispatcherTimer ticker = new DispatcherTimer() { Interval = new TimeSpan(0, 0, 0, 0, 1000 / 60) };
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
- public static DiscWindow Instance { get; set; }
+ public static DiscWindow Instance { get; set; }
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
- internal Paddle Paddle { get; } = new();
- internal Level Level { get; private set; }
- public DiscWindow()
- {
- InitializeComponent();
- Instance = this;
- Level = new("assets.levels.level_1.json");
- ScoreBoard = ScoreBoard.Load();
- MusicPlayer.Init(new Mp3FileReader(AssetUtil.OpenEmbeddedFile("assets.sounds.music.mp3")));
- MusicPlayer.Volume = 0.25f;
- MusicPlayer.Play();
- ticker.Tick += delegate
+ internal Paddle Paddle { get; } = new Paddle();
+ internal Level Level { get; private set; }
+ public DiscWindow()
{
- if (GameRestart)
+ InitializeComponent();
+ Instance = this;
+ Level = new Level("assets.levels.level_1.json");
+ ScoreBoard = ScoreBoard.Load();
+ MusicPlayer.Init(new Mp3FileReader(AssetUtil.OpenEmbeddedFile("assets.sounds.music.mp3")));
+ MusicPlayer.Volume = 0.25f;
+ MusicPlayer.Play();
+ ticker.Tick += delegate
{
- if (keys.Contains(Key.Enter))
+ if (GameRestart)
{
- SoundUtils.PlaySound(SoundUtils.CLICK_SOUND);
- GameRestart = false;
- DisplayText.Text = "";
- Level = new("assets.levels.level_" + Convert.ToString(CurrentLevel) + ".json");
- keys.Clear();
+ if (keys.Contains(Key.Enter))
+ {
+ SoundUtils.PlaySound(SoundUtils.CLICK_SOUND);
+ GameRestart = false;
+ DisplayText.Text = "";
+ Level = new Level("assets.levels.level_" + Convert.ToString(CurrentLevel) + ".json");
+ keys.Clear();
+ }
+ DisplayText.Text = "Press Enter To Restart";
}
- DisplayText.Text = "Press Enter To Restart";
- }
- else
- {
- Paddle.OnKeyDown(keys);
- Level.GetBall().OnKeyDown(keys);
- if (!Level.GetBall().IsAlive())
+ else
{
- DisplayText.Text = "Press Space To Start!\n " + ScoreBoard.ToString();
+ Paddle.OnKeyDown(keys);
+ Level.GetBall().OnKeyDown(keys);
+ if (!Level.GetBall().IsAlive())
+ {
+ DisplayText.Text = "Press Space To Start!\n " + ScoreBoard.ToString();
+ }
+ else
+ DisplayText.Text = "";
}
- else
- DisplayText.Text = "";
- }
- if (Paddle.IsDead())
- {
- Paddle.ResetPaddle();
- int Score = Level.GetBall().GetScore();
- if (Score > ScoreBoard.entry[0].Score)
+ if (Paddle.IsDead())
{
- Action callback = FinishNewUser;
- var popupWindow = new PopUpWindow(Score, callback);
- var task = popupWindow.ShowDialog(this);
+ Paddle.ResetPaddle();
+ int Score = Level.GetBall().GetScore();
+ if (Score > ScoreBoard.entry[0].Score)
+ {
+ Action callback = FinishNewUser;
+ var popupWindow = new PopUpWindow(Score, callback);
+ var task = popupWindow.ShowDialog(this);
+ }
+ GameRestart = true;
}
- GameRestart = true;
- }
+ Level.OnUpdate();
+ Paddle.OnUpdate();
+ };
+ ticker.IsEnabled = true;
Level.OnUpdate();
Paddle.OnUpdate();
- };
- ticker.IsEnabled = true;
- Level.OnUpdate();
- Paddle.OnUpdate();
- GC.Collect(GC.MaxGeneration, GCCollectionMode.Aggressive, true, true);
- GC.WaitForPendingFinalizers();
- }
+ GC.Collect(GC.MaxGeneration, GCCollectionMode.Optimized, true, true);
+ GC.WaitForPendingFinalizers();
+ }
- protected override void OnKeyDown(KeyEventArgs e)
- {
- keys.Add(e.Key);
- base.OnKeyDown(e);
- }
+ protected override void OnKeyDown(KeyEventArgs e)
+ {
+ keys.Add(e.Key);
+ base.OnKeyDown(e);
+ }
- protected override void OnKeyUp(KeyEventArgs e)
- {
- keys.Remove(e.Key);
- base.OnKeyUp(e);
- }
+ protected override void OnKeyUp(KeyEventArgs e)
+ {
+ keys.Remove(e.Key);
+ base.OnKeyUp(e);
+ }
- public override void Render(DrawingContext context)
- {
- GLView.Render(context);
- base.Render(context);
- Dispatcher.UIThread.Post(InvalidateVisual, DispatcherPriority.MaxValue);
- }
+ public override void Render(DrawingContext context)
+ {
+ GLView.Render(context);
+ base.Render(context);
+ Dispatcher.UIThread.Post(InvalidateVisual, DispatcherPriority.MaxValue);
+ }
- protected void FinishNewUser(int LastScoreData, string UserNameData)
- {
- ScoreBoard.AddScore(new(UserNameData, LastScoreData));
- ScoreBoard.Save(ScoreBoard);
- }
+ protected void FinishNewUser(int LastScoreData, string UserNameData)
+ {
+ ScoreBoard.AddScore(new ScoreEntry(UserNameData, LastScoreData));
+ ScoreBoard.Save(ScoreBoard);
+ }
- protected override void OnClosing(CancelEventArgs e)
- {
- ticker.IsEnabled = false;
- SoundUtils.CleanUp();
- MusicPlayer.Stop();
- MusicPlayer.Dispose();
- Renderer.Dispose();
- ScoreBoard.Save(ScoreBoard);
- base.OnClosing(e);
- }
+ protected override void OnClosing(CancelEventArgs e)
+ {
+ ticker.IsEnabled = false;
+ SoundUtils.CleanUp();
+ MusicPlayer.Stop();
+ MusicPlayer.Dispose();
+ Renderer.Dispose();
+ ScoreBoard.Save(ScoreBoard);
+ base.OnClosing(e);
+ }
- public void LevelWon()
- {
- CurrentLevel++;
- Level = new Level("assets.levels.level_" + Convert.ToString(CurrentLevel) + ".json");
+ public void LevelWon()
+ {
+ CurrentLevel++;
+ Level = new Level("assets.levels.level_" + Convert.ToString(CurrentLevel) + ".json");
+ }
}
}
diff --git a/DiscOut/Avolonia/GameOpenGLControl.axaml.cs b/DiscOut/Avolonia/GameOpenGLControl.axaml.cs
index c0d4926..1dc9fd5 100644
--- a/DiscOut/Avolonia/GameOpenGLControl.axaml.cs
+++ b/DiscOut/Avolonia/GameOpenGLControl.axaml.cs
@@ -2,25 +2,27 @@
using Avalonia.OpenGL.Controls;
using DiscOut.Renderer;
using static Avalonia.OpenGL.GlConsts;
-namespace DiscOut.Avalonia;
-public partial class GameOpenGLControl : OpenGlControlBase
+namespace DiscOut.Avalonia
{
- internal QuadBatchRenderer? Renderer { get; private set; }
- public GameOpenGLControl()
- => InitializeComponent();
-
- protected override unsafe void OnOpenGlRender(GlInterface gl, int fb)
+ public partial class GameOpenGLControl : OpenGlControlBase
{
- gl.ClearColor(0, 0, 0, 0);
- gl.Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- gl.Viewport(0, 0, (int)DiscWindow.Instance.Width - ((int)DiscWindow.Instance.Width / 16), (int)DiscWindow.Instance.Height - ((int)DiscWindow.Instance.Height / 10));
- DiscWindow.Instance.Paddle.OnRendering(Renderer!);
- DiscWindow.Instance.Level.OnRendering(Renderer!);
- }
+ internal QuadBatchRenderer Renderer { get; private set; }
+ public GameOpenGLControl()
+ => InitializeComponent();
- protected override void OnOpenGlInit(GlInterface gl, int fb)
- => Renderer = new(gl);
+ protected override unsafe void OnOpenGlRender(GlInterface gl, int fb)
+ {
+ gl.ClearColor(0, 0, 0, 0);
+ gl.Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+ gl.Viewport(0, 0, (int)DiscWindow.Instance.Width - 25, (int)DiscWindow.Instance.Height);
+ DiscWindow.Instance.Paddle.OnRendering(Renderer);
+ DiscWindow.Instance.Level.OnRendering(Renderer);
+ }
- protected override void OnOpenGlDeinit(GlInterface gl, int fb)
- => Renderer!.Dispose();
-}
+ protected override void OnOpenGlInit(GlInterface gl, int fb)
+ => Renderer = new QuadBatchRenderer(gl);
+
+ protected override void OnOpenGlDeinit(GlInterface gl, int fb)
+ => Renderer.Dispose();
+ }
+}
\ No newline at end of file
diff --git a/DiscOut/Avolonia/PopUpWindow.axaml.cs b/DiscOut/Avolonia/PopUpWindow.axaml.cs
index 8db1922..f444e84 100644
--- a/DiscOut/Avolonia/PopUpWindow.axaml.cs
+++ b/DiscOut/Avolonia/PopUpWindow.axaml.cs
@@ -2,37 +2,40 @@
using Avalonia.Interactivity;
using DiscOut.Util;
using System;
-namespace DiscOut.Avalonia;
-public partial class PopUpWindow : Window
+namespace DiscOut.Avalonia
{
- private readonly Action Callback;
- private readonly int Score;
-
- public PopUpWindow()
+ public partial class PopUpWindow : Window
{
- Score = 0;
- Callback = (int n, string s) => { };
- InitializeComponent();
- TextInput.Text = "";
- }
+ private readonly Action Callback;
+ private readonly int Score;
- public PopUpWindow(int score, Action callback)
- {
- Callback = callback;
- Score = score;
- InitializeComponent();
- TextInput.Text = "";
- }
+ public PopUpWindow()
+ {
+ Score = 0;
+ Callback = (int n, string s) => { };
+ InitializeComponent();
+ TextInput.Text = "";
+ }
- private void OnButtonClick(object sender, RoutedEventArgs e)
- {
- SoundUtils.PlaySound(SoundUtils.CLICK_SOUND);
- if (TextInput.Text.Length >= 1 && TextInput.Text.Length <= 10)
+ public PopUpWindow(int score, Action callback)
+ {
+ Callback = callback;
+ Score = score;
+ InitializeComponent();
+ TextInput.Text = "";
+ }
+
+ private void OnButtonClick(object sender, RoutedEventArgs e)
{
- Callback.Invoke(Score, TextInput.Text);
- Close();
- return;
+ TextInput.Focus();
+ SoundUtils.PlaySound(SoundUtils.CLICK_SOUND);
+ if (TextInput.Text.Length >= 1 && TextInput.Text.Length <= 10)
+ {
+ Callback.Invoke(Score, TextInput.Text);
+ Close();
+ return;
+ }
+ TextInput.Text = "must be between 1 & 10 chars";
}
- TextInput.Text = "must be between 1 & 10 chars";
}
-}
+}
\ No newline at end of file
diff --git a/DiscOut/GameObjects/Dynamic/Ball.cs b/DiscOut/GameObjects/Dynamic/Ball.cs
index 7394589..42388c4 100644
--- a/DiscOut/GameObjects/Dynamic/Ball.cs
+++ b/DiscOut/GameObjects/Dynamic/Ball.cs
@@ -6,127 +6,130 @@
using DiscOut.Util;
using System;
using System.Collections.Generic;
-namespace DiscOut.GameObjects.Dynamic;
-internal class Ball
+namespace DiscOut.GameObjects.Dynamic
{
- public int Score { get; set; } = 0;
- private int LastScore = 0;
- private Vertex[] Vertices = new Vertex[6];
- private float PositionX;
- private float PositionY = -140;
- private float VelocityX;
- private float VelocityY;
- private readonly byte LaunchSpeed;
- private bool Released = false;
- private byte CoolDown = 0;
- public Ball(byte speed)
+ internal class Ball
{
- LaunchSpeed = speed;
- PositionX = DiscWindow.Instance.Paddle.GetPositionX();
- VertexUtils.PreMakeQuad(0, 0, 0, 0, 0, ref Vertices);
- }
- public void ResetBall()
- {
- VelocityX = 0;
- VelocityY = 0;
- Released = false;
- }
- public int GetScore()
- {
- LastScore = Score;
- Score = 0;
- return LastScore;
- }
- public bool IsAlive() => Released;
- public void OnKeyDown(HashSet keys)
- {
- if (keys.Contains(Key.Space) && !Released)
+ private Random random = new Random();
+ public int Score { get; set; } = 0;
+ private int LastScore = 0;
+ private Vertex[] Vertices = new Vertex[6];
+ private float PositionX;
+ private float PositionY = -140;
+ private float VelocityX;
+ private float VelocityY;
+ private readonly byte LaunchSpeed;
+ private bool Released = false;
+ private byte CoolDown = 0;
+ public Ball(byte speed)
{
- SoundUtils.PlaySound(SoundUtils.CLICK_SOUND);
- DiscWindow.Instance.DisplayText.Text = "";
- VelocityY = LaunchSpeed;
- VelocityX = Random.Shared.NextSingle() > 0.5f ? -LaunchSpeed : LaunchSpeed;
- Released = true;
+ LaunchSpeed = speed;
+ PositionX = DiscWindow.Instance.Paddle.GetPositionX();
+ VertexUtils.PreMakeQuad(0, 0, 0, 0, 0, ref Vertices);
}
- }
- public void OnUpdate(Level level)
- {
- if (Released is false)
+ public void ResetBall()
{
- PositionX = DiscWindow.Instance.Paddle.GetPositionX() * 10;
- PositionY = -145;
- VertexUtils.UpdateQuad(PositionX, PositionY, 0.03f, 0.03f, ref Vertices);
- return;
+ VelocityX = 0;
+ VelocityY = 0;
+ Released = false;
}
- PositionX = Math.Clamp(PositionX + VelocityX, -171, 171);
- PositionY = Math.Clamp(PositionY + VelocityY, -171, 171);
- if (DiscWindow.Instance.Paddle.DoseFullIntersects(Vertices))
+ public int GetScore()
{
- SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
- VelocityY = Math.Abs(VelocityY);
- }
- else if (PositionY >= 170)
- {
- SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
- VelocityY = -Math.Abs(VelocityY);
- }
- else if (PositionX <= -170)
- {
- SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
- VelocityX = Math.Abs(VelocityX);
+ LastScore = Score;
+ Score = 0;
+ return LastScore;
}
- else if (PositionX >= 170)
+ public bool IsAlive() => Released;
+ public void OnKeyDown(HashSet keys)
{
- SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
- VelocityX = -Math.Abs(VelocityX);
+ if (keys.Contains(Key.Space) && !Released)
+ {
+ SoundUtils.PlaySound(SoundUtils.CLICK_SOUND);
+ DiscWindow.Instance.DisplayText.Text = "";
+ VelocityY = LaunchSpeed;
+ VelocityX = random.NextDouble() > 0.5 ? -LaunchSpeed : LaunchSpeed;
+ Released = true;
+ }
}
- else
+ public void OnUpdate(Level level)
{
- foreach (Brick brick in level.GetBricks())
+ if (Released is false)
+ {
+ PositionX = DiscWindow.Instance.Paddle.GetPositionX() * 10;
+ PositionY = -145;
+ VertexUtils.UpdateQuad(PositionX, PositionY, 0.03f, 0.03f, ref Vertices);
+ return;
+ }
+ PositionX = VertexUtils.Clamp(PositionX + VelocityX, -171, 171);
+ PositionY = VertexUtils.Clamp(PositionY + VelocityY, -171, 171);
+ if (DiscWindow.Instance.Paddle.DoseFullIntersects(Vertices))
{
- if (brick.DoseFullIntersects(Vertices))
+ SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
+ VelocityY = Math.Abs(VelocityY);
+ }
+ else if (PositionY >= 170)
+ {
+ SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
+ VelocityY = -Math.Abs(VelocityY);
+ }
+ else if (PositionX <= -170)
+ {
+ SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
+ VelocityX = Math.Abs(VelocityX);
+ }
+ else if (PositionX >= 170)
+ {
+ SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
+ VelocityX = -Math.Abs(VelocityX);
+ }
+ else
+ {
+ foreach (Brick brick in level.GetBricks())
{
- SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
- if (CoolDown == 0)
+ if (brick.DoseFullIntersects(Vertices))
{
- CoolDown = 5;
- brick.Die();
- Score++;
- if (brick.GetBrickType() == BrickType.LIFE)
- DiscWindow.Instance.Paddle.AddLife();
- VelocityY = -(Math.Abs(VelocityY) * 1.02f);
- }
- else
- VelocityY = -Math.Abs(VelocityY);
+ SoundUtils.PlaySound(SoundUtils.BOUNCE_SOUND);
+ if (CoolDown == 0)
+ {
+ CoolDown = 5;
+ brick.Die();
+ Score++;
+ if (brick.GetBrickType() == BrickType.LIFE)
+ DiscWindow.Instance.Paddle.AddLife();
+ VelocityY = -(Math.Abs(VelocityY) * 1.02f);
+ }
+ else
+ VelocityY = -Math.Abs(VelocityY);
- if (Random.Shared.Next(12) > 7)
- {
- if (Random.Shared.Next(12) > 7)
- VelocityX -= Random.Shared.Next(12) > 7 ? 0 : 3;
+ if (random.Next(12) > 7)
+ {
+ if (random.Next(12) > 7)
+ VelocityX -= random.Next(12) > 7 ? 0 : 3;
+ else
+ VelocityX += random.Next(12) > 7 ? 0 : 3;
+ }
else
- VelocityX += Random.Shared.Next(12) > 7 ? 0 : 3;
+ VelocityX = random.Next(12) > 4 ? VelocityX * 1.02f : Math.Abs(VelocityX) * 1.02f;
+ break;
}
- else
- VelocityX = Random.Shared.Next(12) > 4 ? VelocityX * 1.02f : Math.Abs(VelocityX) * 1.02f;
- break;
}
}
+ if (CoolDown != 0)
+ CoolDown--;
+ if (VelocityY == 0)
+ VelocityY += LaunchSpeed;
+ VertexUtils.UpdateQuad(PositionX, PositionY, 0.03f, 0.03f, ref Vertices, 0);
+ if (PositionY <= -170)
+ {
+ ResetBall();
+ LastScore = Score;
+ DiscWindow.Instance.Paddle.ResetPaddle();
+ }
}
- if (CoolDown != 0)
- CoolDown--;
- if (VelocityY == 0)
- VelocityY += LaunchSpeed;
- VertexUtils.UpdateQuad(PositionX, PositionY, 0.03f, 0.03f, ref Vertices, 0);
- if (PositionY <= -170)
+ public void OnRendering(QuadBatchRenderer renderer)
{
- ResetBall();
- LastScore = Score;
- DiscWindow.Instance.Paddle.ResetPaddle();
+ DiscWindow.Instance.ScoreText.Text = "Score: " + Score.ToString();
+ renderer.AddQuad(Vertices);
}
}
- public void OnRendering(QuadBatchRenderer renderer)
- {
- DiscWindow.Instance.ScoreText.Text = "Score: " + Score.ToString();
- renderer.AddQuad(Vertices);
- }
-}
+}
\ No newline at end of file
diff --git a/DiscOut/GameObjects/Dynamic/Paddle.cs b/DiscOut/GameObjects/Dynamic/Paddle.cs
index 6646fc9..60d3f94 100644
--- a/DiscOut/GameObjects/Dynamic/Paddle.cs
+++ b/DiscOut/GameObjects/Dynamic/Paddle.cs
@@ -2,67 +2,59 @@
using Avalonia.Input;
using DiscOut.Renderer;
using DiscOut.Util;
-namespace DiscOut.GameObjects.Dynamic;
-internal class Paddle
+namespace DiscOut.GameObjects.Dynamic
{
- private Vertex[] Vertices = new Vertex[6];
- private short X;
- private short VelocityX;
- private sbyte Lives = 3;
- public short GetPositionX() => X;
- public bool IsDead() => Lives < 0;
- public void AddLife() => Lives++;
-
- public static short Clamp(short value, short min, short max)
+ internal class Paddle
{
- if (value < min)
- return min;
- else if (value > max)
- return max;
- else
- return value;
- }
+ private Vertex[] Vertices = new Vertex[6];
+ private short X;
+ private short VelocityX;
+ private sbyte Lives = 3;
+ public short GetPositionX() => X;
+ public bool IsDead() => Lives < 0;
+ public void AddLife() => Lives++;
- public Paddle()
- {
- VertexUtils.PreMakeQuad(0, 0, 0, 0, 1f, ref Vertices);
- ResetPaddle();
- }
+ public Paddle()
+ {
+ VertexUtils.PreMakeQuad(0, 0, 0, 0, 1f, ref Vertices);
+ ResetPaddle();
+ }
- public void ResetPaddle()
- {
- Lives -= (sbyte)(IsDead() ? -3 : 1);
- VelocityX = 0;
- VertexUtils.UpdateQuad(1.0f, -150.0f, 0.3f, 0.03f, ref Vertices);
- }
+ public void ResetPaddle()
+ {
+ Lives -= (sbyte)(IsDead() ? -3 : 1);
+ VelocityX = 0;
+ VertexUtils.UpdateQuad(1.0f, -150.0f, 0.3f, 0.03f, ref Vertices);
+ }
- public void OnKeyDown(HashSet keys)
- {
- if (keys.Contains(Key.A) || keys.Contains(Key.Left) && X < 14)
- VelocityX = 1;
- else if (keys.Contains(Key.D) || keys.Contains(Key.Right) && X > -14)
- VelocityX = -1;
- }
+ public void OnKeyDown(HashSet keys)
+ {
+ if (keys.Contains(Key.A) || keys.Contains(Key.Left) && X < 14)
+ VelocityX = 1;
+ else if (keys.Contains(Key.D) || keys.Contains(Key.Right) && X > -14)
+ VelocityX = -1;
+ }
- public void OnUpdate()
- {
- X += VelocityX;
- VelocityX = 0;
- X = Clamp(X, -15, 15);
- VertexUtils.UpdateQuad(X, -150.0f, 0.3f, 0.03f, ref Vertices);
- }
+ public void OnUpdate()
+ {
+ X += VelocityX;
+ VelocityX = 0;
+ X = VertexUtils.Clamp(X, (short)-15, (short)15);
+ VertexUtils.UpdateQuad(X, -150.0f, 0.3f, 0.03f, ref Vertices);
+ }
- public void OnRendering(QuadBatchRenderer renderer)
- {
- renderer.AddQuad(Vertices);
- short x = -33;
- for (uint i = 0; i <= Lives; i++)
+ public void OnRendering(QuadBatchRenderer renderer)
{
- renderer.AddQuad(x, 49f, 0.1f, 0.1f, 2u);
- x -= 7;
+ renderer.AddQuad(Vertices);
+ short x = -33;
+ for (uint i = 0; i <= Lives; i++)
+ {
+ renderer.AddQuad(x, 49f, 0.1f, 0.1f, 2u);
+ x -= 7;
+ }
+ renderer.FlushAntiGhost();
}
- renderer.FlushAntiGhost();
+ public bool DoseFullIntersects(Vertex[] testing_quad)
+ => CollisonUtil.TestAABB(new Aabb(Vertices), new Aabb(testing_quad));
}
- public bool DoseFullIntersects(Vertex[] testing_quad)
- => CollisonUtil.TestAABB(new(Vertices), new(testing_quad));
}
\ No newline at end of file
diff --git a/DiscOut/GameObjects/Static/Brick.cs b/DiscOut/GameObjects/Static/Brick.cs
index 341990c..33e884c 100644
--- a/DiscOut/GameObjects/Static/Brick.cs
+++ b/DiscOut/GameObjects/Static/Brick.cs
@@ -2,68 +2,71 @@
using DiscOut.Renderer;
using DiscOut.Util;
using System;
-namespace DiscOut.GameObjects.Static;
-internal enum BrickType
+namespace DiscOut.GameObjects.Static
{
- NORMAL,
- LIFE
-}
-internal abstract class Brick
-{
- protected Vertex[] Vertices = new Vertex[6];
- private Aabb hitbox;
- public delegate void OnBrickDeathEventHandler(object sender, EventArgs e);
- public event OnBrickDeathEventHandler OnBrickDeath;
- public abstract BrickType GetBrickType();
- protected Brick(int x, int y, byte colour, Level level)
- {
- VertexUtils.PreMakeQuad(x, y, 0.1225f, 0.04f, colour,ref Vertices);
- hitbox = new(Vertices);
- OnBrickDeath += level.OnBrickDeath;
- }
- public void Die() => OnBrickDeath(this, EventArgs.Empty);
- public virtual void OnRendering(QuadBatchRenderer renderer) => renderer.AddQuad(Vertices);
- public bool DoseFullIntersects(Vertex[] testing_quad) => CollisonUtil.TestAABB(hitbox, new(testing_quad));
-}
-internal class NormalBrick : Brick
-{
- public NormalBrick(int x, int y, byte colour, Level level) : base(x, y, colour, level)
- {
- }
- public override BrickType GetBrickType() => BrickType.NORMAL;
-}
-internal abstract class ChangeableBrick : Brick
-{
- public abstract void OnUpdate();
- protected void UpdateColour(byte colour)
+ internal enum BrickType
{
- for (int i = 0; i < Vertices.Length; i++)
- Vertices[i].ColorID = colour;
+ NORMAL,
+ LIFE
}
- protected ChangeableBrick(int x, int y, byte colour, Level level) : base(x, y, colour, level)
+ internal abstract class Brick
{
+ protected Vertex[] Vertices = new Vertex[6];
+ private Aabb hitbox;
+ public delegate void OnBrickDeathEventHandler(object sender, EventArgs e);
+ public event OnBrickDeathEventHandler OnBrickDeath;
+ public abstract BrickType GetBrickType();
+ protected Brick(int x, int y, byte colour, Level level)
+ {
+ VertexUtils.PreMakeQuad(x, y, 0.1225f, 0.04f, colour, ref Vertices);
+ hitbox = new Aabb(Vertices);
+ OnBrickDeath += level.OnBrickDeath;
+ }
+ public void Die() => OnBrickDeath(this, EventArgs.Empty);
+ public virtual void OnRendering(QuadBatchRenderer renderer) => renderer.AddQuad(Vertices);
+ public bool DoseFullIntersects(Vertex[] testing_quad) => CollisonUtil.TestAABB(hitbox, new Aabb(testing_quad));
}
-}
-internal class LifeBrick : ChangeableBrick
-{
- private int wait = 0;
- public LifeBrick(int x, int y, Level level) : base(x, y, 0, level)
+ internal class NormalBrick : Brick
{
+ public NormalBrick(int x, int y, byte colour, Level level) : base(x, y, colour, level)
+ {
+ }
+ public override BrickType GetBrickType() => BrickType.NORMAL;
}
- public override BrickType GetBrickType() => BrickType.LIFE;
- public override void OnRendering(QuadBatchRenderer renderer)
+ internal abstract class ChangeableBrick : Brick
{
- OnUpdate();
- base.OnRendering(renderer);
+ public abstract void OnUpdate();
+ protected void UpdateColour(byte colour)
+ {
+ for (int i = 0; i < Vertices.Length; i++)
+ Vertices[i].ColorID = colour;
+ }
+ protected ChangeableBrick(int x, int y, byte colour, Level level) : base(x, y, colour, level)
+ {
+ }
}
- public override void OnUpdate()
+ internal class LifeBrick : ChangeableBrick
{
- if (wait > 10)
+ private static readonly Random random = new Random();
+ private int wait = 0;
+ public LifeBrick(int x, int y, Level level) : base(x, y, 0, level)
+ {
+ }
+ public override BrickType GetBrickType() => BrickType.LIFE;
+ public override void OnRendering(QuadBatchRenderer renderer)
+ {
+ OnUpdate();
+ base.OnRendering(renderer);
+ }
+ public override void OnUpdate()
{
- wait = 0;
- UpdateColour((byte)(Random.Shared.Next() % 5));
+ if (wait > 10)
+ {
+ wait = 0;
+ UpdateColour((byte)random.Next(5));
+ }
+ else
+ wait++;
}
- else
- wait++;
}
}
\ No newline at end of file
diff --git a/DiscOut/GameObjects/World/Level.cs b/DiscOut/GameObjects/World/Level.cs
index 02a19db..f9184ed 100644
--- a/DiscOut/GameObjects/World/Level.cs
+++ b/DiscOut/GameObjects/World/Level.cs
@@ -7,108 +7,121 @@
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
-namespace DiscOut.GameObjects.World;
-internal class Level
-{
- protected List bricks = new(114);
- protected Ball ball;
- protected class BrickData
- {
- public string Colour { get; set; } = "";
- public BrickType Type { get; set; } = BrickType.NORMAL;
- [JsonPropertyName("Repeat")]
- public int Loop { get; set; } = 0;
- }
- protected struct LevelData
- {
- public byte BaseBallSpeed { get; set; }
- public BrickData[] Bricks { get; set; }
- };
+namespace DiscOut.GameObjects.World
+{
- protected enum BrickDataColour
+ internal class Level
{
- DiscPink,
- DiscBlue,
- DiscOrange,
- DiscGreen,
- };
+ protected List bricks = new List(114);
+ protected Ball ball;
+ protected class BrickData
+ {
+ public string Colour { get; set; } = "";
+ public BrickType Type { get; set; } = BrickType.NORMAL;
+ [JsonPropertyName("Repeat")]
+ public int Loop { get; set; } = 0;
+ }
- private Brick MakeBrick(BrickType type, int x, int y, string str)
- {
- byte colour = (BrickDataColour)Enum.Parse(typeof(BrickDataColour), str) switch
+ protected struct LevelData
{
- BrickDataColour.DiscPink => 3,
- BrickDataColour.DiscBlue => 4,
- BrickDataColour.DiscOrange => 5,
- BrickDataColour.DiscGreen => 6,
- _ => throw new ArgumentException("a colour provided in the level is not one implemented in the game"),
+ public byte BaseBallSpeed { get; set; }
+ public BrickData[] Bricks { get; set; }
};
- return type switch
+
+ protected enum BrickDataColour
{
- BrickType.NORMAL => new NormalBrick(x, y, colour, this),
- BrickType.LIFE => new LifeBrick(x, y, this),
- _ => throw new ArgumentException("a type provided in the level is not one implemented in the game"),
+ DiscPink,
+ DiscBlue,
+ DiscOrange,
+ DiscGreen,
};
- }
- private void AddBrick(BrickData brick, ref int x, ref int y)
- {
- if (bricks.Count >= 114) throw new ArgumentException("trying to add to many brings to the live");
- Brick created = MakeBrick(brick.Type, x, y, brick.Colour);
- bricks.Add(created);
- x += 6;
- if (x > 40)
+ private Brick MakeBrick(BrickType type, int x, int y, string str)
{
- x = -39;
- y -= 6;
+ byte colour = 0;
+ switch ((BrickDataColour)Enum.Parse(typeof(BrickDataColour), str))
+ {
+ case BrickDataColour.DiscPink:
+ colour = 3;
+ break;
+ case BrickDataColour.DiscBlue:
+ colour = 4;
+ break;
+ case BrickDataColour.DiscOrange:
+ colour = 5;
+ break;
+ case BrickDataColour.DiscGreen:
+ colour = 6;
+ break;
+ default:
+ colour = 0;
+ break;
+ };
+ if (type == BrickType.NORMAL)
+ return new NormalBrick(x, y, colour, this);
+ else
+ return new LifeBrick(x, y, this);
}
- }
- public Level(string json_level)
- {
- LevelData data = JsonSerializer.Deserialize(AssetUtil.ReadEmbeddedFile(json_level));
- ball = new(data.BaseBallSpeed);
- int x = -39;
- int y = 100;
- foreach (BrickData brick in data.Bricks)
+ private void AddBrick(BrickData brick, ref int x, ref int y)
{
- if (brick.Loop == 0)
- AddBrick(brick, ref x, ref y);
- else for (byte i = 0; i < brick.Loop; i++)
+ if (bricks.Count >= 114) throw new ArgumentException("trying to add to many brings to the live");
+ Brick created = MakeBrick(brick.Type, x, y, brick.Colour);
+ bricks.Add(created);
+ x += 6;
+ if (x > 40)
+ {
+ x = -39;
+ y -= 6;
+ }
+ }
+
+ public Level(string json_level)
+ {
+ LevelData data = JsonSerializer.Deserialize(AssetUtil.ReadEmbeddedFile(json_level));
+ ball = new Ball(data.BaseBallSpeed);
+ int x = -39;
+ int y = 100;
+ foreach (BrickData brick in data.Bricks)
+ {
+ if (brick.Loop == 0)
AddBrick(brick, ref x, ref y);
+ else for (byte i = 0; i < brick.Loop; i++)
+ AddBrick(brick, ref x, ref y);
+ }
}
- }
- public Ball GetBall() => ball;
- public List GetBricks() => bricks;
+ public Ball GetBall() => ball;
+ public List GetBricks() => bricks;
- public sbyte bricks_to_gc = 5;
- public void OnBrickDeath(object sender, EventArgs e)
- {
- bricks.Remove((Brick)sender);
- bricks_to_gc--;
- if (bricks_to_gc < 0)
+ public sbyte bricks_to_gc = 5;
+ public void OnBrickDeath(object sender, EventArgs e)
{
- bricks_to_gc = 5;
- GC.Collect(GC.MaxGeneration, GCCollectionMode.Aggressive, true, true);
- GC.WaitForPendingFinalizers();
+ bricks.Remove((Brick)sender);
+ bricks_to_gc--;
+ if (bricks_to_gc < 0)
+ {
+ bricks_to_gc = 5;
+ GC.Collect(GC.MaxGeneration, GCCollectionMode.Optimized, true, true);
+ GC.WaitForPendingFinalizers();
+ }
}
- }
- public void OnRendering(QuadBatchRenderer renderer)
- {
- foreach (Brick brick in bricks)
- brick.OnRendering(renderer);
- renderer.Flush();
- ball.OnRendering(renderer);
- renderer.FlushAntiGhost();
- }
- public void OnUpdate()
- {
- if (bricks.Count <= 0)
- DiscWindow.Instance.LevelWon();
- else
- ball.OnUpdate(this);
+ public void OnRendering(QuadBatchRenderer renderer)
+ {
+ foreach (Brick brick in bricks)
+ brick.OnRendering(renderer);
+ renderer.Flush();
+ ball.OnRendering(renderer);
+ renderer.FlushAntiGhost();
+ }
+ public void OnUpdate()
+ {
+ if (bricks.Count <= 0)
+ DiscWindow.Instance.LevelWon();
+ else
+ ball.OnUpdate(this);
+ }
}
}
\ No newline at end of file
diff --git a/DiscOut/GameObjects/World/Score/ScoreBoard.cs b/DiscOut/GameObjects/World/Score/ScoreBoard.cs
index 44df534..f3a85c7 100644
--- a/DiscOut/GameObjects/World/Score/ScoreBoard.cs
+++ b/DiscOut/GameObjects/World/Score/ScoreBoard.cs
@@ -3,54 +3,56 @@
using System.IO;
using System.Text;
using System.Xml.Serialization;
-namespace DiscOut.GameObjects.World.Score;
-[XmlRoot("ScoreBoard", IsNullable = false)]
-public class ScoreBoard
+namespace DiscOut.GameObjects.World.Score
{
- [XmlArray("ScoreEntryStack")]
- public ScoreEntry[] entry = new ScoreEntry[3];
- public void AddScore(ScoreEntry new_entry)
+ [XmlRoot("ScoreBoard", IsNullable = false)]
+ public class ScoreBoard
{
- entry[2] = entry[1];
- entry[1] = entry[0];
- entry[0] = new_entry;
- }
- public override string? ToString()
- {
- StringBuilder builder = new();
- builder.Append("Current ScoreBoard:\n");
- foreach (ScoreEntry e in entry)
- builder.Append(" " + e.ToString() + "\n");
- return builder.ToString();
- }
- public static void Save(ScoreBoard obj)
- {
- XmlSerializer bf = new(typeof(ScoreBoard));
- try
+ [XmlArray("ScoreEntryStack")]
+ public ScoreEntry[] entry = new ScoreEntry[3];
+ public void AddScore(ScoreEntry new_entry)
{
- using var file = new StreamWriter(AssetUtil.OpenFile("ScoreBoard.xml")!);
- bf.Serialize(file, obj);
+ entry[2] = entry[1];
+ entry[1] = entry[0];
+ entry[0] = new_entry;
}
- catch (Exception)
+ public override string ToString()
{
- return;
+ StringBuilder builder = new StringBuilder();
+ builder.Append("Current ScoreBoard:\n");
+ foreach (ScoreEntry e in entry)
+ builder.Append(" " + e.ToString() + "\n");
+ return builder.ToString();
}
- }
- public static ScoreBoard Load()
- {
- try
+ public static void Save(ScoreBoard obj)
{
- XmlSerializer bf = new(typeof(ScoreBoard));
- using Stream file = AssetUtil.OpenFile("ScoreBoard.xml", false)!;
- return (ScoreBoard)bf.Deserialize(file)!;
+ XmlSerializer bf = new XmlSerializer(typeof(ScoreBoard));
+ try
+ {
+ var file = new StreamWriter(AssetUtil.OpenFile("ScoreBoard.xml"));
+ bf.Serialize(file, obj);
+ }
+ catch (Exception)
+ {
+ return;
+ }
}
- catch (Exception)
+ public static ScoreBoard Load()
{
- ScoreBoard obj = new();
- obj.AddScore(new());
- obj.AddScore(new());
- obj.AddScore(new());
- return obj;
+ try
+ {
+ XmlSerializer bf = new XmlSerializer(typeof(ScoreBoard));
+ Stream file = AssetUtil.OpenFile("ScoreBoard.xml", false);
+ return (ScoreBoard)bf.Deserialize(file);
+ }
+ catch (Exception)
+ {
+ ScoreBoard obj = new ScoreBoard();
+ obj.AddScore(new ScoreEntry());
+ obj.AddScore(new ScoreEntry());
+ obj.AddScore(new ScoreEntry());
+ return obj;
+ }
}
}
-}
+}
\ No newline at end of file
diff --git a/DiscOut/GameObjects/World/Score/ScoreEntry.cs b/DiscOut/GameObjects/World/Score/ScoreEntry.cs
index 900b797..e9bd86c 100644
--- a/DiscOut/GameObjects/World/Score/ScoreEntry.cs
+++ b/DiscOut/GameObjects/World/Score/ScoreEntry.cs
@@ -1,16 +1,18 @@
using System;
-namespace DiscOut.GameObjects.World.Score;
-[Serializable]
-public class ScoreEntry
+namespace DiscOut.GameObjects.World.Score
{
- public string UserName { get; set; } = "";
- public int Score { get; set; } = 0;
- public ScoreEntry() { }
- public ScoreEntry(string userName, int score)
+ [Serializable]
+ public class ScoreEntry
{
- UserName = userName ?? throw new ArgumentNullException(nameof(userName));
- Score = score;
+ public string UserName { get; set; } = "";
+ public int Score { get; set; } = 0;
+ public ScoreEntry() { }
+ public ScoreEntry(string userName, int score)
+ {
+ UserName = userName ?? throw new ArgumentNullException(nameof(userName));
+ Score = score;
+ }
+ public override string ToString()
+ => UserName == string.Empty ? string.Empty : $"{UserName} - Score:{Score}";
}
- public override string? ToString()
- => UserName == string.Empty ? string.Empty : $"{UserName} - Score:{Score}";
}
\ No newline at end of file
diff --git a/DiscOut/Program.axaml.cs b/DiscOut/Program.axaml.cs
index 72fe7d3..ae901f1 100644
--- a/DiscOut/Program.axaml.cs
+++ b/DiscOut/Program.axaml.cs
@@ -3,29 +3,32 @@
using Avalonia.Markup.Xaml;
using DiscOut.Avalonia;
using System;
-namespace DiscOut;
-public partial class Program : Application
+
+namespace DiscOut
{
- public override void Initialize()
+ public partial class Program : Application
{
- AvaloniaXamlLoader.Load(this);
- }
- public override void OnFrameworkInitializationCompleted()
- {
- if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+ public override void Initialize()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+ public override void OnFrameworkInitializationCompleted()
{
- desktop.MainWindow = new DiscWindow();
+ if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+ {
+ desktop.MainWindow = new DiscWindow();
+ }
+ base.OnFrameworkInitializationCompleted();
}
- base.OnFrameworkInitializationCompleted();
}
-}
-public static class Entry
-{
- [STAThread]
- public static void Main(string[] args)
+ public static class Entry
{
- Console.Write($"DISCout Copyright (C) 2023-{DateTime.Now.Year} DISC (Digital Independent specialist College) \nThis program comes with ABSOLUTELY NO WARRANTY;\n");
- BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ Console.Write($"DISCout Copyright (C) 2023-{DateTime.Now.Year} DISC (Digital Independent specialist College) \nThis program comes with ABSOLUTELY NO WARRANTY;\n");
+ BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
+ }
+ public static AppBuilder BuildAvaloniaApp() => AppBuilderDesktopExtensions.UsePlatformDetect().With(new Win32PlatformOptions { UseWgl = true }).LogToTrace();
}
- public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure().UsePlatformDetect().With(new Win32PlatformOptions { UseWgl = true }).LogToTrace();
}
\ No newline at end of file
diff --git a/DiscOut/Renderer/QuadBatchRenderer.cs b/DiscOut/Renderer/QuadBatchRenderer.cs
index 0b66caf..73057f8 100644
--- a/DiscOut/Renderer/QuadBatchRenderer.cs
+++ b/DiscOut/Renderer/QuadBatchRenderer.cs
@@ -3,134 +3,137 @@
using System;
using System.IO;
using static Avalonia.OpenGL.GlConsts;
-namespace DiscOut.Renderer;
-internal sealed class QuadBatchRenderer : GlInterfaceBase, IDisposable
+namespace DiscOut.Renderer
{
- private readonly GlInterface GL;
- private readonly int vbo;
- private readonly int vao;
- private readonly int sid;
- private readonly int sid_anti_ghost;
- private readonly int tex_id;
- private Vertex[] quadVertices = new Vertex[714];
- private int vertex_index = 0;
+ internal sealed class QuadBatchRenderer : GlInterfaceBase, IDisposable
+ {
+ private readonly GlInterface GL;
+ private readonly int vbo;
+ private readonly int vao;
+ private readonly int sid;
+ private readonly int sid_anti_ghost;
+ private readonly int tex_id;
+ private Vertex[] quadVertices = new Vertex[714];
+ private int vertex_index = 0;
- [GlEntryPoint("glGenVertexArrays")]
- public GlGenVertexArrays GenVertexArrays { get; } = null!;
- public delegate void GlGenVertexArrays(int count, int[] arrays);
+ [GlEntryPoint("glGenVertexArrays")]
+ public GlGenVertexArrays GenVertexArrays { get; } = null;
+ public delegate void GlGenVertexArrays(int count, int[] arrays);
- [GlEntryPoint("glDeleteVertexArrays")]
- public GlDeleteVertexArrays DeleteVertexArrays { get; } = null!;
- public delegate void GlDeleteVertexArrays(int count, int[] buffers);
+ [GlEntryPoint("glDeleteVertexArrays")]
+ public GlDeleteVertexArrays DeleteVertexArrays { get; } = null;
+ public delegate void GlDeleteVertexArrays(int count, int[] buffers);
- [GlEntryPoint("glBindVertexArray")]
- public GlBindVertexArray BindVertexArray { get; } = null!;
- public delegate void GlBindVertexArray(int array);
- private static int CreateShader(GlInterface GL, string vertex_source, string fragment_source)
- {
- int vid = GL.CreateShader(GL_VERTEX_SHADER);
- string vertexShaderInfoLog = GL.CompileShaderAndGetError(vid, vertex_source);
- if (!string.IsNullOrWhiteSpace(vertexShaderInfoLog))
- throw new FileLoadException($"Vertex shader compilation failed: {vertexShaderInfoLog}");
+ [GlEntryPoint("glBindVertexArray")]
+ public GlBindVertexArray BindVertexArray { get; } = null;
+ public delegate void GlBindVertexArray(int array);
+ private static int CreateShader(GlInterface GL, string vertex_source, string fragment_source)
+ {
+ int vid = GL.CreateShader(GL_VERTEX_SHADER);
+ string vertexShaderInfoLog = GL.CompileShaderAndGetError(vid, vertex_source);
+ if (!string.IsNullOrWhiteSpace(vertexShaderInfoLog))
+ throw new FileLoadException($"Vertex shader compilation failed: {vertexShaderInfoLog}");
- int fid = GL.CreateShader(GL_FRAGMENT_SHADER);
- string fragmentShaderInfoLog = GL.CompileShaderAndGetError(fid, fragment_source);
- if (!string.IsNullOrWhiteSpace(fragmentShaderInfoLog))
- throw new FileLoadException($"Fragment shader compilation failed: {fragmentShaderInfoLog}");
+ int fid = GL.CreateShader(GL_FRAGMENT_SHADER);
+ string fragmentShaderInfoLog = GL.CompileShaderAndGetError(fid, fragment_source);
+ if (!string.IsNullOrWhiteSpace(fragmentShaderInfoLog))
+ throw new FileLoadException($"Fragment shader compilation failed: {fragmentShaderInfoLog}");
- int id = GL.CreateProgram();
- GL.AttachShader(id, vid);
- GL.AttachShader(id, fid);
- string programLinkInfoLog = GL.LinkProgramAndGetError(id);
- if (!string.IsNullOrWhiteSpace(programLinkInfoLog))
- Console.WriteLine($"Shader program linking has problems: {programLinkInfoLog}");
- GL.DeleteShader(vid);
- GL.DeleteShader(fid);
- return id;
- }
+ int id = GL.CreateProgram();
+ GL.AttachShader(id, vid);
+ GL.AttachShader(id, fid);
+ string programLinkInfoLog = GL.LinkProgramAndGetError(id);
+ if (!string.IsNullOrWhiteSpace(programLinkInfoLog))
+ Console.WriteLine($"Shader program linking has problems: {programLinkInfoLog}");
+ GL.DeleteShader(vid);
+ GL.DeleteShader(fid);
+ return id;
+ }
- public QuadBatchRenderer(GlInterface gl) : base(gl.GetProcAddress, gl.ContextInfo)
- {
- GL = gl;
- string vertex_source = "#version 330 core\r\n// input\r\nlayout(location = 0) in vec2 position;\r\nlayout(location = 1) in float colour;\r\nlayout (location = 2) in float uv;\r\n// output\r\nout vec3 vertex_colour;\r\nout vec2 texture_coord;\r\n\r\n//colour look up\r\nvec3 colours[] = vec3[](vec3(255,255,255),vec3(157, 6, 241),vec3(255, 127, 80),vec3(251, 0, 250),vec3(0, 192, 237),vec3(249, 185, 0),vec3(0, 238, 0));\r\n\r\nvec2 uvs[] = vec2[](vec2(0.0, 0.0),vec2(1.0, 0.0),vec2(0.0, 1.0),vec2(1.0, 1.0));\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(position, 0.0, 1.0);\r\n vertex_colour = normalize(colours[int(colour)]);\r\n texture_coord = uvs[int(uv)];\r\n}";
- string fragment_source_basic = "#version 330 core\r\n\r\n// input\r\nin vec3 vertex_colour;\r\nin vec2 texture_coord; //mask texture_coord\r\nuniform sampler2D mask;\r\n// output\r\nout vec4 frag_colour;\r\n\r\nvoid main()\r\n{\r\n precision highp float;\r\n\r\n vec4 texColor = texture2D(mask, texture_coord);\r\n\r\n if (texColor.a < 0.9)\r\n discard;\r\n\r\n float grayscale = dot(texColor.rgb, vec3(0.2126, 0.7152, 0.0722));\r\n vec3 grayscaleColor = vec3(grayscale, grayscale, grayscale);\r\n \r\n frag_colour = vec4(vertex_colour - grayscaleColor,texColor.a);\r\n}";
- string fragment_source_ghost = "#version 330 core\r\n\r\n// input\r\nin vec3 vertex_colour;\r\nin vec2 texture_coord;\r\nuniform sampler2D mask;\r\n// output\r\nout vec4 frag_colour;\r\n\r\nvoid main()\r\n{\r\n precision highp float;\r\n\r\n vec4 texColor = texture2D(mask, texture_coord);\r\n\r\n if (texColor.a < 0.9)\r\n discard;\r\n frag_colour = vec4(vertex_colour,texColor.a);\r\n}";
- sid = CreateShader(gl, vertex_source, fragment_source_basic);
- sid_anti_ghost = CreateShader(gl, vertex_source, fragment_source_ghost);
- int[] tex = new int[1];
- GL.GenTextures(1, tex);
- tex_id = tex[0];
- GL.ActiveTexture(GL_TEXTURE0);
- GL.BindTexture(GL_TEXTURE_2D, tex_id);
- byte[] data = { 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 56, 56, 56, 6, 63, 63, 63, 91, 69, 69, 69, 172, 75, 75, 75, 223, 80, 80, 80, 250, 84, 84, 84, 255, 88, 88, 88, 255, 90, 90, 90, 255, 92, 92, 92, 255, 93, 93, 93, 255, 94, 94, 94, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 94, 94, 94, 255, 93, 93, 93, 255, 92, 92, 92, 255, 90, 90, 90, 255, 88, 88, 88, 255, 84, 84, 84, 255, 80, 80, 80, 250, 75, 75, 75, 223, 69, 69, 69, 172, 63, 63, 63, 91, 56, 56, 56, 6, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 61, 61, 61, 83, 70, 70, 70, 219, 78, 78, 78, 255, 86, 86, 86, 255, 93, 93, 93, 255, 99, 99, 99, 255, 104, 104, 104, 255, 108, 108, 108, 255, 111, 111, 111, 255, 113, 113, 113, 255, 114, 114, 114, 255, 115, 115, 115, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 115, 115, 115, 255, 114, 114, 114, 255, 113, 113, 113, 255, 111, 111, 111, 255, 108, 108, 108, 255, 104, 104, 104, 255, 99, 99, 99, 255, 93, 93, 93, 255, 86, 86, 86, 255, 79, 79, 79, 255, 70, 70, 70, 219, 61, 61, 61, 84, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 54, 54, 54, 3, 64, 64, 64, 147, 75, 75, 75, 255, 86, 86, 86, 255, 96, 96, 96, 255, 105, 105, 105, 255, 113, 113, 113, 255, 120, 120, 120, 255, 125, 125, 125, 255, 130, 130, 130, 255, 133, 133, 133, 255, 136, 136, 136, 255, 137, 137, 137, 255, 138, 138, 138, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 138, 138, 138, 255, 137, 137, 137, 255, 136, 136, 136, 255, 133, 133, 133, 255, 130, 130, 130, 255, 125, 125, 125, 255, 120, 120, 120, 255, 113, 113, 113, 255, 105, 105, 105, 255, 96, 96, 96, 255, 86, 86, 86, 255, 75, 75, 75, 255, 64, 64, 64, 148, 54, 54, 54, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 64, 64, 64, 138, 77, 77, 77, 255, 89, 89, 89, 255, 101, 101, 101, 255, 113, 113, 113, 255, 123, 123, 123, 255, 132, 132, 132, 255, 139, 139, 139, 255, 146, 146, 146, 255, 151, 151, 151, 255, 155, 155, 155, 255, 157, 157, 157, 255, 158, 158, 158, 255, 159, 159, 159, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 159, 159, 159, 255, 158, 158, 158, 255, 157, 157, 157, 255, 155, 155, 155, 255, 151, 151, 151, 255, 146, 146, 146, 255, 139, 139, 139, 255, 132, 132, 132, 255, 123, 123, 123, 255, 113, 113, 113, 255, 101, 101, 101, 255, 89, 89, 89, 255, 77, 77, 77, 255, 64, 64, 64, 138, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 61, 61, 61, 85, 74, 74, 74, 255, 89, 89, 89, 255, 103, 103, 103, 255, 116, 116, 116, 255, 129, 129, 129, 255, 140, 140, 140, 255, 149, 149, 149, 255, 158, 158, 158, 255, 165, 165, 165, 255, 170, 170, 170, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 178, 178, 178, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 178, 178, 178, 255, 178, 178, 178, 255, 176, 176, 176, 255, 174, 174, 174, 255, 170, 170, 170, 255, 165, 165, 165, 255, 158, 158, 158, 255, 149, 149, 149, 255, 140, 140, 140, 255, 129, 129, 129, 255, 116, 116, 116, 255, 103, 103, 103, 255, 89, 89, 89, 255, 75, 75, 75, 255, 61, 61, 61, 85, 255, 255, 255, 0, 55, 55, 55, 6, 68, 68, 68, 227, 84, 84, 84, 255, 100, 100, 100, 255, 115, 115, 115, 255, 130, 130, 130, 255, 143, 143, 143, 255, 155, 155, 155, 255, 165, 165, 165, 255, 174, 174, 174, 255, 181, 181, 181, 255, 187, 187, 187, 255, 191, 191, 191, 255, 193, 193, 193, 255, 195, 195, 195, 255, 195, 195, 195, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 195, 195, 195, 255, 195, 195, 195, 255, 193, 193, 193, 255, 191, 191, 191, 255, 187, 187, 187, 255, 181, 181, 181, 255, 174, 174, 174, 255, 165, 165, 165, 255, 155, 155, 155, 255, 143, 143, 143, 255, 130, 130, 130, 255, 115, 115, 115, 255, 100, 100, 100, 255, 84, 84, 84, 255, 69, 69, 69, 228, 55, 55, 55, 7, 60, 60, 60, 91, 75, 75, 75, 255, 92, 92, 92, 255, 110, 110, 110, 255, 126, 126, 126, 255, 142, 142, 142, 255, 156, 156, 156, 255, 168, 168, 168, 255, 179, 179, 179, 255, 189, 189, 189, 255, 196, 196, 196, 255, 202, 202, 202, 255, 206, 206, 206, 255, 208, 208, 208, 255, 209, 209, 209, 255, 210, 210, 210, 255, 210, 210, 210, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 210, 210, 210, 255, 210, 210, 210, 255, 209, 209, 209, 255, 208, 208, 208, 255, 206, 206, 206, 255, 202, 202, 202, 255, 196, 196, 196, 255, 189, 189, 189, 255, 179, 179, 179, 255, 169, 169, 169, 255, 156, 156, 156, 255, 142, 142, 142, 255, 126, 126, 126, 255, 110, 110, 110, 255, 92, 92, 92, 255, 76, 76, 76, 255, 60, 60, 60, 92, 65, 65, 65, 171, 81, 81, 81, 255, 99, 99, 99, 255, 117, 117, 117, 255, 135, 135, 135, 255, 151, 151, 151, 255, 166, 166, 166, 255, 179, 179, 179, 255, 191, 191, 191, 255, 201, 201, 201, 255, 208, 208, 208, 255, 214, 214, 214, 255, 219, 219, 219, 255, 221, 221, 221, 255, 222, 222, 222, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 222, 222, 222, 255, 221, 221, 221, 255, 219, 219, 219, 255, 214, 214, 214, 255, 208, 208, 208, 255, 201, 201, 201, 255, 191, 191, 191, 255, 179, 179, 179, 255, 166, 166, 166, 255, 151, 151, 151, 255, 135, 135, 135, 255, 117, 117, 117, 255, 99, 99, 99, 255, 81, 81, 81, 255, 65, 65, 65, 172, 68, 68, 68, 217, 85, 85, 85, 255, 104, 104, 104, 255, 123, 123, 123, 255, 141, 141, 141, 255, 158, 158, 158, 255, 173, 173, 173, 255, 187, 187, 187, 255, 199, 199, 199, 255, 209, 209, 209, 255, 217, 217, 217, 255, 223, 223, 223, 255, 227, 227, 227, 255, 229, 229, 229, 255, 231, 231, 231, 255, 231, 231, 231, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 231, 231, 231, 255, 231, 231, 231, 255, 229, 229, 229, 255, 227, 227, 227, 255, 223, 223, 223, 255, 217, 217, 217, 255, 209, 209, 209, 255, 199, 199, 199, 255, 187, 187, 187, 255, 173, 173, 173, 255, 158, 158, 158, 255, 141, 141, 141, 255, 123, 123, 123, 255, 104, 104, 104, 255, 85, 85, 85, 255, 68, 68, 68, 224, 69, 69, 69, 242, 87, 87, 87, 255, 106, 106, 106, 255, 125, 125, 125, 255, 144, 144, 144, 255, 161, 161, 161, 255, 177, 177, 177, 255, 190, 190, 190, 255, 202, 202, 202, 255, 213, 213, 213, 255, 221, 221, 221, 255, 227, 227, 227, 255, 231, 231, 231, 255, 234, 234, 234, 255, 235, 235, 235, 255, 235, 235, 235, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 235, 235, 235, 255, 235, 235, 235, 255, 233, 233, 233, 255, 231, 231, 231, 255, 227, 227, 227, 255, 221, 221, 221, 255, 213, 213, 213, 255, 202, 202, 202, 255, 190, 190, 190, 255, 177, 177, 177, 255, 161, 161, 161, 255, 144, 144, 144, 255, 125, 125, 125, 255, 106, 106, 106, 255, 87, 87, 87, 255, 70, 70, 70, 249, 69, 69, 69, 248, 87, 87, 87, 255, 106, 106, 106, 255, 125, 125, 125, 255, 144, 144, 144, 255, 161, 161, 161, 255, 177, 177, 177, 255, 190, 190, 190, 255, 202, 202, 202, 255, 213, 213, 213, 255, 221, 221, 221, 255, 227, 227, 227, 255, 231, 231, 231, 255, 234, 234, 234, 255, 235, 235, 235, 255, 235, 235, 235, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 235, 235, 235, 255, 235, 235, 235, 255, 233, 233, 233, 255, 231, 231, 231, 255, 227, 227, 227, 255, 221, 221, 221, 255, 213, 213, 213, 255, 202, 202, 202, 255, 190, 190, 190, 255, 177, 177, 177, 255, 161, 161, 161, 255, 144, 144, 144, 255, 125, 125, 125, 255, 106, 106, 106, 255, 87, 87, 87, 255, 70, 70, 70, 249, 68, 68, 68, 224, 85, 85, 85, 255, 104, 104, 104, 255, 123, 123, 123, 255, 141, 141, 141, 255, 158, 158, 158, 255, 173, 173, 173, 255, 187, 187, 187, 255, 199, 199, 199, 255, 209, 209, 209, 255, 217, 217, 217, 255, 223, 223, 223, 255, 227, 227, 227, 255, 229, 229, 229, 255, 231, 231, 231, 255, 231, 231, 231, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 231, 231, 231, 255, 231, 231, 231, 255, 229, 229, 229, 255, 227, 227, 227, 255, 223, 223, 223, 255, 217, 217, 217, 255, 209, 209, 209, 255, 199, 199, 199, 255, 187, 187, 187, 255, 173, 173, 173, 255, 158, 158, 158, 255, 141, 141, 141, 255, 123, 123, 123, 255, 104, 104, 104, 255, 85, 85, 85, 255, 68, 68, 68, 224, 65, 65, 65, 171, 81, 81, 81, 255, 99, 99, 99, 255, 117, 117, 117, 255, 135, 135, 135, 255, 151, 151, 151, 255, 166, 166, 166, 255, 179, 179, 179, 255, 191, 191, 191, 255, 201, 201, 201, 255, 208, 208, 208, 255, 214, 214, 214, 255, 219, 219, 219, 255, 221, 221, 221, 255, 222, 222, 222, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 222, 222, 222, 255, 221, 221, 221, 255, 219, 219, 219, 255, 214, 214, 214, 255, 208, 208, 208, 255, 201, 201, 201, 255, 191, 191, 191, 255, 179, 179, 179, 255, 166, 166, 166, 255, 151, 151, 151, 255, 135, 135, 135, 255, 117, 117, 117, 255, 99, 99, 99, 255, 81, 81, 81, 255, 65, 65, 65, 172, 60, 60, 60, 91, 75, 75, 75, 255, 92, 92, 92, 255, 110, 110, 110, 255, 126, 126, 126, 255, 142, 142, 142, 255, 156, 156, 156, 255, 168, 168, 168, 255, 179, 179, 179, 255, 189, 189, 189, 255, 196, 196, 196, 255, 202, 202, 202, 255, 206, 206, 206, 255, 208, 208, 208, 255, 209, 209, 209, 255, 210, 210, 210, 255, 210, 210, 210, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 210, 210, 210, 255, 210, 210, 210, 255, 209, 209, 209, 255, 208, 208, 208, 255, 206, 206, 206, 255, 202, 202, 202, 255, 196, 196, 196, 255, 189, 189, 189, 255, 179, 179, 179, 255, 168, 168, 168, 255, 156, 156, 156, 255, 142, 142, 142, 255, 126, 126, 126, 255, 110, 110, 110, 255, 92, 92, 92, 255, 75, 75, 75, 255, 60, 60, 60, 92, 55, 55, 55, 6, 68, 68, 68, 227, 84, 84, 84, 255, 100, 100, 100, 255, 115, 115, 115, 255, 130, 130, 130, 255, 143, 143, 143, 255, 155, 155, 155, 255, 165, 165, 165, 255, 174, 174, 174, 255, 181, 181, 181, 255, 187, 187, 187, 255, 191, 191, 191, 255, 193, 193, 193, 255, 195, 195, 195, 255, 195, 195, 195, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 195, 195, 195, 255, 195, 195, 195, 255, 193, 193, 193, 255, 191, 191, 191, 255, 187, 187, 187, 255, 181, 181, 181, 255, 174, 174, 174, 255, 165, 165, 165, 255, 155, 155, 155, 255, 143, 143, 143, 255, 130, 130, 130, 255, 115, 115, 115, 255, 100, 100, 100, 255, 84, 84, 84, 255, 69, 69, 69, 228, 55, 55, 55, 6, 255, 255, 255, 0, 61, 61, 61, 84, 74, 74, 74, 255, 89, 89, 89, 255, 103, 103, 103, 255, 116, 116, 116, 255, 129, 129, 129, 255, 140, 140, 140, 255, 149, 149, 149, 255, 158, 158, 158, 255, 165, 165, 165, 255, 170, 170, 170, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 178, 178, 178, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 178, 178, 178, 255, 177, 177, 177, 255, 176, 176, 176, 255, 174, 174, 174, 255, 170, 170, 170, 255, 164, 164, 164, 255, 158, 158, 158, 255, 149, 149, 149, 255, 140, 140, 140, 255, 128, 128, 128, 255, 116, 116, 116, 255, 103, 103, 103, 255, 89, 89, 89, 255, 74, 74, 74, 255, 61, 61, 61, 84, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 64, 64, 64, 137, 77, 77, 77, 255, 89, 89, 89, 255, 101, 101, 101, 255, 113, 113, 113, 255, 123, 123, 123, 255, 132, 132, 132, 255, 139, 139, 139, 255, 146, 146, 146, 255, 151, 151, 151, 255, 154, 154, 154, 255, 157, 157, 157, 255, 158, 158, 158, 255, 159, 159, 159, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 159, 159, 159, 255, 158, 158, 158, 255, 157, 157, 157, 255, 154, 154, 154, 255, 151, 151, 151, 255, 146, 146, 146, 255, 139, 139, 139, 255, 132, 132, 132, 255, 123, 123, 123, 255, 112, 112, 112, 255, 101, 101, 101, 255, 89, 89, 89, 255, 77, 77, 77, 255, 64, 64, 64, 137, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 54, 54, 54, 3, 64, 64, 64, 137, 75, 75, 75, 255, 86, 86, 86, 255, 96, 96, 96, 255, 105, 105, 105, 255, 113, 113, 113, 255, 120, 120, 120, 255, 125, 125, 125, 255, 130, 130, 130, 255, 133, 133, 133, 255, 136, 136, 136, 255, 137, 137, 137, 255, 138, 138, 138, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 138, 138, 138, 255, 137, 137, 137, 255, 136, 136, 136, 255, 133, 133, 133, 255, 130, 130, 130, 255, 125, 125, 125, 255, 119, 119, 119, 255, 112, 112, 112, 255, 104, 104, 104, 255, 95, 95, 95, 255, 86, 86, 86, 255, 75, 75, 75, 255, 64, 64, 64, 137, 54, 54, 54, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 61, 61, 61, 81, 70, 70, 70, 219, 78, 78, 78, 255, 86, 86, 86, 255, 93, 93, 93, 255, 99, 99, 99, 255, 104, 104, 104, 255, 108, 108, 108, 255, 111, 111, 111, 255, 113, 113, 113, 255, 114, 114, 114, 255, 115, 115, 115, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 115, 115, 115, 255, 114, 114, 114, 255, 113, 113, 113, 255, 111, 111, 111, 255, 108, 108, 108, 255, 104, 104, 104, 255, 99, 99, 99, 255, 93, 93, 93, 255, 86, 86, 86, 255, 78, 78, 78, 255, 70, 70, 70, 219, 61, 61, 61, 82, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 56, 56, 56, 6, 63, 63, 63, 86, 69, 69, 69, 166, 75, 75, 75, 223, 80, 80, 80, 249, 84, 84, 84, 255, 88, 88, 88, 255, 90, 90, 90, 255, 92, 92, 92, 255, 93, 93, 93, 255, 94, 94, 94, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 94, 94, 94, 255, 94, 94, 94, 255, 93, 93, 93, 255, 92, 92, 92, 255, 90, 90, 90, 255, 88, 88, 88, 255, 84, 84, 84, 255, 80, 80, 80, 243, 75, 75, 75, 215, 69, 69, 69, 166, 63, 63, 63, 85, 56, 56, 56, 6, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0 };
- unsafe
+ public QuadBatchRenderer(GlInterface gl) : base(gl.GetProcAddress, gl.ContextInfo)
{
- fixed (void* ptr_data = data)
- GL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 160, 20, 0, GL_RGBA, GL_UNSIGNED_BYTE, new nint(ptr_data));
+ GL = gl;
+ string vertex_source = "#version 330 core\r\n// input\r\nlayout(location = 0) in vec2 position;\r\nlayout(location = 1) in float colour;\r\nlayout (location = 2) in float uv;\r\n// output\r\nout vec3 vertex_colour;\r\nout vec2 texture_coord;\r\n\r\n//colour look up\r\nvec3 colours[] = vec3[](vec3(255,255,255),vec3(157, 6, 241),vec3(255, 127, 80),vec3(251, 0, 250),vec3(0, 192, 237),vec3(249, 185, 0),vec3(0, 238, 0));\r\n\r\nvec2 uvs[] = vec2[](vec2(0.0, 0.0),vec2(1.0, 0.0),vec2(0.0, 1.0),vec2(1.0, 1.0));\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(position, 0.0, 1.0);\r\n vertex_colour = normalize(colours[int(colour)]);\r\n texture_coord = uvs[int(uv)];\r\n}";
+ string fragment_source_basic = "#version 330 core\r\n\r\n// input\r\nin vec3 vertex_colour;\r\nin vec2 texture_coord; //mask texture_coord\r\nuniform sampler2D mask;\r\n// output\r\nout vec4 frag_colour;\r\n\r\nvoid main()\r\n{\r\n precision highp float;\r\n\r\n vec4 texColor = texture2D(mask, texture_coord);\r\n\r\n if (texColor.a < 0.9)\r\n discard;\r\n\r\n float grayscale = dot(texColor.rgb, vec3(0.2126, 0.7152, 0.0722));\r\n vec3 grayscaleColor = vec3(grayscale, grayscale, grayscale);\r\n \r\n frag_colour = vec4(vertex_colour - grayscaleColor,texColor.a);\r\n}";
+ string fragment_source_ghost = "#version 330 core\r\n\r\n// input\r\nin vec3 vertex_colour;\r\nin vec2 texture_coord;\r\nuniform sampler2D mask;\r\n// output\r\nout vec4 frag_colour;\r\n\r\nvoid main()\r\n{\r\n precision highp float;\r\n\r\n vec4 texColor = texture2D(mask, texture_coord);\r\n\r\n if (texColor.a < 0.9)\r\n discard;\r\n frag_colour = vec4(vertex_colour,texColor.a);\r\n}";
+ sid = CreateShader(gl, vertex_source, fragment_source_basic);
+ sid_anti_ghost = CreateShader(gl, vertex_source, fragment_source_ghost);
+ int[] tex = new int[1];
+ GL.GenTextures(1, tex);
+ tex_id = tex[0];
+ GL.ActiveTexture(GL_TEXTURE0);
+ GL.BindTexture(GL_TEXTURE_2D, tex_id);
+ byte[] data = { 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 56, 56, 56, 6, 63, 63, 63, 91, 69, 69, 69, 172, 75, 75, 75, 223, 80, 80, 80, 250, 84, 84, 84, 255, 88, 88, 88, 255, 90, 90, 90, 255, 92, 92, 92, 255, 93, 93, 93, 255, 94, 94, 94, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 94, 94, 94, 255, 93, 93, 93, 255, 92, 92, 92, 255, 90, 90, 90, 255, 88, 88, 88, 255, 84, 84, 84, 255, 80, 80, 80, 250, 75, 75, 75, 223, 69, 69, 69, 172, 63, 63, 63, 91, 56, 56, 56, 6, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 61, 61, 61, 83, 70, 70, 70, 219, 78, 78, 78, 255, 86, 86, 86, 255, 93, 93, 93, 255, 99, 99, 99, 255, 104, 104, 104, 255, 108, 108, 108, 255, 111, 111, 111, 255, 113, 113, 113, 255, 114, 114, 114, 255, 115, 115, 115, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 115, 115, 115, 255, 114, 114, 114, 255, 113, 113, 113, 255, 111, 111, 111, 255, 108, 108, 108, 255, 104, 104, 104, 255, 99, 99, 99, 255, 93, 93, 93, 255, 86, 86, 86, 255, 79, 79, 79, 255, 70, 70, 70, 219, 61, 61, 61, 84, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 54, 54, 54, 3, 64, 64, 64, 147, 75, 75, 75, 255, 86, 86, 86, 255, 96, 96, 96, 255, 105, 105, 105, 255, 113, 113, 113, 255, 120, 120, 120, 255, 125, 125, 125, 255, 130, 130, 130, 255, 133, 133, 133, 255, 136, 136, 136, 255, 137, 137, 137, 255, 138, 138, 138, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 138, 138, 138, 255, 137, 137, 137, 255, 136, 136, 136, 255, 133, 133, 133, 255, 130, 130, 130, 255, 125, 125, 125, 255, 120, 120, 120, 255, 113, 113, 113, 255, 105, 105, 105, 255, 96, 96, 96, 255, 86, 86, 86, 255, 75, 75, 75, 255, 64, 64, 64, 148, 54, 54, 54, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 64, 64, 64, 138, 77, 77, 77, 255, 89, 89, 89, 255, 101, 101, 101, 255, 113, 113, 113, 255, 123, 123, 123, 255, 132, 132, 132, 255, 139, 139, 139, 255, 146, 146, 146, 255, 151, 151, 151, 255, 155, 155, 155, 255, 157, 157, 157, 255, 158, 158, 158, 255, 159, 159, 159, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 159, 159, 159, 255, 158, 158, 158, 255, 157, 157, 157, 255, 155, 155, 155, 255, 151, 151, 151, 255, 146, 146, 146, 255, 139, 139, 139, 255, 132, 132, 132, 255, 123, 123, 123, 255, 113, 113, 113, 255, 101, 101, 101, 255, 89, 89, 89, 255, 77, 77, 77, 255, 64, 64, 64, 138, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 61, 61, 61, 85, 74, 74, 74, 255, 89, 89, 89, 255, 103, 103, 103, 255, 116, 116, 116, 255, 129, 129, 129, 255, 140, 140, 140, 255, 149, 149, 149, 255, 158, 158, 158, 255, 165, 165, 165, 255, 170, 170, 170, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 178, 178, 178, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 178, 178, 178, 255, 178, 178, 178, 255, 176, 176, 176, 255, 174, 174, 174, 255, 170, 170, 170, 255, 165, 165, 165, 255, 158, 158, 158, 255, 149, 149, 149, 255, 140, 140, 140, 255, 129, 129, 129, 255, 116, 116, 116, 255, 103, 103, 103, 255, 89, 89, 89, 255, 75, 75, 75, 255, 61, 61, 61, 85, 255, 255, 255, 0, 55, 55, 55, 6, 68, 68, 68, 227, 84, 84, 84, 255, 100, 100, 100, 255, 115, 115, 115, 255, 130, 130, 130, 255, 143, 143, 143, 255, 155, 155, 155, 255, 165, 165, 165, 255, 174, 174, 174, 255, 181, 181, 181, 255, 187, 187, 187, 255, 191, 191, 191, 255, 193, 193, 193, 255, 195, 195, 195, 255, 195, 195, 195, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 195, 195, 195, 255, 195, 195, 195, 255, 193, 193, 193, 255, 191, 191, 191, 255, 187, 187, 187, 255, 181, 181, 181, 255, 174, 174, 174, 255, 165, 165, 165, 255, 155, 155, 155, 255, 143, 143, 143, 255, 130, 130, 130, 255, 115, 115, 115, 255, 100, 100, 100, 255, 84, 84, 84, 255, 69, 69, 69, 228, 55, 55, 55, 7, 60, 60, 60, 91, 75, 75, 75, 255, 92, 92, 92, 255, 110, 110, 110, 255, 126, 126, 126, 255, 142, 142, 142, 255, 156, 156, 156, 255, 168, 168, 168, 255, 179, 179, 179, 255, 189, 189, 189, 255, 196, 196, 196, 255, 202, 202, 202, 255, 206, 206, 206, 255, 208, 208, 208, 255, 209, 209, 209, 255, 210, 210, 210, 255, 210, 210, 210, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 210, 210, 210, 255, 210, 210, 210, 255, 209, 209, 209, 255, 208, 208, 208, 255, 206, 206, 206, 255, 202, 202, 202, 255, 196, 196, 196, 255, 189, 189, 189, 255, 179, 179, 179, 255, 169, 169, 169, 255, 156, 156, 156, 255, 142, 142, 142, 255, 126, 126, 126, 255, 110, 110, 110, 255, 92, 92, 92, 255, 76, 76, 76, 255, 60, 60, 60, 92, 65, 65, 65, 171, 81, 81, 81, 255, 99, 99, 99, 255, 117, 117, 117, 255, 135, 135, 135, 255, 151, 151, 151, 255, 166, 166, 166, 255, 179, 179, 179, 255, 191, 191, 191, 255, 201, 201, 201, 255, 208, 208, 208, 255, 214, 214, 214, 255, 219, 219, 219, 255, 221, 221, 221, 255, 222, 222, 222, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 222, 222, 222, 255, 221, 221, 221, 255, 219, 219, 219, 255, 214, 214, 214, 255, 208, 208, 208, 255, 201, 201, 201, 255, 191, 191, 191, 255, 179, 179, 179, 255, 166, 166, 166, 255, 151, 151, 151, 255, 135, 135, 135, 255, 117, 117, 117, 255, 99, 99, 99, 255, 81, 81, 81, 255, 65, 65, 65, 172, 68, 68, 68, 217, 85, 85, 85, 255, 104, 104, 104, 255, 123, 123, 123, 255, 141, 141, 141, 255, 158, 158, 158, 255, 173, 173, 173, 255, 187, 187, 187, 255, 199, 199, 199, 255, 209, 209, 209, 255, 217, 217, 217, 255, 223, 223, 223, 255, 227, 227, 227, 255, 229, 229, 229, 255, 231, 231, 231, 255, 231, 231, 231, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 231, 231, 231, 255, 231, 231, 231, 255, 229, 229, 229, 255, 227, 227, 227, 255, 223, 223, 223, 255, 217, 217, 217, 255, 209, 209, 209, 255, 199, 199, 199, 255, 187, 187, 187, 255, 173, 173, 173, 255, 158, 158, 158, 255, 141, 141, 141, 255, 123, 123, 123, 255, 104, 104, 104, 255, 85, 85, 85, 255, 68, 68, 68, 224, 69, 69, 69, 242, 87, 87, 87, 255, 106, 106, 106, 255, 125, 125, 125, 255, 144, 144, 144, 255, 161, 161, 161, 255, 177, 177, 177, 255, 190, 190, 190, 255, 202, 202, 202, 255, 213, 213, 213, 255, 221, 221, 221, 255, 227, 227, 227, 255, 231, 231, 231, 255, 234, 234, 234, 255, 235, 235, 235, 255, 235, 235, 235, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 235, 235, 235, 255, 235, 235, 235, 255, 233, 233, 233, 255, 231, 231, 231, 255, 227, 227, 227, 255, 221, 221, 221, 255, 213, 213, 213, 255, 202, 202, 202, 255, 190, 190, 190, 255, 177, 177, 177, 255, 161, 161, 161, 255, 144, 144, 144, 255, 125, 125, 125, 255, 106, 106, 106, 255, 87, 87, 87, 255, 70, 70, 70, 249, 69, 69, 69, 248, 87, 87, 87, 255, 106, 106, 106, 255, 125, 125, 125, 255, 144, 144, 144, 255, 161, 161, 161, 255, 177, 177, 177, 255, 190, 190, 190, 255, 202, 202, 202, 255, 213, 213, 213, 255, 221, 221, 221, 255, 227, 227, 227, 255, 231, 231, 231, 255, 234, 234, 234, 255, 235, 235, 235, 255, 235, 235, 235, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 236, 236, 236, 255, 235, 235, 235, 255, 235, 235, 235, 255, 233, 233, 233, 255, 231, 231, 231, 255, 227, 227, 227, 255, 221, 221, 221, 255, 213, 213, 213, 255, 202, 202, 202, 255, 190, 190, 190, 255, 177, 177, 177, 255, 161, 161, 161, 255, 144, 144, 144, 255, 125, 125, 125, 255, 106, 106, 106, 255, 87, 87, 87, 255, 70, 70, 70, 249, 68, 68, 68, 224, 85, 85, 85, 255, 104, 104, 104, 255, 123, 123, 123, 255, 141, 141, 141, 255, 158, 158, 158, 255, 173, 173, 173, 255, 187, 187, 187, 255, 199, 199, 199, 255, 209, 209, 209, 255, 217, 217, 217, 255, 223, 223, 223, 255, 227, 227, 227, 255, 229, 229, 229, 255, 231, 231, 231, 255, 231, 231, 231, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 232, 232, 232, 255, 231, 231, 231, 255, 231, 231, 231, 255, 229, 229, 229, 255, 227, 227, 227, 255, 223, 223, 223, 255, 217, 217, 217, 255, 209, 209, 209, 255, 199, 199, 199, 255, 187, 187, 187, 255, 173, 173, 173, 255, 158, 158, 158, 255, 141, 141, 141, 255, 123, 123, 123, 255, 104, 104, 104, 255, 85, 85, 85, 255, 68, 68, 68, 224, 65, 65, 65, 171, 81, 81, 81, 255, 99, 99, 99, 255, 117, 117, 117, 255, 135, 135, 135, 255, 151, 151, 151, 255, 166, 166, 166, 255, 179, 179, 179, 255, 191, 191, 191, 255, 201, 201, 201, 255, 208, 208, 208, 255, 214, 214, 214, 255, 219, 219, 219, 255, 221, 221, 221, 255, 222, 222, 222, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 223, 223, 223, 255, 222, 222, 222, 255, 221, 221, 221, 255, 219, 219, 219, 255, 214, 214, 214, 255, 208, 208, 208, 255, 201, 201, 201, 255, 191, 191, 191, 255, 179, 179, 179, 255, 166, 166, 166, 255, 151, 151, 151, 255, 135, 135, 135, 255, 117, 117, 117, 255, 99, 99, 99, 255, 81, 81, 81, 255, 65, 65, 65, 172, 60, 60, 60, 91, 75, 75, 75, 255, 92, 92, 92, 255, 110, 110, 110, 255, 126, 126, 126, 255, 142, 142, 142, 255, 156, 156, 156, 255, 168, 168, 168, 255, 179, 179, 179, 255, 189, 189, 189, 255, 196, 196, 196, 255, 202, 202, 202, 255, 206, 206, 206, 255, 208, 208, 208, 255, 209, 209, 209, 255, 210, 210, 210, 255, 210, 210, 210, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 211, 211, 211, 255, 210, 210, 210, 255, 210, 210, 210, 255, 209, 209, 209, 255, 208, 208, 208, 255, 206, 206, 206, 255, 202, 202, 202, 255, 196, 196, 196, 255, 189, 189, 189, 255, 179, 179, 179, 255, 168, 168, 168, 255, 156, 156, 156, 255, 142, 142, 142, 255, 126, 126, 126, 255, 110, 110, 110, 255, 92, 92, 92, 255, 75, 75, 75, 255, 60, 60, 60, 92, 55, 55, 55, 6, 68, 68, 68, 227, 84, 84, 84, 255, 100, 100, 100, 255, 115, 115, 115, 255, 130, 130, 130, 255, 143, 143, 143, 255, 155, 155, 155, 255, 165, 165, 165, 255, 174, 174, 174, 255, 181, 181, 181, 255, 187, 187, 187, 255, 191, 191, 191, 255, 193, 193, 193, 255, 195, 195, 195, 255, 195, 195, 195, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 196, 196, 196, 255, 195, 195, 195, 255, 195, 195, 195, 255, 193, 193, 193, 255, 191, 191, 191, 255, 187, 187, 187, 255, 181, 181, 181, 255, 174, 174, 174, 255, 165, 165, 165, 255, 155, 155, 155, 255, 143, 143, 143, 255, 130, 130, 130, 255, 115, 115, 115, 255, 100, 100, 100, 255, 84, 84, 84, 255, 69, 69, 69, 228, 55, 55, 55, 6, 255, 255, 255, 0, 61, 61, 61, 84, 74, 74, 74, 255, 89, 89, 89, 255, 103, 103, 103, 255, 116, 116, 116, 255, 129, 129, 129, 255, 140, 140, 140, 255, 149, 149, 149, 255, 158, 158, 158, 255, 165, 165, 165, 255, 170, 170, 170, 255, 174, 174, 174, 255, 176, 176, 176, 255, 178, 178, 178, 255, 178, 178, 178, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 179, 179, 179, 255, 178, 178, 178, 255, 177, 177, 177, 255, 176, 176, 176, 255, 174, 174, 174, 255, 170, 170, 170, 255, 164, 164, 164, 255, 158, 158, 158, 255, 149, 149, 149, 255, 140, 140, 140, 255, 128, 128, 128, 255, 116, 116, 116, 255, 103, 103, 103, 255, 89, 89, 89, 255, 74, 74, 74, 255, 61, 61, 61, 84, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 64, 64, 64, 137, 77, 77, 77, 255, 89, 89, 89, 255, 101, 101, 101, 255, 113, 113, 113, 255, 123, 123, 123, 255, 132, 132, 132, 255, 139, 139, 139, 255, 146, 146, 146, 255, 151, 151, 151, 255, 154, 154, 154, 255, 157, 157, 157, 255, 158, 158, 158, 255, 159, 159, 159, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 160, 160, 160, 255, 159, 159, 159, 255, 158, 158, 158, 255, 157, 157, 157, 255, 154, 154, 154, 255, 151, 151, 151, 255, 146, 146, 146, 255, 139, 139, 139, 255, 132, 132, 132, 255, 123, 123, 123, 255, 112, 112, 112, 255, 101, 101, 101, 255, 89, 89, 89, 255, 77, 77, 77, 255, 64, 64, 64, 137, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 54, 54, 54, 3, 64, 64, 64, 137, 75, 75, 75, 255, 86, 86, 86, 255, 96, 96, 96, 255, 105, 105, 105, 255, 113, 113, 113, 255, 120, 120, 120, 255, 125, 125, 125, 255, 130, 130, 130, 255, 133, 133, 133, 255, 136, 136, 136, 255, 137, 137, 137, 255, 138, 138, 138, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 139, 139, 139, 255, 138, 138, 138, 255, 137, 137, 137, 255, 136, 136, 136, 255, 133, 133, 133, 255, 130, 130, 130, 255, 125, 125, 125, 255, 119, 119, 119, 255, 112, 112, 112, 255, 104, 104, 104, 255, 95, 95, 95, 255, 86, 86, 86, 255, 75, 75, 75, 255, 64, 64, 64, 137, 54, 54, 54, 3, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 61, 61, 61, 81, 70, 70, 70, 219, 78, 78, 78, 255, 86, 86, 86, 255, 93, 93, 93, 255, 99, 99, 99, 255, 104, 104, 104, 255, 108, 108, 108, 255, 111, 111, 111, 255, 113, 113, 113, 255, 114, 114, 114, 255, 115, 115, 115, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 116, 116, 116, 255, 115, 115, 115, 255, 114, 114, 114, 255, 113, 113, 113, 255, 111, 111, 111, 255, 108, 108, 108, 255, 104, 104, 104, 255, 99, 99, 99, 255, 93, 93, 93, 255, 86, 86, 86, 255, 78, 78, 78, 255, 70, 70, 70, 219, 61, 61, 61, 82, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 56, 56, 56, 6, 63, 63, 63, 86, 69, 69, 69, 166, 75, 75, 75, 223, 80, 80, 80, 249, 84, 84, 84, 255, 88, 88, 88, 255, 90, 90, 90, 255, 92, 92, 92, 255, 93, 93, 93, 255, 94, 94, 94, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 95, 95, 95, 255, 94, 94, 94, 255, 94, 94, 94, 255, 93, 93, 93, 255, 92, 92, 92, 255, 90, 90, 90, 255, 88, 88, 88, 255, 84, 84, 84, 255, 80, 80, 80, 243, 75, 75, 75, 215, 69, 69, 69, 166, 63, 63, 63, 85, 56, 56, 56, 6, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0 };
+ unsafe
+ {
+ fixed (void* ptr_data = data)
+ GL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 160, 20, 0, GL_RGBA, GL_UNSIGNED_BYTE, new IntPtr(ptr_data));
+ }
+ GL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ GL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ GL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ GL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ vbo = GL.GenBuffer();
+ int[] vaos = new int[1];
+ GenVertexArrays(1, vaos);
+ vao = vaos[0];
+ BindVertexArray(vao);
+ GL.BindBuffer(GL_ARRAY_BUFFER, vbo);
+ GL.VertexAttribPointer(0, 2, GL_FLOAT, 0, 4 * sizeof(float), new IntPtr(0));
+ GL.EnableVertexAttribArray(0);
+ GL.VertexAttribPointer(1, 1, GL_FLOAT, 0, 4 * sizeof(float), 2 * sizeof(float));
+ GL.EnableVertexAttribArray(1);
+ GL.VertexAttribPointer(2, 1, GL_FLOAT, 0, 4 * sizeof(float), 3 * sizeof(float));
+ GL.EnableVertexAttribArray(2);
+ BindVertexArray(0);
}
- GL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- GL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- GL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- GL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- vbo = GL.GenBuffer();
- int[] vaos = new int[1];
- GenVertexArrays(1, vaos);
- vao = vaos[0];
- BindVertexArray(vao);
- GL.BindBuffer(GL_ARRAY_BUFFER, vbo);
- GL.VertexAttribPointer(0, 2, GL_FLOAT, 0, 4 * sizeof(float), 0);
- GL.EnableVertexAttribArray(0);
- GL.VertexAttribPointer(1, 1, GL_FLOAT, 0, 4 * sizeof(float), 2 * sizeof(float));
- GL.EnableVertexAttribArray(1);
- GL.VertexAttribPointer(2, 1, GL_FLOAT, 0, 4 * sizeof(float), 3 * sizeof(float));
- GL.EnableVertexAttribArray(2);
- BindVertexArray(0);
- }
-
- public void AddQuad(Vertex[] Vertices)
- {
- int i = 0;
- for (; vertex_index < 714 && i != Vertices.Length;)
- quadVertices[vertex_index++] = Vertices[i++];
- }
- public void AddQuad(float x, float y, float width, float height, float color)
- {
- VertexUtils.PreMakeQuad(x, y, width, height, color, ref quadVertices, vertex_index);
- vertex_index += 6;
- }
+ public void AddQuad(Vertex[] Vertices)
+ {
+ int i = 0;
+ for (; vertex_index < 714 && i != Vertices.Length;)
+ quadVertices[vertex_index++] = Vertices[i++];
+ }
- private void ShaderFlush(int id)
- {
- BindVertexArray(vao);
- unsafe
+ public void AddQuad(float x, float y, float width, float height, float color)
{
- fixed (void* ptr_data = quadVertices)
- GL.BufferData(GL_ARRAY_BUFFER, quadVertices.Length * 4 * sizeof(float), new nint(ptr_data), GL_DYNAMIC_DRAW);
+ VertexUtils.PreMakeQuad(x, y, width, height, color, ref quadVertices, vertex_index);
+ vertex_index += 6;
}
- GL.BindTexture(GL_TEXTURE_2D, tex_id);
- GL.UseProgram(id);
- GL.DrawArrays(GL_TRIANGLES, 0, quadVertices.Length);
- BindVertexArray(0);
- vertex_index = 0;
- for (int i = 0; i < quadVertices.Length; i++)
+
+ private unsafe void ShaderFlush(int id)
{
- quadVertices[i].UvID = 0f;
- quadVertices[i].ColorID = 0f;
- quadVertices[i].X = 0f;
- quadVertices[i].Y = 0f;
+ BindVertexArray(vao);
+ unsafe
+ {
+ fixed (void* ptr_data = quadVertices)
+ GL.BufferData(GL_ARRAY_BUFFER, quadVertices.Length * 4 * sizeof(float), new IntPtr(ptr_data), GL_DYNAMIC_DRAW);
+ }
+ GL.BindTexture(GL_TEXTURE_2D, tex_id);
+ GL.UseProgram(id);
+ int size = quadVertices.Length;
+ GL.DrawArrays(GL_TRIANGLES, 0, new IntPtr(&size));
+ BindVertexArray(0);
+ vertex_index = 0;
+ for (int i = 0; i < quadVertices.Length; i++)
+ {
+ quadVertices[i].UvID = 0f;
+ quadVertices[i].ColorID = 0f;
+ quadVertices[i].X = 0f;
+ quadVertices[i].Y = 0f;
+ }
}
- }
- public void Flush() => ShaderFlush(sid);
- public void FlushAntiGhost() => ShaderFlush(sid_anti_ghost);
+ public void Flush() => ShaderFlush(sid);
+ public void FlushAntiGhost() => ShaderFlush(sid_anti_ghost);
- public void Dispose()
- {
- GL.DeleteBuffers(1, new[] { vbo });
- DeleteVertexArrays(1, new[] { vao });
- GL.DeleteProgram(sid);
- GL.DeleteProgram(sid_anti_ghost);
- GL.DeleteTextures(1, new[] { tex_id });
+ public void Dispose()
+ {
+ GL.DeleteBuffers(1, new[] { vbo });
+ DeleteVertexArrays(1, new[] { vao });
+ GL.DeleteProgram(sid);
+ GL.DeleteProgram(sid_anti_ghost);
+ GL.DeleteTextures(1, new[] { tex_id });
+ }
}
}
\ No newline at end of file
diff --git a/DiscOut/Renderer/Vertex.cs b/DiscOut/Renderer/Vertex.cs
index d89c588..1bda077 100644
--- a/DiscOut/Renderer/Vertex.cs
+++ b/DiscOut/Renderer/Vertex.cs
@@ -1,24 +1,25 @@
-namespace DiscOut.Renderer;
-internal struct Vertex
+namespace DiscOut.Renderer
{
- public float X { get; set; } = 0f;
- public float Y { get; set; } = 0f;
- public float ColorID { get; set; } = 0f;
- public float UvID { get; set; } = 0f;
- public Vertex() { }
-}
-internal struct Aabb
-{
- public float MinX { get; set; }
- public float MinY { get; set; }
- public float MaxX { get; set; }
- public float MaxY { get; set; }
-
- public Aabb(Vertex[] quad)
+ internal struct Vertex
{
- MinX = quad[3].X;
- MinY = quad[3].Y;
- MaxX = quad[0].X;
- MaxY = quad[0].Y;
+ public float X { get; set; }
+ public float Y { get; set; }
+ public float ColorID { get; set; }
+ public float UvID { get; set; }
+ }
+ internal struct Aabb
+ {
+ public float MinX { get; set; }
+ public float MinY { get; set; }
+ public float MaxX { get; set; }
+ public float MaxY { get; set; }
+
+ public Aabb(Vertex[] quad)
+ {
+ MinX = quad[3].X;
+ MinY = quad[3].Y;
+ MaxX = quad[0].X;
+ MaxY = quad[0].Y;
+ }
}
}
\ No newline at end of file
diff --git a/DiscOut/Util/Util.cs b/DiscOut/Util/Util.cs
index 7faaf35..645393f 100644
--- a/DiscOut/Util/Util.cs
+++ b/DiscOut/Util/Util.cs
@@ -6,146 +6,179 @@
using System.Threading;
using DiscOut.Renderer;
using System.Numerics;
-namespace DiscOut.Util;
-// Contains utility functions related to sound
-internal static class SoundUtils
+namespace DiscOut.Util
{
- private static readonly Stream BOUNCE_DATA = AssetUtil.OpenEmbeddedFile("assets.sounds.bounce.wav");
- public static readonly WaveFileReader BOUNCE_SOUND = new(BOUNCE_DATA);
- private static readonly Stream CLICK_DATA = AssetUtil.OpenEmbeddedFile("assets.sounds.click.wav");
- public static readonly WaveFileReader CLICK_SOUND = new(CLICK_DATA);
- // Plays a sound using the specified IWaveProvider
- public static void PlaySound(IWaveProvider stream)
+ // Contains utility functions related to sound
+ internal static class SoundUtils
{
- ThreadPool.QueueUserWorkItem(delegate
+ private static readonly Stream BOUNCE_DATA = AssetUtil.OpenEmbeddedFile("assets.sounds.bounce.wav");
+ public static readonly WaveFileReader BOUNCE_SOUND = new WaveFileReader(BOUNCE_DATA);
+ private static readonly Stream CLICK_DATA = AssetUtil.OpenEmbeddedFile("assets.sounds.click.wav");
+ public static readonly WaveFileReader CLICK_SOUND = new WaveFileReader(CLICK_DATA);
+ // Plays a sound using the specified IWaveProvider
+ public static void PlaySound(IWaveProvider stream)
{
- using WaveOutEvent player = new();
- player.Init(stream);
- player.Play();
- while (player.PlaybackState != PlaybackState.Stopped) ;
- player.Dispose();
- });
- // Reset the position to the beginning if the stream is a WaveFileReader
- if (stream.GetType() == typeof(WaveFileReader))
- ((WaveFileReader)stream).Position = 0;
- }
- // Cleans up the sound resources
- public static void CleanUp()
- {
- BOUNCE_SOUND.Dispose();
- BOUNCE_DATA.Dispose();
- CLICK_SOUND.Dispose();
- CLICK_DATA.Dispose();
- }
-}
-// Contains utility functions related to vertices
-internal static class VertexUtils
-{
- // Pre-calculate the vertices for a quad and assign color and UV coordinates
- public static Vertex[] PreMakeQuad(float x, float y, float width, float height, float color)
- {
- var quad = new Vertex[6]; // Use 6 vertices for a quad triangle strip
- UpdateQuad(x, y, width, height, ref quad, 0);
- quad[0].ColorID = color;
- quad[0].UvID = 0;
- quad[1].ColorID = color;
- quad[1].UvID = 1;
- quad[2].ColorID = color;
- quad[2].UvID = 2;
- quad[3].ColorID = color;
- quad[3].UvID = 3;
- quad[4].ColorID = color;
- quad[4].UvID = 2;
- quad[5].ColorID = color;
- quad[5].UvID = 1;
- return quad;
- }
- // Pre-calculate the vertices for a quad and assign color and UV coordinates to an existing array of vertices
- public static void PreMakeQuad(float x, float y, float width, float height, float color, ref Vertex[] vertices, int index = 0)
- {
- UpdateQuad(x, y, width, height, ref vertices, index);
- vertices[index].ColorID = color;
- vertices[index].UvID = 0;
- vertices[index + 1].ColorID = color;
- vertices[index + 1].UvID = 1;
- vertices[index + 2].ColorID = color;
- vertices[index + 2].UvID = 2;
- vertices[index + 3].ColorID = color;
- vertices[index + 3].UvID = 3;
- vertices[index + 4].ColorID = color;
- vertices[index + 4].UvID = 2;
- vertices[index + 5].ColorID = color;
- vertices[index + 5].UvID = 1;
+ ThreadPool.QueueUserWorkItem(delegate
+ {
+ WaveOutEvent player = new WaveOutEvent();
+ player.Init(stream);
+ player.Play();
+ while (player.PlaybackState != PlaybackState.Stopped) ;
+ player.Dispose();
+ });
+ // Reset the position to the beginning if the stream is a WaveFileReader
+ if (stream.GetType() == typeof(WaveFileReader))
+ ((WaveFileReader)stream).Position = 0;
+ }
+ // Cleans up the sound resources
+ public static void CleanUp()
+ {
+ BOUNCE_SOUND.Dispose();
+ BOUNCE_DATA.Dispose();
+ CLICK_SOUND.Dispose();
+ CLICK_DATA.Dispose();
+ }
}
- // Pre-calculate the vertices for a quad based on the specified parameters
- private static readonly Vector3 PerTransform_0 = new(-3, -2, -4.1982f);
- private static readonly Vector3 PerTransform_1 = new(3, -2, -4.1982f);
- private static readonly Vector3 PerTransform_2 = new(-3, 2, -4.1982f);
- private static readonly Vector3 PerTransform_3 = new(3, 2, -4.1982f);
- private static readonly Vector3 PerTransform_4 = new(-3, 2, -4.1982f);
- private static readonly Vector3 PerTransform_5 = new(3, -2, -4.1982f);
- public static Vertex[] UpdateQuad(float x, float y, float width, float height, ref Vertex[] quad, int index = 0)
+ // Contains utility functions related to vertices
+ internal static class VertexUtils
{
- // Apply model transformation
- Matrix4x4 modelTransform = Matrix4x4.CreateTranslation(x, y, -1);
- modelTransform *= Matrix4x4.CreateScale(width, height, 1);
- // Calculate transformed vertices
- Vector3 transform_0 = Vector3.Transform(PerTransform_0, modelTransform);
- quad[index].X = transform_0.X / transform_0.Z;
- quad[index].Y = transform_0.Y / transform_0.Z;
- Vector3 transform_1 = Vector3.Transform(PerTransform_1, modelTransform);
- quad[index + 1].X = transform_1.X / transform_1.Z;
- quad[index + 1].Y = transform_1.Y / transform_1.Z;
+ public static float Clamp(float value, float min, float max)
+ {
+ if (value < min)
+ return min;
+ else if (value > max)
+ return max;
+ else
+ return value;
+ }
+
+ public static int Clamp(int value, int min, int max)
+ {
+ if (value < min)
+ return min;
+ else if (value > max)
+ return max;
+ else
+ return value;
+ }
+
+ public static short Clamp(short value, short min, short max)
+ {
+ if (value < min)
+ return min;
+ else if (value > max)
+ return max;
+ else
+ return value;
+ }
+
+ // Pre-calculate the vertices for a quad and assign color and UV coordinates
+ public static Vertex[] PreMakeQuad(float x, float y, float width, float height, float color)
+ {
+ var quad = new Vertex[6]; // Use 6 vertices for a quad triangle strip
+ UpdateQuad(x, y, width, height, ref quad, 0);
+ quad[0].ColorID = color;
+ quad[0].UvID = 0;
+ quad[1].ColorID = color;
+ quad[1].UvID = 1;
+ quad[2].ColorID = color;
+ quad[2].UvID = 2;
+ quad[3].ColorID = color;
+ quad[3].UvID = 3;
+ quad[4].ColorID = color;
+ quad[4].UvID = 2;
+ quad[5].ColorID = color;
+ quad[5].UvID = 1;
+ return quad;
+ }
+ // Pre-calculate the vertices for a quad and assign color and UV coordinates to an existing array of vertices
+ public static void PreMakeQuad(float x, float y, float width, float height, float color, ref Vertex[] vertices, int index = 0)
+ {
+ UpdateQuad(x, y, width, height, ref vertices, index);
+ vertices[index].ColorID = color;
+ vertices[index].UvID = 0;
+ vertices[index + 1].ColorID = color;
+ vertices[index + 1].UvID = 1;
+ vertices[index + 2].ColorID = color;
+ vertices[index + 2].UvID = 2;
+ vertices[index + 3].ColorID = color;
+ vertices[index + 3].UvID = 3;
+ vertices[index + 4].ColorID = color;
+ vertices[index + 4].UvID = 2;
+ vertices[index + 5].ColorID = color;
+ vertices[index + 5].UvID = 1;
+ }
+ // Pre-calculate the vertices for a quad based on the specified parameters
+ private static readonly Vector3 PerTransform_0 = new Vector3(-3, -2, -4.1982f);
+ private static readonly Vector3 PerTransform_1 = new Vector3(3, -2, -4.1982f);
+ private static readonly Vector3 PerTransform_2 = new Vector3(-3, 2, -4.1982f);
+ private static readonly Vector3 PerTransform_3 = new Vector3(3, 2, -4.1982f);
+ private static readonly Vector3 PerTransform_4 = new Vector3(-3, 2, -4.1982f);
+ private static readonly Vector3 PerTransform_5 = new Vector3(3, -2, -4.1982f);
+ public static Vertex[] UpdateQuad(float x, float y, float width, float height, ref Vertex[] quad, int index = 0)
+ {
+ // Apply model transformation
+ Matrix4x4 modelTransform = Matrix4x4.CreateTranslation(x, y, -1);
+ modelTransform *= Matrix4x4.CreateScale(width, height, 1);
+ // Calculate transformed vertices
+ Vector3 transform_0 = Vector3.Transform(PerTransform_0, modelTransform);
+ quad[index].X = transform_0.X / transform_0.Z;
+ quad[index].Y = transform_0.Y / transform_0.Z;
- Vector3 transform_2 = Vector3.Transform(PerTransform_2, modelTransform);
- quad[index + 2].X = transform_2.X / transform_2.Z;
- quad[index + 2].Y = transform_2.Y / transform_2.Z;
+ Vector3 transform_1 = Vector3.Transform(PerTransform_1, modelTransform);
+ quad[index + 1].X = transform_1.X / transform_1.Z;
+ quad[index + 1].Y = transform_1.Y / transform_1.Z;
- Vector3 transform_3 = Vector3.Transform(PerTransform_3, modelTransform);
- quad[index + 3].X = transform_3.X / transform_3.Z;
- quad[index + 3].Y = transform_3.Y / transform_3.Z;
+ Vector3 transform_2 = Vector3.Transform(PerTransform_2, modelTransform);
+ quad[index + 2].X = transform_2.X / transform_2.Z;
+ quad[index + 2].Y = transform_2.Y / transform_2.Z;
- Vector3 transform_4 = Vector3.Transform(PerTransform_4, modelTransform);
- quad[index + 4].X = transform_4.X / transform_4.Z;
- quad[index + 4].Y = transform_4.Y / transform_4.Z;
+ Vector3 transform_3 = Vector3.Transform(PerTransform_3, modelTransform);
+ quad[index + 3].X = transform_3.X / transform_3.Z;
+ quad[index + 3].Y = transform_3.Y / transform_3.Z;
- Vector3 transform_5 = Vector3.Transform(PerTransform_5, modelTransform);
- quad[index + 5].X = transform_5.X / transform_5.Z;
- quad[index + 5].Y = transform_5.Y / transform_5.Z;
- return quad;
+ Vector3 transform_4 = Vector3.Transform(PerTransform_4, modelTransform);
+ quad[index + 4].X = transform_4.X / transform_4.Z;
+ quad[index + 4].Y = transform_4.Y / transform_4.Z;
+
+ Vector3 transform_5 = Vector3.Transform(PerTransform_5, modelTransform);
+ quad[index + 5].X = transform_5.X / transform_5.Z;
+ quad[index + 5].Y = transform_5.Y / transform_5.Z;
+ return quad;
+ }
}
-}
-// Contains utility functions related to collision detection
-internal static class CollisonUtil
-{
- // Tests for AABB collision between two objects
- public static bool TestAABB(Aabb obj_0, Aabb obj_1)
+ // Contains utility functions related to collision detection
+ internal static class CollisonUtil
{
- // Check if there is a gap between the two AABBs along any axis
- if (obj_0.MaxX < obj_1.MinX || obj_0.MinX > obj_1.MaxX) return false; // No overlap along X-axis
- if (obj_0.MaxY < obj_1.MinY || obj_0.MinY > obj_1.MaxY) return false; // No overlap along Y-axis
- return true; // Overlapping along both X-axis and Y-axis
+ // Tests for AABB collision between two objects
+ public static bool TestAABB(Aabb obj_0, Aabb obj_1)
+ {
+ // Check if there is a gap between the two AABBs along any axis
+ if (obj_0.MaxX < obj_1.MinX || obj_0.MinX > obj_1.MaxX) return false; // No overlap along X-axis
+ if (obj_0.MaxY < obj_1.MinY || obj_0.MinY > obj_1.MaxY) return false; // No overlap along Y-axis
+ return true; // Overlapping along both X-axis and Y-axis
+ }
}
-}
-// Contains utility functions related to assets
-internal static class AssetUtil
-{
- private static readonly Assembly exe_base = typeof(Program).GetTypeInfo().Assembly;
- // Reads the content of an embedded file as a string
- public static string ReadEmbeddedFile(string path)
+ // Contains utility functions related to assets
+ internal static class AssetUtil
{
- using Stream? stream = exe_base.GetManifestResourceStream("SquareSmash." + path)
- ?? throw new FieldAccessException("could not find embedded file:" + path);
+ private static readonly Assembly exe_base = typeof(Program).GetTypeInfo().Assembly;
+ // Reads the content of an embedded file as a string
+ public static string ReadEmbeddedFile(string path)
+ {
+ Stream stream = exe_base.GetManifestResourceStream("DISCout." + path)
+ ?? throw new FieldAccessException("could not find embedded file:" + path);
- using StreamReader reader = new(stream, Encoding.UTF8);
- return reader.ReadToEnd();
+ StreamReader reader = new StreamReader(stream, Encoding.UTF8);
+ return reader.ReadToEnd();
+ }
+ // Opens an embedded file as a stream
+ public static Stream OpenEmbeddedFile(string path)
+ => exe_base.GetManifestResourceStream("DISCout." + path)
+ ?? throw new FieldAccessException("could not find embedded file:" + path);
+ // Opens a file as a stream
+ public static Stream OpenFile(string path, bool create = true)
+ => File.Open(Path.GetDirectoryName(exe_base.Location) + '/' + path, create ? FileMode.OpenOrCreate : FileMode.Open);
}
- // Opens an embedded file as a stream
- public static Stream OpenEmbeddedFile(string path)
- => exe_base.GetManifestResourceStream("SquareSmash." + path)
- ?? throw new FieldAccessException("could not find embedded file:" + path);
- // Opens a file as a stream
- public static Stream OpenFile(string path, bool create = true)
- => File.Open(Path.GetDirectoryName(exe_base.Location) + '/' + path, create ? FileMode.OpenOrCreate : FileMode.Open);
}
\ No newline at end of file
diff --git a/SquareSmash.csproj b/SquareSmash.csproj
index f7a2bc5..b135c3b 100644
--- a/SquareSmash.csproj
+++ b/SquareSmash.csproj
@@ -1,13 +1,12 @@
Exe
- net7.0
- enable
+ netstandard2.1
true
true
true
-
+ DiscOut.Entry
DISC
DISCout
Phoenixfirewingz
@@ -25,6 +24,10 @@
build_assets\icon.ico
icon.png
true
+ DISCout
+ DISCout
+ False
+ SquareSmash_TemporaryKey.pfx
@@ -44,6 +47,7 @@
+
@@ -62,6 +66,10 @@
+
+
+
+
PopUpWindow.axaml
diff --git a/SquareSmash.csproj.user b/SquareSmash.csproj.user
index d301a33..40e276a 100644
--- a/SquareSmash.csproj.user
+++ b/SquareSmash.csproj.user
@@ -1,6 +1,6 @@
- <_LastSelectedProfileId>C:\Users\Luke S\Desktop\SmashBricks\Properties\PublishProfiles\ClickOnceProfile.pubxml
+ <_LastSelectedProfileId>C:\Users\Luke S\Desktop\SmashBricks\Properties\PublishProfiles\ClickOnceProfile1.pubxml
\ No newline at end of file