{"id":86,"date":"2014-06-02T11:40:05","date_gmt":"2014-06-02T11:40:05","guid":{"rendered":"https:\/\/blogs.scummvm.org\/uruk\/?p=86"},"modified":"2022-05-22T18:37:09","modified_gmt":"2022-05-22T18:37:09","slug":"an-almost-correct-display-of-the-first-screen-and-a-bit-of-mouse-handling","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/uruk\/2014\/06\/02\/an-almost-correct-display-of-the-first-screen-and-a-bit-of-mouse-handling\/","title":{"rendered":"An almost correct display of the first screen and a bit of mouse handling"},"content":{"rendered":"<p>As the very verbose title of this post described, that&#8217;s what you will see in this short video:<\/p>\n<div style=\"width: 580px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-86-1\" width=\"580\" height=\"459\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blogs.scummvm.org\/uruk\/wp-content\/uploads\/sites\/48\/2022\/05\/Sfinx-first-scene-ScummVM-97146678.mp4?_=1\" \/><a href=\"https:\/\/blogs.scummvm.org\/uruk\/wp-content\/uploads\/sites\/48\/2022\/05\/Sfinx-first-scene-ScummVM-97146678.mp4\">https:\/\/blogs.scummvm.org\/uruk\/wp-content\/uploads\/sites\/48\/2022\/05\/Sfinx-first-scene-ScummVM-97146678.mp4<\/a><\/video><\/div>\n<p><a href=\"http:\/\/vimeo.com\/97146678\">Sfinx first scene &#8211; ScummVM<\/a>\u00a0from\u00a0<a href=\"http:\/\/vimeo.com\/user20453492\">Peter Bozs\u00f3<\/a>\u00a0on\u00a0<a href=\"https:\/\/vimeo.com\/\">Vimeo<\/a>.<\/p>\n<p>You may have noticed a &#8220;little&#8221; problem above. Yes, some of the sprites are placed totally wrong on the screen. Namely it&#8217;s the door, the shades on the window, the fan on the ceiling, and the wardrobe to the right. Besides that, everything seems fine, and you might have seen that I hovered the mouse cursor over the screen &#8211; yes, that&#8217;s also implemented now. \ud83d\ude42<br \/>\n(Also the sounds are &#8220;a bit&#8221; loud compared to the music of the game, but it really won&#8217;t be a hard-to-fix thing, it&#8217;s just out of my scope of attention right now.)<\/p>\n<p>Back to the problem of the misplaced objects:<br \/>\nAs far as we were able to perceive it with Arnaud, the problem is about the z-coordinates of the objects. In Sfinx, everything that is placed on the screen has not 2, but 3 coordinates. These are the traditional x and y, and there&#8217;s also a z axis which describes the distance of each object from the screen &#8211; where the z-coord is equal to 0 and the further the object is, the greater the number is.<br \/>\nThe problem here is that the original engine used a quite weird fixed-point implementation to store the coordinates of things, and until now I wasn&#8217;t able to properly reimplement or mimic it completely. Right now, it&#8217;s on the top priority list of ours and hopefully we will get over it soon.<\/p>\n<p>Looking at the bright side, even if it&#8217;s ugly, it&#8217;s not an obstacle which would pull back my progress. As you may see, it didn&#8217;t hold me back from implementing the basic mouse handling of the engine (which blessedly has A LOT in common with CGE1), and I am not far from actually handling the events fired by mouse-clicks. From that point, a bunch of opportunities will open, and I will be able to dive into the depths of the command handling (Snail) again.<\/p>\n<p>So, these are my plans for the upcoming week, see you soon! \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As the very verbose title of this post described, that&#8217;s what you will see in this short video: Sfinx first scene &#8211; ScummVM\u00a0from\u00a0Peter Bozs\u00f3\u00a0on\u00a0Vimeo. You may have noticed a &#8220;little&#8221; problem above. Yes, some of the sprites are placed totally wrong on the screen. Namely it&#8217;s the door, the shades on the window, the fan [&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-86","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":88,"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/posts\/86\/revisions\/88"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/uruk\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}