{"id":100,"date":"2018-06-07T10:47:43","date_gmt":"2018-06-07T10:47:43","guid":{"rendered":"https:\/\/blogs.scummvm.org\/drenn1\/?p=100"},"modified":"2022-05-24T10:48:50","modified_gmt":"2022-05-24T10:48:50","slug":"gsoc-week-3-r%cc%b6e%cc%b6b%cc%b6e%cc%b6l%cc%b6-elasi-scum","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/drenn1\/2018\/06\/07\/gsoc-week-3-r%cc%b6e%cc%b6b%cc%b6e%cc%b6l%cc%b6-elasi-scum\/","title":{"rendered":"GSoC Week 3: R\u0336e\u0336b\u0336e\u0336l\u0336 Elasi Scum"},"content":{"rendered":"<p>The main task of this last week was to implement saving. This had a surprising amount of nuance to it, since I need to provide ScummVM with various metadata, including a thumbnail of the savefile, the savegame description, etc\u2026 fortunately it wasn\u2019t too difficult to use other engines as templates on how to accomplish this. I\u2019m quite glad I found out about ScummVM\u2019s built-in serializer before starting on this, as it reduces the amount of redundant code by a lot (saving and loading is done with the same code).<\/p>\n<div>\n<figure class=\"image\"><img decoding=\"async\" src=\"..\/images\/gsoc-week-3-saving.png\" alt=\"\" \/><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/blogs.scummvm.org\/drenn1\/wp-content\/uploads\/sites\/62\/2022\/05\/gsoc-week-3-saving.png\" \/><figcaption><\/figcaption><\/figure>\n<\/div>\n<p>The main issue I encountered, was a portability concern. I can\u2019t simply memcpy a data structure to save it, since there are no guarantees about struct packing, or endianness, etc\u2026 so, I need to specify each individual variable that goes into the savefile. This is a huge pain to do, since each individual room has its own set of variables, and I\u2019m still figuring out what they are. I\u2019ve mostly held off on saving room-specific variables for now. Hopefully I\u2019ll find a better solution, but obviously I must eventually solve this for saves to work properly.<\/p>\n<p>In the meantime, the next mission is coming along, in which Kirk faces off against the Elasi &#8211; some kind of \u201crebel alliance\u201d, except, they\u2019re the bad guys.<\/p>\n<div>\n<figure class=\"image\"><img decoding=\"async\" src=\"..\/images\/gsoc-week-3-hard-fast-dirty.png\" alt=\"\" \/><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/blogs.scummvm.org\/drenn1\/wp-content\/uploads\/sites\/62\/2022\/05\/gsoc-week-3-hard-fast-dirty.png\" \/><\/figure>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The main task of this last week was to implement saving. This had a surprising amount of nuance to it, since I need to provide ScummVM with various metadata, including a thumbnail of the savefile, the savegame description, etc\u2026 fortunately it wasn\u2019t too difficult to use other engines as templates on how to accomplish this. [&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-100","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/posts\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/posts\/100\/revisions\/101"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/drenn1\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}