Example #1
0
/**
 * Initializes the game modes.
 */
static void init_modes(void)
{
    extern gamemode_t *mode_intro, *mode_game, *mode_pause, *mode_scores;

    mode_intro = mode_create("Intro", NULL, NULL, intro_draw, intro_key_handler);
    mode_scores = mode_create("Scores", scores_enter, NULL, scores_draw, scores_key_handler);
    mode_game = mode_create("Game", game_enter, game_leave, game_draw, game_key_handler);
    mode_pause = mode_create("Pause", pause_enter, NULL, pause_draw, pause_key_handler);
}
Example #2
0
File: Audio.cpp Project: uvbs/V8
CELTCodec::CELTCodec() {
    cmMode = NULL;
    RESOLVE(mode_create);
    RESOLVE(mode_destroy);
    RESOLVE(mode_info);

    RESOLVE(encoder_destroy);
    RESOLVE(encode_float);
    RESOLVE(encode);
    RESOLVE(encoder_ctl);

    RESOLVE(decoder_destroy);
    RESOLVE(decode_float);
    RESOLVE(decode);
    RESOLVE(decoder_ctl);

    RESOLVE(mode_create);
    RESOLVE(strerror);

    int error=0;
    cmMode = mode_create(SAMPLE_RATE, SAMPLE_RATE / SAMPLE_DIV, &error);
    if (!cmMode)
    {
        Assert(0);
        Trace("error:celt_mode_create:%s\n",strerror(error));
    }
}
Example #3
0
int main(int argc, char** argv)
{
	if (argc < 3) {
		show_help(argv[0]);

		return 1;
	}

	int result = 2;
	char* mode = argv[1];

	if        (strcmp(mode, "create") == 0) {
		result = mode_create(argc, argv);
	} else if (strcmp(mode, "info") == 0) {
		result = mode_info(argc, argv);
	} else if (strcmp(mode, "filter") == 0) {
		result = mode_filter(argc, argv);
	} else if (strcmp(mode, "merge") == 0) {
		result = mode_merge(argc, argv);
	}

	return 0;
}
int
main(int argc, char **argv)
{
	MY_INIT(argv[0]);

	if (get_options(&argc, &argv)) {
		goto err;
	}

	if (opt_mode == RUN_MODE_NONE) {
		msg("%s: either -c or -x must be specified.\n", my_progname);
		goto err;
	}

	/* Change the current directory if -C is specified */
	if (opt_directory && my_setwd(opt_directory, MYF(MY_WME))) {
		goto err;
	}

	if (opt_mode == RUN_MODE_CREATE && mode_create(argc, argv)) {
		goto err;
	} else if (opt_mode == RUN_MODE_EXTRACT && mode_extract(argc, argv)) {
		goto err;
	}

	my_cleanup_options(my_long_options);

	my_end(0);

	return EXIT_SUCCESS;
err:
	my_cleanup_options(my_long_options);

	my_end(0);

	exit(EXIT_FAILURE);
}
void MCStack::mode_copy(const MCStack& stack)
{
	mode_create();
}