Firstly, yes you really should be using kb_Scan instead of os_GetCSC, which should give you some speed improvement (and also let you move the cursor along diagonals).
The method that I used for VYSION 2 is a combination of partial redraw and intelligent updating--things are generally only redrawn and/or updated when they have to be, instead of every frame as I assume you're doing it now. The largest speed concern in your program is probably the large background sprites, which will be very slow to draw.
So to start with, I'd try to figure out a way in which you can move the cursor around without redrawing the entire screen. This should be pretty easy given that as far as I can tell, the background behind the cursor doesn't change very often--so you don't have to do any tricks to fix that. If you're looking for more speed after that, see if you can figure out a way to only update the things that you actually need to. It looks like you already have a start on that in marking buttons as valid or invalid. In VYSION 2, for example, only the currently active window updates, as well as any visible elements in the super menu/taskbar/etc.
Good luck!
The method that I used for VYSION 2 is a combination of partial redraw and intelligent updating--things are generally only redrawn and/or updated when they have to be, instead of every frame as I assume you're doing it now. The largest speed concern in your program is probably the large background sprites, which will be very slow to draw.
So to start with, I'd try to figure out a way in which you can move the cursor around without redrawing the entire screen. This should be pretty easy given that as far as I can tell, the background behind the cursor doesn't change very often--so you don't have to do any tricks to fix that. If you're looking for more speed after that, see if you can figure out a way to only update the things that you actually need to. It looks like you already have a start on that in marking buttons as valid or invalid. In VYSION 2, for example, only the currently active window updates, as well as any visible elements in the super menu/taskbar/etc.
Good luck!