This commit is contained in:
Rose Apollo 2024-11-30 22:13:38 +00:00
parent 3fce97aa4a
commit b9b0d8f815
2 changed files with 35 additions and 2 deletions

View File

@ -1,4 +1,4 @@
echo "BUILDING LOGIC"
clang ./logic.c ./logic_symb.c ./logic_run.c ./logic_ops.c ./logic_karn.c -o ./logic.elf
echo "LOGIC HAS BEEN BUILT - NOW WE GONNA RUN IT"
./logic
./logic.elf

View File

@ -11,11 +11,44 @@ void logic_karn_render(bool* karn, int x, int y)
{
bool *c = karn;
printf("| ");
for (int iy = 0; iy < y; iy++)
{
if (y == 2)
{
printf("| %d ", (logic_karn_1_gray[iy] & (1)));
}
else
{
printf("|%d%d ", (logic_karn_2_gray[iy] & (1 << 0)), ((logic_karn_2_gray[iy] & (1 << 1)) / 2));
}
}
printf("|\n");
for (int ix = 0; ix < x; ix++)
{
if (x == 2)
{
printf("| %d ", (logic_karn_1_gray[ix] & (1)));
}
else
{
printf("|%d%d ", (logic_karn_2_gray[ix] & (1 << 0)), ((logic_karn_2_gray[ix] & (1 << 1)) / 2));
}
for (int iy = 0; iy < y; iy++)
{
printf("| %d ", *c);
if (*c == 1)
{
printf("| 1 ");
}
else
{
printf("| ");
}
c++; // lmao
}