Пример #1
0
AS3_Val destroyScene( void* self, AS3_Val args )
{
	Scene *scene = AS3_PtrValue(args);

	scene_destroy(&scene);

	return 0;
}
Пример #2
0
void game_destroy(Game* game) {
    timer_destroy(game->timer);
    scene_destroy(game->scene);

    SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "Destroy Vertex Arrays.\n");
    glDeleteVertexArrays(1, &game->vao_id);
    SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "Destroy GL context.\n");
    glcontext_destroy(game->gl);

    window_destroy(game->window);
    free(game);
}
Пример #3
0
void game_reload(Game* game, const char* tmp_path) {
    scene_save(game->scene, tmp_path);
    scene_destroy(game->scene);
    game->scene = scene_create();
    scene_load(game->scene, tmp_path);
}