Difference between revisions of "Tetris Zone"

From TetrisWiki
Jump to navigation Jump to search
(Added gameplay details, and "bpr" file hacking)
Line 5: Line 5:
 
|platform = Windows 2000/XP/Vista<br>Mac OSX 10.3 or higher
 
|platform = Windows 2000/XP/Vista<br>Mac OSX 10.3 or higher
 
|preview = 3
 
|preview = 3
|playfield = 10w x 20h visible
+
|playfield = 10w x 23h (20h visible)
 
|hold = Yes, with IHS
 
|hold = Yes, with IHS
 
|hard = Yes
 
|hard = Yes
Line 14: Line 14:
 
It was one of the first games that attempted to limit the effects of T-spins on the game, by eliminating the recognition of T-spins triples. However, singles and doubles that use the TST twist are still recognised.
 
It was one of the first games that attempted to limit the effects of T-spins on the game, by eliminating the recognition of T-spins triples. However, singles and doubles that use the TST twist are still recognised.
  
 +
== Gameplay Details ==
 +
*Playfield width: 10
 +
*Playfield height: 20 visible + 3 hidden (There may be more, but this game has no VS mode so there is no way to verify it)
 +
*[[ARE]]
 +
**Sprint: No
 +
**All other modes: Yes
 +
*Initial actions (IRS,IHS): Yes
 +
*[[T-Spin]] detection: 3-corner T (However, points for TST is same as normal triple, and it breaks back-to-back chains)
 +
*Combo bonus: Yes
 +
 +
== "bpr" File Hacking ==
 +
In PC version, inside the "rsrc/GFX" and "rsrc/TPF" directory, you'll see many "bpr" files.
 +
These files are encrypted in very simple format.
 +
The following simple C source code encrypts/decrypts these files.
 +
 +
/* A simple C source code that encrypts and decrypts bpr file */
 +
#include <stdio.h>
 +
#include <stdlib.h>
 +
#include <string.h>
 +
   
 +
/* Globals */
 +
unsigned char *fileBuf; // File buffer
 +
unsigned long fileSize; // File size
 +
   
 +
/* Prototypes */
 +
int main(int argc, char *argv[]);
 +
int loadFile(char *filename);
 +
   
 +
/* Main function */
 +
int main(int argc, char *argv[]) {
 +
    int i;
 +
    FILE *fp;
 +
   
 +
    // Show usage
 +
    if(argc < 3) {
 +
        printf("Usage: %s [In] [Out]\n", argv[0]);
 +
        return 1;
 +
    }
 +
   
 +
    // Load a file
 +
    if(!loadFile(argv[1])) {
 +
        printf("Couldn't load from %s\n", argv[1]);
 +
        return 2;
 +
    }
 +
   
 +
    // Encrypt/Decrypt
 +
    for(i = 0; i < fileSize; i++) {
 +
        fileBuf[i] = 0xFF - fileBuf[i];
 +
    }
 +
   
 +
    // Write
 +
    fp = fopen(argv[2], "wb");
 +
    if(!fp) {
 +
        printf("Couldn't write to %s\n", argv[2]);
 +
        return 3;
 +
    }
 +
    fwrite(fileBuf, fileSize, 1, fp);
 +
    fclose(fp);
 +
   
 +
    // Done
 +
    printf("Done\n");
 +
   
 +
    return 0;
 +
}
 +
   
 +
/* Load a file */
 +
int loadFile(char *filename) {
 +
    FILE *fp;
 +
   
 +
    // Open
 +
    fp = fopen(filename, "rb");
 +
    if(!fp) return 0; // Fail
 +
   
 +
    // Get size
 +
    fseek(fp, 0, SEEK_END);
 +
    fileSize = ftell(fp);
 +
    fseek(fp, 0, SEEK_SET);
 +
   
 +
    // Allocate
 +
    fileBuf = (unsigned char *)malloc(fileSize);
 +
   
 +
    // Read
 +
    fread(fileBuf, fileSize, 1, fp);
 +
   
 +
    // Close
 +
    fclose(fp);
 +
   
 +
    // Done
 +
    return 1;
 +
}
 +
 +
GFX subdirectory contains all graphics, and they are stored in BMP format.
 +
 +
TPF subdirectory contains "TPF" files for all four modes. This game uses TPF file to define some game mechanisms. TPF resembles to "TWS" ([[Tetris Worlds]] Script) file, but it comes in almost already-compiled format so only runtime-scripts are in raw text.
 +
 +
== External links ==
 
[http://zone.tetris.com/ Official Site]
 
[http://zone.tetris.com/ Official Site]
 
[[Category:Games List]]
 
[[Category:Games List]]

Revision as of 11:50, 4 July 2009

Tetris Zone
Developer(s)Blue Planet Software
Publisher(s)Blue Planet Software
Platform(s)Windows 2000/XP/Vista
Mac OSX 10.3 or higher
ReleaseThu Feb 22, 2007
Gameplay info
Next pieces3
Playfield size10w x 23h (20h visible)
Hold pieceYes, with IHS
Hard dropYes
Rotation systemSRS

Tetris Zone is an official Tetris game for the Macintosh platform and was released as an Universal Binary (for Intel- and PPC-Macs). A Windows version is also available.

It was one of the first games that attempted to limit the effects of T-spins on the game, by eliminating the recognition of T-spins triples. However, singles and doubles that use the TST twist are still recognised.

Gameplay Details

  • Playfield width: 10
  • Playfield height: 20 visible + 3 hidden (There may be more, but this game has no VS mode so there is no way to verify it)
  • ARE
    • Sprint: No
    • All other modes: Yes
  • Initial actions (IRS,IHS): Yes
  • T-Spin detection: 3-corner T (However, points for TST is same as normal triple, and it breaks back-to-back chains)
  • Combo bonus: Yes

"bpr" File Hacking

In PC version, inside the "rsrc/GFX" and "rsrc/TPF" directory, you'll see many "bpr" files. These files are encrypted in very simple format. The following simple C source code encrypts/decrypts these files.

/* A simple C source code that encrypts and decrypts bpr file */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
    
/* Globals */
unsigned char *fileBuf; // File buffer
unsigned long fileSize; // File size
    
/* Prototypes */
int main(int argc, char *argv[]);
int loadFile(char *filename);
    
/* Main function */
int main(int argc, char *argv[]) {
    int i;
    FILE *fp;
    
    // Show usage
    if(argc < 3) {
        printf("Usage: %s [In] [Out]\n", argv[0]);
        return 1;
    }
    
    // Load a file
    if(!loadFile(argv[1])) {
        printf("Couldn't load from %s\n", argv[1]);
        return 2;
    }
    
    // Encrypt/Decrypt
    for(i = 0; i < fileSize; i++) {
        fileBuf[i] = 0xFF - fileBuf[i];
    }
    
    // Write
    fp = fopen(argv[2], "wb");
    if(!fp) {
        printf("Couldn't write to %s\n", argv[2]);
        return 3;
    }
    fwrite(fileBuf, fileSize, 1, fp);
    fclose(fp);
    
    // Done
    printf("Done\n");
    
    return 0;
}
    
/* Load a file */
int loadFile(char *filename) {
    FILE *fp;
    
    // Open
    fp = fopen(filename, "rb");
    if(!fp) return 0; // Fail
    
    // Get size
    fseek(fp, 0, SEEK_END);
    fileSize = ftell(fp);
    fseek(fp, 0, SEEK_SET);
    
    // Allocate
    fileBuf = (unsigned char *)malloc(fileSize);
    
    // Read
    fread(fileBuf, fileSize, 1, fp);
    
    // Close
    fclose(fp);
    
    // Done
    return 1;
}

GFX subdirectory contains all graphics, and they are stored in BMP format.

TPF subdirectory contains "TPF" files for all four modes. This game uses TPF file to define some game mechanisms. TPF resembles to "TWS" (Tetris Worlds Script) file, but it comes in almost already-compiled format so only runtime-scripts are in raw text.

External links

Official Site