Subversion Repositories Kolibri OS

Rev

Rev 7475 | Rev 8436 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7475 Rev 7624
Line 434... Line 434...
434
int kol_clip_set(int n, char buffer[])
434
int kol_clip_set(int n, char buffer[])
435
{
435
{
436
asm volatile ("int $0x40"::"a"(54), "b"(2), "c"(n), "d"(buffer));
436
asm volatile ("int $0x40"::"a"(54), "b"(2), "c"(n), "d"(buffer));
437
}
437
}
Line 438... Line -...
438
 
-
 
439
 
438
 
440
int kos_random(int num) 
439
int kos_random(int num) 
441
{
440
{
442
	srand(kol_time_tick());
441
	srand(kol_time_tick());
443
	return rand() % num;
442
	return rand() % num;
Line -... Line 443...
-
 
443
}
-
 
444
 
-
 
445
int kos_get_mouse_wheels(void)
-
 
446
{
-
 
447
    int val;
-
 
448
    asm ("int $0x40":"=a"(val):"a"(37),"b"(7));
-
 
449
    return val;
-
 
450
};
-
 
451
 
-
 
452
 
-
 
453
struct blit_call
-
 
454
{
-
 
455
   int dstx;       
-
 
456
   int dsty;
-
 
457
   int w;
-
 
458
   int h;
-
 
459
 
-
 
460
   int srcx;
-
 
461
   int srcy;
-
 
462
   int srcw;
-
 
463
   int srch;
-
 
464
 
-
 
465
   unsigned char *d;
-
 
466
   int   stride;
-
 
467
};
-
 
468
 
-
 
469
void kos_blit(int dstx, int dsty, int w, int h, int srcx, 
-
 
470
	int srcy,int srcw, int srch, int stride, char *d)
-
 
471
{
-
 
472
	struct blit_call image;
-
 
473
	image.dstx=dstx;
-
 
474
	image.dsty=dsty;
-
 
475
	image.w=w;
-
 
476
	image.h=h;
-
 
477
	image.srcx=srcx;
-
 
478
	image.srcy=srcy;
-
 
479
	image.srcw=srcw;
-
 
480
	image.srch=srch;
-
 
481
	image.stride=stride;
-
 
482
	image.d=d;
-
 
483
	asm ("int $0x40"::"a"(73),"b"(0),"c"(&image));