adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Porting to SDL2


From: Kai Sterker
Subject: Re: [Adonthell-devel] Porting to SDL2
Date: Thu, 2 Jun 2016 10:01:38 +0200

On Tue, May 31, 2016 at 4:04 PM, Kai Sterker <address@hidden> wrote:

Good progress yesterday. Main menu and intro sequence are working up to a point. There seems to be a memory corruption with the speech bubbles, so it crashes. But I think I know where to look in order to fix that.

Other small issues that need fixing are
* filling surfaces with the mask color (FF00FF) does not make them properly transparent.
* text input needs to be specifically enabled by calling SDL_StartTextInput when a input field receives focus (and stopped again when done)

Memory issues and rendering glitches all sorted out. Text input working same as v0.3, though code is now also closer to what v0.4 is doing.
 
* switching between Window and Fullscreen must be implemented

That'll be today's task, together with introducing the Letterbox mode and some provisions for multi-monitor setups (should be able to at least pick the display on which to go fullscreen).
 
* some flickering while scrolling needs tracking down

I am wondering if this has something to do with flipping the render buffer at the wrong time. So I am thinking about enabling VSync and upping the framerate from 50 to 60. Since on my new PC it only takes about 1% CPU on average, that shouldn't be too bad ;-).
 

There is one larger task related to the text rendering, due to a change in the scaling implementation. [...] I guess that returning to the v0.3 way of scaling everything upfront is the better approach. While this makes scaling a bit less elegant, it'll avoid unnecessary complexity elsewhere.

That'll be the task for the weekend, although in reality it should not require that much effort. I also need to make a few small adjustments to how the individual glyphs are drawn, as right now they use masked surfaces and require recreating the whole texture after any change. Converting them to RGBA upfront still requires one surface-to-surface blit when drawing each letter, but no longer requires converting the mask to an alpha channel afterwards.


Otherwise, played for a bit, watched the extro again and things are looking good with SDL2. Glad I did the change, as that really helps in future-proving Waste's Edge for the next decade :-).

Kai

reply via email to

[Prev in Thread] Current Thread [Next in Thread]