#include "system/vga.h" #include "const.h" int difficultyBands[MAX_DIFFICULTY]; int hitPointRanges[MAX_DIFFICULTY][4]; int damageUpgradeCosts[3] = { 5, 11, 18 }; int healthUpgradeCosts[3] = { 4, 9, 15 }; int healthGainUpgradeCosts[3] = { 6, 13, 21 }; struct SpriteBounds bounds; // TODO: centralize these outside of game.c struct CompiledSpriteRender rabbit, mouse, bullet, enemy, enemyBullet, shotgun, beam; void buildDifficultyBands() { int i; float current = 0; float increaseBy = BASE_KILLS; for (i = 0; i < MAX_DIFFICULTY; ++i) { current += increaseBy; difficultyBands[i] = (int)current; increaseBy *= KILLS_NEEDED_FOR_NEXT_LEVEL_MULTIPLIER; } } void buildHitPointRages() { int currentRange[4] = { 1, 1, 1, 1 }; int i, j, countOfCurrent = 0, tmp; for (i = 0; i < MAX_DIFFICULTY; ++i) { for (j = 0; j < 4; ++j) { hitPointRanges[i][j] = currentRange[j]; } countOfCurrent++; if (countOfCurrent == HIT_POINT_DIFFICULTY_INCREASE_DELAY) { countOfCurrent = 0; currentRange[3]++; for (j = 3; j > 0; --j) { if (currentRange[j] > currentRange[j - 1]) { tmp = currentRange[j - 1]; currentRange[j - 1] = currentRange[j]; currentRange[j] = tmp; } } } } };