Tetris Elements INI hacking

From TetrisWiki
Revision as of 08:49, 4 January 2008 by *>Mmm10000
Jump to navigation Jump to search

Tetris Elements stores much of the game rules, including shapes of seven tetrominoes and five unused pieces and part of the wall kick tables, in an INI file for each gimmick. 工控机 茅台酒 二锅头 防伪标签 热转印机 水晶像 奖杯 干洗 数码快印 硒鼓加粉 塑料颗粒机 防伪 防伪技术 高新技术企业认定 北京洗衣公司 服务器机柜 空气净化工程 国际速递 国际快递公司 国际快递 梯具 节能节电 冬令营 石材翻新 电器维修 北京公司注册 制冰机 电脑回收 代开发票 不干胶 机打发票 电缆桥架 电缆桥架 北京货架 航空货运 会议服务 小升初 梅兰日兰UPS 口语 Dell服务器 再生塑料颗粒机 灯光音响 二手电脑回收 热水器维修 环氧地坪 IBM服务器 工商注册 IBM服务器 北京航空货运 北京写字楼 动画制作

Like games that implement SRS correctly, TE uses bounding-square rotation, but the bounding boxes normally of size 2 and 3 are extended to 4 and 5.

Tetris_Classic_SINGLE.ini has 12 piece records numbered Piece00 to Piece11. Piece00 through Piece06 represent TIJOLSZ; Piece07 through Piece11 seem unused. Each piece record consists of the integer size of the extended bounding box followed by a 5x5 array describing the shape of the piece; each nonzero makes a block in that space.

This is one of two common methods used in Soviet Mind Game implementations to represent tetrominoes. The other method is to store a list of (x, y) positions of each block in the shape.

Piece00 (T) is expressed in the file as


This might be easier to see as


which is

  • Piece00: T rotated 180, color 5, bounding box size 5


  • Piece01: I rotated left, color 1, bounding box size 4
  • Piece02: J rotated left, color 2, bounding box size 5
  • Piece03: O, color 7, bounding box size 4
  • Piece04: L rotated right, color 4, bounding box size 5
  • Piece05: S, color 3, bounding box size 5
  • Piece06: Z, color 6, bounding box size 5
  • Piece07: L trimino, color 6, bounding box size 5
  • Piece08: Solid 3x3 block, color 1, bounding box size 5
  • Piece09: Solid 4x4 block, color 2, bounding box size 4
  • Piece10: P pentomino, color 3, bounding box size 5
  • Piece11: I pentomino, color 4, bounding box size 5

PieceEntry0 through PieceEntry6 describe the spawn positions of each piece. They are interpreted as the (x, y) of top left corner of piece's extended bounding box, where the top left corner of the playfield is (0, 0). All diameter-5 pieces' entry positions are set to (2, -2); diameter-4 pieces are set to (3, -2). This is consistent with SRS spawn positions (centered, rounding to the left).

PieceRot00 through PieceRot04 seem to describe the wallkick entries of SRS (or a defective version thereof).


This corresponds to a wall kick list of (0, 0), (-1, 0), (-1, 1), (99, 99), (-1, 2). These resemble the wall kicks for T-up to T-right from the diagram of the T tetromino in the Heboris Unofficial Expansion manual.