Bytes and Flags and Bits (part 42) - KVonGit/zil-stuff GitHub Wiki


I'm thinking dfrotz ignores the ones it can't do anything with, except I wonder why it cares about bit 1.

Windows Frotz seems to ignore bit 7 because it's just going to play sounds regardless, if called.

And I guess Gargoyle knows it can't handle menus.

;"FLAGS 2"
<ROUTINE BIT-SLAP ()
  <TELL "|BIT-SLAP!" CR>
  <COND
    (<BTST <LOWCORE FLAGS> 1>;"ZIP+"
      <TELL "Bit 0: Set when transcripting is on" CR>
    )
  >
  <COND
    (<BTST <LOWCORE FLAGS> 2>;"ZIP+"
      <TELL "Bit 1: Game sets to force printing in fixed-pitch font" CR>
    )
  >
  <COND
    (<BTST <LOWCORE FLAGS> 4>;"YZIP"
      <TELL "Bit 2: Int sets to request screen redraw: game clears when it complies with this." CR>
    )
  >
  <COND
    (<BTST <LOWCORE FLAGS> 8>;"XZIP+"
      <TELL "Bit 3: If set, game wants to use pictures" CR>
    )
  >
  <COND
    (<BTST <LOWCORE FLAGS> 16>;"XZIP+"
      <TELL "Bit 4: If set, game wants to use the UNDO opcodes" CR>
    )
  >
  <COND
    (<BTST <LOWCORE FLAGS> 32>;"XZIP+"
      <TELL "Bit 5: If set, game wants to use a mouse" CR>
    )
  >
  <COND
    (<BTST <LOWCORE FLAGS> 64>;"XZIP+"
      <TELL "Bit 6: If set, game wants to use colours" CR>
    )
  >
  <COND
    (<BTST <LOWCORE FLAGS> 128>;"XZIP+"
      <TELL "Bit 7: If set, game wants to use sound effects" CR>
    )
  >
  <COND
    (<BTST <LOWCORE FLAGS> 256>;"YZIP"
      <TELL "Bit 8: If set, game wants to use menus" CR>
    )
  >
>