kieranhj / pop-beeb

Prince of Persia port to BBC Master
45 stars 2 forks source link

Message system could be refactored #105

Closed kieranhj closed 6 years ago

kieranhj commented 6 years ago

The message / status line system is getting increasingly verbose with each message having to check for the presence of other messages and understand how to blank and restore the status line appropriately.

If any further or generic messages need to be added then it is probably worth refactoring this so there is a proper message stack that handles all the requests with different times & priorities etc.

inversephase commented 6 years ago

is this a good place to mention that the message timers are a bit short? I feel like they should be about twice as long.

kieranhj commented 6 years ago

That will be because the timings are in frames and the Beeb version often runs at twice the frame rate of Apple II! I can change this now.

I won't be refactoring the message code but have simplified it a lot by removing some code that I didn't quite understand and just seemed to be causing delays in the messages appearing. I've also removed the code that attempts to just plot the messages to screen twice (for double buffers) and just plot them all the time.

Last message requested wins. Timer message is "polite" and waits for no other messages before it tries to display.

kieranhj commented 6 years ago

In master.

kieranhj commented 6 years ago

I should add that I extended the message times as well.