mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Use enums for time trial indexes
This adds an anonymous enum for time trial indexes (e.g. the bestrank, bestlives, etc. arrays and timetriallevel), and replaces all integer literals with them. Just like the unlock arrays, these are indexes to an array in XML save files, so the numbers matter, and therefore should not use strict typechecking.
This commit is contained in:
@@ -729,12 +729,30 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if(game.bestrank[0]>=3) game.unlockAchievement("vvvvvvtimetrial_station1_fixed");
|
||||
if(game.bestrank[1]>=3) game.unlockAchievement("vvvvvvtimetrial_lab_fixed");
|
||||
if(game.bestrank[2]>=3) game.unlockAchievement("vvvvvvtimetrial_tower_fixed");
|
||||
if(game.bestrank[3]>=3) game.unlockAchievement("vvvvvvtimetrial_station2_fixed");
|
||||
if(game.bestrank[4]>=3) game.unlockAchievement("vvvvvvtimetrial_warp_fixed");
|
||||
if(game.bestrank[5]>=3) game.unlockAchievement("vvvvvvtimetrial_final_fixed");
|
||||
if (game.bestrank[TimeTrial_SPACESTATION1] >= 3)
|
||||
{
|
||||
game.unlockAchievement("vvvvvvtimetrial_station1_fixed");
|
||||
}
|
||||
if (game.bestrank[TimeTrial_LABORATORY] >= 3)
|
||||
{
|
||||
game.unlockAchievement("vvvvvvtimetrial_lab_fixed");
|
||||
}
|
||||
if (game.bestrank[TimeTrial_TOWER] >= 3)
|
||||
{
|
||||
game.unlockAchievement("vvvvvvtimetrial_tower_fixed");
|
||||
}
|
||||
if (game.bestrank[TimeTrial_SPACESTATION2] >= 3)
|
||||
{
|
||||
game.unlockAchievement("vvvvvvtimetrial_station2_fixed");
|
||||
}
|
||||
if (game.bestrank[TimeTrial_WARPZONE] >= 3)
|
||||
{
|
||||
game.unlockAchievement("vvvvvvtimetrial_warp_fixed");
|
||||
}
|
||||
if (game.bestrank[TimeTrial_FINALLEVEL] >= 3)
|
||||
{
|
||||
game.unlockAchievement("vvvvvvtimetrial_final_fixed");
|
||||
}
|
||||
|
||||
obj.init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user