Changed BGM a little and made DrawNumber more readable
This commit is contained in:
parent
e142ad94bf
commit
0a4af8b7e2
|
@ -12,10 +12,10 @@ Exit - Escape(ESC)
|
||||||
|
|
||||||
Settings.syn can be opened with a text editor.
|
Settings.syn can be opened with a text editor.
|
||||||
Format:
|
Format:
|
||||||
First line: Screen Mode, 1 is Fullscreen, 0 is Windowed
|
First line: Screen Mode, 1 is Fullscreen, 0 is Windowed (Default Value = 1)
|
||||||
Second line: Screen Width, Windowed Mode Only
|
Second line: Screen Width, Windowed Mode Only (Default Value = 1600)
|
||||||
Third line: Screen Height, Windowed Mode Only
|
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
|
Fourth line: Enemy Count Limiter, there will be no more enemies than this number on the screen (Default Value = 12)
|
||||||
|
|
||||||
Exe without console window
|
Exe without console window
|
||||||
|
|
||||||
|
|
Binary file not shown.
10
SynGame.c
10
SynGame.c
|
@ -203,7 +203,7 @@ void Update()
|
||||||
timeSinceStart += deltaTime;
|
timeSinceStart += deltaTime;
|
||||||
player.score = (int)(timeSinceStart * timeSinceStart) * (player.killedEnemyCount + 1);
|
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)
|
if(enemies.enemyLimit != enemyLimiter)
|
||||||
{
|
{
|
||||||
enemies.enemyLimit = initialEnemyLimit + (int)(timeSinceStart / 10);
|
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)
|
void DrawNumber(Vector2D position, int number)
|
||||||
{
|
{
|
||||||
Vector2D InstantiateSize;
|
Vector2D InstantiateSize;
|
||||||
float numberFactor;
|
|
||||||
InstantiateSize.x = (float)al_get_bitmap_width(numberTable);
|
InstantiateSize.x = (float)al_get_bitmap_width(numberTable);
|
||||||
InstantiateSize.y = (float)al_get_bitmap_height(numberTable);
|
InstantiateSize.y = (float)al_get_bitmap_height(numberTable);
|
||||||
numberFactor = InstantiateSize.x / numbersLength;
|
|
||||||
|
|
||||||
al_draw_scaled_bitmap(numberTable,
|
al_draw_scaled_bitmap(numberTable,
|
||||||
numberFactor * number, 0, numberFactor, InstantiateSize.y,
|
numberImageSize * number, 0, numberImageSize, InstantiateSize.y,
|
||||||
position.x - numberFactor / 2 * screenSizeMultiplier, position.y - InstantiateSize.y / 2 * screenSizeMultiplier,
|
position.x - numberImageSize / 2 * screenSizeMultiplier, position.y - InstantiateSize.y / 2 * screenSizeMultiplier,
|
||||||
numberFactor * screenSizeMultiplier, InstantiateSize.y * screenSizeMultiplier, 0);
|
numberImageSize * screenSizeMultiplier, InstantiateSize.y * screenSizeMultiplier, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawSizedObject(Vector2D position, ALLEGRO_BITMAP *image, int flag, float objectscreenSizeMultiplier)
|
void DrawSizedObject(Vector2D position, ALLEGRO_BITMAP *image, int flag, float objectscreenSizeMultiplier)
|
||||||
|
|
Loading…
Reference in New Issue