From: "Gorden" Newsgroups: comp.os.msdos.djgpp Subject: about graphics mode mouse cursor Date: Mon, 11 Dec 2000 14:37:18 +0800 Organization: DCI HiNet Lines: 60 Message-ID: <911sj3$lub@netnews.hinet.net> NNTP-Posting-Host: 210.242.228.137 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com /* how can changce this function for djgpp */ /* I used this function on Turbo C is ok */ void mouse_cursor(int x, int y, int *mask) int mask[32] = { 0xffff, 0xffff, 0xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0Xffff, 0X0000, 0X0004, 0X0019, 0X0072, 0X01EB, 0X01CC, 0X019C, 0X01FC, 0X7FFC, 0X4780, 0X4980, 0X5280, 0X6480, 0X0880, 0X0F80, 0X0000 }; void set_video_mode(int mode) { union REGS r; r.h.ah = 0x00; r.h.al = mode; int86(0x10, &r, &r); } /* how can changce this function for djgpp */ void mouse_cursor(int x, int y, int *mask) /* how can changce this function for djgpp */ { union REGS r; struct SREGS s; r.x.ax = 9; r.x.bx = x; r.x.cx = y; r.x.dx = FP_OFF(mask); s.es = FP_SEG(mask); int86x(0x33, &r, &r, &s); } int main(void) { set_video_mode(0x12); /* 640x480x16 */ mouse_detect(); mouse_show(); mouse_cursor(4, 4, mask); while (!kbhit()) set_video_mode(0x03); return 0; }