added main header and debug.c file Bruah

This commit is contained in:
Return0ne 2021-09-05 12:30:50 -04:00
parent d26d7da1aa
commit ca08ddda7c
7 changed files with 29 additions and 14 deletions

View File

@ -2,7 +2,7 @@
#files to compile
OBJS = src/main.c src/Controls.c
OBJS = src/main.c src/Controls.c src/Debug.c
#compiler to use

View File

@ -1,7 +1,7 @@
#include "raylib.h"
#include "main.h"
#include "Controls.h"
// Tux Position Varaibles
float TuxPos_x = 32.0f, TuxPos_y = 62.0f;
// Controls
int Func_Controls()
{

View File

@ -1,7 +1,5 @@
#pragma once
// makes the Varaibles globle across c files
extern float TuxPos_x;
extern float TuxPos_y;
int Func_Controls();

13
src/Debug.c Normal file
View File

@ -0,0 +1,13 @@
#include <stdio.h>
#include "main.h"
#include "Controls.h"
#include "Debug.h"
int Func_ShowPos()
{
// Ouput Position Infomation in the command line
printf("TuxPos_x = %f TuxPos_y = %f EnemyPos_x = %f EnemyPos_y = %f\n", TuxPos_x, TuxPos_y, EnemyPos_x, EnemyPos_y);
}

3
src/Debug.h Normal file
View File

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

View File

@ -2,19 +2,13 @@
#include <stdio.h>
#include "Controls.h"
#include "Debug.h"
// Globles
// Position Varaibles
float EnemyPos_x = 482.0f, EnemyPos_y = 62.0f;
int Func_ShowPos()
{
// Ouput Position Infomation in the command line
printf("TuxPos_x = %f TuxPos_y = %f EnemyPos_x = %f EnemyPos_y = %f\n", TuxPos_x, TuxPos_y, EnemyPos_x, EnemyPos_y);
}
float TuxPos_x = 32.0f, TuxPos_y = 62.0f;
// Setup Code
int Func_Setup()

7
src/main.h Normal file
View File

@ -0,0 +1,7 @@
#pragma once
// makes the Varaibles globle across c files
extern float TuxPos_x;
extern float TuxPos_y;
extern float EnemyPos_x;
extern float EnemyPos_y;