The First Visuals

The Splash Screen.

This is a short mid-week update on my work to add support to qdEngine. As I previously mentioned,  I have been working on displaying the splash screen. In this blog post I will give you details on how I managed to render my first visuals using qdEngine.

The splash screen is stored as a bitmap. The original engine was loading the bitmap from the executable. Microsoft gives you a feature where you can convert assets (like fonts, images etc) into binary and include them in your final executable. This is how the original code was loading the bitmap on the screen.

bitmap_handle_ = LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(bitmap_resid), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR)
if (!bitmap_handle_) {
return false;

The splash screen in the original engine is a little fancy. They didn’t load the splash screen on the main window, which is going to be used for the game. They decided to load a smaller sub-window to load the splash screen, sort of like a popup, before loading the main game window. Instead  of taking this approach we decided to load the splash screen on the main window itself.

I re-wrote this using the Common::PEResource class. Thereafter we copied the buffer returned by the decoder to the screen. This resulted in a monochromatic splash screen, which looked something like this.

Initial Splash Screen.

To add colour to the splash screen we initialised a palette. After some minor refactoring to get the splash screen to the centre, we managed to load the splash screen with colour. This is the commit which shows the complete implementation of the splash screen.

This is a short mid-week post, to showcase my progress. I am really excited for the coming weeks, and look forward to sharing more updates.

Leave a Reply

Your email address will not be published. Required fields are marked *