ac-stef bfb8158069 add cubescript commands for binary arithmetic
The commands &b, |b, ^b and !b perform the operations and, or, xor and not
using binary arithmetic on integer values.

Please keep in mind, that integer values are 32-bit signed values, so
"echo (!b 1)" returns "-2", of course.

The new command "h0 precision value" is modeled after the existing "l0"
command and returns the given value as string of hexadecimal digits,
padded with leading zeros to a given minimum length ("precision").

Examples:

  echo (h0 2 1024)       ->  "400"
  echo (h0 4 1024)       ->  "0400"
  echo (h0 6 1024)       ->  "000400"
  echo (h0 0 (&b 0xe 0x3))  ->  "2"
  echo (h0 0 (|b 0xe 0x3))  ->  "f"
  echo (h0 0 (^b 0xe 0x3))  ->  "d"
  echo (h0 0 (!b 0xe))   ->  "fffffff1"
  echo (h0 0 (* -1 0xe))  ->  "fffffff2"  (for comparison)

Also, the commands for addition and multiplication of integer and float
values have been modified to accept more than two arguments.

Examples:

  echo (* 3 5)   -> "15"
  echo (* 3 5 2)   -> "30"
  echo (* 3 5 2 -1)   -> "-30"
  echo (* 3)   -> "0"  (for compatibility reasons)
  echo (+ 3 5)   -> "8"
  echo (+ 3 5 2)   -> "10"
  echo (+ 3 5 2 -1)   -> "9"
  echo (+f 3.0 5 1.9 -1)   -> "-28.5"
  echo (*f 3.0 5 1.9 -1)   -> "8.9"

DOCREF + * +f *f &b |b ^b !b h0
2016-09-01 15:47:09 +02:00
2015-07-15 21:57:05 +02:00
2015-10-13 20:24:23 +02:00
2015-06-21 10:34:07 +02:00
2016-08-31 17:20:28 +02:00
2015-07-15 21:57:05 +02:00
2015-10-13 20:24:23 +02:00
…
2016-08-31 23:08:49 +02:00
2015-07-15 21:57:05 +02:00
2016-05-28 21:46:31 +02:00
2016-08-26 14:28:54 +02:00
2015-09-07 14:53:56 +02:00
2014-01-30 21:51:37 -08:00
2015-09-07 14:53:56 +02:00

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta http-equiv="refresh" content="0; url=docs/index.html">
    <meta name="description" content="Documentation index of the game AssaultCube @ http://assault.cubers.net/">
    <meta name="author" content="Rabid Viper Productions">
    <meta name="copyright" content="You may be able to redistribute this content under specific conditions.
    Please read the licensing information, available @ http://assault.cubers.net/docs/license.html for the
    conditions that would apply to what you may be redistributing.">
    <title>AssaultCube Documentation</title>
    <style type="text/css">
      body
        {
          background-color: #222222;
        }
    </style>
  </head>
  <body>
    <div>
      &nbsp;
    </div>
  </body>
</html>
S
Description
assaultcube but better (trust)
Readme
490 MiB
Languages
C 57.9%
C++ 27.6%
Shell 11.1%
Python 1.2%
Makefile 1%
Other 1.1%