Subversion Repositories Kolibri OS

Rev

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

Rev 5235 Rev 5239
Line 33... Line 33...
33
    
33
    
Line 34... Line 34...
34
    return rs_app.app_time;
34
    return rs_app.app_time;
Line 35... Line 35...
35
    
35
    
Line -... Line 36...
-
 
36
};
Line 36... Line 37...
36
};
37
 
37
 
38
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) {
38
void rskos_draw_area(int x, int y, int w, int h, int k_scale, unsigned char *data, unsigned char *scaled_buffer) {
39
    
39
 
40
    int bpp = image_format == RSKOS_BGR ? 3 : 4;
40
 
41
 
41
    int i, j;
42
//    int i, j;
42
    
43
//    
43
    for (i = 0; i < h*k_scale; i++) {
44
//    for (i = 0; i < h*k_scale; i++) {
44
        for (j = 0; j < w*k_scale; j++) {
45
//        for (j = 0; j < w*k_scale; j++) {
Line 63... Line 64...
63
	
64
	
-
 
65
	
Line 64... Line 66...
64
	
66
	
Line 65... Line 67...
65
	
67
	
Line 84... Line 86...
84
    
86
    
Line 85... Line -...
85
    
-
 
86
 
-
 
87
    rsDoSwapBuffers();
-
 
88
 
-
 
89
    // swap buffers (??)
87
    
Line 90... Line 88...
90
    
88
 
91
    
89
    rsDoSwapBuffers();
Line 148... Line 146...
148
 
146
 
149
    unsigned int rskos_get_time() {
147
    unsigned int rskos_get_time() {
150
        return 1;
148
        return 1;
Line 151... Line 149...
151
    };
149
    };
Line 152... Line 150...
152
 
150
 
-
 
151
    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) {
-
 
152
 
-
 
153
//        unsigned char *scaled_buffer = malloc(w*k_scale*h*k_scale*3);
-
 
154
 
153
    void rskos_draw_area(int x, int y, int w, int h, int k_scale, unsigned char *data, unsigned char *scaled_buffer) {
155
 
Line 154... Line 156...
154
 
156
//        if (scaled_buffer != NULL) {
155
//        unsigned char *scaled_buffer = malloc(w*k_scale*h*k_scale*3);
157
 
156
        int i, j;
158
            int i, j;
Line 162... Line 164...
162
                scaled_buffer[ (i*w*k_scale + j)*3 + 2] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 2];
164
                    scaled_buffer[ (i*w*k_scale + j)*3 + 2] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 2];
163
            };
165
                };
164
        };
166
            };
Line 165... Line 167...
165
 
167
 
-
 
168
            kol_paint_image(0, 0, w*k_scale, h*k_scale, scaled_buffer);
-
 
169
//        }
-
 
170
//        else {
-
 
171
//            //kol_paint_image_pal(0, 0, w, h, data, &image_format)
-
 
172
//            h/=4;
-
 
173
//            asm volatile ("int $0x40"::"a"(65), "b"(data), "c"(w*65536+h), "d"(0*65536+0), "D"(0), "S"(24) );
-
 
174
////            asm volatile ("int $0x40"::"a"(7), "c"(w*65536+h), "d"(x*65536+y), "b"(data));
166
        kol_paint_image(0, 0, w*k_scale, h*k_scale, scaled_buffer);
175
//        };
167
        
176
//        
Line 168... Line 177...
168
//        free(image_data);
177
////        free(image_data);