annotate src/wktables.c @ 0:c84446dfb3f5

initial add
author paulo@localhost
date Fri, 13 Mar 2009 00:39:12 -0700
parents
children
rev   line source
paulo@0 1 /* Wall kick tables for LOCKJAW, an implementation of the Soviet Mind Game
paulo@0 2
paulo@0 3 Copyright (C) 2006 Damian Yerrick <tepples+lj@spamcop.net>
paulo@0 4
paulo@0 5 This work is free software; you can redistribute it and/or modify
paulo@0 6 it under the terms of the GNU General Public License as published by
paulo@0 7 the Free Software Foundation; either version 2 of the License, or
paulo@0 8 (at your option) any later version.
paulo@0 9
paulo@0 10 This program is distributed in the hope that it will be useful,
paulo@0 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
paulo@0 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
paulo@0 13 GNU General Public License for more details.
paulo@0 14
paulo@0 15 You should have received a copy of the GNU General Public License
paulo@0 16 along with this program; if not, write to the Free Software
paulo@0 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
paulo@0 18
paulo@0 19 Original game concept and design by Alexey Pajitnov.
paulo@0 20 The Software is not sponsored or endorsed by Alexey Pajitnov, Elorg,
paulo@0 21 or The Tetris Company LLC.
paulo@0 22
paulo@0 23 */
paulo@0 24
paulo@0 25 #define LJ_INTERNAL
paulo@0 26 #include "lj.h"
paulo@0 27
paulo@0 28
paulo@0 29 // These wall kicks are for rotation TO a given orientation.
paulo@0 30 // Based on http://www.the-shell.net/img/srs_study.html
paulo@0 31 static const LJRotSystem rotSRS = {
paulo@0 32 .kicksL = {1, 0, 0, -1, 0, 0, 0, -1, 0, -1},
paulo@0 33 .kicksR = {3, 2, 2, -1, 2, 2, 2, -1, 2, -3},
paulo@0 34 .kickTables = {
paulo@0 35
paulo@0 36 // 0: JLSTZ counterclockwise
paulo@0 37 {
paulo@0 38 { WK( 0, 0),WK( 1, 0),WK( 1,-1),WK( 0, 2),WK( 1, 2) }, // R->U
paulo@0 39 { WK( 0, 0),WK(-1, 0),WK(-1, 1),WK( 0,-2),WK(-1,-2) }, // D->R
paulo@0 40 { WK( 0, 0),WK(-1, 0),WK(-1,-1),WK( 0, 2),WK(-1, 2) }, // L->D
paulo@0 41 { WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 0,-2),WK( 1,-2) } // U->L
paulo@0 42 },
paulo@0 43
paulo@0 44 // 1: I counterclockwise
paulo@0 45 {
paulo@0 46 { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK(-1,-2),WK( 2, 1) }, // R->U
paulo@0 47 { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK( 1,-1),WK(-2, 1) }, // D->R
paulo@0 48 { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK(-2,-1),WK( 1, 2) }, // L->D
paulo@0 49 { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK( 2,-1),WK(-1, 2) } // U->L
paulo@0 50 },
paulo@0 51
paulo@0 52 // 2: JLSTZ clockwise
paulo@0 53 {
paulo@0 54 { WK( 0, 0),WK(-1, 0),WK(-1,-1),WK( 0, 2),WK(-1, 2) }, // L->U
paulo@0 55 { WK( 0, 0),WK(-1, 0),WK(-1, 1),WK( 0,-2),WK(-1,-2) }, // U->R
paulo@0 56 { WK( 0, 0),WK( 1, 0),WK( 1,-1),WK( 0, 2),WK( 1, 2) }, // R->D
paulo@0 57 { WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 0,-2),WK( 1,-2) }, // D->L
paulo@0 58 },
paulo@0 59
paulo@0 60 // 3: I clockwise
paulo@0 61 {
paulo@0 62 { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK( 1,-2),WK(-2, 1) }, // L->U
paulo@0 63 { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK(-2,-1),WK( 1, 2) }, // U->R
paulo@0 64 { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK( 2,-1),WK(-1, 2) }, // R->D
paulo@0 65 { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK(-1,-1),WK( 2, 1) } // D->L
paulo@0 66 }
paulo@0 67 }
paulo@0 68 };
paulo@0 69
paulo@0 70 // I: round to top right
paulo@0 71 // J, L, T: round to bottom
paulo@0 72 // S: round to bottom left (constant center column)
paulo@0 73 // Z: round to bottom right (constant center column)
paulo@0 74 static const LJRotSystem rotSega = {
paulo@0 75 .colorScheme = 1,
paulo@0 76 .entryOffset = {
paulo@0 77 WK( 0, 0),WK( 0, 1),WK( 0, 1),WK( 0, 0),WK( 0, 0),WK( 0, 1),WK( 0, 0),
paulo@0 78 WK( 0, 0),WK( 0, 0),WK( 0, 0)
paulo@0 79 },
paulo@0 80 .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 },
paulo@0 81 .kicksL = {0, 1, 1, -1, 2, 1, 3, 0, -1, -1},
paulo@0 82 .kicksR = {4, 5, 5, -1, 6, 5, 7, 4, -1, -1},
paulo@0 83
paulo@0 84 .kickTables = {
paulo@0 85
paulo@0 86 // 0: I counterclockwise
paulo@0 87 {
paulo@0 88 { WK( 0, 0),WK_END }, // R->U
paulo@0 89 { WK( 0,-1),WK_END }, // D->R
paulo@0 90 { WK(-1, 1),WK_END }, // L->D
paulo@0 91 { WK( 1, 0),WK_END } // U->L
paulo@0 92 },
paulo@0 93
paulo@0 94 // 1: JLT counterclockwise
paulo@0 95 {
paulo@0 96 { WK( 0,-1),WK_END }, // R->U
paulo@0 97 { WK( 0, 0),WK_END }, // D->R
paulo@0 98 { WK( 0, 0),WK_END }, // L->D
paulo@0 99 { WK( 0, 1),WK_END } // U->L
paulo@0 100 },
paulo@0 101
paulo@0 102 // 2: S counterclockwise (round left, like Game Boy)
paulo@0 103 {
paulo@0 104 { WK( 1,-1),WK_END }, // R->U
paulo@0 105 { WK(-1, 0),WK_END }, // D->R
paulo@0 106 { WK( 0, 0),WK_END }, // L->D
paulo@0 107 { WK( 0, 1),WK_END } // U->L
paulo@0 108 },
paulo@0 109
paulo@0 110 // 3: Z counterclockwise (round right, like NES)
paulo@0 111 {
paulo@0 112 { WK( 0,-1),WK_END }, // R->U
paulo@0 113 { WK( 0, 0),WK_END }, // D->R
paulo@0 114 { WK(-1, 0),WK_END }, // L->D
paulo@0 115 { WK( 1, 1),WK_END } // U->L
paulo@0 116 },
paulo@0 117
paulo@0 118 // 4: I clockwise
paulo@0 119 {
paulo@0 120 { WK(-1, 0),WK_END }, // L->U
paulo@0 121 { WK( 0, 0),WK_END }, // U->R
paulo@0 122 { WK( 0, 1),WK_END }, // R->D
paulo@0 123 { WK( 1,-1),WK_END } // D->L
paulo@0 124 },
paulo@0 125
paulo@0 126 // 5: JLT clockwise
paulo@0 127 {
paulo@0 128 { WK( 0,-1),WK_END }, // L->U
paulo@0 129 { WK( 0, 1),WK_END }, // U->R
paulo@0 130 { WK( 0, 0),WK_END }, // R->D
paulo@0 131 { WK( 0, 0),WK_END } // D->L
paulo@0 132 },
paulo@0 133
paulo@0 134 // 6: S clockwise (round left)
paulo@0 135 {
paulo@0 136 { WK( 0,-1),WK_END }, // L->U
paulo@0 137 { WK(-1, 1),WK_END }, // U->R
paulo@0 138 { WK( 1, 0),WK_END }, // R->D
paulo@0 139 { WK( 0, 0),WK_END } // D->L
paulo@0 140 },
paulo@0 141
paulo@0 142 // 7: Z clockwise (round right)
paulo@0 143 {
paulo@0 144 { WK(-1,-1),WK_END }, // L->U
paulo@0 145 { WK( 0, 1),WK_END }, // U->R
paulo@0 146 { WK( 0, 0),WK_END }, // R->D
paulo@0 147 { WK( 1, 0),WK_END } // D->L
paulo@0 148 }
paulo@0 149 }
paulo@0 150 };
paulo@0 151
paulo@0 152 // Arika is based on Sega but with a few wall kicks.
paulo@0 153 // Each free-space kick should be followed by Right, then Left
paulo@0 154 // but for J, L, and T, kicks to vertical positions (point-right and
paulo@0 155 // point-left)
paulo@0 156 // T when rotating to point-up can also floor kick by one,
paulo@0 157 // and I when rotating to vertical can floor kick by one or two.
paulo@0 158 static const LJRotSystem rotArika = {
paulo@0 159 .colorScheme = 1,
paulo@0 160 .entryOffset = {
paulo@0 161 WK( 0, 0),WK( 0, 1),WK( 0, 1),WK( 0, 0),WK( 0, 0),WK( 0, 1),WK( 0, 0),
paulo@0 162 WK( 0, 0),WK( 0, 0),WK( 0, 0)
paulo@0 163 },
paulo@0 164 .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 },
paulo@0 165 .kicksL = {0, 1, 1, -1, 2, 8, 3, 0, -1, -1},
paulo@0 166 .kicksR = {4, 5, 5, -1, 6, 9, 7, 4, -1, -1},
paulo@0 167 .kickTables = {
paulo@0 168
paulo@0 169 // 0: I counterclockwise
paulo@0 170 {
paulo@0 171 { WK( 0, 0),WK_END }, // R->U
paulo@0 172 { WK( 0,-1),WK( 0, 0),WK( 0, 1),WK_END }, // D->R
paulo@0 173 { WK(-1, 1),WK_END }, // L->D
paulo@0 174 { WK( 1, 0),WK( 1, 1),WK( 1, 2),WK_END } // U->L
paulo@0 175 },
paulo@0 176
paulo@0 177 // 1: JL counterclockwise
paulo@0 178 {
paulo@0 179 { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK_END }, // R->U
paulo@0 180 { WK( 0, 0),ARIKA_IF_NOT_CENTER,WK( 1, 0),WK(-1, 0),WK_END }, // D->R
paulo@0 181 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // L->D
paulo@0 182 { WK( 0, 1),ARIKA_IF_NOT_CENTER,WK( 1, 1),WK(-1, 1),WK_END } // U->L
paulo@0 183 },
paulo@0 184
paulo@0 185 // 2: S counterclockwise (round left, like Game Boy with WK)
paulo@0 186 {
paulo@0 187 { WK( 1,-1),WK( 2,-1),WK( 0,-1),WK_END }, // R->U
paulo@0 188 { WK(-1, 0),WK( 0, 0),WK(-2, 0),WK_END }, // D->R
paulo@0 189 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // L->D
paulo@0 190 { WK( 0, 1),WK( 1, 1),WK(-1, 1),WK_END } // U->L
paulo@0 191 },
paulo@0 192
paulo@0 193 // 3: Z counterclockwise (round right, like NES with WK)
paulo@0 194 {
paulo@0 195 { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK_END }, // R->U
paulo@0 196 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // D->R
paulo@0 197 { WK(-1, 0),WK( 0, 0),WK(-2, 0),WK_END }, // L->D
paulo@0 198 { WK( 1, 1),WK( 2, 1),WK( 0, 1),WK_END } // U->L
paulo@0 199 },
paulo@0 200
paulo@0 201 // 4: I clockwise
paulo@0 202 {
paulo@0 203 { WK(-1, 0),WK_END }, // L->U
paulo@0 204 { WK( 0, 0),WK( 0, 1),WK( 0, 2),WK_END }, // U->R
paulo@0 205 { WK( 0, 1),WK_END }, // R->D
paulo@0 206 { WK( 1,-1),WK( 1, 0),WK( 1, 1),WK_END } // D->L
paulo@0 207 },
paulo@0 208
paulo@0 209 // 5: JLT clockwise
paulo@0 210 {
paulo@0 211 { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK_END }, // L->U
paulo@0 212 { WK( 0, 1),ARIKA_IF_NOT_CENTER,WK( 1, 1),WK(-1, 1),WK_END }, // U->R
paulo@0 213 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // R->D
paulo@0 214 { WK( 0, 0),ARIKA_IF_NOT_CENTER,WK( 1, 0),WK(-1, 0),WK_END } // D->L
paulo@0 215 },
paulo@0 216
paulo@0 217 // 6: S clockwise (round left)
paulo@0 218 {
paulo@0 219 { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK_END }, // L->U
paulo@0 220 { WK(-1, 1),WK( 0, 1),WK(-2, 1),WK_END }, // U->R
paulo@0 221 { WK( 1, 0),WK( 2, 0),WK( 0, 0),WK_END }, // R->D
paulo@0 222 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END } // D->L
paulo@0 223 },
paulo@0 224
paulo@0 225 // 7: Z clockwise (round right)
paulo@0 226 {
paulo@0 227 { WK(-1,-1),WK( 0,-1),WK(-2,-1),WK_END }, // L->U
paulo@0 228 { WK( 0, 1),WK( 1, 1),WK(-1, 1),WK_END }, // U->R
paulo@0 229 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // R->D
paulo@0 230 { WK( 1, 0),WK( 2, 0),WK( 0, 0),WK_END } // D->L
paulo@0 231 },
paulo@0 232
paulo@0 233 // 8: T counterclockwise (with TI floorkick)
paulo@0 234 {
paulo@0 235 { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK( 0, 0),WK_END }, // R->U
paulo@0 236 { WK( 0, 0),ARIKA_IF_NOT_CENTER,WK( 1, 0),WK(-1, 0),WK_END }, // D->R
paulo@0 237 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // L->D
paulo@0 238 { WK( 0, 1),ARIKA_IF_NOT_CENTER,WK( 1, 1),WK(-1, 1),WK_END } // U->L
paulo@0 239 },
paulo@0 240
paulo@0 241 // 9: T clockwise (with TI floorkick)
paulo@0 242 {
paulo@0 243 { WK( 0,-1),WK( 1,-1),WK(-1,-1),WK( 0, 0),WK_END }, // L->U
paulo@0 244 { WK( 0, 1),ARIKA_IF_NOT_CENTER,WK( 1, 1),WK(-1, 1),WK_END }, // U->R
paulo@0 245 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK_END }, // R->D
paulo@0 246 { WK( 0, 0),ARIKA_IF_NOT_CENTER,WK( 1, 0),WK(-1, 0),WK_END } // D->L
paulo@0 247 }
paulo@0 248 }
paulo@0 249 };
paulo@0 250
paulo@0 251 // All pieces are started with their left side in column 5 and flat side up.
paulo@0 252 // All pieces stick to the top of the bounding box.
paulo@0 253 // All 3-wide pieces stick to the left side of the bounding box.
paulo@0 254 // I sticks to the top when left and right and occupies the second column
paulo@0 255 // when up and down.
paulo@0 256 // Try here, then try kicking one space left. Discovered by zaphod77:
paulo@0 257 // http://www.tetrisconcept.com/forum/viewtopic.php?t=877
paulo@0 258 static const LJRotSystem rotTengen = {
paulo@0 259 .colorScheme = 1,
paulo@0 260 .entryOffset = {
paulo@0 261 WK( 1, 0),WK( 1, 1),WK( 1, 1),WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 1, 0),
paulo@0 262 WK( 0, 0),WK( 1, 0),WK( 0, 0)
paulo@0 263 },
paulo@0 264 .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 },
paulo@0 265 .kicksL = {0, 3, 3, -1, 3, 3, 3, 0, 2, 5},
paulo@0 266 .kicksR = {1, 4, 4, -1, 4, 4, 4, 1, 3, 5},
paulo@0 267 .kickTables = {
paulo@0 268
paulo@0 269 // 0: I counterclockwise
paulo@0 270 {
paulo@0 271 { WK( 1, 1),WK( 0, 1),WK_END }, // R->U
paulo@0 272 { WK(-1,-2),WK(-2,-2),WK_END }, // D->R
paulo@0 273 { WK( 0, 2),WK(-1, 2),WK_END }, // L->D
paulo@0 274 { WK( 0,-1),WK(-1,-1),WK_END } // U->L
paulo@0 275 },
paulo@0 276
paulo@0 277 // 1: I clockwise
paulo@0 278 {
paulo@0 279 { WK( 0, 1),WK(-1, 1),WK_END }, // L->U
paulo@0 280 { WK(-1,-1),WK(-2,-1),WK_END }, // U->R
paulo@0 281 { WK( 1, 2),WK( 0, 2),WK_END }, // R->D
paulo@0 282 { WK( 0,-2),WK(-1,-2),WK_END } // D->L
paulo@0 283 },
paulo@0 284
paulo@0 285 // 2: I3
paulo@0 286 {
paulo@0 287 { WK( 0, 1),WK(-1, 1),WK_END }, // L->U
paulo@0 288 { WK( 0,-1),WK(-1,-1),WK_END }, // U->R
paulo@0 289 { WK( 0, 1),WK(-1, 1),WK_END }, // R->D
paulo@0 290 { WK( 0,-1),WK(-1,-1),WK_END } // D->L
paulo@0 291 },
paulo@0 292
paulo@0 293 // 3: JLSTZ counterclockwise
paulo@0 294 {
paulo@0 295 { WK( 1, 0),WK( 0, 0),WK_END }, // R->U
paulo@0 296 { WK(-1,-1),WK(-2,-1),WK_END }, // D->R
paulo@0 297 { WK( 0, 1),WK(-1, 1),WK_END }, // L->D
paulo@0 298 { WK( 0, 0),WK(-1, 0),WK_END } // U->L
paulo@0 299 },
paulo@0 300
paulo@0 301 // 4: JLSTZ clockwise
paulo@0 302 {
paulo@0 303 { WK( 0, 0),WK(-1, 0),WK_END }, // L->U
paulo@0 304 { WK(-1, 0),WK(-2, 0),WK_END }, // U->R
paulo@0 305 { WK( 1, 1),WK( 0, 1),WK_END }, // R->D
paulo@0 306 { WK( 0,-1),WK(-1,-1),WK_END } // D->L
paulo@0 307 },
paulo@0 308
paulo@0 309 // 5: L3
paulo@0 310 {
paulo@0 311 { WK( 0, 0),WK(-1, 0),WK_END }, // L->U
paulo@0 312 { WK(-1, 0),WK(-2, 0),WK_END }, // U->R
paulo@0 313 { WK( 1, 1),WK( 0, 1),WK_END }, // R->D
paulo@0 314 { WK( 0,-1),WK(-1,-1),WK_END } // D->L
paulo@0 315 }
paulo@0 316 }
paulo@0 317 };
paulo@0 318
paulo@0 319 // NES: No wall kick
paulo@0 320 // 3-wide pieces start out one block to the right
paulo@0 321 // I, S and Z round to the right and use effective positions R and D
paulo@0 322 static const LJRotSystem rotNES = {
paulo@0 323 .colorScheme = 1,
paulo@0 324 .entryOffset = {
paulo@0 325 WK( 0, 0),WK( 1, 1),WK( 1, 1),WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 1, 0),
paulo@0 326 WK( 0, 0),WK( 0, 0),WK( 0, 0)
paulo@0 327 },
paulo@0 328 .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 },
paulo@0 329 .kicksL = {0, -1, -1, -1, 0, -1, 0, 0, -1, -1},
paulo@0 330 .kicksR = {1, -1, -1, -1, 1, -1, 1, 1, -1, -1},
paulo@0 331 .kickTables = {
paulo@0 332
paulo@0 333 // 0: counterclockwise (round right)
paulo@0 334 {
paulo@0 335 { WK( 0,-1),WK_END }, // R->U
paulo@0 336 { WK( 0, 0),WK_END }, // D->R
paulo@0 337 { WK(-1, 0),WK_END }, // L->D
paulo@0 338 { WK( 1, 1),WK_END } // U->L
paulo@0 339 },
paulo@0 340 // 1: clockwise (round right)
paulo@0 341 {
paulo@0 342 { WK(-1,-1),WK_END }, // L->U
paulo@0 343 { WK( 0, 1),WK_END }, // U->R
paulo@0 344 { WK( 0, 0),WK_END }, // R->D
paulo@0 345 { WK( 1, 0),WK_END } // D->L
paulo@0 346 }
paulo@0 347 }
paulo@0 348 };
paulo@0 349
paulo@0 350 // GB: No wall kick
paulo@0 351 // I, S and Z round to the left and use effective positions L and D
paulo@0 352 static const LJRotSystem rotGB = {
paulo@0 353 .colorScheme = 1,
paulo@0 354 .entryOffset = {
paulo@0 355 WK( 0, 0),WK( 0, 1),WK( 0, 1),WK( 0, 0),WK( 0, 0),WK( 0, 1),WK( 0, 0),
paulo@0 356 WK( 0, 0),WK( 0, 0),WK( 0, 0)
paulo@0 357 },
paulo@0 358 .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 },
paulo@0 359 .kicksL = {0, -1, -1, -1, 0, -1, 0, 0, -1, -1},
paulo@0 360 .kicksR = {1, -1, -1, -1, 1, -1, 1, 1, -1, -1},
paulo@0 361 .kickTables = {
paulo@0 362
paulo@0 363 // 0: counterclockwise (round left)
paulo@0 364 {
paulo@0 365 { WK( 1,-1),WK_END }, // R->U
paulo@0 366 { WK(-1, 0),WK_END }, // D->R
paulo@0 367 { WK( 0, 0),WK_END }, // L->D
paulo@0 368 { WK( 0, 1),WK_END } // U->L
paulo@0 369 },
paulo@0 370 // 1: clockwise (round left)
paulo@0 371 {
paulo@0 372 { WK( 0,-1),WK_END }, // L->U
paulo@0 373 { WK(-1, 1),WK_END }, // U->R
paulo@0 374 { WK( 1, 0),WK_END }, // R->D
paulo@0 375 { WK( 0, 0),WK_END } // D->L
paulo@0 376 },
paulo@0 377 }
paulo@0 378 };
paulo@0 379
paulo@0 380
paulo@0 381 // The rotation system of LOCKJAW: The Overdose (GBA) and
paulo@0 382 // Tetramino (NES) TOD is simple. In free space it behaves like SRS.
paulo@0 383 // If that's blocked, kick right, kick left, kick up.
paulo@0 384 static const LJRotSystem rotTOD = {
paulo@0 385 .kicksL = {0, 0, 0, -1, 0, 0, 0, 0, 0, 0},
paulo@0 386 .kicksR = {0, 0, 0, -1, 0, 0, 0, 0, 0, 0},
paulo@0 387 .kickTables = {
paulo@0 388
paulo@0 389 // 0: JLSTZ counterclockwise
paulo@0 390 {
paulo@0 391 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK( 0, 1),WK_END }, // ->U
paulo@0 392 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK( 0, 1),WK_END }, // ->R
paulo@0 393 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK( 0, 1),WK_END }, // ->D
paulo@0 394 { WK( 0, 0),WK( 1, 0),WK(-1, 0),WK( 0, 1),WK_END } // ->L
paulo@0 395 },
paulo@0 396
paulo@0 397 // 1: I counterclockwise
paulo@0 398 {
paulo@0 399 { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK(-1,-2),WK( 2, 1) }, // R->U
paulo@0 400 { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK( 1,-1),WK(-2, 1) }, // D->R
paulo@0 401 { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK(-2,-1),WK( 1, 2) }, // L->D
paulo@0 402 { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK( 2,-1),WK(-1, 2) } // U->L
paulo@0 403 },
paulo@0 404
paulo@0 405 // 2: JLSTZ clockwise
paulo@0 406 {
paulo@0 407 { WK( 0, 0),WK(-1, 0),WK(-1,-1),WK( 0, 2),WK(-1, 2) }, // L->U
paulo@0 408 { WK( 0, 0),WK(-1, 0),WK(-1, 1),WK( 0,-2),WK(-1,-2) }, // U->R
paulo@0 409 { WK( 0, 0),WK( 1, 0),WK( 1,-1),WK( 0, 2),WK( 1, 2) }, // R->D
paulo@0 410 { WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 0,-2),WK( 1,-2) }, // D->L
paulo@0 411 },
paulo@0 412
paulo@0 413 // 3: I clockwise
paulo@0 414 {
paulo@0 415 { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK( 1,-2),WK(-2, 1) }, // L->U
paulo@0 416 { WK( 0, 0),WK( 1, 0),WK(-2, 0),WK(-2,-1),WK( 1, 2) }, // U->R
paulo@0 417 { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK( 2,-1),WK(-1, 2) }, // R->D
paulo@0 418 { WK( 0, 0),WK(-1, 0),WK( 2, 0),WK(-1,-1),WK( 2, 1) } // D->L
paulo@0 419 }
paulo@0 420 }
paulo@0 421 };
paulo@0 422
paulo@0 423 static const LJRotSystem rotTDX = {
paulo@0 424 .entryOffset = {
paulo@0 425 WK( 0, 0),WK( 1, 1),WK( 1, 1),WK( 0, 0),WK( 1, 0),WK( 1, 1),WK( 1, 0),
paulo@0 426 WK( 0, 0),WK( 0, 0),WK( 0, 0)
paulo@0 427 },
paulo@0 428 .entryTheta = { 0, 2, 2, 0, 0, 2, 0, 0, 0, 2 },
paulo@0 429 .kicksL = {0, 0, 0, -1, 0, 0, 0, 0, 0, 0},
paulo@0 430 .kicksR = {1, 1, 1, -1, 1, 1, 1, 1, 1, 1},
paulo@0 431 .kickTables = {
paulo@0 432
paulo@0 433 // 0: counterclockwise
paulo@0 434 {
paulo@0 435 { WK( 0, 0),WK( 1,-1),WK_END }, // R->U
paulo@0 436 { WK( 0, 0),WK(-1,-1),WK_END }, // D->R
paulo@0 437 { WK( 0, 0),WK(-1, 1),WK_END }, // L->D
paulo@0 438 { WK( 0, 0),WK( 1, 1),WK_END } // U->L
paulo@0 439 },
paulo@0 440
paulo@0 441 // 1: clockwise
paulo@0 442 {
paulo@0 443 { WK( 0, 0),WK(-1,-1),WK_END }, // L->U
paulo@0 444 { WK( 0, 0),WK(-1, 1),WK_END }, // U->R
paulo@0 445 { WK( 0, 0),WK( 1, 1),WK_END }, // R->D
paulo@0 446 { WK( 0, 0),WK( 1,-1),WK_END } // D->L
paulo@0 447 }
paulo@0 448 }
paulo@0 449 };
paulo@0 450
paulo@0 451 const LJRotSystem *const rotSystems[N_ROTATION_SYSTEMS] = {
paulo@0 452 &rotSRS, &rotSega, &rotArika, &rotTengen,
paulo@0 453 &rotNES, &rotGB, &rotTOD, &rotTDX
paulo@0 454 };