06-08-2004, 04:52 PM
Hi, I'm making a game called Tycoom(see in the projects...)
Anyway. I encountered a problem I'm not sure how to solve. The problem is with the mouse. How to get on what tile mouse pointer is?
The thing what makes it difficult is that:
X and Y rows of the map progress diagonally on the screen.
Tile isn't square, but a rhomb what is placed on the screen under angle.
To see the code download the prog. There is exe file, but also source what I tryed to comment a bit. Also make sure that three bmp files are in the same folders(included)
Also there is small BMP file called Exampl.bmp -it shows how rows goes... just check it out you'll understand.
I'd be really happy if someone would help me out. Of course I know it IS pretty diffivult... At least for me :oops:
http://www.hot.ee/wizgui/BIN.exe
Anyway. I encountered a problem I'm not sure how to solve. The problem is with the mouse. How to get on what tile mouse pointer is?
The thing what makes it difficult is that:
X and Y rows of the map progress diagonally on the screen.
Tile isn't square, but a rhomb what is placed on the screen under angle.
To see the code download the prog. There is exe file, but also source what I tryed to comment a bit. Also make sure that three bmp files are in the same folders(included)
Also there is small BMP file called Exampl.bmp -it shows how rows goes... just check it out you'll understand.
I'd be really happy if someone would help me out. Of course I know it IS pretty diffivult... At least for me :oops:
http://www.hot.ee/wizgui/BIN.exe