2014-01-21 03:42:18 +04:00
|
|
|
// cursor file should be 32x32 in default MS Windows .cur format
|
2015-07-22 21:32:54 +03:00
|
|
|
#ifndef INCLUDE_CURSOR_H
|
|
|
|
#define INCLUDE_CURSOR_H
|
2015-08-04 18:48:36 +03:00
|
|
|
#print "[include <cursor.h>]\n"
|
2015-07-22 21:32:54 +03:00
|
|
|
|
|
|
|
#ifndef INCLUDE_KOLIBRI_H
|
|
|
|
#include "../lib/kolibri.h"
|
|
|
|
#endif
|
2014-01-21 03:42:18 +04:00
|
|
|
|
|
|
|
struct CustomCursor
|
|
|
|
{
|
|
|
|
dword CursorPointer;
|
|
|
|
dword Load();
|
|
|
|
dword Set();
|
|
|
|
dword Restore();
|
|
|
|
void Delete();
|
|
|
|
};
|
|
|
|
|
|
|
|
dword CustomCursor::Load(dword CursorFilePath)
|
|
|
|
{
|
|
|
|
if (CursorPointer) return;
|
|
|
|
EAX = 37;
|
|
|
|
EBX = 4;
|
|
|
|
ECX = CursorFilePath;
|
|
|
|
EDX = 1;
|
|
|
|
$int 0x40
|
|
|
|
CursorPointer = EAX; // 0 - err, other - handle
|
|
|
|
}
|
|
|
|
|
|
|
|
dword CustomCursor::Set()
|
|
|
|
{
|
|
|
|
EAX = 37;
|
|
|
|
EBX = 5;
|
|
|
|
ECX = CursorPointer;
|
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
|
|
|
dword CustomCursor::Restore()
|
|
|
|
{
|
|
|
|
EAX = 37;
|
|
|
|
EBX = 5;
|
|
|
|
ECX = 0;
|
|
|
|
$int 0x40
|
|
|
|
}
|
|
|
|
|
|
|
|
void CustomCursor::Delete()
|
|
|
|
{
|
|
|
|
EAX = 37;
|
|
|
|
EBX = 6;
|
|
|
|
ECX = CursorPointer;
|
|
|
|
$int 0x40
|
|
|
|
}
|
2015-07-22 21:32:54 +03:00
|
|
|
|
|
|
|
#endif
|