Subversion Repositories Kolibri OS

Rev

Rev 5260 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5260 Rev 5324
Line 263... Line 263...
263
    
263
    
Line 264... Line -...
264
    
-
 
265
 
-
 
266
    void rskos_draw_area(int x, int y, int w, int h, int k_scale, unsigned char *data, unsigned char *scaled_buffer, int image_format) {
-
 
267
 
-
 
268
//        unsigned char *scaled_buffer = malloc(w*k_scale*h*k_scale*3);
-
 
269
 
264
    
270
 
265
 
271
//        if (scaled_buffer != NULL) {
266
    void rskos_draw_area(int x, int y, int w, int h, int k_scale, unsigned char *data, unsigned char *scaled_buffer, int image_format) {
272
 
267
 
273
            int i, j;
268
        int i, j;
274
            
269
        
275
            for (i = 0; i < h*k_scale; i++) {
270
        for (i = 0; i < h*k_scale; i++) {
276
                for (j = 0; j < w*k_scale; j++) {
-
 
277
                    scaled_buffer[ (i*w*k_scale + j)*3 + 0] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 0];
271
            for (j = 0; j < w*k_scale; j++) {
-
 
272
                scaled_buffer[ (i*w*k_scale + j)*3 + 0] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 0];
Line 278... Line 273...
278
                    scaled_buffer[ (i*w*k_scale + j)*3 + 1] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 1];
273
                scaled_buffer[ (i*w*k_scale + j)*3 + 1] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 1];
279
                    scaled_buffer[ (i*w*k_scale + j)*3 + 2] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 2];
-
 
280
                };
-
 
281
            };
-
 
282
 
-
 
283
            kol_paint_image(0, 0, w*k_scale, h*k_scale, scaled_buffer);
-
 
284
//        }
-
 
285
//        else {
-
 
286
//            //kol_paint_image_pal(0, 0, w, h, data, &image_format)
-
 
287
//            h/=4;
-
 
288
//            asm volatile ("int $0x40"::"a"(65), "b"(data), "c"(w*65536+h), "d"(0*65536+0), "D"(0), "S"(24) );
-
 
289
////            asm volatile ("int $0x40"::"a"(7), "c"(w*65536+h), "d"(x*65536+y), "b"(data));
-
 
Line 290... Line 274...
290
//        };
274
                scaled_buffer[ (i*w*k_scale + j)*3 + 2] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 2];
Line 291... Line 275...
291
//        
275
            };