+static void SetGadgetState(struct GadgetInfo *gi, boolean state)
+{
+ if (gi == NULL)
+ return;
+
+ gi->checked = state;
+}
+
+static void RedrawSoundButtonGadget(int id)
+{
+ int id2 = (id == SOUND_CTRL_ID_MUSIC ? SOUND_CTRL_ID_PANEL_MUSIC :
+ id == SOUND_CTRL_ID_LOOPS ? SOUND_CTRL_ID_PANEL_LOOPS :
+ id == SOUND_CTRL_ID_SIMPLE ? SOUND_CTRL_ID_PANEL_SIMPLE :
+ id == SOUND_CTRL_ID_PANEL_MUSIC ? SOUND_CTRL_ID_MUSIC :
+ id == SOUND_CTRL_ID_PANEL_LOOPS ? SOUND_CTRL_ID_LOOPS :
+ id == SOUND_CTRL_ID_PANEL_SIMPLE ? SOUND_CTRL_ID_SIMPLE :
+ id);
+
+ SetGadgetState(game_gadget[id2], *gamebutton_info[id2].setup_value);
+ RedrawGadget(game_gadget[id2]);
+}
+
+void MapGameButtons(void)
+{
+ MapGameButtonsExt(FALSE);
+}
+
+void UnmapGameButtons(void)
+{
+ UnmapGameButtonsExt(FALSE);
+}
+
+void RedrawGameButtons(void)
+{
+ RedrawGameButtonsExt(FALSE);
+}
+
+void MapGameButtonsOnTape(void)
+{
+ MapGameButtonsExt(TRUE);
+}
+
+void UnmapGameButtonsOnTape(void)
+{
+ UnmapGameButtonsExt(TRUE);
+}
+
+void RedrawGameButtonsOnTape(void)
+{
+ RedrawGameButtonsExt(TRUE);
+}
+
+static void GameUndoRedoExt(void)