Friday 28 November 2008

Cursor Madness!!!!!!

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 it was stored hardcoded in the
executable, the most interesting part for me was that I could actually
see it there in the hex, Ive seen strange patterns in hex before but this
was clearly a mouse cursor, you wouldnt notice it unless you knew it was there.
and even then you'd need to focus on it pretty hard.

The image here shows the hex for the cursor from the executable, it also shows the cursor image
in 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.






The way I created the cursor image in ScummVM replicates the original strucutre of the cursor
image, however it contains no copyrighted material. I borrowed the idea from the AGI engine so
thanks for whoever made it obvious.

For some strange reason the cursor data in the executable shows 0xDF as the shade of gray
I run the game in DOSBox and the cursor loads up however when I load the cursor
image in ScummVM the palette uses 0xDF but the colours in DOSBox and ScummVM do not match
it seems that the cursor loaded in DOSBox is using 0xAE for gray, I have adjusted the palette
in ScummVM but it begs the question, why arent the right colours showing up?
Ive included a swatch to show the differences maybe someone can explain why..


The image below shows the cursor in the current build of the engine.






This may seem very trivial but I think I can finally get some sort of interactivity going soon.

Rob

No comments: