{"id":43,"date":"2014-05-24T06:10:33","date_gmt":"2014-05-24T06:10:33","guid":{"rendered":"https:\/\/blogs.scummvm.org\/lukaslw\/?p=43"},"modified":"2022-05-22T06:12:36","modified_gmt":"2022-05-22T06:12:36","slug":"background-animations-and-objects-displaying","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/lukaslw\/2014\/05\/24\/background-animations-and-objects-displaying\/","title":{"rendered":"Background animations and objects displaying"},"content":{"rendered":"<p>I had a lot of school work this week, so my progress is smaller then I hope. I\u2019m not proud of it but I\u2019m going to work harder in upcoming week.<\/p>\n<p>I was working on background animations displaying. I manage to load and display proper first frames of animations for each location. At the beginning I thought that I will be able to use same way of loading that is used for objects loading (like for shovel in first location). Sadly, there are more complications with them.<\/p>\n<p>I was trying to understand how animations for Prince are stored. For each location we have anim.lst file that contains information about all animations of loaded room: special animations of hero (like hero with shovel for first room), background animations (like owl or bats in loc no. 1) and normal animations (like wizard Arivald). I had to implement InstallBackAnimations and InstallSingleBackAnim functions to find and load only background animations. These functions allow to find their proper numbers in anim.lst and load data for them.<\/p>\n<p>But there are some background animations that has more then one type \/ sub-animation (like owl in first location \u2013 there are animations of her blinking eyes, waving her wings, etc). I decided to store main info (BAS structure) and array of all sub-animations (Anim) for one background animation in one structure (BackgroundAnim) and then create array of these structures (backAnimList) that contains all of them, but I\u2019m not 100% sure if it\u2019s the best idea. Some of background animations can change into normal animations (like gravedigger in first location) and that will be important too.<\/p>\n<p>I\u2019m still working on finding which sub-animation should be loaded in specific moment &#8211; it\u2019s calculated in ShowBackAnims function.<\/p>\n<div id='gallery-1' class='gallery galleryid-43 gallery-columns-1 gallery-size-full'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_1.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"514\" src=\"https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_1.jpg\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-45\" srcset=\"https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_1.jpg 652w, https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_1-300x237.jpg 300w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-45'>\n\t\t\t\tBackground animations &#8211; location no. 1\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_3.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"648\" height=\"509\" src=\"https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_3.jpg\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-46\" srcset=\"https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_3.jpg 648w, https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_3-300x236.jpg 300w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-46'>\n\t\t\t\tBackground animations &#8211; location no. 3\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_10.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"649\" height=\"511\" src=\"https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_10.jpg\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-47\" srcset=\"https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_10.jpg 649w, https:\/\/blogs.scummvm.org\/lukaslw\/wp-content\/uploads\/sites\/27\/2014\/05\/background_anim_10-300x236.jpg 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-47'>\n\t\t\t\tBackground animations &#8211; location no. 10\n\t\t\t\t<\/figcaption><\/figure>\n\t\t<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>I had a lot of school work this week, so my progress is smaller then I hope. I\u2019m not proud of it but I\u2019m going to work harder in upcoming week. I was working on background animations displaying. I manage to load and display proper first frames of animations for each location. At the beginning [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":48,"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/posts\/43\/revisions\/48"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/lukaslw\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}