/*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2010 Parallel Realities
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
bulletsHit[i] = bulletsFired[i] = 0;
}
- strncpy(mapName, "data/grasslands1", sizeof mapName);
- strncpy(stageName, "Grasslands", sizeof stageName);
+ strlcpy(mapName, "data/grasslands1", sizeof mapName);
+ strlcpy(stageName, "Grasslands", sizeof stageName);
continuesUsed = 0;
levelsStarted = 0;
checkPointY = (int)y;
}
-void Game::getCheckPoint(float *x, float *y)
+void Game::getCheckPoint(float *x, float *y) const
{
*x = checkPointX;
*y = checkPointY;
return 0;
}
-int Game::getTotalBulletsFired()
+int Game::getTotalBulletsFired() const
{
return bulletsFired[0] + bulletsFired[1] + bulletsFired[2] + bulletsFired[3] + bulletsFired[4];
}
void Game::setStageName(const char *name)
{
- strncpy(stageName, name, sizeof stageName);
+ strlcpy(stageName, name, sizeof stageName);
}
void Game::setMapName(const char *name)
{
- strncpy(mapName, name, sizeof mapName);
+ strlcpy(mapName, name, sizeof mapName);
}
void Game::setMissionOver(int reason)