sub InitializeTempCommonData {
  if(!IsCommonDataAreaExists("temp")){
    CreateCommonDataArea("temp");
  }
}

function SetGameSpeed(speed){
  SetCommonDataEx("temp", "game speed", floor(speed));
}

function GetGameSpeed {
  return GetCommonDataDefaultEx("temp", "game speed", 0);
}

function SetPlayerEnabled(bool){
  SetCommonDataEx("temp", "player enabled", bool);
}

function GetPlayerEnabled {
  return GetCommonDataDefaultEx("temp", "player enabled", true);
}

function SetCameraDeleteArea(left, top, right, bottom){
  SetCommonDataEx("temp", "camera delete area", [left, top, right, bottom]);
}

function GetCameraDeleteArea {
  return GetCommonDataDefaultEx("temp", "camera delete area", [-1, -1, -1, -1]);
}

function SetShotDeleteEffectPositions(array) {
  SetCommonDataEx("temp", "delete effect pos", array);
}

function GetShotDeleteEffectPositions {
  return GetCommonDataDefaultEx("temp", "delete effect pos", []);
}

function SetPictureScore(score){
  SetCommonDataEx("temp", "picture score", score);
}

function GetPictureScore {
  return GetCommonDataDefaultEx("temp", "picture score", 0);
}

function SetCurrentPicture(num){
  SetCommonDataEx("temp", "current picture", num);
}

function GetCurrentPicture {
  return GetCommonDataDefaultEx("temp", "current picture", 0);
}

function SetTargetShotCount(num){
  SetCommonDataEx("temp", "target shot count", num);
}

function GetTargetShotCount {
  return GetCommonDataDefaultEx("temp", "target shot count", 10);
}