- ClearWindow();
- DrawText(SX + 16, SY + 6*32, " JOYSTICK NOT ", FS_BIG, FC_YELLOW);
- DrawText(SX, SY + 7*32, " AVAILABLE ", FS_BIG, FC_YELLOW);
- BackToFront();
- Delay(2000);
- DrawSetupInputScreen();
+void CalibrateJoystick(int player_nr)
+{
+ if (!CalibrateJoystickMain(player_nr))
+ {
+ ClearWindow();
+
+ DrawText(SX + 16, SY + 6*32, " JOYSTICK NOT ", FS_BIG, FC_YELLOW);
+ DrawText(SX, SY + 7*32, " AVAILABLE ", FS_BIG, FC_YELLOW);
+ BackToFront();
+ Delay(2000); /* show error message for two seconds */
+ }
+}
+
+void DrawSetupScreen()
+{
+ DeactivateJoystick();
+
+ if (setup_mode == SETUP_MODE_INPUT)
+ DrawSetupScreen_Input();
+ else if (setup_mode == SETUP_MODE_CHOOSE_GRAPHICS)
+ DrawChooseTree(&artwork.gfx_current);
+ else if (setup_mode == SETUP_MODE_CHOOSE_SOUNDS)
+ DrawChooseTree(&artwork.snd_current);
+ else if (setup_mode == SETUP_MODE_CHOOSE_MUSIC)
+ DrawChooseTree(&artwork.mus_current);
+ else
+ DrawSetupScreen_Generic();
+}
+
+void HandleSetupScreen(int mx, int my, int dx, int dy, int button)
+{
+ if (setup_mode == SETUP_MODE_INPUT)
+ HandleSetupScreen_Input(mx, my, dx, dy, button);
+ else if (setup_mode == SETUP_MODE_CHOOSE_GRAPHICS)
+ HandleChooseTree(mx, my, dx, dy, button, &artwork.gfx_current);
+ else if (setup_mode == SETUP_MODE_CHOOSE_SOUNDS)
+ HandleChooseTree(mx, my, dx, dy, button, &artwork.snd_current);
+ else if (setup_mode == SETUP_MODE_CHOOSE_MUSIC)
+ HandleChooseTree(mx, my, dx, dy, button, &artwork.mus_current);
+ else
+ HandleSetupScreen_Generic(mx, my, dx, dy, button);