Alright so i'm more than certain that this can be solved with some basic math however I for the life of me cannot find the answer. I have two sets of x and y coordinates which are almost 100% alike. For example when I change the x of the first coordinate it also changes the x of the second coordinate. The issue is that the second coordinate seems to move at a faster rate than the first one does. Note that the first coordinate that I am talking about is x which is based on the players movement and the second is mouseX which is where the mouse should be at in the game, not on the screen. Here is some code that might help.
So in short my mouse moves perfectly in sync with the player however I need to convert the mouse coordinates to match the player coordinates.
Note that calculate is where I am trying to calculate the game coordinates in relation to X.
Game Manager
As an example here are some coordinates from me moving just to the right. Also I did not move the mouse other than how it moves from the player position.
FORMAT: {Player x, player y} {Mouse x, mouse y}
{24 19} {219 212}
{8 19} {475 212}
{-14 19} {827 212}
{-36 19} {1179 212}
Alright so I looked at it a bit harder and noticed a correlation between them and from that I was able to construct the equation -(((MouseX-217)/16)-24) = new X. The -217 is to zero out the actual coordinates, the 16 for the pixel to position size and the 24 for the lock position size.