Original Supertris

Saturday, February 23, 2013

Starting to Parse

I have developed the Lightspeed Pascal binary source code parser to the point where it can parse the source file with the constants, types, and global variables in it. Basically it turns this:

00000000  c6 07 00 00 00 12 07 47  6c 6f 62 61 6c 73 98 01  |.......Globals..|
00000010  94 01 c8 03 00 00 00 00  94 01 9e 01 7e 04 05 53  |............~..S|
00000020  6f 75 6e 64 7c 01 7e 04  05 4e 6f 69 73 65 98 01  |ound|.~..Noise..|
00000030  94 01 a2 01 94 01 92 16  00 01 26 7b 20 6e 75 6d  |..........&{ num|
00000040  62 65 72 73 20 6f 66 20  73 6f 75 6e 64 73 20 6d  |bers of sounds m|
00000050  69 6e 75 73 20 31 2c 20  67 6f 74 20 69 74 3f 20  |inus 1, got it? |
00000060  7d 08 cc 07 0a 47 6f 6f  64 53 6f 75 6e 64 73 08  |}....GoodSounds.|
00000070  7a 03 03 00 00 0c 98 01  cc 06 09 42 61 64 53 6f  |z..........BadSo|
00000080  75 6e 64 73 7a 03 03 00  00 0f 98 01 cc 07 0b 43  |undsz..........C|
00000090  6c 65 61 72 53 6f 75 6e  64 73 7a 03 03 00 00 07  |learSoundsz.....|
000000a0  98 01 cc 07 0b 4c 65 76  65 6c 53 6f 75 6e 64 73  |.....LevelSounds|
000000b0  7a 03 03 00 00 05 98 01  94 01 92 08 00 01 0b 7b  |z..............{|
000000c0  20 6d 65 6e 75 20 49 44  73 7d cc 05 07 41 70 70  | menu IDs}...App|
000000d0  6c 65 49 44 7a 03 03 00  00 01 98 01 cc 06 09 41  |leIDz..........A|
000000e0  62 6f 75 74 49 74 65 6d  7a 03 03 00 00 01 98 01  |boutItemz.......|
000000f0  94 01 cc 05 06 46 69 6c  65 49 44 08 7a 03 03 00  |.....FileID.z...|
00000100  00 02 98 01 cc 06 08 51  75 69 74 49 74 65 6d 08  |.......QuitItem.|
00000110  7a 03 03 00 00 01 98 01  94 01 cc 05 06 45 64 69  |z............Edi|
00000120  74 49 44 08 7a 03 03 00  00 03 98 01 cc 06 08 55  |tID.z..........U|
00000130  6e 64 6f 49 74 65 6d 08  7a 03 03 00 00 01 98 01  |ndoItem.z.......|
00000140  cc 05 07 43 75 74 49 74  65 6d 7a 03 03 00 00 03  |...CutItemz.....|

into this:

unit Globals;

interface

uses Sound, Noise;

const

{ numbers of sounds minus 1, got it? }
GoodSounds = 12;
BadSounds = 15;
ClearSounds = 7;
LevelSounds = 5;

{ menu IDs}

AppleID = 1;
AboutItem = 1;

FileID = 2;

QuitItem = 1;

EditID = 3;

UndoItem = 1;
CutItem = 3;

So far this is just declarations and comments. Real code will follow.

2 Comments:

  • 2/25/14
    Many thanks for your update. I am looking forward to playing my favorite game! "Nice move!" Tom Podnar--

    By Blogger Tom, at 1:14 AM  

  • Hey dude. Is it okay for me to port the gameplay of supertris into nullpomino Right down to the personality?

    By Blogger James Lee McKigney, at 7:54 AM  

Post a Comment

<< Home