Container Peek, and Map Centering

Hey Folks! Can you guess what I did today? If you guessed "resolution stuff," congrats! You're right!

Almost half of the day was spent wrestling with a seemingly innocuous feature: container previews. When you roll over a container, it shows the stuff inside in the tooltip. Or it was supposed to.

Unfortunately, due to the way mobile differs from desktop architecture, the preview image generation requires a different code path. Particularly stacked items, which require bitmap fonts be generated and rendered wherever they are needed.

It seems to work now, in at least Small and 4:3 modes. Big mode has a positioning issue that prevents all pop-ups from working, so I'll have to check that later. Given the others work, though, I don't expect it to be an issue.

Once that was done, I started tackling camera stuff. Specifically, getting the map view to center on the player when ending turns. Again, the mobile architecture differs in the way screen size is handled, and therefore positions, too. I eventually was able to get it to work by borrowing the old Flash code and updating it for camera scrolling offsets in the new mobile code.

Minimap centering was going to be a part of that, but I started to notice some weirdness in minimap position, and later, whole game position when changing resolutions. I need to figure out where things went awry, as I seem to have short circuited my res-switching somewhere. (Good thing there's version control!)