Rev 2415 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2415 | Rev 2421 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | #include |
7 | #include |
8 | #include "sound.h" |
8 | #include "sound.h" |
9 | #include "fplay.h" |
9 | #include "fplay.h" |
10 | 10 | ||
Line -... | Line 11... | ||
- | 11 | #define CAPTION_HEIGHT 24 |
|
Line 11... | Line 12... | ||
11 | 12 | ||
12 | typedef struct |
13 | typedef struct |
13 | { |
14 | { |
14 | AVPicture picture; |
15 | AVPicture picture; |
Line 42... | Line 43... | ||
42 | 43 | ||
Line 43... | Line 44... | ||
43 | width = ctx->width; |
44 | width = ctx->width; |
44 | height = ctx->height; |
45 | height = ctx->height; |
Line -... | Line 46... | ||
- | 46 | ||
45 | 47 | ||
Line 46... | Line 48... | ||
46 | printf("w = %d h = %d\n\r", width, height); |
48 | printf("w = %d h = %d\n\r", width, height); |
Line 47... | Line 49... | ||
47 | 49 | ||
Line 229... | Line 231... | ||
229 | }; |
231 | }; |
230 | 232 | ||
Line 231... | Line 233... | ||
231 | if(fdelay > 10.0) |
233 | if(fdelay > 10.0) |
232 | { |
234 | { |
233 | delay( (uint32_t)(fdelay/10.0)); |
235 | // delay( (uint32_t)(fdelay/10.0)); |
- | 236 | yield(); |
|
- | 237 | return; |
|
234 | }; |
238 | }; |
Line 235... | Line 239... | ||
235 | 239 | ||
236 | main_render->draw(main_render, &frames[vfx].picture); |
240 | main_render->draw(main_render, &frames[vfx].picture); |
237 | frames[vfx].ready = 0; |
241 | frames[vfx].ready = 0; |
Line 399... | Line 403... | ||
399 | uint8_t state; |
403 | uint8_t state; |
400 | 404 | ||
Line 401... | Line 405... | ||
401 | 405 | ||
402 | right = win->w; |
406 | right = win->w; |
403 | bottom = win->h-29; |
407 | bottom = win->h-CAPTION_HEIGHT; |
Line 404... | Line 408... | ||
404 | render->win_state = win->win_state; |
408 | render->win_state = win->win_state; |
405 | 409 | ||
Line 433... | Line 437... | ||
433 | new_h = 64*render->ctx_height/render->ctx_width; |
437 | new_h = 64*render->ctx_height/render->ctx_width; |
434 | }; |
438 | }; |
435 | 439 | ||
Line 436... | Line 440... | ||
436 | render->win_width = win->w; |
440 | render->win_width = win->w; |
437 | render->win_height = win->h-29; |
441 | render->win_height = win->h-CAPTION_HEIGHT; |
438 | render_set_size(render, new_w, new_h); |
442 | render_set_size(render, new_w, new_h); |
439 | }; |
443 | }; |
Line 440... | Line 444... | ||
440 | 444 | ||
441 | void draw_hw_picture(render_t *render, AVPicture *picture) |
445 | void draw_hw_picture(render_t *render, AVPicture *picture) |
Line 494... | Line 498... | ||
494 | picture->linesize, 0, render->ctx_height, data, linesize); |
498 | picture->linesize, 0, render->ctx_height, data, linesize); |
495 | // printf("sws_scale\n"); |
499 | // printf("sws_scale\n"); |
496 | 500 | ||
Line 497... | Line 501... | ||
497 | blit_bitmap(bitmap, render->rcvideo.l, |
501 | blit_bitmap(bitmap, render->rcvideo.l, |
498 | 29+render->rcvideo.t, |
502 | CAPTION_HEIGHT+render->rcvideo.t, |
499 | render->rcvideo.r, render->rcvideo.b); |
503 | render->rcvideo.r, render->rcvideo.b); |
500 | // printf("blit_bitmap\n"); |
504 | // printf("blit_bitmap\n"); |
Line 501... | Line 505... | ||
501 | 505 | ||
Line 538... | Line 542... | ||
538 | sws_scale(cvt_ctx, (const uint8_t* const *)picture->data, |
542 | sws_scale(cvt_ctx, (const uint8_t* const *)picture->data, |
539 | picture->linesize, 0, render->ctx_height, data, linesize); |
543 | picture->linesize, 0, render->ctx_height, data, linesize); |
Line 540... | Line 544... | ||
540 | 544 | ||
541 | blit_bitmap(&render->bitmap[0], render->rcvideo.l, |
545 | blit_bitmap(&render->bitmap[0], render->rcvideo.l, |
542 | render->rcvideo.t+29, |
546 | render->rcvideo.t+CAPTION_HEIGHT, |
543 | render->rcvideo.r, render->rcvideo.b); |
547 | render->rcvideo.r, render->rcvideo.b); |
Line 544... | Line 548... | ||
544 | } |
548 | } |
545 | 549 | ||
546 | void render_draw_client(render_t *render) |
550 | void render_draw_client(render_t *render) |
547 | { |
551 | { |
548 | if(render->win_state == MINIMIZED || |
552 | if(render->win_state == MINIMIZED || |
Line 549... | Line 553... | ||
549 | render->win_state == ROLLED) |
553 | render->win_state == ROLLED) |
550 | return; |
554 | return; |
551 | 555 | ||
552 | if(render->layout & HAS_TOP) |
556 | if(render->layout & HAS_TOP) |
553 | draw_bar(0, 29, render->win_width, |
557 | draw_bar(0, CAPTION_HEIGHT, render->win_width, |
554 | render->rctop.b, 0); |
558 | render->rctop.b, 0); |
555 | if(render->layout & HAS_LEFT) |
559 | if(render->layout & HAS_LEFT) |
556 | draw_bar(0, render->rcvideo.t+29, render->rcleft.r, |
560 | draw_bar(0, render->rcvideo.t+CAPTION_HEIGHT, render->rcleft.r, |
557 | render->rcvideo.b, 0); |
561 | render->rcvideo.b, 0); |
558 | if(render->layout & HAS_RIGHT) |
562 | if(render->layout & HAS_RIGHT) |
559 | draw_bar(render->rcright.l, render->rcvideo.t+29, |
563 | draw_bar(render->rcright.l, render->rcvideo.t+CAPTION_HEIGHT, |
560 | render->rcright.r, render->rcvideo.b, 0); |
564 | render->rcright.r, render->rcvideo.b, 0); |
561 | if(render->layout & HAS_BOTTOM) |
565 | if(render->layout & HAS_BOTTOM) |
Line 562... | Line -... | ||
562 | draw_bar(0, render->rcbottom.t+29, |
- | |
563 | render->win_width, render->rcbottom.b, 0); |
- |