Actions
Feature #65
openLua: bit operations
Start date:
2022-11-27
Due date:
% Done:
70%
Estimated time:
Description
Lua 5.1 doesn't provide bitwise operations.
Implements some basic ones manually: and, or, xor and left and right bit shift.
Updated by I. Valentin about 3 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 70
As of 026c976, the following functions have been implemented in Lua scripts:
- bit_or(a, b)
- bit_xor(a, b)
- bit_and(a, b)
- get_byte_nth_bit(value, n)
- set_byte_nth_bit(value, n, bit)
Also, the following ones to directly read and write from and to data banks:
- get_bank_bit(bank, address, bit)
- set_bank_bit(bank, address, bit)
The installer stills generates some operations with the invalid operators "&", "^" and "|", so some field map scripts aren't loadable because of the invalid syntax.
Actions