Wednesday, April 12, 2006

Incorporated ToolEngine and got the mouse working.

Yesterday I integrated my existing 3D engine into the Dune II Remake project. I changed the Engine class a bit to support 2D operations using the Microsoft.DirectX.Sprite class. However, I added all the functionality directly into the Engine class, which seems a bit bad. The same class, for both 2D and 3D. I'll split them out in a Engine2D and an Engine3D class later this week.

After that, I spent some time reviewing my old InputManager code, and to be honest, it was quite solid. I added in a little bit of code to initialize both the keyboard and the mouse, and experimented a bit with the CooperativeFlags. I still haven't figured out if I want to go with Exclusive or NonExclusive, but at the moment, I use NonExclusive, and I don't really like it.

After the mouse worked, I added a simple class to render the mouse pointer to the screen. It works, but without transparancy. I did specify Palet entry 0 as transparancy, but for some reason, it still shows the black I used in the bitmaps. Trying to figure out why.

If I got some more time tonight(Which I doubt, because there's a giant pile of dishes to do since yesterday I had my birthday), I want to add in a first unit, the trike. I want to create a Unit class, then derive a Vehicle class from that(Because there are also infantry units) and then try using some sort of config file for the units.

Or I might try to whip up a map loader and editor, because at the moment, I don't really have any good map that I can use. I might try to work out the format for the Dune II: The maker maps, and use those until I can whip up my own format and editor.

No comments: