Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmds] Add paintbucket fill to C86 paint #2262

Merged
merged 2 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions elkscmd/gui/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,13 @@ void A_GameLoop(void)
{
R_Paint(omx, omy, mx, my);
}
#ifndef __C86__
if(floodFillCalled == true)
{
floodFillCalled = false;
hidecursor();
R_LineFloodFill(omx, omy, currentMainColor, readpixel(mx, my));
showcursor();
}
#endif
}
else // In toolbar
{
Expand Down
8 changes: 5 additions & 3 deletions elkscmd/gui/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ static transform2d_t FF_StackPop(transform2d_t stack[], int* top)
return stack[(*top)--];
}

#ifndef __C86__ /* FIXME C86 */
// ----------------------------------------------------
// Line Flood Fill, for the bucket tool
// ----------------------------------------------------
Expand All @@ -225,8 +224,12 @@ void R_LineFloodFill(int x, int y, int color, int ogColor)
while(stackTop >= 0) // While there are elements
{
// Take the first one
#ifdef __C86__ /* FIXME C86 compiler bug calling FF_StackPop*/
curElement = stack[stackTop];
stackTop--;
#else
curElement = FF_StackPop(stack, &stackTop);

#endif
mRight = false;
int leftestX = curElement.x;

Expand Down Expand Up @@ -288,7 +291,6 @@ void R_LineFloodFill(int x, int y, int color, int ogColor)
}
}
}
#endif

#if UNUSED
// ----------------------------------------------------
Expand Down