I want to draw something in the game, and after some experimentation it seems to me that the game uses two different representations for coordinates:
- One is linked to the monitor of the user, as in the topleft corner is (0,0) and bottomright corner is whatever your monitor resolution is. This is used for all the methods that have iV_ or pie_ in it.
- The other is linked to the map, where the topleft corner of the map is (0,0) and the bottomright corner is however big the map is. This is used for the coordinates of all objects in the game.
I want to draw something that is linked to the coordinates of the map and the objects. As example, formations for droids are used. These formations contain an x and a y that shows where in the map they are. Now I want to draw a line through this formation that stays with the formation while it moves. I can get the ends of this line in the following way (200 just as an example):
Code: Select all
x_min = (psFormation->x - 200);
x_max = (psFormation->x + 200);
y_min = (psFormation->y - 200);
y_max = (psFormation->y + 200);
Code: Select all
glBegin(GL_LINES);
glVertex2f((float)startX, (float)startY);
glVertex2f((float)endX, (float)endY);
glEnd( );
Thanks a lot in advance!
(PS, for those that answered in my previous topic and interested, I stopped trying to get it to work with a Radeon, on a different computer now)



