THE ARMCHAIR GENERAL





1 / 18 / 2005: Welcome to the Armchair General page -- online today and for the next 2 years, at least.
Status Update: shown here is how the programming is going. So far I'm able to draw units to the screen, detect mouse position and draw any map hex, anywhere.
Todo: Get mouse map to recognize hex limits so that ArmGen knows what hex the mouse is over and knows the difference between the hexes.





This is a screen capture showing several map hexes loaded onto a window along with a unit and a unit mask. A unit mask (at least for right now) is basicaly all of the graphics that make up a unit turned black and all other unwanted parts of the unit icon are turned white.


In order to correctly draw the ONLY THE UNIT ICON onto a map hex, we must first draw the unit mask to the map:




Finally, we can draw our unit to the map with the BitBlt() function:








Below I will show my map drawing progress and what's involved:


Here is a main map window with a windows Picturebox control. This Picturebox is where we will be drawing all of our map hexes and where the Armchair General will be running.




Here is the main map with the mask file ANDed and ready to be loaded to our blank map




Once ANDed (notice how the city icon has the unwanted parts stripped off, or masked off,) we are ready to draw our city icon to the blank map.





Finnaly I quickly created this FORM3 to allow me to draw map icons where ever I want to in the map. In this case I draw the same icon 45 pixels to the right and 25 pixels down from the origin (the top left hand corner of the map.)




Those who are savvy with BitBlt() and programming in general know that I have a problem with window redrawing. Yes, currently I do, but I will solve that problem AFTER I get the mouse map over the hex map working. I'll explain how it all works each time I pass a milestone. This FORM3 will eventually become a useful scenario creator menu. Right now it is extremely basic, but functional for my purposes.

That's all for now, tune in later.