その他、テスト

■main関数でdsFunctionsの関数を何もセットしないで、

dsSimulationLoopを
呼び出した場合、どうなるのか(Windows)

dsFunctions fn;
fn.version = DS_VERSION;
fn.start   = NULL;
fn.step    = NULL;
fn.command = NULL;
fn.stop    = 0;
fn.path_to_textures = "../../drawstuff/textures";

dsSimulationLoop( argc, argv, 320, 240, &fn );

空が流れるのが表示され、地面も表示、特に問題は起こらないっぽい。








■メインのループの関数切り替えてもOK?

 >OKっぽい、きちんと00から01に切り替わる

dsFunctions g_fn;

static void loop_01( int pause )
{
printf("01");
return;
}

static void loop_00( int pause )
{
g_fn.step    = loop_01;
printf("01");
return;
}


int main( int argc, char* argv[] )
{

g_fn.version = DS_VERSION;
g_fn.start   = NULL;
g_fn.step    = loop_00;
g_fn.command = NULL;
g_fn.stop    = 0;
g_fn.path_to_textures = "../../drawstuff/textures";

dsSimulationLoop( argc, argv, 320, 240, &g_fn );

}
最終更新:2010年08月11日 07:58