Exemple #1
0
void D_DoomMain(void)
{
	BigNumFont = LoadAResource(rBIGNUMB);	/* Cache the large numeric font (Needed always) */
	R_Init();			/* Init refresh system */
	P_Init();			/* Init main code */
	O_Init();			/* Init controls */
	for (;;) {
		RunTitle();			/* Show the title page */
		RunDemo(rDEMO1);	/* Run the first demo */
		RunCredits();		/* Show the credits page */
		RunDemo(rDEMO2);	/* Run the second demo */
	}
}
Exemple #2
0
int main(int argc, char *argv[]) {

    printf("\n");

    if (argc < 2) {
        printf("not enough arguments\n\n");
        return 1;
    }

    printf("STARTING MATLAB ENGINE\n\n");
    Engine *ep = engOpen("");
    if (ep == NULL) {
        printf("unable to start MATLAB engine\n\n");
        return 1;
    }
    engSetVisible(ep, false);
    char out[BUFSIZE];
    engOutputBuffer(ep, out, BUFSIZE);

    printf("SETTING PATH TO CNS\n\n");
    Eval(ep, out, "run(fullfile('%s', 'cns_path'));", argv[1]);

    bool ok = RunDemo(ep, out);

    printf("PRESS RETURN TO CONTINUE: ");
    fgets(out, BUFSIZE, stdin);
    printf("\n");

    printf("CLOSING MATLAB ENGINE\n\n");
    Eval(ep, out, "close all;");
    engClose(ep);

    return ok ? 0 : 1;

}
Exemple #3
0
///////////////////////////////////////////////////////////////	
//	Do Demo	
///////////////////////////////////////////////////////////////	
void	DoDemo(void)	
{	
	
	switch(DEMOm)	
	{	
		case	0:	
			if(TONKS==0)	
				LEVEL=0;	
			else	
				LEVEL=20;	
	
			DemoSetup();	
			break;	
		case	1:	
			RunDemo();	
			break;	
		case	2:	
			NextDemo();	
			break;	
	}	
}