29.01.2012, 11:01 | #1 (permalink) | |
Новичок
Регистрация: 29.01.2012
Сообщений: 2
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
Репутация: 10
|
Курсор и изображение
Это изображение. Цитата:
|
|
29.01.2012, 11:01 | |
Helpmaster
Member
Регистрация: 08.03.2016
Сообщений: 0
|
По содержанию данные темы очень схожи с вашей Курсор дёргается Пропадает изображение. Тормозит курсор мышки |
29.01.2012, 11:01 | #2 (permalink) |
Новичок
Регистрация: 29.01.2012
Сообщений: 2
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
Репутация: 10
|
Это курсор
#include<stdio.h> #include<dos.h> #include<conio.h> #include<stdlib.h> #include<mouse.h> void ms_tform(int tip,int ms1, int ms2); MOUSE_STATE*ms_query(MOUSE_STATE*ms); void ms_setcr(int x, int y); union REGS reg; int ms_init(int*kbt) { union REGS reg; reg.x.ax=0; int86(0x33,®,®); *kbt=reg.x.bx; return(reg.x.ax); } void ms_on (void) { union REGS reg; reg.x.ax=1; int86(0x33,®,®); } void ms_off (void) { union REGS reg; reg.x.ax=2; int86(0x33,®,®); } void ms_tform(int type, int msk1,int msk2) { union REGS reg; reg.x.ax=0xA; reg.x.bx=type; reg.x.cx=msk1; reg.x.dx=msk2; int86(0x33,®,®); } void ms_setcr(int x, int y) { union REGS reg; reg.x.ax=4; reg.x.cx=x; reg.x.dx=y; int86(0x33,®,®); } MOUSE_STATE*ms_query(MOUSE_STATE*ms) { union REGS reg; reg.x.ax=3; int86(0x33,®,®); ms->bottoms=reg.x.bx; ms->x=reg.x.cx; ms->y=reg.x.dx; return(ms); } main() { int botm, lp,px,py; MOUSE_STATE state; textmode(3); textbackground(0); textcolor(14); clrscr(); if(!ms_init(&botm)) { puts("Mouse is off."); exit(-1); } label5: ms_on(); ms_tform(0,0x30E0,0xCF1F); ms_setcr(0,0); gotoxy(2,9); cprintf("Blue"); gotoxy(2,10); cprintf("Green"); gotoxy(2,11); cprintf("Red"); gotoxy(2,12); cprintf("White"); gotoxy(2,14); cprintf("EXIT"); lp=0; while(!0) { ms_query(&state); px=state.x; py=state.y; lp=state.bottoms; if(lp==1) { ms_off(); gotoxy(10,1); cprintf("x=%-5d y=%-5d",px,py); if(px>0*8 && px<5*8 && py>56 && py<72) goto label1; if(px>0*8 && px<5*8 && py>64 && py<80) goto label2; if(px>0*8 && px<5*8 && py>72 && py<88) goto label3; if(px>0*8 && px<5*8 && py>80 && py<96) goto label4; if(px>0*8 && px<5*8 && py>96 && py<112) goto label6; ms_on(); lp=0; } } label1:clrscr(); textbackground(1); gotoxy(36,12); cprintf(" "); gotoxy(36,13); cprintf(" "); gotoxy(36,14); cprintf(" "); gotoxy(36,15); cprintf(" "); sound(130.85); delay(1000); nosound(); textmode(-1); ms_off(); clrscr(); goto label5; label2:clrscr(); textbackground(2); gotoxy(36,12); cprintf(" "); gotoxy(36,13); cprintf(" "); gotoxy(36,14); cprintf(" "); gotoxy(36,15); cprintf(" "); sound(130.85); delay(1000); nosound(); textmode(-1); ms_off(); clrscr(); goto label5; label3:clrscr(); textbackground(4); gotoxy(36,12); cprintf(" "); gotoxy(36,13); cprintf(" "); gotoxy(36,14); cprintf(" "); gotoxy(36,15); cprintf(" "); sound(130.85); delay(1000); nosound(); textmode(-1); ms_off(); clrscr(); goto label5; label4:clrscr(); textbackground(7); gotoxy(36,12); cprintf(" "); gotoxy(36,13); cprintf(" "); gotoxy(36,14); cprintf(" "); gotoxy(36,15); cprintf(" "); sound(130.85); delay(1000); nosound(); textmode(-1); ms_off(); clrscr(); goto label5; label6:clrscr(); gotoxy(36,12); cprintf("Thank you!!!"); delay(1000); ms_off(); clrscr(); return(0); } |
Ads | |
Member
Регистрация: 31.10.2006
Сообщений: 40200
Записей в дневнике: 0
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
Репутация: 55070
|
|
|