Commit graph

71 commits

Author SHA1 Message Date
AzaezelX fed381c945 more console cleanups
(cherry picked from commit a66ff6407cdcdf233996f49c74d7a42537314562)
2023-04-28 17:16:48 -05:00
AzaezelX a956264bbc misc warn fixes
parser had a few spots where it was throwing int compares to ints instead of bools for logical and/ors. not bitwise ones.
_dumpDirectories had a stray itterator dupe
2023-04-08 12:39:09 -05:00
JeffR ed13bdfdd2 Changes the -> syntax check from exclusively checking simgroups to checking simsets, allowing both to be used 2022-01-21 16:01:44 -06:00
Jeff Hutchinson 73b023a4b7 Fix console warning when calling void functions in console
Forgot to add this check when rewriting the interpreter.
2021-12-08 21:00:50 -05:00
Jeff Hutchinson 7ac62f42a3 Fixed a leak with console stack in the interpreter.
Issue was pushing a new frame in the global scope. Everytime a global scope was called, 1 ConsoleValue got allocated that was never freed. After 4096 'global scope' function calls, the engine would blow. Also cleans up an extra rogue usage of push/pop with the saver helper.
2021-11-20 19:08:02 -05:00
Jeff Hutchinson 2e03108856 Optionally allow to treat script assert as warning
This commit allows us to treat variable use before assign errors and local variables inside of the global scope as warnings instead of asserts. This will allow for easier porting of legacy scripts. It is highly recommended use this as an aid to port scripts, but can be used in production if needbe.
2021-11-17 18:01:35 -05:00
Robert MacGregor 5d26dba7da * BugFix: Clear some MSVC compiler warnings. 2021-10-07 00:27:39 -04:00
Jeff Hutchinson 2d50f52cf1 Allow local variables to be used in eval. 2021-09-20 21:00:33 -04:00
Robert MacGregor f9b78597f7 * BugFix: Correct an error that causes the engine to crash when calling non-namespaced engine functions incorrectly. 2021-09-16 21:21:04 -04:00
Jeff Hutchinson a7db690b59 Reimplement object copy failures. 2021-09-13 19:46:21 -04:00
Jeff Hutchinson 7f59bc6350 Forgot to null out the datablock after being deleted when it fails to preload. 2021-09-11 15:16:36 -04:00
Jeff Hutchinson 6d93e96dc3 NULL out an object variable if it fails to register. 2021-09-07 21:03:57 -04:00
Jeff Hutchinson 9b2f4976c9 small regression fix. 2021-09-04 22:00:32 -04:00
Jeff Hutchinson 278bef8d1a Fix if to else if regression. 2021-09-04 16:23:20 -04:00
Jeff Hutchinson 313c069ecb Fix xyz again by reverting previous commit and fixing the local variables from not resetting the object states. 2021-09-03 23:27:39 -04:00
Jeff Hutchinson 7efe72aced More fixes with xyz lookup, and some cleanup and test cases. 2021-09-02 22:21:00 -04:00
Jeff Hutchinson f04aca9def Fix string stack issue returning from a foreach statement. 2021-08-31 22:18:08 -04:00
Jeff Hutchinson 98a2fa0f33 Fix bugs with internalName accessor 2021-08-17 20:52:59 -04:00
Jeff Hutchinson 6ec40e86da Fix bugs with certain properties (and .x .y .z accessors) and add tests. 2021-08-16 22:02:24 -04:00
Jeff Hutchinson a449fadde2 hacks to make thedebugger work again. 2021-08-14 01:37:01 -04:00
Robert MacGregor 6ad2876504 * BugFix: Correct 3 missing defines in the GCC types include file.
* BugFix: Move several compiledEval declarations around to resolve ordering issues.
* BugFix: Experimentally remove the reference on an engineAPI template function to allow parameter types to match.
2021-07-09 21:05:55 -04:00
Jeff Hutchinson 8fc0db21c1 Small fixes for the script interpreter. 2021-06-18 18:52:41 -04:00
Jeff Hutchinson db047275f1 add fast int to object lookup. 2021-05-01 02:55:24 -04:00
Jeff Hutchinson ab4c0f0361 Add fast math optimization 2021-05-01 02:07:54 -04:00
Jeff Hutchinson 55b0ecb487 optimizations 2021-04-30 01:20:01 -04:00
Jeff Hutchinson dcd01e1231 move parameters instead of copying. 2021-04-30 00:24:03 -04:00
Jeff Hutchinson 964fde8f09 Goodbye String Stack! 2021-04-29 23:11:49 -04:00
Jeff Hutchinson bb12638ea5 Added error checking for using a local variable in global scope, and added optimization to method object parameter. 2021-04-17 14:31:27 -04:00
Jeff Hutchinson bfc0109485 fixes and some minor bc adjustment. 2021-04-16 23:21:39 -04:00
Jeff Hutchinson bc0f5bd3a3 combine numeric stacks into one common stack. 2021-04-16 19:20:15 -04:00
Jeff Hutchinson 960db74733 small fix. 2021-04-10 15:52:53 -04:00
Jeff Hutchinson 4e678292e1 fix foreach/foreach$ loops. 2021-04-04 00:50:37 -04:00
Jeff Hutchinson 3e04196a53 make tests pass. 2021-04-03 01:53:40 -04:00
Jeff Hutchinson f776e73b04 cleanup 2021-04-02 00:57:49 -04:00
Jeff Hutchinson 02447f0996 compile fixes. 2021-03-31 22:12:58 -04:00
Jeff Hutchinson 35500a87c6 initial port of the new interpreter 2021-03-30 19:33:19 -04:00
Glenn Smith 18dee487f9 Use a circular buffer for getReturnBuffer because StringStack's would get clobbered too quickly 2018-03-28 20:55:09 -04:00
Glenn Smith 7769da9434 Use strncat instead of strcat to prevent some buffer overflows 2018-03-06 00:48:44 -05:00
Areloch d666322a1b Merging 2017-11-05 22:33:32 -06:00
Marc Chapman 39b62b1461 copy-on-reload -- The datablock copy op, ":" is modified to copy on reload as well as on creation.
reload-reset -- adds virtual method that is called when a datablock is reloaded.
2017-07-26 21:40:27 +01:00
Marc Chapman 0b84fccdd2 substitutions -- Implementation of special substitution statements on datablock fields. 2017-07-26 20:18:27 +01:00
Thomas "elfprince13" Dickerson 45ae5e71cb fixed lots of tabs and space 2017-01-06 18:04:28 -05:00
Areloch 810ac82eae Adds a missed cleanup for currentNewObj. 2016-06-20 12:34:07 -05:00
Areloch 3cfc6f787c Adds some pointer cleanup in the event we bail out of creating a new object for whatever reason. 2016-06-11 02:06:24 -05:00
Areloch 86dd8a8cf7 Adds a onPostAdd callback to simObject so we can do handling AFTER the object and it's children have been added successfully. 2016-04-30 23:32:10 -05:00
Areloch 7a3b40a86d Initial Implementation of the Taml, Asset and Modules systems.
Only has example and shape assets currently.
2015-10-13 15:19:36 -05:00
Azaezel 3c1c88d96b TORQUE_VALIDATE_STACK define for console stack debugging 2015-07-29 04:46:36 -05:00
Azaezel 555610f69f Addresses roughly half of the C4189 errors though the following methodologies:
1) truly unused vars removed
2) vars leading to remmed out code for debugging remmed in turn.

left out:
vars in macros.
2015-07-29 03:03:27 -05:00
Daniel Buckmaster 84e8cbb4ee Revert recent style cleanup changes. 2015-03-04 11:58:36 +11:00
Daniel Buckmaster 33fcc59543 Merge remote-tracking branch 'origin/style-cleanup' into development
Conflicts:
	Engine/source/T3D/tsStatic.cpp
	Engine/source/console/compiledEval.cpp
	Engine/source/ts/tsMesh.cpp
	Engine/source/ts/tsShape.cpp
2015-03-01 22:30:22 +11:00