The best solution would depend on the complexity of your game.
It might be that the easiest way to draw the ship would be to pretend it doesn't move, and instead move the camera instead. But that would depend on whether things inside of the ship can interact with things outside of the ship. If not, then it would be an idea solution.
So the idea is to position the camera according to the location & orientation of the ship. And then to draw everything on the ship as if the ship was at the origin (0,0) and at zero rotation.
Code:
var _x = cam_x - x;
var _y = cam_y - y;
var _c = dcos(angle_of_ship);
var _s = dsin(angle_of_ship);
d3d_set_projection_ortho(
_x * _c - _y * _s - width_of_view/2 + offset_x,
_x * _s + _y * _c - height_of_view/2 + offset_y,
width_of_view,
height_of_view,
cam_angle + angle_of_ship
);
//draw everything on ship here.
//then reset to normal view, if necessary.
cam_x,cam_y is where the camera is located (i.e. center of view).
cam_angle is equivalent to view_angle.
offset_x,offset_y should be zero unless you are drawing something like a background or surface, and you want it to rotate around something other than its upper-left corner. Example: drawing a surface 128x64 pixels in size, and want it to rotate around its center, offset_x/y would then be 64 & 32.