{"id":111,"date":"2019-07-29T19:42:41","date_gmt":"2019-07-29T19:42:41","guid":{"rendered":"https:\/\/blogs.scummvm.org\/pantherengine\/?p=111"},"modified":"2022-05-23T19:43:40","modified_gmt":"2022-05-23T19:43:40","slug":"week-9-2","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/pantherengine\/2019\/07\/29\/week-9-2\/","title":{"rendered":"Week 9"},"content":{"rendered":"<p>This week I have been reversing action and inventory systems.<\/p>\n<p>&nbsp;<\/p>\n<p>Action system<\/p>\n<p>There are 7 action types:<\/p>\n<ul>\n<li>LOOK<\/li>\n<li>WALK<\/li>\n<li>USE<\/li>\n<li>TAKE<\/li>\n<li>TALK<\/li>\n<li>OBJUSE(HERO 1)<\/li>\n<li>OBJUSE(HERO 2)<\/li>\n<\/ul>\n<p>All of them are processed using opcodes.<\/p>\n<p>Inventory in this engine is array of item IDs.<\/p>\n<p>There are 3 opcodes for inventory:<\/p>\n<ul>\n<li>ADDINV \u2013 adds new item<\/li>\n<li>DELINV \u2013 deletes item<\/li>\n<li>SETINV \u2013 replaces the current item with another<\/li>\n<\/ul>\n<p>The item id is then used to show the item sprite and used in OBJUSE handler.<\/p>\n<p>This screenshot shows the fixed font rendering along with star object, which is used for choosing action type.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/blogs.scummvm.org\/pantherengine\/wp-content\/uploads\/sites\/31\/2022\/05\/redcom.jpg\" \/><\/p>\n<p>There is only left to reverse InterfaceSequence(don\u2019t know for what it is used) and walking system.<\/p>\n<p>Considering code I need to clean it, end what hasn\u2019t been transfered from disassembly and prepare engine for merging.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week I have been reversing action and inventory systems. &nbsp; Action system There are 7 action types: LOOK WALK USE TAKE TALK OBJUSE(HERO 1) OBJUSE(HERO 2) All of them are processed using opcodes. Inventory in this engine is array of item IDs. There are 3 opcodes for inventory: ADDINV \u2013 adds new item DELINV [&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-111","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":112,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/posts\/111\/revisions\/112"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}