more fitting return types for functions

This commit is contained in:
Return0ne 2021-10-21 08:02:11 -04:00
parent e6c3a27823
commit 2665450626
7 changed files with 10 additions and 15 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
T_V_X_E

View File

@ -4,7 +4,7 @@
#include "Controls.h"
// Controls
int Func_Controls()
void Func_Controls()
{
if (IsKeyDown(KEY_LEFT)) {TuxPos_x -= GetFrameTime() * 800.0f;}
if (IsKeyDown(KEY_RIGHT)) {TuxPos_x += GetFrameTime() * 800.0f;}

View File

@ -1,3 +1,3 @@
#pragma once
int Func_Controls();
void Func_Controls();

View File

@ -6,7 +6,7 @@ void Func_License()
// Outputs Copying info in the command line
printf
(
"Tux Vs X Engine Copyright (C) 2021 Canneddonuts Team.\n"
"\nTux Vs X Engine Copyright (C) 2021 Canneddonuts Team.\n"
"This program comes with ABSOLUTELY NO WARRANTY; \n"
"This is free software, and you are welcome to redistribute it\n"
"under certain conditions; for details read the LICENSE.\n"

View File

@ -1,11 +1,9 @@
#include <stdio.h>
#include "Main.h"
#include "Controls.h"
#include "Debug.h"
int Func_ShowPos()
void Func_ShowPos()
{
// Ouput Position Infomation in the command line
printf

View File

@ -1,3 +1,3 @@
#pragma once
int Func_ShowPos();
void Func_ShowPos();

View File

@ -1,4 +1,3 @@
#include <stdio.h>
#include "raylib.h"
@ -12,10 +11,8 @@
float EnemyPos_x = 482.0f, EnemyPos_y = 62.0f;
float TuxPos_x = 32.0f, TuxPos_y = 62.0f;
// Setup Code
int Func_Setup()
void Func_Setup()
{
const int screenWidth = 800;
const int screenHeight = 450;
@ -26,7 +23,7 @@ int Func_Setup()
}
// GameLoop Code
int Func_MainGameLoop()
void Func_MainGameLoop()
{
// Load Textures
Texture2D tux = LoadTexture("assets/tux.png");
@ -34,12 +31,10 @@ int Func_MainGameLoop()
Texture2D arctic = LoadTexture("assets/arctic.png");
// GameLoop
while (!WindowShouldClose())
{
while (!WindowShouldClose()) {
Func_ShowPos();
Func_Controls();
BeginDrawing();
ClearBackground(RAYWHITE);
@ -48,6 +43,7 @@ int Func_MainGameLoop()
DrawTexture(tux, TuxPos_x, TuxPos_y, RAYWHITE);
DrawTexture(enemy, EnemyPos_x, EnemyPos_y, RAYWHITE);
DrawText("Tux Vs X ENGINE PROTOTYPE please read the LINCENSE", 50, 18, 20, BLACK);
EndDrawing();
}
// Unload Textures