/* * pexeso - multiplayer Pexeso game for MS-Dos/Win32/SVGAlib/X11 * * cursors.c - graphical mouse pointers * ____________________________________________________________ * * Developed by Ondrej Jombik * Copyright (c) 1997-2000 Condy software inc. * Copyright (c) 2001-2004 Platon SDG, http://platon.sk/ * All rights reserved. * * See README file for more information about this software. * See COPYING file for license information. * * Download the latest version from * http://platon.sk/projects/games/ */ /* $Platon: games/pexeso/cursors.c,v 1.4 2003/08/03 21:34:19 nepto Exp $ */ #include #include #if PLATON_SYSTEM_MSDOS #include #include #include #include static WORD cursor_normal[] = { 0xfe7f, 0xfc3f, 0xfc3f, 0xfc3f, 0xfc3f, 0xfc3f, 0x8241, 0x0000, 0x0000, 0x8241, 0xfc3f, 0xfc3f, 0xfc3f, 0xfc3f, 0xfc3f, 0xfe7f, 0x0000, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0000, 0x7dbe, 0x7dbe, 0x0000, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0000 }; static WORD cursor_click[] = { 0x9695, 0x0000, 0x0001, 0x0001, 0x0000, 0x9015, 0xe00f, 0xf00f, 0xf00f, 0xf00f, 0x9101, 0x0000, 0x0001, 0x0001, 0x0001, 0x916b, 0x0000, 0x696a, 0x494c, 0x494c, 0x6d6a, 0x0000, 0x0ee0, 0x04a0, 0x04a0, 0x04e0, 0x0000, 0x6e9e, 0x4ad4, 0x4ab4, 0x6e94, 0x0000 }; static WORD cursor_clock[] = { 0xfc7f, 0xf01f, 0xe00f, 0xc007, 0x8c63, 0x8c63, 0x1c71, 0x1c71, 0x1e31, 0x8f03, 0x8fa3, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1110, 0x2108, 0x2108, 0x4104, 0x4104, 0x4084, 0x2048, 0x2008, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x8f03, 0x8e23, 0x1e31, 0x1c71, 0x1e31, 0x8f03, 0x8fa3, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2048, 0x2088, 0x4084, 0x4104, 0x4084, 0x2048, 0x2008, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x8fc3, 0x8f03, 0x1e11, 0x1c31, 0x1e31, 0x8f03, 0x8fa3, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2008, 0x2028, 0x40c4, 0x4104, 0x4084, 0x2048, 0x2008, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x8fe3, 0x8fe3, 0x1e01, 0x1c01, 0x1e01, 0x8f03, 0x8fa3, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2008, 0x2008, 0x4004, 0x41f4, 0x4084, 0x2048, 0x2008, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x8fe3, 0x8fe3, 0x1ef1, 0x1c31, 0x1e11, 0x8f03, 0x8f83, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2008, 0x2008, 0x4004, 0x4104, 0x40c4, 0x2068, 0x2008, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x8fe3, 0x8fe3, 0x1ef1, 0x1c71, 0x1e31, 0x8e03, 0x8f03, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2008, 0x2008, 0x4004, 0x4104, 0x4084, 0x20c8, 0x2048, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x8fe3, 0x8fe3, 0x1ef1, 0x1c71, 0x1c31, 0x8c03, 0x8c23, 0xc007, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2008, 0x2008, 0x4004, 0x4104, 0x4184, 0x2148, 0x2108, 0x1110, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x8fe3, 0x8fe3, 0x1ef1, 0x1c71, 0x1831, 0x8803, 0x81a3, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2008, 0x2008, 0x4004, 0x4104, 0x4284, 0x2248, 0x2408, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x8fe3, 0x8fe3, 0x1ef1, 0x1871, 0x1031, 0x8103, 0x87a3, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2008, 0x2008, 0x4004, 0x4104, 0x4684, 0x2848, 0x2008, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x8fe3, 0x8fe3, 0x00f1, 0x0071, 0x0031, 0x8f03, 0x8fa3, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2008, 0x2008, 0x4004, 0x5f04, 0x4084, 0x2048, 0x2008, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x87e3, 0x81e3, 0x10f1, 0x1871, 0x1e31, 0x8f03, 0x8fa3, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2008, 0x2808, 0x4604, 0x4104, 0x4084, 0x2048, 0x2008, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000, 0xfc7f, 0xf01f, 0xe00f, 0xc387, 0x81e3, 0x88e3, 0x18f1, 0x1c71, 0x1e31, 0x8f03, 0x8fa3, 0xc387, 0xe00f, 0xf01f, 0xfc7f, 0xffff, 0x0000, 0x0380, 0x0c60, 0x1010, 0x2408, 0x2208, 0x4204, 0x4104, 0x4084, 0x2048, 0x2008, 0x1010, 0x0c60, 0x0380, 0x0000, 0x0000 }; #ifdef __cplusplus # define __CPPARGS ... #else # define __CPPARGS #endif static void interrupt(*old0x1c)(__CPPARGS); static void interrupt new0x1c(__CPPARGS) { static BYTE phase = 0; setmousecur(7, 7, (void *) (cursor_clock + (phase * 32))); phase = phase > 10 ? 0 : phase + 1; old0x1c(); } void cursor_clock_enable(void) { setmousecur(7, 7, (void *) cursor_clock); wait(.25); old0x1c = getvect(0x1c); setvect(0x1c, new0x1c); } void cursor_clock_disable(void) { setvect(0x1c, old0x1c); setmousecur(7, 7, (void *) cursor_normal); } void cursor_click_enable(void) { setmousecur(7, 7, (void *) cursor_click); } void cursor_click_disable(void) { setmousecur(7, 7, (void *) cursor_normal); } #else void cursor_clock_enable(void) { return; } void cursor_clock_disable(void) { return; } void cursor_click_enable(void) { return; } void cursor_click_disable(void) { return; } #endif