You have to understand there are two matrices involved. The projection matrix, and the view matrix. You're mixing the two, and you still aren't even trying to do what I showed you in the other thread.
Also, you are mixing 2D and 3D drawing without resetting your projection matrices properly.
You should read over the manual entry for transformations.
Specifically, look at the docs for al_build_camera_transform , al_orthographic_transform, and al_perspective_transform.
For 2D you use the orthographic transform for the projection matrix. For 3D you use the perspective transform for the projection matrix. For 2D view matrix, all you need is the identity. For 3D, you need to apply a camera transform to the view matrix.
First, see https://liballeg.org/a5docs/trunk/transformations.html#al_use_projection_transform for the difference between 2D and 3D projection matrices.
Second, see https://liballeg.org/a5docs/trunk/transformations.html#al_build_camera_transform for how to set up your camera. As I told you before, you need to use a forward, right, and up vector to define the orientation of the camera. You also need a position for the camera. Then the lookAt parameter becomes camera.position + forward_vector.
You can also 'cheat' and calculate the look vector yourself using a little trig.
The compass heading becomes the rotation around the y-axis on the xz plane.
And then the pitch become the rotation around the right vector.
double heading = atan2(-dz,dx);
double pitch = acos((dist(xz)/dist(xyz));
I think that's right but I'm tired.