Hello, in first place sorry for my bad english and thanks for your time.
I have a 2d tiled base project, and is drawed to screen using this allegro transform:
How can I use this transform to translate my mouse position to world position? I tried to use al_transform_cordinates but I'm not sure how I have to treath the mouse value before passing to it. My current implementation of world_x and world_y only works before zoom or rotation are applied
al_invert_transform(&level->viewport.transform); al_transform_coordinates(&level->viewport.transform, &mouse_x, &mouse_y);
That should work. Obviously it might make sense for you to copy the transformation before inverting it.
Thanks!