Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Test/test_render/viewerSDL.cpp @ 397:a4f690f44842
delete manager (in kernel/ppe/TaskManager.h)
don't move.
author | game@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Sun, 20 Sep 2009 18:55:26 +0900 |
parents | 5ffee529dc59 |
children |
comparison
equal
deleted
inserted
replaced
396:d1f1e27d0a12 | 397:a4f690f44842 |
---|---|
5 extern void post2runLoop(void *); | 5 extern void post2runLoop(void *); |
6 | 6 |
7 extern | 7 extern |
8 | 8 |
9 void | 9 void |
10 ViewerSDL::video_init() | 10 ViewerSDL::video_init(TaskManager *manager) |
11 { | 11 { |
12 Uint32 sdl_flag = default_sdl_flag | SDL_INIT_VIDEO; | 12 Uint32 sdl_flag = default_sdl_flag | SDL_INIT_VIDEO; |
13 Uint32 *p; | 13 Uint32 *p; |
14 | 14 |
15 if (SDL_Init(sdl_flag) < 0) { | 15 if (SDL_Init(sdl_flag) < 0) { |
40 //bzero(pixels, sizeof(int)*width*height); | 40 //bzero(pixels, sizeof(int)*width*height); |
41 SDL_FillRect(screen,NULL,SDL_MapRGB(screen->format,0,0,0)); | 41 SDL_FillRect(screen,NULL,SDL_MapRGB(screen->format,0,0,0)); |
42 } | 42 } |
43 | 43 |
44 void | 44 void |
45 ViewerSDL::run_loop(void) | 45 ViewerSDL::run_loop(HTaskPtr task_next) |
46 { | 46 { |
47 SDL_BlitSurface(bitmap, NULL, screen, NULL); | 47 SDL_BlitSurface(bitmap, NULL, screen, NULL); |
48 SDL_UpdateRect(screen, 0, 0, 0, 0); | 48 SDL_UpdateRect(screen, 0, 0, 0, 0); |
49 | 49 |
50 Viewer::run_loop(); | 50 Viewer::run_loop(task_next); |
51 } | 51 } |
52 | 52 |
53 void | 53 void |
54 ViewerSDL::run_finish(void) | 54 ViewerSDL::run_finish() |
55 { | 55 { |
56 free(bitmap->pixels); | 56 free(bitmap->pixels); |
57 SDL_FreeSurface(bitmap); | 57 SDL_FreeSurface(bitmap); |
58 | 58 |
59 Viewer::run_finish(); | 59 Viewer::run_finish(); |