Changed BGM a little and made DrawNumber more readable

This commit is contained in:
Asrın Doğan 2019-09-13 20:12:30 +03:00
parent e142ad94bf
commit 0a4af8b7e2
3 changed files with 8 additions and 10 deletions

View File

@ -12,10 +12,10 @@ Exit - Escape(ESC)
Settings.syn can be opened with a text editor.
Format:
First line: Screen Mode, 1 is Fullscreen, 0 is Windowed
Second line: Screen Width, Windowed Mode Only
Third line: Screen Height, Windowed Mode Only
Fourth line: Enemy Count Limiter, there will be no more enemies than this number on the screen
First line: Screen Mode, 1 is Fullscreen, 0 is Windowed (Default Value = 1)
Second line: Screen Width, Windowed Mode Only (Default Value = 1600)
Third line: Screen Height, Windowed Mode Only (Default Value = 900)
Fourth line: Enemy Count Limiter, there will be no more enemies than this number on the screen (Default Value = 12)
Exe without console window

Binary file not shown.

View File

@ -203,7 +203,7 @@ void Update()
timeSinceStart += deltaTime;
player.score = (int)(timeSinceStart * timeSinceStart) * (player.killedEnemyCount + 1);
/* To limit enemies on the screen */
/* To limit the enemies on the screen */
if(enemies.enemyLimit != enemyLimiter)
{
enemies.enemyLimit = initialEnemyLimit + (int)(timeSinceStart / 10);
@ -574,15 +574,13 @@ void DrawObject(Vector2D position, ALLEGRO_BITMAP *image, int flag)
void DrawNumber(Vector2D position, int number)
{
Vector2D InstantiateSize;
float numberFactor;
InstantiateSize.x = (float)al_get_bitmap_width(numberTable);
InstantiateSize.y = (float)al_get_bitmap_height(numberTable);
numberFactor = InstantiateSize.x / numbersLength;
al_draw_scaled_bitmap(numberTable,
numberFactor * number, 0, numberFactor, InstantiateSize.y,
position.x - numberFactor / 2 * screenSizeMultiplier, position.y - InstantiateSize.y / 2 * screenSizeMultiplier,
numberFactor * screenSizeMultiplier, InstantiateSize.y * screenSizeMultiplier, 0);
numberImageSize * number, 0, numberImageSize, InstantiateSize.y,
position.x - numberImageSize / 2 * screenSizeMultiplier, position.y - InstantiateSize.y / 2 * screenSizeMultiplier,
numberImageSize * screenSizeMultiplier, InstantiateSize.y * screenSizeMultiplier, 0);
}
void DrawSizedObject(Vector2D position, ALLEGRO_BITMAP *image, int flag, float objectscreenSizeMultiplier)