Mandel.c needs #define INCL_DOSSEMAPHORES before os2.h. Makefile needs some minor mods, -Zmts removed and -Zomf added in its place on the Mandel.exe recipe.
I will attach my work.
Note that it runs fine run from the source directory besides a warning about the lack of a map file. With the map file(s) gives a blank screen. I think as it expects only 256 colours
Edit:, yes the map files seem to be different palettes. I ran out of memory while playing with it so it may be worth adding a -Zhigh-mem where you have the -Zomf. Guess the check for map file could be removed or changed to a parameter. If I knew how, it could query the number of colours and only use the map file with 256 colours.
Edit2: With the map files, if you save the image, the gif looks correct and varies based on the map file.
Edit3: Updated source again, add stdlib.h a few places, fixed make clean, bigger stack for _beginthread.
Now get warnings like,
gcc -c -o Mandel.o Mandel.c
Mandel.c: In function 'MandelWndProc':
Mandel.c:170:20: warning: passing argument 1 of '_beginthread' from incompatible pointer type [-Wincompatible-pointer-types]
170 | _beginthread (SaveThread, 0, 4096, &pfdFileDialog.szFullFile);
| ^~~~~~~~~~
| |
| void (__attribute__((system)) *)(char *) {aka void (*)(char *)}
Mandel.h has,
void APIENTRY SaveThread (char *path);
Not sure of the fix.