Files
assaultcube-/source
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-10-13 20:24:23 +02:00
…

License
=======

The AssaultCube source code is mainly based on the cube game/engine and uses the 
same license (z-lib like). See README_CUBEENGINE.txt
In addition AssaultCube contains code from pCube (Cube pro mod) and Sauerbraten (Cube successor)
and other sources.


AssaultCube Authors
==================

Adrian 'driAn' Henke			drian at sprintf.org
Andrew 'Arghvark' Davis			arghvark at gmail.com
Lee 'Eihrul' Salzman			
stef


Cube Engine Authors
===================

Wouter 'Aardappel' van Oortmerssen, Lee 'Eihrul' Salzman and others.
See README_CUBEENGINE.txt and
http://www.cubeengine.com


pCube Authors
=============

Adrian 'driAn' Henke and others.
http://p.cubers.net


Sauerbraten Authors
===================

Wouter 'Aardappel' van Oortmerssen, Lee 'Eihrul' Salzman, Mike 'Gilt' Dysart and others.
http://www.sauerbraten.org


Cheat Protection
================

The cheat protection described in README_CUBEENGINE.txt is not used in AssaultCube. Binaries 
compiled from source are compatible with the official binaries. This means, the client can 
easily be hacked, on the other hand, you can compile AssaultCube for different platforms and 
fix bugs yourself.
You MUST NOT connect to servers that are not yours with a modified client that contains changes 
that were not made for platform-compatibility or to fix bugs. This would be cheating. Thank you 
for supporting fair play gaming.