So before I left for a long winded break, I was struggling with the clear map feature.
What I wanted was to be able to start a new map (regenerate from scratch) at the hit of a button. Instead what I had was something that didnt always reset the image and simply re-drew what was in the BMP. TO add a complicating factor, the explore map (fog) wasn't being reset either.
But this evening, I managed to 'fix' it.
The clear button functions as intended - clear the map from the map array, clears the picture box and resets the BMP in memory to be blank.
Turning fog on and off with a cleared map now no longer shows a picture box with the player and either default colours or fog colours. It will simply say (to itself, not literally) - "hey you cleared the map, there is no point drawing or not drawing fog. I'll do that once you make a new one".
Two small hurdles, and I am back in the game.
Only problem left is to go back through code I've not looked at for more than a year and try to understand what the heck i was doing. Fortunately I have some reasonably code annotations, that will help me get back up to speed. That plus the internet.
No comments:
Post a Comment