01-15-2023, 06:09 AM
(01-15-2023, 04:09 AM)megamarc Wrote: Hi!
Glad to know you have it working :-)
As you can see, the single main difference is that the main loop doesn't exist isnide main() function anymore, but is a delegate function set up by the new API call TLN_SetMainTask(). That's because how the browser calls javascript code. Being single-threaded, it means you can't call a function that doesn't return control to the javascript engine, a delegate callback must be used. This new mechanism is also implemented inside the Tilengine window, so the updated samples will also run when compiled to native C applications. The rest of the API is the same.
This is good to know! I also have an idea : You maybe can implement the samples on the website, so the user can interact with them while visiting the website