Bitwise.lua

Download Latest Version

DEPRECATED IN LUNALUA V0.7!!! Use luajit bit API instead!!! (Note:This API Current still required for Encrypt.dll)

Bitwise is a library that provides access to bitwise operators.

Installation
Place the file bitwise.lua into the LuaScriptsLib folder.

How to use
To enable the Bitwise library for a specific level, add this line to lunadll.lua: This will load the Bitwise API.

Structures
BitTable

BitTables aren't really their own structure, just specific formatting of tables. Formats other than this may cause errors or crashes in the code, and are not useful.

BitTables are tables of tables, which act to define the conditions under which variables should be true, or false.

Unary BitTable This is a BitTable for use with a unary operator, such as "not". This should be formatted like so:

This will define the null BitTable, which returns 1 when the bit is 1, and 0 when the bit is 0.

Binary BitTable This is a BitTable for use with a binary operator, such as "and". These are arguably more useful than unary operators, and act on two bits at once. This should be formatted like so:

This will define one null BitTable, which returns 1 when the bit from the first value is 1, and 0 when the bit from the first value is 0.

BitTables are much like mathematical tables, and act as truth tables for the bitwise operators.

External Use Functions
These are functions you will need to use the library