Here's my projection:

which comes out to being something likeCode:gc.set_map_mode(cl_user_projection); // params are left right bottom top gc.set_projection(CL_Mat4f::ortho_2d( m_camera_location.x - m_camera_size.x, m_camera_location.x + m_camera_size.x, m_camera_location.x - m_camera_size.y, m_camera_location.x + m_camera_size.y));

Calling m_sprite.draw(_gc, position.x, position.y); renders the sprite upside down. Walking through the sprite code, it appears to assume a positive-y-down coordinate system.Code:gc.set_projection(CL_Mat4f::ortho_2d(-200, 200, -200, 200))

I fixed this locally by changing CL_Sprite_Impl::draw_calcs_step2 to subtract t_params1->destHeight from t_params1->pixDestY instead of add. Here is the code that works for me in my coordinate system (will be broken without using a projection like the above)

It might be worth making a destination rectangle at the top of the function and using that. But this is a quick-and-dirty fix (at least until I find if this breaks something else )Code:// Calculate final destination rectangle points for surface rectangle: if (params2.rotate_angle.to_radians() == 0.0f) { params1.dest_position[0].x = t_params1->pixDestX; params1.dest_position[1].x = t_params1->pixDestX+t_params1->destWidth; params1.dest_position[2].x = t_params1->pixDestX; params1.dest_position[3].x = t_params1->pixDestX+t_params1->destWidth; params1.dest_position[0].y = t_params1->pixDestY; params1.dest_position[1].y = t_params1->pixDestY; // PMD - set this up to subtract the height to support Y is positive going up params1.dest_position[2].y = t_params1->pixDestY-t_params1->destHeight; params1.dest_position[3].y = t_params1->pixDestY-t_params1->destHeight; } else { // Roll params1.dest_position[0].x = calc_rotate_x(t_params1->pixDestX, t_params1->pixDestY, t_params1->rotation_hotspot.x, t_params1->rotation_hotspot.y, vect_rotate_x[0], vect_rotate_y[0]); params1.dest_position[1].x = calc_rotate_x(t_params1->pixDestX+t_params1->destWidth, t_params1->pixDestY, t_params1->rotation_hotspot.x, t_params1->rotation_hotspot.y, vect_rotate_x[0], vect_rotate_y[0]); // PMD - set this up to subtract the height to support Y is positive going up params1.dest_position[2].x = calc_rotate_x(t_params1->pixDestX, t_params1->pixDestY-t_params1->destHeight, t_params1->rotation_hotspot.x, t_params1->rotation_hotspot.y, vect_rotate_x[0], vect_rotate_y[0]); params1.dest_position[3].x = calc_rotate_x(t_params1->pixDestX+t_params1->destWidth, t_params1->pixDestY-t_params1->destHeight, t_params1->rotation_hotspot.x, t_params1->rotation_hotspot.y, vect_rotate_x[0], vect_rotate_y[0]); params1.dest_position[0].y = calc_rotate_y(t_params1->pixDestX, t_params1->pixDestY, t_params1->rotation_hotspot.x, t_params1->rotation_hotspot.y, vect_rotate_x[1], vect_rotate_y[1]); params1.dest_position[1].y = calc_rotate_y(t_params1->pixDestX+t_params1->destWidth, t_params1->pixDestY, t_params1->rotation_hotspot.x, t_params1->rotation_hotspot.y, vect_rotate_x[1], vect_rotate_y[1]); // PMD - set this up to subtract the height to support Y is positive going up params1.dest_position[2].y = calc_rotate_y(t_params1->pixDestX, t_params1->pixDestY-t_params1->destHeight, t_params1->rotation_hotspot.x, t_params1->rotation_hotspot.y, vect_rotate_x[1], vect_rotate_y[1]); params1.dest_position[3].y = calc_rotate_y(t_params1->pixDestX+t_params1->destWidth, t_params1->pixDestY-t_params1->destHeight, t_params1->rotation_hotspot.x, t_params1->rotation_hotspot.y, vect_rotate_x[1], vect_rotate_y[1]); }

## Bookmarks