{"id":209,"date":"2020-08-10T12:00:18","date_gmt":"2020-08-10T12:00:18","guid":{"rendered":"https:\/\/blogs.scummvm.org\/djsrv\/?p=209"},"modified":"2022-05-24T00:37:34","modified_gmt":"2022-05-24T00:37:34","slug":"fixup","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/djsrv\/2020\/08\/10\/fixup\/","title":{"rendered":"Fixup"},"content":{"rendered":"<section class=\"body\">This last week I largely worked my way through my backed up Trello cards, as well as fixing Buildbot failures and various issues with movies in windows.<\/p>\n<p>Some highlights from bug hunting:<\/p>\n<ul>\n<li>Director movies contain a Lingo names table (<code>Lnam<\/code>) which, as the name implies, stores the names of functions, variables, etc. Previously, we were just loading the name table which had the highest ID, and thus should usually be the newest. This worked pretty much all the time. However, one target, Lingo Expo\u2019s Noh Tale, was absolutely full of unnamed functions, and I had long been confused why this was happening. Inexplicably, the highest name table turned out to be the wrong one in this just this single movie, and this was fixed by loading the correct name table specified in the Lingo context (<code>Lctx<\/code>).<\/li>\n<li>Now, Noh Tale seemed to work fine, but it inexplicably still failed in the Buildbot, timing out after 20 seconds. After some testing, it became apparent that the problem was the movie\u2019s use of the \u201cwait for click\u201d tempo, one of the few features implemented with a busy loop. Normally, a movie running in the Buildbot would be killed after the movie was stepped a few times, but this busy loop kept it trapped in the step function forever, waiting for a click which would never come. This also blocked any movies in windows running at the same time, so I had to replace the busy loop.<\/li>\n<li>Next was Bingo.dir from Chop Suey, another movie which seemed to work fine but failed in the Buildbot. Here, the problem was that the movie was being terminated in the middle of a script, and then a <code>stopMovie<\/code> event handler was triggered. It turned out that this event handler relied on the results of the prematurely terminated script, and preventing the <code>stopMovie<\/code> handler from running in the first place solved this.<\/li>\n<\/ul>\n<p>After more MacGUI cleanup, windows look even closer to how they did on a real Mac, with proper title rendering, transparency, inactive window coloring, and a desktop background that doesn\u2019t cause ScummVM to lag. Not to mention quite a few other rendering fixes:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-210\" src=\"https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/windowType.png\" alt=\"\" width=\"1052\" height=\"824\" srcset=\"https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/windowType.png 1052w, https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/windowType-300x235.png 300w, https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/windowType-1024x802.png 1024w, https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/windowType-768x602.png 768w, https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/windowType-480x376.png 480w, https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/windowType-960x752.png 960w\" sizes=\"auto, (max-width: 1052px) 100vw, 1052px\" \/>Over the weekend, I continued work on <a href=\"https:\/\/github.com\/Earthquake-Project\/ProjectorRays\">ProjectorRays<\/a>, and it can now detect a movie\u2019s Director version, load a movie\u2019s casts, and link scripts to cast members so that they can be identified by name. These features were blocking lots of improvements, and I should be able to make progress on Lingo decompilation much faster now. The code will also be easy to reuse in ScummVM\u2014I just copied over the version detection code today. \ud83d\ude42<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>This last week I largely worked my way through my backed up Trello cards, as well as fixing Buildbot failures and various issues with movies in windows. Some highlights from bug hunting: Director movies contain a Lingo names table (Lnam) which, as the name implies, stores the names of functions, variables, etc. Previously, we were [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-209","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts\/209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/comments?post=209"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":211,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts\/209\/revisions\/211"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/media?parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/categories?post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/tags?post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}