diff --git a/Core/ComponentType.cs b/Core/ComponentType.cs index 284df6e..c289267 100644 --- a/Core/ComponentType.cs +++ b/Core/ComponentType.cs @@ -32,6 +32,12 @@ namespace Core SFG, // Sets a flag to true RFG, // Sets a flag to false + // drawing + CPXBF, // create buffer + PBSET, // set pixel in buffer + PBCLEAR, // clear pb + DCLR, // set draw clr + GIE, // Gets if X is equal to Y PRA, // Prints accumulator diff --git a/Core/Operations.cs b/Core/Operations.cs index 0450185..d863fbd 100644 --- a/Core/Operations.cs +++ b/Core/Operations.cs @@ -18,9 +18,10 @@ namespace Core public int pointer = 0; // Declare them here without `new int[WindowSize]` - public int[] PixBufferR; - public int[] PixBufferG; - public int[] PixBufferB; + public int[,] PixBufferR; + public int[,] PixBufferG; + public int[,] PixBufferB; + public int[] ColorBuffer = new int[3]; public int f_IsEqu; public int f_IsZer; @@ -28,11 +29,6 @@ namespace Core public Operations(int pixBufSize) { WindowSize = pixBufSize; - - // Initialize them here so they use the correct WindowSize - PixBufferR = new int[WindowSize]; - PixBufferG = new int[WindowSize]; - PixBufferB = new int[WindowSize]; } @@ -50,6 +46,8 @@ namespace Core return StackY; case "f_IsEqual": return f_IsEqu; + case "f_IsZero": + return f_IsZer; } Variables.TryGetValue(shite, out int a); return a; @@ -147,6 +145,16 @@ namespace Core Accumulator = StackX / StackY; return; + // drawing + case ComponentType.CPXBF: + ExecuteCommand(ComponentType.SVAR, new[] { args[1], WindowSize.ToString() }); + PixBufferR = new int[WindowSize, WindowSize]; + PixBufferG = new int[WindowSize, WindowSize]; + PixBufferB = new int[WindowSize, WindowSize]; + return; + case ComponentType.DCLR: + ColorBuffer = new int[] { args[1] }; + // Debug commands @@ -225,6 +233,12 @@ namespace Core case "MUL": ExecuteCommand(ComponentType.MUL, tokens); break; case "DIV": ExecuteCommand(ComponentType.DIV, tokens); break; + // drawing + case "CPXBF": break; // create pixel buffer + case "PBSET": break; // set a pixel in the buffer + case "PBCLEAR": break; // clear buffer + case "DCLR": break; // set draw color + // Debug case "PRA": ExecuteCommand(ComponentType.PRA, tokens); break; case "PRX": ExecuteCommand(ComponentType.PRX, tokens); break; diff --git a/Core/bin/Debug/Core.dll b/Core/bin/Debug/Core.dll index 10f3145..025cf7c 100644 Binary files a/Core/bin/Debug/Core.dll and b/Core/bin/Debug/Core.dll differ diff --git a/Core/bin/Debug/Core.pdb b/Core/bin/Debug/Core.pdb index c8cb77c..a3e283e 100644 Binary files a/Core/bin/Debug/Core.pdb and b/Core/bin/Debug/Core.pdb differ diff --git a/Core/obj/Debug/Core.csproj.AssemblyReference.cache b/Core/obj/Debug/Core.csproj.AssemblyReference.cache index 1a474ee..6219cba 100644 Binary files a/Core/obj/Debug/Core.csproj.AssemblyReference.cache and b/Core/obj/Debug/Core.csproj.AssemblyReference.cache differ diff --git a/Core/obj/Debug/Core.csproj.CoreCompileInputs.cache b/Core/obj/Debug/Core.csproj.CoreCompileInputs.cache index bc55487..46db51f 100644 --- a/Core/obj/Debug/Core.csproj.CoreCompileInputs.cache +++ b/Core/obj/Debug/Core.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -7e4ab6ec30c119e58bb28285aaa45d2b6248630033dfbcb03f8acc446e1d573c +56ba5591e1a83fa83135db75c787bf936e80bbba9a4cdf6068a6857b3a145201 diff --git a/Core/obj/Debug/Core.csproj.FileListAbsolute.txt b/Core/obj/Debug/Core.csproj.FileListAbsolute.txt index efe811b..323f3c3 100644 --- a/Core/obj/Debug/Core.csproj.FileListAbsolute.txt +++ b/Core/obj/Debug/Core.csproj.FileListAbsolute.txt @@ -13,3 +13,6 @@ C:\Users\Madeline McWhorter\MathApp\Core\obj\Debug\Core.pdb C:\Users\Madeline McWhorter\MathApp\Core\bin\Debug\Core.dll.config C:\Users\Madeline McWhorter\MathApp\Core\bin\Debug\SDL2-CS.dll C:\Users\Madeline McWhorter\MathApp\Core\obj\Debug\Core.csproj.Up2Date +C:\Users\Administrator\MathApp\Core\bin\Debug\Core.dll.config +C:\Users\Administrator\MathApp\Core\bin\Debug\SDL2-CS.dll +C:\Users\Administrator\MathApp\Core\obj\Debug\Core.csproj.Up2Date diff --git a/Core/obj/Debug/Core.dll b/Core/obj/Debug/Core.dll index 10f3145..025cf7c 100644 Binary files a/Core/obj/Debug/Core.dll and b/Core/obj/Debug/Core.dll differ diff --git a/Core/obj/Debug/Core.pdb b/Core/obj/Debug/Core.pdb index c8cb77c..a3e283e 100644 Binary files a/Core/obj/Debug/Core.pdb and b/Core/obj/Debug/Core.pdb differ diff --git a/Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index bffd629..14be054 100644 Binary files a/Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/MathLib/Program.cs b/MathLib/Program.cs index 5e2b3a9..6b0ceae 100644 --- a/MathLib/Program.cs +++ b/MathLib/Program.cs @@ -30,7 +30,7 @@ namespace MathApp contents = ""; } } - Operations ops = new Operations(409600); + Operations ops = new Operations(640); Console.WriteLine("[ASM] System started!"); ops.EquParserLoop(contents); } diff --git a/MathLib/bin/Debug/Core.dll b/MathLib/bin/Debug/Core.dll index 10f3145..025cf7c 100644 Binary files a/MathLib/bin/Debug/Core.dll and b/MathLib/bin/Debug/Core.dll differ diff --git a/MathLib/bin/Debug/Core.pdb b/MathLib/bin/Debug/Core.pdb index c8cb77c..a3e283e 100644 Binary files a/MathLib/bin/Debug/Core.pdb and b/MathLib/bin/Debug/Core.pdb differ diff --git a/MathLib/bin/Debug/MathLib.exe b/MathLib/bin/Debug/MathLib.exe index c342b29..612dc3d 100644 Binary files a/MathLib/bin/Debug/MathLib.exe and b/MathLib/bin/Debug/MathLib.exe differ diff --git a/MathLib/bin/Debug/MathLib.pdb b/MathLib/bin/Debug/MathLib.pdb index 19d3fcb..fc2abd5 100644 Binary files a/MathLib/bin/Debug/MathLib.pdb and b/MathLib/bin/Debug/MathLib.pdb differ diff --git a/MathLib/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/MathLib/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 635d027..f3609ff 100644 Binary files a/MathLib/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/MathLib/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/MathLib/obj/x86/Debug/MathLib.csproj.AssemblyReference.cache b/MathLib/obj/x86/Debug/MathLib.csproj.AssemblyReference.cache index f6b91bf..5926928 100644 Binary files a/MathLib/obj/x86/Debug/MathLib.csproj.AssemblyReference.cache and b/MathLib/obj/x86/Debug/MathLib.csproj.AssemblyReference.cache differ diff --git a/MathLib/obj/x86/Debug/MathLib.csproj.CoreCompileInputs.cache b/MathLib/obj/x86/Debug/MathLib.csproj.CoreCompileInputs.cache index 3d442b1..63bbbf2 100644 --- a/MathLib/obj/x86/Debug/MathLib.csproj.CoreCompileInputs.cache +++ b/MathLib/obj/x86/Debug/MathLib.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -6e19822cf9df8a3348f7b52adfa331baa8ea4458cbec56a5f3fa3f63bc1a6672 +3acf27fa7da4c0bed16312c6cbec7519a66f2b6319fa1561ba08b5cbef155736 diff --git a/MathLib/obj/x86/Debug/MathLib.csproj.FileListAbsolute.txt b/MathLib/obj/x86/Debug/MathLib.csproj.FileListAbsolute.txt index 6a54ec2..8094f8d 100644 --- a/MathLib/obj/x86/Debug/MathLib.csproj.FileListAbsolute.txt +++ b/MathLib/obj/x86/Debug/MathLib.csproj.FileListAbsolute.txt @@ -20,3 +20,5 @@ C:\Users\Madeline McWhorter\MathApp\MathLib\obj\x86\Debug\MathLib.exe C:\Users\Madeline McWhorter\MathApp\MathLib\obj\x86\Debug\MathLib.pdb C:\Users\Madeline McWhorter\MathApp\MathLib\bin\Debug\SDL2-CS.dll C:\Users\Madeline McWhorter\MathApp\MathLib\bin\Debug\Core.dll.config +C:\Users\Administrator\MathApp\MathLib\bin\Debug\SDL2-CS.dll +C:\Users\Administrator\MathApp\MathLib\bin\Debug\Core.dll.config diff --git a/MathLib/obj/x86/Debug/MathLib.exe b/MathLib/obj/x86/Debug/MathLib.exe index c342b29..612dc3d 100644 Binary files a/MathLib/obj/x86/Debug/MathLib.exe and b/MathLib/obj/x86/Debug/MathLib.exe differ diff --git a/MathLib/obj/x86/Debug/MathLib.pdb b/MathLib/obj/x86/Debug/MathLib.pdb index 19d3fcb..fc2abd5 100644 Binary files a/MathLib/obj/x86/Debug/MathLib.pdb and b/MathLib/obj/x86/Debug/MathLib.pdb differ