{"id":184,"date":"2020-06-21T12:00:34","date_gmt":"2020-06-21T12:00:34","guid":{"rendered":"https:\/\/blogs.scummvm.org\/djsrv\/?p=184"},"modified":"2022-05-25T00:23:22","modified_gmt":"2022-05-25T00:23:22","slug":"sounds-events-and-bugs","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/djsrv\/2020\/06\/21\/sounds-events-and-bugs\/","title":{"rendered":"Sounds, Events, and Bugs"},"content":{"rendered":"<section class=\"body\">This last week was a busy one, with my focus split between three main tasks.The first two days, I played through the beginning of <em>Spaceship Warlock<\/em>, identifying and fixing any Lingo issues. I quickly got frustrated with not being able to hear the game\u2019s dialogue, so I improved our decoder for Macintosh <code>snd <\/code> resources so that it could handle <em>Warlock<\/em>\u2019s sounds:<\/section>\n<section class=\"body\"><div style=\"width: 480px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-184-1\" width=\"480\" height=\"360\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/Spaceship-Warlock-Sound-KVChLrPZds8.mp4?_=1\" \/><a href=\"https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/Spaceship-Warlock-Sound-KVChLrPZds8.mp4\">https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/Spaceship-Warlock-Sound-KVChLrPZds8.mp4<\/a><\/video><\/div><\/p>\n<p>The next day, I focused on event handling: fixing some strange bugs, and then rewriting most of our event code to allow for proper event delegation. Only one object is supposed to handle each event\u2014sometimes a sprite, sometimes a cast member, sometimes the frame, and sometimes the movie. I still haven\u2019t perfected the process of determining which object it should be in every case, but the new system is a heck of a lot better than before, when we were just firing off the event to everything that could possibly handle it.<\/p>\n<p>For the rest of the week, I began implementing parent scripts, Lingo\u2019s second iteration of object-oriented programming. With factories already implemented, this was relatively easy, but the test movies I\u2019ve been working with, the object-oriented bug examples from <em>Lingo Workshop<\/em>, have been surprisingly hard to get working, using all sorts of uncommon Lingo features. Our implementations of many of these features were buggy, to say the least, and I\u2019ve been slowly working through them.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-185\" src=\"https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/bug-garden.png\" alt=\"\" width=\"668\" height=\"536\" srcset=\"https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/bug-garden.png 668w, https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/bug-garden-300x241.png 300w, https:\/\/blogs.scummvm.org\/djsrv\/wp-content\/uploads\/sites\/4\/2022\/05\/bug-garden-480x385.png 480w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/>I\u2019ve finally squashed enough of the bad type of bug to get the good type to display! Still, there\u2019s plenty of work to do, which I will get to tomorrow.<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>This last week was a busy one, with my focus split between three main tasks.The first two days, I played through the beginning of Spaceship Warlock, identifying and fixing any Lingo issues. I quickly got frustrated with not being able to hear the game\u2019s dialogue, so I improved our decoder for Macintosh snd resources so [&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-184","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts\/184","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=184"}],"version-history":[{"count":4,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"predecessor-version":[{"id":235,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/posts\/184\/revisions\/235"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/djsrv\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}