The original mode7 topic I thought had info on it.
Anyways the gist of positioning stuff is:
// get position relative to camera
xx = (x-cam.x)* cos(-cam.angle) - (y-cam.y)* sin(-cam.angle)
yy = 200
zz = (x-cam.x)* sin(-cam.angle) + (y-cam.y)* cos(-cam.angle)
screenx = xx/zz + xcenterScreen
screeny = yy/zz + ycenterScreen
then hide object
else show object
However, the scale is probably off. Shaders deal with 0-1 scale in spots.
It subtracts the cameras position from the points position, rotates it in the opposite direction of the cameras angle and then projects it to The screen.
The shader merely does the opposite. The exact scales can be found by reversing the math found in the shader itself.
Or you can find the scale by trial and error. Basically before getting the screen coordinates multiply some numbers against xx, yy and zz. Realistically yy should Just be the Ground height. Zz adjusts the intensity of the perspective and xx is the general scale.
You could even open up the behavior that rex made to get the math he used which is based on reversing the math in the shader.
I abandoned The shader long ago and don’t want to open it. It’s fiddly and needs to be rewritten. Fiddly in that the scale of things is pretty specific as I recall.