mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
Fixed texture coordinates for vector screen quad (nw)
This commit is contained in:
parent
95309f461e
commit
454db9d5d3
@ -1890,8 +1890,39 @@ void render_target::add_container_primitives(render_primitive_list &list, const
|
||||
|
||||
if (PRIMFLAG_GET_VECTORBUF(curitem.flags()))
|
||||
{
|
||||
// flags S swap-xy, Y flip-y, X flip-x
|
||||
//
|
||||
// S Y X e.g. flips
|
||||
// 0 0 0 asteroid !X !Y
|
||||
// 0 0 1 -
|
||||
// 0 1 0 speedfrk !X Y
|
||||
// 0 1 1 solarq X Y
|
||||
// 1 0 0 -
|
||||
// 1 0 1 -
|
||||
// 1 1 0 tempest !X Y
|
||||
// 1 1 1 barrier !X !Y
|
||||
|
||||
bool flip_x = (manager().machine().system().flags & ORIENTATION_FLIP_X) == ORIENTATION_FLIP_X;
|
||||
bool flip_y = (manager().machine().system().flags & ORIENTATION_FLIP_Y) == ORIENTATION_FLIP_Y;
|
||||
bool swap_xy = (manager().machine().system().flags & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY;
|
||||
|
||||
int vectororient = 0;
|
||||
if (flip_x)
|
||||
{
|
||||
vectororient |= ORIENTATION_FLIP_X;
|
||||
}
|
||||
if (flip_y)
|
||||
{
|
||||
vectororient |= ORIENTATION_FLIP_Y;
|
||||
}
|
||||
if (flip_x && flip_y && swap_xy)
|
||||
{
|
||||
vectororient ^= ORIENTATION_FLIP_Y;
|
||||
vectororient ^= ORIENTATION_FLIP_X;
|
||||
}
|
||||
|
||||
// determine the final orientation (textures are up-side down, so flip y-axis for vectors to immitate that behavior)
|
||||
int finalorient = orientation_add(ORIENTATION_FLIP_Y, container_xform.orientation);
|
||||
int finalorient = orientation_add(vectororient, container_xform.orientation);
|
||||
|
||||
// determine UV coordinates
|
||||
prim->texcoords = oriented_texcoords[finalorient];
|
||||
|
Loading…
Reference in New Issue
Block a user