Lexa

WPF, C#, Objective C and a little Math

The Desktop Cat

Last week my good friend and colleague showed me TopCat – an old windows program (1991!) that draws on a desktop the cat running after the mouse cursor. The idea was so simple and the character so nice, so I couldn’t resist to remake this old program using layered windows.

screen

I also wanted to use a fancy blur shadow for the cat, so I decided to save cat animation and shadows as PNG files, and operate with them using GDI+.

shadow
This is the shadow

cat
And this is the cat

I took all images from the original TopCAT, just by saving working screens, and then added color (so I’m not an author of the character, but I really like it).

I also add a carpet – the cat will stay sleeping on a carpet until you’ll wake it up with mouse click. You can move the carpet using mouse. Use carpets context menu to close the application or to select between 3 cats: orange, black (that is actually, blue:) and white.

Program also saves the carpet position and selected cat type for further program starts. You can find source code and executable here (rename doc to zip after downloading, as usual). I used WINAPI, and a little of GDI+. Unfortunately program runs only in 32 bits depth color mode, but it can be improved.

I already have few good responses for this ‘neko’, and some requests for dogs, rabbits and some behavior changes. I also have some ideas, so may be later I’ll modify it.

Oh, almost forgot: this is the original TopCAT! program, by Robert Dannbauer. Robert, thank you very much! :)


Categorised as: GDI+, WINAPI


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>