Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

From what I can see, I have the following changes since the current public release:

  • In apollo_buffer.gml, else if (is_method(v)) { branch was moved in front of else if (is_struct(v)) { since methods now count as structs.
  • In apollo_ref.gml, else if (is_struct(_val)) _kind = 1; is now else if (is_struct(_val) && !is_method(_val)) _kind = 1; for same reason.

This is my test code for methods:

function scr_test_methods(q) {
	//#mark methods
	lua_add_code(q, @'function f(m)
		return m()
	end');
	var fn = function() {
		return "OK!"
	}
	assert(lua_call(q, "f", fn), "OK!")
	assert(lua_call(q, "f", lua_byref(fn)), "OK!")
	
	var fn2 = function() {
		return function() { return "OK2!" }
	}
	lua_add_function(q, "get_ok2", fn2);
	lua_add_code(q, @'function f2(m)
		local _f = get_ok2()
		return _f()
	end');
	assert(lua_call(q, "f2", fn), "OK2!")
}

Thanks to recent runtime updates, the extension can now be rewritten completely but I haven’t gotten around to it yet.