- none
string_*(...)
functions now assume first character index is at 1.log(...)
, no long comma-separates arguments._unittests.gml
, updated accordingly to other changes in this release.
- Renamed
real_within_exlusive(...)
->real_within_exclusive(...)
(typo). - Optimized
array_swap_item(...)
ifindex1
andindex2
are the same. - Ensured
array_height(array)
checking if argumentarray
is array. - Add unittests for
ds_list_swap_item(...)
. extractor.d
complains if non-misc function do not have unittests.assert(...)
optional argument properly documented.array_append(...)
, removed incorrect documentation.- Amount of scripts in the
README.md
.
- Added Marketplace link in
README.md
. array_filter(array, script)
, returns array of items, where the items passed through thescript
returns true (ifscript(array[n]) == true
).array_2d_of(...)
, possibility to create 2D array. All aguments must be of typearray (1D)
.- Unittests for all non-misc functions.
array_swap_item(...)
now calls_gme_arguments(...)
correctly.
- Renamed
array_create
->array_of
, due to recent GameMaker update. - Renamed
array_copy
->array_clone
, due to recent GameMaker update. array_split(array, value)
, now returns 2D array instead of array of string.- Swapping functions have their names changed to minimize confusion.
*_swap(...)
->*_swap_item(...)
. - Most
array_*(...)
functions modified original array. array_*(...)
functions which modify arrays by reference have the array argument prefixed with an&
, eg.array_reverse(&array)
.real_is_*(number)
can take in non-numbers, but will return false.- Removed
deep
variable inarray_expand(...)
.
array_is_1d(array)
, returnstrue
if is 1D array, else false.array_sort(array)
, sorts numbers ascendingly, strings alphabetically.array_replace(array, index, value)
, replacesarray[index]
withvalue
.array_replace(array, height, index, value)
, for 2D arrays.
array_swap_item(array, index1, index2)
, swaps values atindex1
andindex2
inarray
.array_swap_item(array, height, index1, index2)
, for 2D arrays.
ternary(comparison, true_value, false_value)
, ifcomparison
is true, returnstrue_value
, elsefalse_value
.- Compromise for
comparison ? true_value : false_value
.
- Compromise for
string_split(string, separator)
, returns array of string, where each item are the values ofstring
split byseparator
.string_slice(string, from, to)
, returns a portion ofstring
(string[from .. to]
), wherefrom
is inclusive andto
is exclusive. First character has index 0.string_substring(string, from, length)
, returnslength
amount of characters instring
fromfrom
.string_find(source, find, [nth = 1])
, returns position ofnth
occurrence offind
instring
.
array_equal(array1, array2)
, use default GMLarray_equals(var1, var2)
instead.object_destroy(id)
, usewith(instance) instance_destroy();
instead.
type_of(variable)
now supports data structures (ds_*
).array_at(height, index)
now appends correctly.log(...)
now properly displays text.
- Change:
extensions_gme
->_gme
. - Fix: Clarified many parameters in functions.
- Change: For
//params:
, optional arguments are now surrounded with[ ]
. - Add:
extension_gme
, which is intended to providegm_extensions
specific functions.- Functions with optional arguments, or overloads should use new function
_gme_arguments(script, argument_count, count, counts...)
.
- Functions with optional arguments, or overloads should use new function
- Fix:
array_at(array, height, index)
overload not available inREFERENCE.md
, fixes #1. - Fix:
assert(...)
now properly stops code. - Fix: newlines in
REFERENCE.md
.
Initial release of GameMaker 1.4 Library Extensions.