{"id":43,"date":"2025-07-07T12:36:07","date_gmt":"2025-07-07T12:36:07","guid":{"rendered":"https:\/\/blogs.scummvm.org\/prime\/?p=43"},"modified":"2025-07-07T14:08:23","modified_gmt":"2025-07-07T14:08:23","slug":"week-5-buried-and-access","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/prime\/2025\/07\/07\/week-5-buried-and-access\/","title":{"rendered":"Week 5: Buried and Access"},"content":{"rendered":"<p data-start=\"139\" data-end=\"370\">This week, I focused on bringing keymapper support to two more engines: <strong data-start=\"211\" data-end=\"221\">Buried<\/strong> and <strong data-start=\"226\" data-end=\"236\">Access<\/strong>. Both engines came with their own set of challenges<\/p>\n<hr data-start=\"1908\" data-end=\"1911\" \/>\n<h3 data-start=\"372\" data-end=\"382\">Buried<\/h3>\n<p data-start=\"384\" data-end=\"636\">The <strong data-start=\"388\" data-end=\"398\">Buried<\/strong> engine had an unusual approach to input: it handled most keypresses on <strong data-start=\"470\" data-end=\"485\">key release<\/strong> rather than on key press.<\/p>\n<p data-start=\"384\" data-end=\"636\">In terms of actual key replacement, there wasn\u2019t much heavy lifting to do. However, the real challenge\u2014like in some of the previous engines\u2014was figuring out <strong data-start=\"795\" data-end=\"837\">when to activate or deactivate keymaps<\/strong>. Buried has different contexts where certain keymaps should be enabled or ignored, and tracing that logic took the majority of my time this week.<\/p>\n<p data-start=\"985\" data-end=\"1091\">Once I understood those transitions, hooking up the rest of the keymapper functionality was fairly smooth.<\/p>\n<hr data-start=\"1908\" data-end=\"1911\" \/>\n<h3 data-start=\"1093\" data-end=\"1103\">Access<\/h3>\n<p data-start=\"1105\" data-end=\"1285\"><strong data-start=\"1105\" data-end=\"1115\">Access<\/strong> was easier to work with in comparison, but it did come with one major twist: it used <strong data-start=\"1201\" data-end=\"1272\">function keys (like F1, F2, etc.) to change the current active verb<\/strong> in the game.<\/p>\n<p data-start=\"1287\" data-end=\"1570\">The function responsible for switching verbs didn\u2019t rely on keycodes\u2014it used <strong data-start=\"1364\" data-end=\"1390\">internal numeric codes<\/strong> corresponding to different verbs. I couldn\u2019t just update that function to use actions instead, because it was used in other parts of the engine where those codes were passed directly.<\/p>\n<p data-start=\"1572\" data-end=\"1906\">To solve this, I came up with a workaround: I mapped keymapper actions to these verb codes by ensuring the actions were written <strong data-start=\"1700\" data-end=\"1723\">in a specific order<\/strong>, and then calculated the correct internal code by subtracting a default base. It\u2019s not the cleanest solution, but it worked without requiring intrusive changes to the engine\u2019s logic.<\/p>\n<hr data-start=\"1908\" data-end=\"1911\" \/>\n<h3 data-start=\"1913\" data-end=\"1924\">Wrap-Up<\/h3>\n<p data-start=\"1926\" data-end=\"1939\">This week, I:<\/p>\n<ul data-start=\"1941\" data-end=\"2139\">\n<li data-start=\"1941\" data-end=\"2002\">\n<p data-start=\"1943\" data-end=\"2002\">Implemented keymapper support for <strong data-start=\"1977\" data-end=\"1987\">Buried<\/strong> and <strong data-start=\"1992\" data-end=\"2002\">Access<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>Next week, I\u2019ll continue expanding support to more engines\u2014each one bringing its own surprises.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, I focused on bringing keymapper support to two more engines: Buried and Access. Both engines came with their own set of challenges Buried The Buried engine had an unusual approach to input: it handled most keypresses on key release rather than on key press. In terms of actual key replacement, there wasn\u2019t much [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-week-5"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":5,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":48,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/posts\/43\/revisions\/48"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/prime\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}