From e944bfc31a06650ebeda4a6bbed08fb965e58560 Mon Sep 17 00:00:00 2001 From: "Rustem Gimadutdinov (rgimad)" Date: Wed, 7 Feb 2024 18:37:23 +0000 Subject: [PATCH] libc.obj: added _ksys_blitter (sysfn73), add forgotten static in libimg.h git-svn-id: svn://kolibrios.org@9973 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../trunk/libc.obj/include/clayer/libimg.h | 2 +- .../ktcc/trunk/libc.obj/include/sys/ksys.h | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/programs/develop/ktcc/trunk/libc.obj/include/clayer/libimg.h b/programs/develop/ktcc/trunk/libc.obj/include/clayer/libimg.h index f8a8c4de6a..71df4a420d 100644 --- a/programs/develop/ktcc/trunk/libc.obj/include/clayer/libimg.h +++ b/programs/develop/ktcc/trunk/libc.obj/include/clayer/libimg.h @@ -115,7 +115,7 @@ DLLAPI Image* __stdcall img_convert(Image *src, Image *dst, uint32_t dst_type, u DLLAPI Image* __stdcall img_resize_data(Image *src, uint32_t width, uint32_t height); DLLAPI Image* __stdcall img_scale(Image* src, uint32_t crop_x, uint32_t crop_y, uint32_t crop_width, uint32_t crop_height, Image* dst, uint32_t scale_type, uint32_t inter, uint32_t new_width, uint32_t new_height); -void img_fill_color(Image* img, uint32_t width, uint32_t height, uint32_t color){ +static void img_fill_color(Image* img, uint32_t width, uint32_t height, uint32_t color){ for (uint32_t i = 0; i < width*height; i++) { img->Data[i] = color; } diff --git a/programs/develop/ktcc/trunk/libc.obj/include/sys/ksys.h b/programs/develop/ktcc/trunk/libc.obj/include/sys/ksys.h index 8fa44cfbfd..28971fc38b 100644 --- a/programs/develop/ktcc/trunk/libc.obj/include/sys/ksys.h +++ b/programs/develop/ktcc/trunk/libc.obj/include/sys/ksys.h @@ -201,6 +201,19 @@ typedef union { }; } ksys_signal_info_t; +typedef struct { + int32_t dst_x; + int32_t dst_y; + uint32_t dst_w; + uint32_t dst_h; + int32_t src_x; + int32_t src_y; + uint32_t src_w; + uint32_t src_h; + uint32_t depth; + uint32_t pitch; +} ksys_blitter_params_t; + #pragma pack(pop) typedef rgb_t ksys_bitmap_t; @@ -1615,6 +1628,19 @@ KOSAPI void _ksys_set_window_title(const char* title) #define _ksys_clear_window_title() _ksys_set_window_title(NULL) +/*============= Function 73 - blitter =============*/ + +KOSAPI void _ksys_blitter(uint32_t flags, ksys_blitter_params_t *params) +{ + int res; + asm_inline( + "int $0x40" + : "=a"(res) + : "a"(73), "b"(flags), "c"(params) + : "memory"); + (void)res; +} + /*============= Function 77, subfunction 0 - create futex object =============*/ KOSAPI uint32_t _ksys_futex_create(int* futex_ctrl)