[ Thread Index |
| More lists.liballeg.org/allegro-developers Archives
OK, I have looked into using coroutines to allow create
main-addon-powered abstraction. It seems to be possible, but
unfortunately coroutines currently only available in Firefox and Chrome
http://kangax.github.io/compat-table/es6/, look for Generators (yield)
). No other browser support it, and even in Chrome, users would have to
dig around settings to make such code work. So, no, I believe that we
can't presently use coroutines to implement endless loops with yield.
The trouble is, Generators (and the whole ECMAScript 6 standard isn't
finalized yet, so relying on it would be a bad idea, especially if my
port is to be merged into the main library. Maybe in experimental,
separate port, it may be possible to use such a feature.
So, for now I'm stuck. I can see no other way to avoid having frame
18.06.2014 1:57, SiegeLord пишет:
On 06/14/2014 05:11 AM, Max Savenkov wrote:
Here's a result of my work for the last two months: a port of Allegro
attached. The port isn't fully complete, but it has most of
functionality working, so I decided to present it to community for
testing and to generate interest.
One part I don't understand are the changes to the audio addon. Why is
the thread emulation you coded into the core not sufficient? What are
the OpenAL changes for?
Additionally, the way you've done the time/timer etc (by literally
copying files over) is just terrible. Can none of it be refactored to
use the system driver abstraction?
In terms of the main loop... is there no main-addon-powered abstraction
that can be made there? E.g. the Allegro main would register the thread
emulator dispatch loop as the main loop which would then call the user
main? Overall, even with this it's very sad that emscripten will force
people to rewrite their code like that.
These are just the first few things I noticed as I glanced at the code.
As I have get more free time, I'll look over it some more.
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration