OK I am attempting to make a very simple game to get my hands dirty on AROS programming language. I have made a grid of dots one starting at coordinate X=16, Y=16 and then it continues the distance between connecting one dot to the other is by 8 steps, when it reaches to the second dot it is 16+8 which would give you 24 and then the second one between 24 and the other dot is by 8 which is 32 and then the other one is by 8 which is 40 and the other one by 8 which is 48 and so on. As you can see on the picture below.
Uploaded with
ImageShack.usI stored these coordinates in an array as well. Now the problem I have is getting the coorect X and Y coordinate of the mouse to match on the dots on the board. What I want is when the mouse is hovering over the first dot it would say X 16 and Y 16 and when I move the mouse on the second dot it would say X 24 and Y 16 but if I hover the mouse on the black spot between the first dot and second dot I want it to say nothing...I am using the Text X,Y, string$ function to display the X and Y mouse coordinate and I am using the X mouse and Y mouse function to get the current X and Y mouse coordinate.
If I get them raw the top left would say X 144 and if I divide it by 9 it would turn to 16 but if I move the mouse on the second dot it would remain 16 and if i move the mouse almost to the end of the board then it would say 17 and 18...so there is something wrong here when I put new X mouse coordinate in the Text function.
SO what I want is to get the right math calculation so that it displays 16 on the first dot (using the text function) then 24 on the second one and 32 on the third one and so on.