started adding gpu support
This commit is contained in:
@@ -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
|
||||
|
||||
+22
-8
@@ -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;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
7e4ab6ec30c119e58bb28285aaa45d2b6248630033dfbcb03f8acc446e1d573c
|
||||
56ba5591e1a83fa83135db75c787bf936e80bbba9a4cdf6068a6857b3a145201
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user