As for const-correctness, from what I understand - if we're being technical about it it's not undefined behavior to cast away constness (C++ has const_cast for a reason), it's only UB if you write to an actual constant. I'm not saying this isn't a potential source of bugs of course, just want to dispel any misconceptions. That said, const-correctness is something I do take seriously (if you look at the code, I declare a good number of const pointers myself), but if MSVC doesn't warn me about it, I may not always catch violations. But even with /W4, I don't get any such warnings, and /Wall is just unfeasible as mentioned above. Clang must just be REALLY pedantic.
Hey, check out the new 812.8.2 version of minisphere! It's flipping awesome!
Edit: Figured it out, the offending image is actually a PNG image saved as .bmp (Thank goodness for hex editors!). Allegro apparently doesn't appreciate the file extension being changed, while Corona doesn't seem to mind. I'm debating whether I should code in a workaround for this or just leave it alone and make a note in the readme... I'm leaning towards the latter.
Odd, I can't get Kefka's Revenge to run in minisphere. I get an error loading jewtheblue.bmp, which doesn't make sense since Allegro is supposed to support BMP.Edit: Figured it out, the offending image is actually a PNG image saved as .bmp (Thank goodness for hex editors!). Allegro apparently doesn't appreciate the file extension being changed, while Corona doesn't seem to mind. I'm debating whether I should code in a workaround for this or just leave it alone and make a note in the readme... I'm leaning towards the latter.Edit2: Aww, looks like KR isn't going to run in minisphere any time soon as it uses the animation API, which I currently have no means of supporting.
Looking forward to reading OSX compilation instructions so I can give this a shot on my Mavericks MacBook Air!
gcc -o minisphere/font.o -c minisphere/font.cminisphere/font.c: In function 'free_font':minisphere/font.c:189:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for (int i = 0; i < font->num_glyphs; ++i) { ^minisphere/font.c:189:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your codescons: *** [minisphere/font.o] Error 1scons: building terminated because of errors.
gcc -o minisphere/msphere minisphere/api.o minisphere/bytearray.o minisphere/color.o minisphere/duktape.o minisphere/dyad.o minisphere/file.o minisphere/font.o minisphere/geometry.o minisphere/image.o minisphere/input.o minisphere/logger.o minisphere/lstring.o minisphere/main.o minisphere/map_engine.o minisphere/obsmap.o minisphere/persons.o minisphere/primitives.o minisphere/rawfile.o minisphere/script.o minisphere/sockets.o minisphere/sound.o minisphere/spriteset.o minisphere/surface.o minisphere/tileset.o minisphere/windowstyle.o -lallegro -lallegro_audio -lallegro_acodec -lallegro_color -lallegro_dialog -lallegro_font -lallegro_image -lallegro_primitives -lallegro_ttf -lallegro_main/usr/bin/ld: minisphere/duktape.o: undefined reference to symbol 'fmod@@GLIBC_2.2.5'/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusscons: *** [minisphere/msphere] Error 1scons: building terminated because of errors.