1
2
3
4
5
6
7
8
9
10
11
|
// main.cpp: initialisation & main loop
#include "cube.h"
#import "DynamicEntity.h"
OF_APPLICATION_DELEGATE(Cube)
VARF(gamespeed, 10, 100, 1000, if (multiplayer()) gamespeed = 100);
VARP(minmillis, 0, 5, 1000);
|
>
|
1
2
3
4
5
6
7
8
9
10
11
12
|
// main.cpp: initialisation & main loop
#include "cube.h"
#import "Command.h"
#import "DynamicEntity.h"
OF_APPLICATION_DELEGATE(Cube)
VARF(gamespeed, 10, 100, 1000, if (multiplayer()) gamespeed = 100);
VARP(minmillis, 0, 5, 1000);
|
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
|
[msg appendFormat:@" (%s)\n", SDL_GetError()];
[Cube.sharedInstance showMessage:msg];
[OFApplication terminateWithStatus:1];
}
void
quit() // normal exit
{
[Cube.sharedInstance quit];
}
COMMAND(quit, ARG_NONE)
void
screenshot()
{
[Cube.sharedInstance screenshot];
}
COMMAND(screenshot, ARG_NONE)
|
<
|
<
>
|
<
<
|
<
|
<
|
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
|
[msg appendFormat:@" (%s)\n", SDL_GetError()];
[Cube.sharedInstance showMessage:msg];
[OFApplication terminateWithStatus:1];
}
// normal exit
COMMAND(quit, ARG_NONE, ^{
[Cube.sharedInstance quit];
})
COMMAND(screenshot, ARG_NONE, ^{
[Cube.sharedInstance screenshot];
})
|