paulo@0: /* Wall kick tables for LOCKJAW, an implementation of the Soviet Mind Game paulo@0: paulo@0: Copyright (C) 2006 Damian Yerrick paulo@0: paulo@0: This work is free software; you can redistribute it and/or modify paulo@0: it under the terms of the GNU General Public License as published by paulo@0: the Free Software Foundation; either version 2 of the License, or paulo@0: (at your option) any later version. paulo@0: paulo@0: This program is distributed in the hope that it will be useful, paulo@0: but WITHOUT ANY WARRANTY; without even the implied warranty of paulo@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the paulo@0: GNU General Public License for more details. paulo@0: paulo@0: You should have received a copy of the GNU General Public License paulo@0: along with this program; if not, write to the Free Software paulo@0: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA paulo@0: paulo@0: Original game concept and design by Alexey Pajitnov. paulo@0: The Software is not sponsored or endorsed by Alexey Pajitnov, Elorg, paulo@0: or The Tetris Company LLC. paulo@0: paulo@0: */ paulo@0: paulo@0: #define LJ_INTERNAL paulo@0: #include "lj.h" paulo@0: paulo@0: paulo@0: // These wall kicks are for rotation TO a given orientation. paulo@0: // Based on http://www.the-shell.net/img/srs_study.html paulo@0: static const LJRotSystem rotSRS = { paulo@0: .kicksL = {1, 0, 0, -1, 0, 0, 0, -1, 0, -1}, paulo@0: .kicksR = {3, 2, 2, -1, 2, 2, 2, -1, 2, -3}, paulo@0: .kickTables = { paulo@0: paulo@0: // 0: JLSTZ counterclockwise paulo@0: { paulo@0: { WK( 0, 0),WK( 1, 0),WK( 1,-1),WK( 0, 2),WK( 1, 2) }, // R->U paulo@0: { WK( 0, 0),WK(-1, 0),WK(-1, 1),WK( 0,-2),WK(-1,-2) }, // D->R paulo@0: { WK( 0, 0),WK(-1, 0),WK(-1,-1),WK( 0, 2),WK(-1, 2) }, // L->D paulo@0: { WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 0,-2),WK( 1,-2) } // U->L paulo@0: }, paulo@0: paulo@0: // 1: I counterclockwise paulo@0: { paulo@0: { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK(-1,-2),WK( 2, 1) }, // R->U paulo@0: { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK( 1,-1),WK(-2, 1) }, // D->R paulo@0: { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK(-2,-1),WK( 1, 2) }, // L->D paulo@0: { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK( 2,-1),WK(-1, 2) } // U->L paulo@0: }, paulo@0: paulo@0: // 2: JLSTZ clockwise paulo@0: { paulo@0: { WK( 0, 0),WK(-1, 0),WK(-1,-1),WK( 0, 2),WK(-1, 2) }, // L->U paulo@0: { WK( 0, 0),WK(-1, 0),WK(-1, 1),WK( 0,-2),WK(-1,-2) }, // U->R paulo@0: { WK( 0, 0),WK( 1, 0),WK( 1,-1),WK( 0, 2),WK( 1, 2) }, // R->D paulo@0: { WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 0,-2),WK( 1,-2) }, // D->L paulo@0: }, paulo@0: paulo@0: // 3: I clockwise paulo@0: { paulo@0: { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK( 1,-2),WK(-2, 1) }, // L->U paulo@0: { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK(-2,-1),WK( 1, 2) }, // U->R paulo@0: { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK( 2,-1),WK(-1, 2) }, // R->D paulo@0: { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK(-1,-1),WK( 2, 1) } // D->L paulo@0: } paulo@0: } paulo@0: }; paulo@0: paulo@0: // I: round to top right paulo@0: // J, L, T: round to bottom paulo@0: // S: round to bottom left (constant center column) paulo@0: // Z: round to bottom right (constant center column) paulo@0: static const LJRotSystem rotSega = { paulo@0: .colorScheme = 1, paulo@0: .entryOffset = { paulo@0: WK( 0, 0),WK( 0, 1),WK( 0, 1),WK( 0, 0),WK( 0, 0),WK( 0, 1),WK( 0, 0), paulo@0: WK( 0, 0),WK( 0, 0),WK( 0, 0) paulo@0: }, paulo@0: .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 }, paulo@0: .kicksL = {0, 1, 1, -1, 2, 1, 3, 0, -1, -1}, paulo@0: .kicksR = {4, 5, 5, -1, 6, 5, 7, 4, -1, -1}, paulo@0: paulo@0: .kickTables = { paulo@0: paulo@0: // 0: I counterclockwise paulo@0: { paulo@0: { WK( 0, 0),WK_END }, // R->U paulo@0: { WK( 0,-1),WK_END }, // D->R paulo@0: { WK(-1, 1),WK_END }, // L->D paulo@0: { WK( 1, 0),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 1: JLT counterclockwise paulo@0: { paulo@0: { WK( 0,-1),WK_END }, // R->U paulo@0: { WK( 0, 0),WK_END }, // D->R paulo@0: { WK( 0, 0),WK_END }, // L->D paulo@0: { WK( 0, 1),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 2: S counterclockwise (round left, like Game Boy) paulo@0: { paulo@0: { WK( 1,-1),WK_END }, // R->U paulo@0: { WK(-1, 0),WK_END }, // D->R paulo@0: { WK( 0, 0),WK_END }, // L->D paulo@0: { WK( 0, 1),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 3: Z counterclockwise (round right, like NES) paulo@0: { paulo@0: { WK( 0,-1),WK_END }, // R->U paulo@0: { WK( 0, 0),WK_END }, // D->R paulo@0: { WK(-1, 0),WK_END }, // L->D paulo@0: { WK( 1, 1),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 4: I clockwise paulo@0: { paulo@0: { WK(-1, 0),WK_END }, // L->U paulo@0: { WK( 0, 0),WK_END }, // U->R paulo@0: { WK( 0, 1),WK_END }, // R->D paulo@0: { WK( 1,-1),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 5: JLT clockwise paulo@0: { paulo@0: { WK( 0,-1),WK_END }, // L->U paulo@0: { WK( 0, 1),WK_END }, // U->R paulo@0: { WK( 0, 0),WK_END }, // R->D paulo@0: { WK( 0, 0),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 6: S clockwise (round left) paulo@0: { paulo@0: { WK( 0,-1),WK_END }, // L->U paulo@0: { WK(-1, 1),WK_END }, // U->R paulo@0: { WK( 1, 0),WK_END }, // R->D paulo@0: { WK( 0, 0),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 7: Z clockwise (round right) paulo@0: { paulo@0: { WK(-1,-1),WK_END }, // L->U paulo@0: { WK( 0, 1),WK_END }, // U->R paulo@0: { WK( 0, 0),WK_END }, // R->D paulo@0: { WK( 1, 0),WK_END } // D->L paulo@0: } paulo@0: } paulo@0: }; paulo@0: paulo@0: // Arika is based on Sega but with a few wall kicks. paulo@0: // Each free-space kick should be followed by Right, then Left paulo@0: // but for J, L, and T, kicks to vertical positions (point-right and paulo@0: // point-left) paulo@0: // T when rotating to point-up can also floor kick by one, paulo@0: // and I when rotating to vertical can floor kick by one or two. paulo@0: static const LJRotSystem rotArika = { paulo@0: .colorScheme = 1, paulo@0: .entryOffset = { paulo@0: WK( 0, 0),WK( 0, 1),WK( 0, 1),WK( 0, 0),WK( 0, 0),WK( 0, 1),WK( 0, 0), paulo@0: WK( 0, 0),WK( 0, 0),WK( 0, 0) paulo@0: }, paulo@0: .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 }, paulo@0: .kicksL = {0, 1, 1, -1, 2, 8, 3, 0, -1, -1}, paulo@0: .kicksR = {4, 5, 5, -1, 6, 9, 7, 4, -1, -1}, paulo@0: .kickTables = { paulo@0: paulo@0: // 0: I counterclockwise paulo@0: { paulo@0: { WK( 0, 0),WK_END }, // R->U paulo@0: { WK( 0,-1),WK( 0, 0),WK( 0, 1),WK_END }, // D->R paulo@0: { WK(-1, 1),WK_END }, // L->D paulo@0: { WK( 1, 0),WK( 1, 1),WK( 1, 2),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 1: JL counterclockwise paulo@0: { paulo@0: { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK_END }, // R->U paulo@0: { WK( 0, 0),ARIKA_IF_NOT_CENTER,WK( 1, 0),WK(-1, 0),WK_END }, // D->R paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // L->D paulo@0: { WK( 0, 1),ARIKA_IF_NOT_CENTER,WK( 1, 1),WK(-1, 1),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 2: S counterclockwise (round left, like Game Boy with WK) paulo@0: { paulo@0: { WK( 1,-1),WK( 2,-1),WK( 0,-1),WK_END }, // R->U paulo@0: { WK(-1, 0),WK( 0, 0),WK(-2, 0),WK_END }, // D->R paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // L->D paulo@0: { WK( 0, 1),WK( 1, 1),WK(-1, 1),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 3: Z counterclockwise (round right, like NES with WK) paulo@0: { paulo@0: { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK_END }, // R->U paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // D->R paulo@0: { WK(-1, 0),WK( 0, 0),WK(-2, 0),WK_END }, // L->D paulo@0: { WK( 1, 1),WK( 2, 1),WK( 0, 1),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 4: I clockwise paulo@0: { paulo@0: { WK(-1, 0),WK_END }, // L->U paulo@0: { WK( 0, 0),WK( 0, 1),WK( 0, 2),WK_END }, // U->R paulo@0: { WK( 0, 1),WK_END }, // R->D paulo@0: { WK( 1,-1),WK( 1, 0),WK( 1, 1),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 5: JLT clockwise paulo@0: { paulo@0: { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK_END }, // L->U paulo@0: { WK( 0, 1),ARIKA_IF_NOT_CENTER,WK( 1, 1),WK(-1, 1),WK_END }, // U->R paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // R->D paulo@0: { WK( 0, 0),ARIKA_IF_NOT_CENTER,WK( 1, 0),WK(-1, 0),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 6: S clockwise (round left) paulo@0: { paulo@0: { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK_END }, // L->U paulo@0: { WK(-1, 1),WK( 0, 1),WK(-2, 1),WK_END }, // U->R paulo@0: { WK( 1, 0),WK( 2, 0),WK( 0, 0),WK_END }, // R->D paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 7: Z clockwise (round right) paulo@0: { paulo@0: { WK(-1,-1),WK( 0,-1),WK(-2,-1),WK_END }, // L->U paulo@0: { WK( 0, 1),WK( 1, 1),WK(-1, 1),WK_END }, // U->R paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // R->D paulo@0: { WK( 1, 0),WK( 2, 0),WK( 0, 0),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 8: T counterclockwise (with TI floorkick) paulo@0: { paulo@0: { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK( 0, 0),WK_END }, // R->U paulo@0: { WK( 0, 0),ARIKA_IF_NOT_CENTER,WK( 1, 0),WK(-1, 0),WK_END }, // D->R paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // L->D paulo@0: { WK( 0, 1),ARIKA_IF_NOT_CENTER,WK( 1, 1),WK(-1, 1),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 9: T clockwise (with TI floorkick) paulo@0: { paulo@0: { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK( 0, 0),WK_END }, // L->U paulo@0: { WK( 0, 1),ARIKA_IF_NOT_CENTER,WK( 1, 1),WK(-1, 1),WK_END }, // U->R paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // R->D paulo@0: { WK( 0, 0),ARIKA_IF_NOT_CENTER,WK( 1, 0),WK(-1, 0),WK_END } // D->L paulo@0: } paulo@0: } paulo@0: }; paulo@0: paulo@0: // All pieces are started with their left side in column 5 and flat side up. paulo@0: // All pieces stick to the top of the bounding box. paulo@0: // All 3-wide pieces stick to the left side of the bounding box. paulo@0: // I sticks to the top when left and right and occupies the second column paulo@0: // when up and down. paulo@0: // Try here, then try kicking one space left. Discovered by zaphod77: paulo@0: // http://www.tetrisconcept.com/forum/viewtopic.php?t=877 paulo@0: static const LJRotSystem rotTengen = { paulo@0: .colorScheme = 1, paulo@0: .entryOffset = { paulo@0: WK( 1, 0),WK( 1, 1),WK( 1, 1),WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 1, 0), paulo@0: WK( 0, 0),WK( 1, 0),WK( 0, 0) paulo@0: }, paulo@0: .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 }, paulo@0: .kicksL = {0, 3, 3, -1, 3, 3, 3, 0, 2, 5}, paulo@0: .kicksR = {1, 4, 4, -1, 4, 4, 4, 1, 3, 5}, paulo@0: .kickTables = { paulo@0: paulo@0: // 0: I counterclockwise paulo@0: { paulo@0: { WK( 1, 1),WK( 0, 1),WK_END }, // R->U paulo@0: { WK(-1,-2),WK(-2,-2),WK_END }, // D->R paulo@0: { WK( 0, 2),WK(-1, 2),WK_END }, // L->D paulo@0: { WK( 0,-1),WK(-1,-1),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 1: I clockwise paulo@0: { paulo@0: { WK( 0, 1),WK(-1, 1),WK_END }, // L->U paulo@0: { WK(-1,-1),WK(-2,-1),WK_END }, // U->R paulo@0: { WK( 1, 2),WK( 0, 2),WK_END }, // R->D paulo@0: { WK( 0,-2),WK(-1,-2),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 2: I3 paulo@0: { paulo@0: { WK( 0, 1),WK(-1, 1),WK_END }, // L->U paulo@0: { WK( 0,-1),WK(-1,-1),WK_END }, // U->R paulo@0: { WK( 0, 1),WK(-1, 1),WK_END }, // R->D paulo@0: { WK( 0,-1),WK(-1,-1),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 3: JLSTZ counterclockwise paulo@0: { paulo@0: { WK( 1, 0),WK( 0, 0),WK_END }, // R->U paulo@0: { WK(-1,-1),WK(-2,-1),WK_END }, // D->R paulo@0: { WK( 0, 1),WK(-1, 1),WK_END }, // L->D paulo@0: { WK( 0, 0),WK(-1, 0),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 4: JLSTZ clockwise paulo@0: { paulo@0: { WK( 0, 0),WK(-1, 0),WK_END }, // L->U paulo@0: { WK(-1, 0),WK(-2, 0),WK_END }, // U->R paulo@0: { WK( 1, 1),WK( 0, 1),WK_END }, // R->D paulo@0: { WK( 0,-1),WK(-1,-1),WK_END } // D->L paulo@0: }, paulo@0: paulo@0: // 5: L3 paulo@0: { paulo@0: { WK( 0, 0),WK(-1, 0),WK_END }, // L->U paulo@0: { WK(-1, 0),WK(-2, 0),WK_END }, // U->R paulo@0: { WK( 1, 1),WK( 0, 1),WK_END }, // R->D paulo@0: { WK( 0,-1),WK(-1,-1),WK_END } // D->L paulo@0: } paulo@0: } paulo@0: }; paulo@0: paulo@0: // NES: No wall kick paulo@0: // 3-wide pieces start out one block to the right paulo@0: // I, S and Z round to the right and use effective positions R and D paulo@0: static const LJRotSystem rotNES = { paulo@0: .colorScheme = 1, paulo@0: .entryOffset = { paulo@0: WK( 0, 0),WK( 1, 1),WK( 1, 1),WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 1, 0), paulo@0: WK( 0, 0),WK( 0, 0),WK( 0, 0) paulo@0: }, paulo@0: .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 }, paulo@0: .kicksL = {0, -1, -1, -1, 0, -1, 0, 0, -1, -1}, paulo@0: .kicksR = {1, -1, -1, -1, 1, -1, 1, 1, -1, -1}, paulo@0: .kickTables = { paulo@0: paulo@0: // 0: counterclockwise (round right) paulo@0: { paulo@0: { WK( 0,-1),WK_END }, // R->U paulo@0: { WK( 0, 0),WK_END }, // D->R paulo@0: { WK(-1, 0),WK_END }, // L->D paulo@0: { WK( 1, 1),WK_END } // U->L paulo@0: }, paulo@0: // 1: clockwise (round right) paulo@0: { paulo@0: { WK(-1,-1),WK_END }, // L->U paulo@0: { WK( 0, 1),WK_END }, // U->R paulo@0: { WK( 0, 0),WK_END }, // R->D paulo@0: { WK( 1, 0),WK_END } // D->L paulo@0: } paulo@0: } paulo@0: }; paulo@0: paulo@0: // GB: No wall kick paulo@0: // I, S and Z round to the left and use effective positions L and D paulo@0: static const LJRotSystem rotGB = { paulo@0: .colorScheme = 1, paulo@0: .entryOffset = { paulo@0: WK( 0, 0),WK( 0, 1),WK( 0, 1),WK( 0, 0),WK( 0, 0),WK( 0, 1),WK( 0, 0), paulo@0: WK( 0, 0),WK( 0, 0),WK( 0, 0) paulo@0: }, paulo@0: .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 }, paulo@0: .kicksL = {0, -1, -1, -1, 0, -1, 0, 0, -1, -1}, paulo@0: .kicksR = {1, -1, -1, -1, 1, -1, 1, 1, -1, -1}, paulo@0: .kickTables = { paulo@0: paulo@0: // 0: counterclockwise (round left) paulo@0: { paulo@0: { WK( 1,-1),WK_END }, // R->U paulo@0: { WK(-1, 0),WK_END }, // D->R paulo@0: { WK( 0, 0),WK_END }, // L->D paulo@0: { WK( 0, 1),WK_END } // U->L paulo@0: }, paulo@0: // 1: clockwise (round left) paulo@0: { paulo@0: { WK( 0,-1),WK_END }, // L->U paulo@0: { WK(-1, 1),WK_END }, // U->R paulo@0: { WK( 1, 0),WK_END }, // R->D paulo@0: { WK( 0, 0),WK_END } // D->L paulo@0: }, paulo@0: } paulo@0: }; paulo@0: paulo@0: paulo@0: // The rotation system of LOCKJAW: The Overdose (GBA) and paulo@0: // Tetramino (NES) TOD is simple. In free space it behaves like SRS. paulo@0: // If that's blocked, kick right, kick left, kick up. paulo@0: static const LJRotSystem rotTOD = { paulo@0: .kicksL = {0, 0, 0, -1, 0, 0, 0, 0, 0, 0}, paulo@0: .kicksR = {0, 0, 0, -1, 0, 0, 0, 0, 0, 0}, paulo@0: .kickTables = { paulo@0: paulo@0: // 0: JLSTZ counterclockwise paulo@0: { paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK( 0, 1),WK_END }, // ->U paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK( 0, 1),WK_END }, // ->R paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK( 0, 1),WK_END }, // ->D paulo@0: { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK( 0, 1),WK_END } // ->L paulo@0: }, paulo@0: paulo@0: // 1: I counterclockwise paulo@0: { paulo@0: { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK(-1,-2),WK( 2, 1) }, // R->U paulo@0: { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK( 1,-1),WK(-2, 1) }, // D->R paulo@0: { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK(-2,-1),WK( 1, 2) }, // L->D paulo@0: { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK( 2,-1),WK(-1, 2) } // U->L paulo@0: }, paulo@0: paulo@0: // 2: JLSTZ clockwise paulo@0: { paulo@0: { WK( 0, 0),WK(-1, 0),WK(-1,-1),WK( 0, 2),WK(-1, 2) }, // L->U paulo@0: { WK( 0, 0),WK(-1, 0),WK(-1, 1),WK( 0,-2),WK(-1,-2) }, // U->R paulo@0: { WK( 0, 0),WK( 1, 0),WK( 1,-1),WK( 0, 2),WK( 1, 2) }, // R->D paulo@0: { WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 0,-2),WK( 1,-2) }, // D->L paulo@0: }, paulo@0: paulo@0: // 3: I clockwise paulo@0: { paulo@0: { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK( 1,-2),WK(-2, 1) }, // L->U paulo@0: { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK(-2,-1),WK( 1, 2) }, // U->R paulo@0: { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK( 2,-1),WK(-1, 2) }, // R->D paulo@0: { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK(-1,-1),WK( 2, 1) } // D->L paulo@0: } paulo@0: } paulo@0: }; paulo@0: paulo@0: static const LJRotSystem rotTDX = { paulo@0: .entryOffset = { paulo@0: WK( 0, 0),WK( 1, 1),WK( 1, 1),WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 1, 0), paulo@0: WK( 0, 0),WK( 0, 0),WK( 0, 0) paulo@0: }, paulo@0: .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 }, paulo@0: .kicksL = {0, 0, 0, -1, 0, 0, 0, 0, 0, 0}, paulo@0: .kicksR = {1, 1, 1, -1, 1, 1, 1, 1, 1, 1}, paulo@0: .kickTables = { paulo@0: paulo@0: // 0: counterclockwise paulo@0: { paulo@0: { WK( 0, 0),WK( 1,-1),WK_END }, // R->U paulo@0: { WK( 0, 0),WK(-1,-1),WK_END }, // D->R paulo@0: { WK( 0, 0),WK(-1, 1),WK_END }, // L->D paulo@0: { WK( 0, 0),WK( 1, 1),WK_END } // U->L paulo@0: }, paulo@0: paulo@0: // 1: clockwise paulo@0: { paulo@0: { WK( 0, 0),WK(-1,-1),WK_END }, // L->U paulo@0: { WK( 0, 0),WK(-1, 1),WK_END }, // U->R paulo@0: { WK( 0, 0),WK( 1, 1),WK_END }, // R->D paulo@0: { WK( 0, 0),WK( 1,-1),WK_END } // D->L paulo@0: } paulo@0: } paulo@0: }; paulo@0: paulo@0: const LJRotSystem *const rotSystems[N_ROTATION_SYSTEMS] = { paulo@0: &rotSRS, &rotSega, &rotArika, &rotTengen, paulo@0: &rotNES, &rotGB, &rotTOD, &rotTDX paulo@0: };