diff options
author | 2016-04-16 15:46:04 +0200 | |
---|---|---|
committer | 2016-04-16 15:46:04 +0200 | |
commit | 454db9d5d30a2688f355716507bf5bc43240b8f2 (patch) | |
tree | 1cea47e17f286b01f5eb402db1f3c193a3bf5224 /src/emu/render.cpp | |
parent | 95309f461e5274151c97830945ba69d49cccef12 (diff) |
Fixed texture coordinates for vector screen quad (nw)
Diffstat (limited to 'src/emu/render.cpp')
-rw-r--r-- | src/emu/render.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/emu/render.cpp b/src/emu/render.cpp index b2e4e02558a..6f42d26c3c7 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -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]; |