break;
case GAME_MODE_PSEUDO_TYPENAME:
- HandleTypeName(0, KSYM_Return);
+ HandleTypeName(KSYM_Return);
break;
case GAME_MODE_LEVELS:
switch (game_status)
{
case GAME_MODE_PSEUDO_TYPENAME:
- HandleTypeName(0, key);
+ HandleTypeName(key);
break;
case GAME_MODE_TITLE:
static void DrawChooseLevelNr(void);
static void DrawInfoScreen(void);
static void DrawSetupScreen(void);
+static void DrawTypeName(void);
static void DrawInfoScreen_NotAvailable(char *, char *);
static void DrawInfoScreen_HelpAnim(int, int, boolean);
{
SetGameStatus(GAME_MODE_PSEUDO_TYPENAME);
- HandleTypeName(strlen(setup.player_name), 0);
+ DrawTypeName();
}
}
else if (pos == MAIN_CONTROL_LEVELS)
// type name functions
// ============================================================================
-void HandleTypeName(int newxpos, Key key)
+static void HandleTypeNameExt(boolean initialize, Key key)
{
static char last_player_name[MAX_PLAYER_NAME_LEN + 1];
struct MainControlInfo *mci = getMainControlInfo(MAIN_CONTROL_NAME);
DrawBackgroundForFont(startx,starty, pos->width, pos->height, font_active_nr);
- if (newxpos)
+ if (initialize)
{
strcpy(last_player_name, setup.player_name);
- xpos = newxpos;
+ xpos = strlen(setup.player_name);
StartTextInput(startx, starty, pos->width, pos->height);
}
}
}
+static void DrawTypeName(void)
+{
+ HandleTypeNameExt(TRUE, 0);
+}
+
+void HandleTypeName(Key key)
+{
+ HandleTypeNameExt(FALSE, key);
+}
+
// ============================================================================
// tree menu functions
void HandleHallOfFame(int, int, int, int, int);
void HandleInfoScreen(int, int, int, int, int);
void HandleSetupScreen(int, int, int, int, int);
-void HandleTypeName(int, Key);
+void HandleTypeName(Key);
void HandleGameActions(void);
void CreateScreenGadgets(void);