diff --git a/Makefile b/Makefile index db218bc..31cc55a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/src/Controls.c b/src/Controls.c index 6b15aa3..09bc793 100644 --- a/src/Controls.c +++ b/src/Controls.c @@ -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() { diff --git a/src/Controls.h b/src/Controls.h index d9dbe1e..dc52212 100644 --- a/src/Controls.h +++ b/src/Controls.h @@ -1,7 +1,5 @@ #pragma once -// makes the Varaibles globle across c files -extern float TuxPos_x; -extern float TuxPos_y; + int Func_Controls(); diff --git a/src/Debug.c b/src/Debug.c new file mode 100644 index 0000000..55a98bd --- /dev/null +++ b/src/Debug.c @@ -0,0 +1,13 @@ +#include + +#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); +} diff --git a/src/Debug.h b/src/Debug.h new file mode 100644 index 0000000..2d5ddcd --- /dev/null +++ b/src/Debug.h @@ -0,0 +1,3 @@ +#pragma once + +int Func_ShowPos(); diff --git a/src/main.c b/src/main.c index ec3b917..e897a7a 100644 --- a/src/main.c +++ b/src/main.c @@ -2,19 +2,13 @@ #include #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() diff --git a/src/main.h b/src/main.h new file mode 100644 index 0000000..3658820 --- /dev/null +++ b/src/main.h @@ -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;