{"id":28,"date":"2008-11-28T17:02:41","date_gmt":"2008-11-28T17:02:41","guid":{"rendered":"https:\/\/blogs.scummvm.org\/sanguinehearts\/?p=28"},"modified":"2022-05-23T17:04:40","modified_gmt":"2022-05-23T17:04:40","slug":"cursor-madness","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/sanguinehearts\/2008\/11\/28\/cursor-madness\/","title":{"rendered":"Cursor Madness!!!!!!"},"content":{"rendered":"<p>A tiny update with something quite insignificant<br \/>\nIm only updating because it excited me a little bit<br \/>\njohndoe123 managed to find the cursor image data<br \/>\nwhat I wasnt prepared for was exactly where he found it<br \/>\nI was expecting to find the cursor image stored as a sprite<br \/>\nin one of the resource files, however it was stored hardcoded in the<br \/>\nexecutable, the most interesting part for me was that I could actually<br \/>\nsee it there in the hex, Ive seen strange patterns in hex before but this<br \/>\nwas clearly a mouse cursor, you wouldnt notice it unless you knew it was there.<br \/>\nand even then you&#8217;d need to focus on it pretty hard.<\/p>\n<p>The image here shows the hex for the cursor from the executable, it also shows the cursor image<br \/>\nin TeenAgent in DOSBox on the left, and on the right you will find the cursor image data in ScummVM and below that the loaded cursor image data running in ScummVM.<\/p>\n<p><a href=\"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/hardcodedcursor.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-30\" src=\"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/hardcodedcursor.jpg\" alt=\"\" width=\"635\" height=\"301\" srcset=\"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/hardcodedcursor.jpg 635w, https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/hardcodedcursor-300x142.jpg 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/a>The way I created the cursor image in ScummVM replicates the original strucutre of the cursor<br \/>\nimage, however it contains no copyrighted material. I borrowed the idea from the AGI engine so<br \/>\nthanks for whoever made it obvious.<\/p>\n<p>For some strange reason the cursor data in the executable shows 0xDF as the shade of gray<br \/>\nI run the game in DOSBox and the cursor loads up however when I load the cursor<br \/>\nimage in ScummVM the palette uses 0xDF but the colours in DOSBox and ScummVM do not match<br \/>\nit seems that the cursor loaded in DOSBox is using 0xAE for gray, I have adjusted the palette<br \/>\nin ScummVM but it begs the question, why arent the right colours showing up?<br \/>\nIve included a swatch to show the differences maybe someone can explain why..<\/p>\n<p><a href=\"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/swatch.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-31\" src=\"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/swatch.jpg\" alt=\"\" width=\"136\" height=\"79\" \/><\/a>The image below shows the cursor in the current build of the engine.<\/p>\n<p><a href=\"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/cursor.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32\" src=\"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/cursor.jpg\" alt=\"\" width=\"646\" height=\"427\" srcset=\"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/cursor.jpg 646w, https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-content\/uploads\/sites\/35\/2008\/11\/cursor-300x198.jpg 300w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/a>This may seem very trivial but I think I can finally get some sort of interactivity going soon.<\/p>\n<p>Rob<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A tiny update with something quite insignificant Im only updating because it excited me a little bit johndoe123 managed to find the cursor image data what I wasnt prepared for was exactly where he found it I was expecting to find the cursor image stored as a sprite in one of the resource files, however [&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-28","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/posts\/28\/revisions\/33"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/sanguinehearts\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}