{"id":68,"date":"2024-06-11T06:51:35","date_gmt":"2024-06-11T06:51:35","guid":{"rendered":"https:\/\/blogs.scummvm.org\/kunxl\/?p=68"},"modified":"2024-06-16T14:06:39","modified_gmt":"2024-06-16T14:06:39","slug":"the-first-visuals","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/kunxl\/2024\/06\/11\/the-first-visuals\/","title":{"rendered":"The First Visuals"},"content":{"rendered":"<figure id=\"attachment_81\" aria-describedby=\"caption-attachment-81\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-81 size-large\" src=\"https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot-2024-06-11-at-12.56.52-PM-e1718090920609-1024x579.png\" alt=\"\" width=\"1024\" height=\"579\" srcset=\"https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot-2024-06-11-at-12.56.52-PM-e1718090920609-1024x579.png 1024w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot-2024-06-11-at-12.56.52-PM-e1718090920609-300x170.png 300w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot-2024-06-11-at-12.56.52-PM-e1718090920609-768x434.png 768w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot-2024-06-11-at-12.56.52-PM-e1718090920609-480x271.png 480w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot-2024-06-11-at-12.56.52-PM-e1718090920609-960x543.png 960w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot-2024-06-11-at-12.56.52-PM-e1718090920609.png 1431w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption id=\"caption-attachment-81\" class=\"wp-caption-text\">The Splash Screen.<\/figcaption><\/figure>\n<p>This is a short mid-week update on my work to add support to qdEngine. As I previously mentioned, \u00a0I 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.<\/p>\n<p>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.<\/p>\n<p><code><br \/>\nbitmap_handle_ = LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(bitmap_resid), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR)<br \/>\nif (!bitmap_handle_) {<br \/>\nreturn false;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>The splash screen in the original engine is a little fancy. They didn&#8217;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 \u00a0of taking this approach we decided to load the splash screen on the main window itself.<\/p>\n<p>I re-wrote this using the <code>Common::PEResource<\/code> 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.<\/p>\n<figure id=\"attachment_80\" aria-describedby=\"caption-attachment-80\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-80\" src=\"https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot_2024-06-10_at_18.07.35-1024x812.png\" alt=\"\" width=\"1024\" height=\"812\" srcset=\"https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot_2024-06-10_at_18.07.35-1024x812.png 1024w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot_2024-06-10_at_18.07.35-300x238.png 300w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot_2024-06-10_at_18.07.35-768x609.png 768w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot_2024-06-10_at_18.07.35-1536x1218.png 1536w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot_2024-06-10_at_18.07.35-480x381.png 480w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot_2024-06-10_at_18.07.35-960x761.png 960w, https:\/\/blogs.scummvm.org\/kunxl\/wp-content\/uploads\/sites\/75\/2024\/06\/Screenshot_2024-06-10_at_18.07.35.png 1866w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption id=\"caption-attachment-80\" class=\"wp-caption-text\">Initial Splash Screen.<\/figcaption><\/figure>\n<p>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 <a href=\"https:\/\/github.com\/sev-\/qdengine\/commit\/2cbfb9fe626d30ce4e540a34b0f8df08ee84e684\">commit<\/a> which shows the complete implementation of the splash screen.<\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a short mid-week update on my work to add support to qdEngine. As I previously mentioned, \u00a0I 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. [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":14,"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":88,"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/posts\/68\/revisions\/88"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/kunxl\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}