=== base.h ===
enum
{
  TITLE,
  PLAY,
};
extern void chg_state(int);
=== base.c ===
#include "base.h"
static int state = TITLE;
static int before_state = g_state;
int main(void)
{
  if(state == TITLE){ title(); }
  else if(state == PLAY){ play(); }

  return 0;
}
void chg_state(int next_state)
{
  before_state = g_state;
  state = next_state;
}
=== title.c ===
#include "base.h"
void titile(void)
{
  if( ... ){
    chg_state(PLAY);
  }
}