Commit graph

56 commits

Author SHA1 Message Date
marauder2k7 0d4c335231 test
working test without scanstring changes
2024-06-16 23:05:42 +01:00
marauder2k7 d8411b4a58 Update console.h
case insensitive
2024-06-16 20:02:57 +01:00
marauder2k7 d6a79e4f5b if statement
treat "true" as a bool in getInt check (inside if statements for strings)
no longer convert all "true" and "false" to ints
2024-06-16 20:01:47 +01:00
marauder2k7 e56f4cb6a6 if statements
Changed:
if check on vals now return true if the value has a string value
%val = "test me" if(%val) will now return true since %val is not null

Script side:
string checks for "true" and "false" will now be parsed as integer values of 1 and 0.

TEST VIGOUROUSLY
2024-06-16 15:04:20 +01:00
Lukas Aldershaab 83ea6cd0df Improvements based on experience from implementing Python runtime 2023-09-13 10:33:28 +02:00
Lukas Aldershaab e28e24a802 ConsoleValue improvements 2023-09-13 10:33:28 +02:00
Lukas Aldershaab 89b0c7f73b Console Refactor 2023-09-13 10:33:20 +02:00
Jeff Hutchinson 1940becb2d Compilation fixes for C++20 2022-11-28 21:39:06 -05:00
Jeff Hutchinson 8f2beb3219 Fix edgecase where empty string was not being explicitly set to 0 in torquescript when used as integers/floats/bools.
We found this in the setInventory standard module. in setInventory, %max was being set to empty string, but being compared to 0 during TorqueScript comparison ops. I knew to look in ConsoleValue's type conversion functions, as the interpreter internally uses ConsoleValues when working with torquescript variables under the hood. ConsoleValue is responsible for handling all type conversions on the fly as needed inside of the core interpreter logic.
2022-05-23 20:25:32 -04:00
Jeff Hutchinson 3988e7baee Better allocator for TorqueScript temp conversions used during interpretation
instead of using a Vector<> that never frees and grows for torquescript temporaries created when doing type conversions)
2022-05-21 21:55:44 -04:00
Jeff Hutchinson 4af4d90f4a Get rid of setLocalVariable entirely. 2021-10-19 20:38:13 -04:00
Jeff Hutchinson c16b88d709 Fix temporary buffer for scripting conversions. 2021-09-04 21:25:11 -04:00
Jeff Hutchinson 478a04bea8 Fix DSOs and bump version! 2021-09-04 16:37:59 -04:00
Jeff Hutchinson 1b54162580 cleanup todos 2021-08-19 22:25:11 -04:00
Jeff Hutchinson 6f7fdca87d lotsa fixes. 2021-05-04 21:18:15 -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 964fde8f09 Goodbye String Stack! 2021-04-29 23:11:49 -04:00
Jeff Hutchinson bfc0109485 fixes and some minor bc adjustment. 2021-04-16 23:21:39 -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 50df52ecfc more console refactor. 2021-03-31 21:09:23 -04:00
Jeff Hutchinson 5e81c021f5 start cleaning up ConsoleValueRef's 2021-03-30 23:58:07 -04:00
Lukas Aldershaab 099dd4f1f3 Parametrize script extension, default to 'tscript' 2021-01-19 21:32:31 +01:00
Areloch 6cf0c9e360 Merge branch 'development' into EngineAPI-Refactor 2018-12-09 14:48:50 -06:00
Lukas Joergensen 7d91d0a577 Eliminate ConsoleFunction and ConsoleMethod, replace with DefineEngineStringlyVariadic 2018-04-20 22:09:58 +02:00
Lukas Joergensen 6b524ae58a Eliminate ConsoleStaticMethod 2018-04-20 20:27:09 +02:00
Azaezel cbce2ee805 Merge branch 'development' of https://github.com/GarageGames/Torque3D into memberMess
# Conflicts:
#	Engine/source/console/consoleFunctions.cpp
2018-03-28 15:42:34 -05:00
Azaezel 9b8c950701 console membervar cleanup 2018-03-16 20:05:47 -05:00
Glenn Smith 79c34c68db Use strncpy instead of strcpy because again, buffer overflows 2018-03-06 02:35:33 -05:00
Areloch d666322a1b Merging 2017-11-05 22:33:32 -06:00
Areloch 8c807485b1 Reworks the $Core::commonShaderPath variable usage to be a static variable in ShaderGen for efficiency(only one getVariable when shadergen is initialized), as well as implements the ability to set a default value, and ensures that it tries to set a path even if the pref variable is missing which is important for ported projects from older builds. 2017-07-24 00:40:27 -05:00
Thomas "elfprince13" Dickerson 1c2b096a72 Whitespace consistency 2017-01-06 23:10:14 -05:00
Thomas "elfprince13" Dickerson b215bfb933 executef converted 2017-01-06 17:19:16 -05:00
Areloch 255fec1a9d Make exec() and getDSOPath() proper Con namespace functions.
Moves the console function exec()'s body into an actual function in the Con namespace as the function executeFile() to align with the other execute and eval functions.
Also moved the getDSOPath function(as exec/executeFile requires it) from being local in consoleFunctions.cpp to a Con namespace function as well, furthering the consistency.
2016-04-19 01:35:52 -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
Raul Ferriz 7e172869a9 Fixed warning.
Sort struct initialization to match fields declaration avoids a warnings on GCC.
2015-07-02 22:06:24 +02:00
Daniel Buckmaster d89c3b7c6f Merge pull request #1333 from Azaezel/PluggingLeaks
Plugging Memory Leaks
2015-06-28 14:41:13 +10:00
Azaezel b1e8a45a48 leak prevention according to: https://vld.codeplex.com/ ConsoleValue() constructors and destructors to handle corner-cases not already addressed via init, and cleanup 2015-06-02 14:25:08 -05:00
James Urquhart d9436e65c5 Add workaround for issue #1292 2015-05-28 20:34:10 +10:00
James Urquhart 15169eab9f Fix issue with registered variables becoming corrupted when string value was accessed. 2015-05-16 14:50:20 +01:00
James Urquhart 12d435c341 Remove value constructors for ConsoleValueRef & fix callbacks which use them. Fixes issue #1289 2015-05-08 09:04:04 +10:00
James Urquhart 942c7a48f4 Fix corruption issue with string iterator was using an absolute pointer. Also adds a special relative pointer type for constructed strings on the stack. 2015-02-16 21:23:42 +00:00
James Urquhart 97ab694af8 Add extra executef by popular demand 2015-02-10 22:36:09 +00:00
James Urquhart 4a97054f02 Workaround for GCC/LLVM 2015-02-08 11:22:17 +00:00
James Urquhart f44a3f27d6 Fix stack balancing problems by refactoring execution calls
- Con::executef now uses a template
- All public execution functions now restore the console stack upon return
- Fixed bad parameters on some callbacks
- Reverts get*Arg behavior
2015-02-08 00:08:18 +00:00
Daniel Buckmaster b507dc9555 Merge branch 'master' into console-func-refactor
Conflicts:
	Engine/source/app/net/net.cpp
	Engine/source/console/astNodes.cpp
	Engine/source/console/compiledEval.cpp
	Engine/source/console/console.h
	Engine/source/console/consoleInternal.h
	Engine/source/console/engineAPI.h
2014-10-14 15:09:11 +11:00
Daniel Buckmaster 6fdebd16f6 Merge remote-tracking branch 'jamesu/simplify_compiler_ast' into x64
Conflicts:
	Engine/source/console/compiler.cpp
	Engine/source/console/compiler.h
2014-09-15 11:50:32 +10:00
LuisAntonRebollo fcf7bee64a Fix x64 problems for WIN64. 2014-09-14 21:42:51 +02:00