Mercurial > hg > Game > Cerium
view Renderer/DataPack/DataPackEngine.cpp @ 62:b03e4cb64302
*** empty log message ***
author | gongo |
---|---|
date | Sat, 16 Feb 2008 21:42:17 +0900 |
parents | df32980116bd |
children |
line wrap: on
line source
void DataPackEngine::init(int width, int height, int bpp) { if(SDL_Init( SDL_INIT_VIDEO ) < 0) { cout << "Couldn't initialize SDL:" << SDL_GetError() << endl; exit(1); } // etc... } TaskDepend DataPackEngine::update_all(SceneGraph* next, SceneGraph* now, TaskDepend wait) { SceneGraph *t, *nt; t = now; nt = next; SceneGraphPack *nt_pack = nt->data_pack(); SceneGraphPack *t_pack; Task* t_task = now->get_task(); for (t_pack = now->data_pack(); t_pack < not->data_pack;) { t_task->update(t_pack, nt_pack); t_pack = t_pack->next(); nt_pack = nt_pack->next(); } } TaskDepend DataPackEngin::draw_all(SceneGraph* now, TaskDepend wait) { SceneGraph *t, *nt; t = now; nt = next; SceneGraphPack *t_pack; Task* t_task = now->get_task(); for (t_pack = now->data_pack(); t_pack < now->data_pack;) { t_task->draw(t_pack, nt_pack); t_pack = t_pack->next(); } }