git » fp-git.git » commit 4b84626

added signed short

author ecalot
2007-03-25 01:34:39 UTC
committer ecalot
2007-03-25 01:34:39 UTC
parent 8931ed6acb7960f78c8ae23231b85dc4d6f5bd79

added signed short

FP/doc/FormatSpecifications +20 -12
FP/doc/FormatSpecifications.tex +20 -12

diff --git a/FP/doc/FormatSpecifications b/FP/doc/FormatSpecifications
index 3cbd185..046e272 100644
--- a/FP/doc/FormatSpecifications
+++ b/FP/doc/FormatSpecifications
@@ -131,12 +131,31 @@ Table of Contents
  The first 6 bytes are reserved to locate the index and know the file size.
 
  Let's define the numbers as:
+  SC - Signed char: 8 bits, the first bit is for the sign and the 7 last
+       for the number. If the first bit is a 0, then the number is
+       positive, if not the number is negative, in that case invert all
+       bits and add 1 to get the positive number.
+       i.e. -1 is FF (1111 1111), 1 is 01 (0000 0001)
+       Range: -128 to 127
+       1 byte
+  UC - Unsigned char: 8 bits that represent the number.
+       i.e. 32 is 20 (0010 0000)
+       Range: 0 to 255
+       1 byte
   US - Unsigned Short: Little endian, 16 bits, storing two groups of 8 bits
        ordered from the less representative to the most representative
        without sign.
        i.e. 65534 is FFFE in hex and is stored FE FF (1111 1110  1111 1111)
        Range: 0 to 65535
        2 bytes
+  SS - Signed Short: Little endian, 16 bits, storing two groups of 8 bits
+       ordered from the less representative to the most representative
+       with sign. If the first byte is 0 then the number is positive, if not
+       the number is negative, in that case invert all bits and add 1 to get
+       the positive number.
+       i.e. -2 is FFFE in hex and is stored FE FF (1111 1110  1111 1111)
+       Range: -32768 to 32767
+       2 bytes
   UL - Unsigned long: Little endian, 32 bits, storing four groups of 8 bits
        each ordered from the less representative to the most representative
        without sign.
@@ -144,17 +163,6 @@ Table of Contents
        (0000 0010  0000 0000  0000 0001  0000 0000)
        Range: 0 to 2^32-1
        4 bytes
-  SC - Signed char: 8 bits, the first bit is for the sign and the 7 last
-       for the number. If the first bit is a 0, then the number is
-       positive, if not the number is negative, in that case invert all
-       bits and add 1 to get the positive number.
-       i.e. -1 is FF (1111 1111), 1 is 01 (0000 0001)
-       Range: -128 to 127
-       1 byte
-  UC - Unsigned char: 8 bits that represent the number.
-       i.e. 32 is 20 (0010 0000)
-       Range: 0 to 255
-       1 byte
 
  Note: Sizes are always in bytes unless another unit is specified.
 
@@ -938,7 +946,7 @@ Table of Contents
  Background masks are stored consecutively each after another until the
  960 tiles are specified.
  
- The first byte is an unsigned char association to one of the 256 door
+ The first byte is an unsigned char (UC) association to one of the 256 door
  event registers (see section 5.2.2) if the tile is an activator.
  In any other case this byte is an extra attribute information byte.
  For example in wall (0x14) having this byte in 0x04 means the wall is
diff --git a/FP/doc/FormatSpecifications.tex b/FP/doc/FormatSpecifications.tex
index 3cbd185..046e272 100644
--- a/FP/doc/FormatSpecifications.tex
+++ b/FP/doc/FormatSpecifications.tex
@@ -131,12 +131,31 @@ Table of Contents
  The first 6 bytes are reserved to locate the index and know the file size.
 
  Let's define the numbers as:
+  SC - Signed char: 8 bits, the first bit is for the sign and the 7 last
+       for the number. If the first bit is a 0, then the number is
+       positive, if not the number is negative, in that case invert all
+       bits and add 1 to get the positive number.
+       i.e. -1 is FF (1111 1111), 1 is 01 (0000 0001)
+       Range: -128 to 127
+       1 byte
+  UC - Unsigned char: 8 bits that represent the number.
+       i.e. 32 is 20 (0010 0000)
+       Range: 0 to 255
+       1 byte
   US - Unsigned Short: Little endian, 16 bits, storing two groups of 8 bits
        ordered from the less representative to the most representative
        without sign.
        i.e. 65534 is FFFE in hex and is stored FE FF (1111 1110  1111 1111)
        Range: 0 to 65535
        2 bytes
+  SS - Signed Short: Little endian, 16 bits, storing two groups of 8 bits
+       ordered from the less representative to the most representative
+       with sign. If the first byte is 0 then the number is positive, if not
+       the number is negative, in that case invert all bits and add 1 to get
+       the positive number.
+       i.e. -2 is FFFE in hex and is stored FE FF (1111 1110  1111 1111)
+       Range: -32768 to 32767
+       2 bytes
   UL - Unsigned long: Little endian, 32 bits, storing four groups of 8 bits
        each ordered from the less representative to the most representative
        without sign.
@@ -144,17 +163,6 @@ Table of Contents
        (0000 0010  0000 0000  0000 0001  0000 0000)
        Range: 0 to 2^32-1
        4 bytes
-  SC - Signed char: 8 bits, the first bit is for the sign and the 7 last
-       for the number. If the first bit is a 0, then the number is
-       positive, if not the number is negative, in that case invert all
-       bits and add 1 to get the positive number.
-       i.e. -1 is FF (1111 1111), 1 is 01 (0000 0001)
-       Range: -128 to 127
-       1 byte
-  UC - Unsigned char: 8 bits that represent the number.
-       i.e. 32 is 20 (0010 0000)
-       Range: 0 to 255
-       1 byte
 
  Note: Sizes are always in bytes unless another unit is specified.
 
@@ -938,7 +946,7 @@ Table of Contents
  Background masks are stored consecutively each after another until the
  960 tiles are specified.
  
- The first byte is an unsigned char association to one of the 256 door
+ The first byte is an unsigned char (UC) association to one of the 256 door
  event registers (see section 5.2.2) if the tile is an activator.
  In any other case this byte is an extra attribute information byte.
  For example in wall (0x14) having this byte in 0x04 means the wall is