Fix for initialization of scalos preferences library. Library is now loaded only...
[AROS-Contrib.git] / Games / Bomber / BomberSetup.c
blob52e96d1a686787140b1bd6a758766025fcca494d
1 int WhichPlayer, WhichKey;
3 //Initialize the menu
4 void InitSetup ()
6 //Draw to front buffer
7 TargetData = MainBitmapData;
9 //Clear buffer
10 memset ((char *)TargetData, 0, WIDTH * HEIGHT);
12 //Display title
13 Blit (35, 32, 0, 80, 203, 29);
15 FlushKeys ();
16 WhichPlayer = 0;
17 WhichKey = 0;
20 //Display the number of players
21 void SetupDisplay ()
23 //Display "player"
24 Blit (96, 100, 64, 108, 48, 15);
26 //Display number
27 Blit (160, 100, WhichPlayer * 8, 168, 8, 15);
29 //Display directive
30 Blit (60, 132, 64, 123 + WhichKey * 15, 152, 15);
33 //Do the menu stuff
34 void SetupLoop ()
36 int Key = getch ();
38 //Display instructions
39 SetupDisplay ();
41 //Add a new key
42 if (Key != -1) {
43 ChosenKeys [WhichPlayer * 5 + WhichKey] = Key;
44 //Move on to next one
45 WhichKey++;
46 if (WhichKey == 5) {
47 WhichKey = 0;
48 WhichPlayer++;
52 //Exit if we're here
53 if (WhichPlayer == 3) {
54 SaveKeys ();
55 State = IN_MENU;
56 InitMenu ();