PickPalette: fix call to `SetCellBackgroundColour` How did this ever work? The signature was wrong according to the docs. The last element should be the colour, not the first one.
render_map: select and deselect bitmap screen object each iteration from DC The wx docs say that, ...before performing any other operations on the bitmap data, the bitmap must be selected out of the memory DC which we immediately do right after when we fetch the raw pixel data. So it therefore seems more semantically correct to deselect the bitmap before running other non-DC operations, and re-selecting it again before drawing a new room into it. (Thanks Brad for the insight.)
render_map: whoops, gotta match the type of format specifier
render_maps: add a progress dialogue box This was taking a long time for me. This only tracks phases 0 and 3 (the main backgrounds, AIUI, not sprites nor collision boxes) which take a really long time to render on my machine. Since all of my graphics processing slows down during render, I assume wx is using up GPU. Guess my Intel GPU isn't powerful enough to render this quickly?
render_map: move wxMemoryDC creation inside the loop The previous version re-used the same wxMemoryDC object for all rooms, which flooded the console with failed assertions like so: (lizard_tool:25111): Gdk-CRITICAL **: 03:49:13.885: IA__gdk_draw_rectangle: assertion 'GDK_IS_DRAWABLE (drawable)' failed The map then rendered using the first room data for all rooms. From my understanding of the docs, you can't or shouldn't reuse wxMemoryDC like this: https://docs.wxwidgets.org/trunk/classwx_memory_d_c.html It needs to be destroyed or reassigned after each usage. So the simplest thing is to move it into loop so we just get a fresh drawing board each iteration.
Data: fix incorrect condition in rename_item Looks like this typo resulted in renaming anything causing the whole sprite cache to be rebuilt. Rather minor problem.
Item: give trivial virtual dtors to all subclasses I'm pretty sure this is safe, since there were no explicit dtors anywhere before this. This is here to silence another compiler warning.
linting: fix some compiler warnings * Init order in ctor-init lists * Unneeded signed/unsigned comparisons * Remove unused variables
.hgignore: update with build artifacts
makefile.tool: dumb new little makefile to build the tool, for me, in loonix
xcode8: add directory Accidentally ignored by an overzealous .hgignore
main: use wxString instead of wxChar* Maybe this worked in wx 2.8, but in 3.0 there's no conversion from wxChar* to the wxString that the Package ctor expects.
panels: don't namespace inside the namespace g++ doesn't like it when you try to redundantly specify the same namespace when already in a namespace.
render_maps, render_sprites: use explicit enum type for image Assigning the enum to an int raises a deprecation warning in wx 3.0 when passing in that into into the SaveFile function. Using the enum type uses a non-deprecated SaveFile overload.
render_maps: use parens around C-style cast I guess other compilers can parse this without parens, but g++ can't.
wx: add missing includes I don't know if somehow these were all included by other files in wx 2.8, but in 3.0 these extra includes seem to be required.
is_background: match forward declaration to definition The definition of this function is static, so it also needs the static qualifier in its forward declaration.
assign_coins_and_flags: fix coordinate typo g++ caught this because it made no sense to assign an, int, a float, and an int to four ints.
openFileDialog: rename overwrite flag It appears wx 3.0 has changed the name of this flag
init: check in source tarball, minus assets