Commit Graph
25 Commits
Author SHA1 Message Date
smallmodel 1e29fd7d2b Refactor SetScript/SetThread 2024-11-05 19:52:13 +01:00
smallmodel 67f822d492 Process label of type 'none'
A none variable should be considered valid, it will just clear the label
2024-11-05 18:43:28 +01:00
smallmodel 32c3964474 Fix the source line having the entire file 2024-11-01 00:11:09 +01:00
smallmodel 0d01ea939d Fix whole script file being printed sometimes on error 2024-10-30 21:25:15 +01:00
smallmodel becf9f5d8c Cache the source position to improve the source search time
This greatly reduces the time to compile big scripts
2024-10-29 20:26:51 +01:00
smallmodel f9d264058b Use safe version of sprintf and strcpy 2024-09-20 23:08:53 +02:00
smallmodel e3beec985e When parsing and compiling a script, return the length in an output parameter instead so the method can return a boolean to indicate success.
This fixes #221 where a script with no code would fail.
2024-04-08 21:04:26 +02:00
smallmodel 66c4499b2e Fixed ScriptThreadLabel::Execute with other/owner param 2023-12-28 18:30:15 +01:00
smallmodel d7350d8629 Added Clear() method in ScriptThreadLabel 2023-11-27 20:05:21 +01:00
smallmodel f9487b0ba3 Ignore CR in source line 2023-11-01 16:53:09 +01:00
smallmodel bb97ec8933 Added GetSourceAt() with code pos 2023-10-27 19:59:15 +02:00
smallmodel 98816156d7 Delete created scriptclass / thread when there is an exception, in ScriptThreadLabel::Create() 2023-10-26 19:58:26 +02:00
smallmodel b59bd449d4 Removed useless Clear() in GetScriptValue() 2023-10-15 19:52:02 +02:00
smallmodel 33e9c5b1ea Formatted source files 2023-09-09 16:46:42 +02:00
smallmodel 078c90bbc9 Create a ScriptThread directly rather than calling Director.CreateScriptThread
This avoids exception when called by ScriptThreadLabel::Execute(). Because Execute() doesn't have try/catch, the program would crash.
2023-09-09 16:42:15 +02:00
smallmodel a307450e17 Made sourceLine argument optional to avoid string allocation 2023-08-19 21:12:03 +02:00
smallmodel fe5473bc85 Added Set and SetScript with const_str
Fixed try/catch
2023-08-19 20:48:03 +02:00
smallmodel 84adaa07e0 Removed reverse_label_list (use label_list enumeration instead) 2023-08-19 15:48:29 +02:00
smallmodel b1753df1ed Reworked con_set and con_arrayset so that they have their own Entry class 2023-08-19 02:56:51 +02:00
smallmodel 467802c466 Fixed crash when loading savegame 2023-08-16 19:13:52 +02:00
smallmodel efed6d0eac Fixed script developer printf 2023-08-16 02:43:22 +02:00
smallmodel 430c7d1a57 Fixed ScriptCheck always failing regardless of the g_scriptcheck value 2023-08-13 20:19:40 +02:00
smallmodel 5e83e03e33 Major grammar/lexer/compiler fixes 2023-08-13 03:34:09 +02:00
smallmodel ca61fde54b Added ScriptThreadLabel::Execute() with safeptr listener, and optionally another listener 2023-08-02 20:59:54 +02:00
OM e4fa0fff3a Renamed **game** to **fgame** 2023-06-15 23:44:02 +02:00