Support For town screens of any size (> 800x374)

I looked into making town screens with resolutions larger than 800x374 for VCMI.
So now (0.98e) what do we have here?

This is townscreen made from Sleeping Sun’s Necropolis (originally made for HMM7).
It has 2500x1500 pixels resolution.
And now screenshot shows current display of it (32 bit PNGs) in town screen window (VCMI is set to 4K Resolution).


  1. VCMI correctly taken background height and made border around it right.
  2. Dwellings are working (selected by mouse)
  3. Panels for town icons, units and heroes are drawn under townscreen right
  4. Background width is not taken - so right border still is drawn in 800 y coord position.
  5. That is why window is not centered - so part of town screen goes to right panles overlapping them and get corrupted.
  6. All interactive places (town icons, castle icons, income panels, heroes’ portraits and creature icons) still are drawn at 374+some x coord positions (overlapping with town screens) not on panel for them
  7. Window background is not drawn square (not taking all townscreen width…

So this is current behavour of town screen drawing.
I don’t know if I can again mess and configure all that MSVS/GitHub/boost things. But I want to t least locally mess with source codes and find places need to be corrected for right townscreen display.