🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Tile Map Editor Question

Started by
1 comment, last by Dealerz 24 years, 5 months ago
I''m trying to write a map editor like the one used in StarCraft were there are 2 frame windows. One side is the list of tiles and the other is the tilemap it self. I was wondering how to setup the frame windows and then assign one of the windows with the DirectX screen of the tilemap. I know how to set up windows with other classes like with a list class but I use MFC. If some one could help me with some sample source code or at least point me in a good direction. Thanks
Advertisement
so, the problem is with the window in which you view part of the map, and not the one where you select the tiles, right?

in that case, you just need to make a clipper, use the SetHWND() member function to assign it to the window''s GetSafeHWnd(), then you need to use SetClipper() to attach the clipper to the primary surface, and you''re mostly done.

the only other thing to keep in mind is that writing to the primary surface means the ENTIRE surface, and in order to only write within your window, you''ll need to convert from client to screen coordinates.

Get off my lawn!

Jim Hughs is making an isometric game in DirectX with MDI, his webpage is at:
http://www.geocities.com/SiliconValley/Ridge/6444/

You can download his source code to see how he deals with DirectX in MDI windows, which would proabably be similar to the issues you will have.

This topic is closed to new replies.

Advertisement