Allow floats to be constants

This commit is contained in:
Agent X 2023-12-14 15:27:01 -05:00
parent 026c2fe550
commit db2d2a20fa
4 changed files with 11 additions and 0 deletions

View File

@ -163,6 +163,7 @@ def process_define(filename, line):
val = val.replace('(u8)', '')
val = val.replace('(u64)', '')
val = re.sub(r'\.\d+f', '', val)
for p in val.split(' '):
if p.startswith('0x'):

View File

@ -5677,6 +5677,12 @@ PACKET_LENGTH = 3000
--- @type integer
SYNC_DISTANCE_INFINITE = 0
--- @type integer
SYNC_DISTANCE_ONLY_DEATH = -1
--- @type integer
SYNC_DISTANCE_ONLY_EVENTS = -2
--- @class BouncyLevelBounds
--- @type BouncyLevelBounds

View File

@ -2035,6 +2035,8 @@
## [network.h](#network.h)
- PACKET_LENGTH
- SYNC_DISTANCE_INFINITE
- SYNC_DISTANCE_ONLY_DEATH
- SYNC_DISTANCE_ONLY_EVENTS
### [enum BouncyLevelBounds](#BouncyLevelBounds)
| Identifier | Value |

View File

@ -2093,6 +2093,8 @@ char gSmluaConstants[] = ""
"GRAB_POS_BOWSER = 3\n"
"MAX_KEYS = 512\n"
"MAX_KEY_VALUE_LENGTH = 64\n"
"SYNC_DISTANCE_ONLY_DEATH = -1\n"
"SYNC_DISTANCE_ONLY_EVENTS = -2\n"
"SYNC_DISTANCE_INFINITE = 0\n"
"PACKET_LENGTH = 3000\n"
"NS_SOCKET = 0\n"