The Flags values used are in Hexadecimal, but first I will have to
discuss the binary form. I will kept the number of bits down to
8 bits, cause that is all we will need to work with for the Flags
(for the most part anyway).

We have all heard at one time or another that the most basic form
of computer language is made up of ones and zeros. Well, this is
known as the binary digits or bits. The logical values of these
binary digits are denoted by 0 and 1. If a bit is 0 (empty) then
that bit value will be 0. However, if a bit is 1 (full) then
the value would be 2^n. Where the "^" is to the power and "n" is
the bit position. For example, 2^2 is two squared which is the
same as 2 * 2 = 4. (Note: the "*" means times). Another example,
2^3 is the same as 2 * 2 * 2 = 8. One final one that you need to
know is 2^0 = 1.

Ok, let's look at bit position with just four bits.

          bit 3   bit 2   bit 1   bit 0   decimal   hexadecimal

row 1       0       0       0       0        0           0

row 2       0       0       0       1        1           1

row 3       0       0       1       0        2           2

row 4       0       0       1       1        3           3

row 5       0       1       0       0        4           4

row 6       0       1       0       1        5           5

row 7       0       1       1       0        6           6

row 8       0       1       1       1        7           7

row 9       1       0       0       0        8           8

row 10      1       0       0       1        9           9

row 11      1       0       1       0       10           A

row 12      1       0       1       1       11           B

row 13      1       1       0       0       12           C

row 14      1       1       0       1       13           D

row 15      1       1       1       0       14           E

row 16      1       1       1       1       15           F


You will notice that for 4 bits their positions are 0-3. With the
least significant bit on the right and the most significant bit on
the left. Let's add up row 6. We have 0 + 2^2 + 0 + 2^0 and this
is the same as 0 + 4 + 0 + 1 = 5. With row 16 we get 2^3 + 2^2 +
2^1 + 2^0 = 8 + 4 + 2 + 1 = 15. I just wanted to show you how the
decimal values are totaled.

You can also think of a bit that is 0 (empty) as off or false, and
a bit that is 1 (full) as on or true.

So, if a flag value for a SECTOR is 5c then the binary form is:

 0 1 0 1  1 1 0 0
 \     /  \     /
    5        c

Reading from right to left (bit 0 to bit 7) and comparing it with
Section 11. BUILD MAP FORMAT in the BUILDHLP.EXE file which follows:

SECTORS
bit 0: 1 = parallaxing, 0 = not                   "P"
bit 1: 1 = sloped, 0 = not
bit 2: 1 = swap x&y, 0 = not                      "F"
bit 3: 1 = double smooshiness                     "E"
bit 4: 1 = x-flip                                 "F"
bit 5: 1 = y-flip                                 "F"
bit 6: 1 = Align texture to first wall of sector  "R"
bits 7-15: reserved

So, the Flag 5c uses bits 2, 3, 4, and 6 which tells us that when
the sector was made the following keys were pressed F, E, F, and R.

WALLS
bit 0: 1 = Blocking wall (use with clipmove, getzrange) "B"
bit 1: 1 = bottoms of invisible walls swapped, 0 = not  "2"
bit 2: 1 = align picture on bottom (for doors), 0 = top "O"
bit 3: 1 = x-fliped, 0 = normal                         "F"
bit 4: 1 = masking wall, 0 = not                        "M"
bit 5: 1 = 1-way wall, 0 = not                          "1"
bit 6: 1 = Blocking wall (use with hitscan/cliptype 1)  "H"
bit 7: 1 = Transluscence, 0 = not                       "T"
bit 8: 1 = y-flipped, 0 = normal                        "F"
bit 9: 1 = Transluscence reversing, 0 = normal          "T"
bits 10-15: reserved

SPRITES
bit 0: 1 = Blocking sprite (use with clipmove, getzrange) "B"
bit 1: 1 = transluscence, 0 = normal                      "T"
bit 2: 1 = x-flipped, 0 = normal                          "F"
bit 3: 1 = y-flipped, 0 = normal                          "F"
bits 5-4: 00 = FACE sprite (default)
          01 = WALL sprite (like masked walls)            "R"
          10 = FLOOR sprite (parallel to ceilings&floors  "R"
bit 6: 1 = 1-sided sprite, 0 = normal                     "1"
bit 7: 1 = Real centered centering, 0 = foot center       "C"
bit 8: 1 = Blocking sprite (use with hitscan/cliptype 1)  "H"
bit 9: 1 = Transluscence reversing, 0 = normal            "T"
bits 10-14: reserved
bit 15: 1 = Invisible sprite, 0 = not            no key given


Well, I hope that this helps you out in understanding how a map
(level) was made. Let me know...good or bad.

Created by Bruce A. Benko at webmaster@babtech.com
Copyright (C) 1997-98 by Bruce A. Benko
