Compare commits
No commits in common. "d766ed5fcecfd019c5f3ce50a0deffbe8de5a611" and "6749eeb679308f81fba0b5df5e5ffb236d1f0d3d" have entirely different histories.
d766ed5fce
...
6749eeb679
5 changed files with 26 additions and 44 deletions
5
Makefile
5
Makefile
|
@ -6,11 +6,8 @@ OBJS = src/Main.c src/Controls.c src/Debug.c src/Copying.c
|
||||||
|
|
||||||
#compiler to use
|
#compiler to use
|
||||||
|
|
||||||
CC = cc
|
CC = gcc
|
||||||
|
|
||||||
#gimmie dem warnings yo
|
|
||||||
|
|
||||||
COMPILER_FLAGS = -Wall
|
|
||||||
|
|
||||||
#libs we linkin bro
|
#libs we linkin bro
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,3 @@ Make sure to read the LICENSE file
|
||||||
* Screen Boundaries
|
* Screen Boundaries
|
||||||
* Projectiles
|
* Projectiles
|
||||||
* Portable Binaries of the game
|
* Portable Binaries of the game
|
||||||
|
|
||||||
# BRANCHES
|
|
||||||
|
|
||||||
<p>To see new code use</p>
|
|
||||||
|
|
||||||
git checkout unstable
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
// Controls
|
// Controls
|
||||||
void Func_Controls()
|
void Func_Controls()
|
||||||
{
|
{
|
||||||
if (IsKeyDown(KEY_LEFT)) TuxPos_x -= GetFrameTime() * 800.0f;
|
if (IsKeyDown(KEY_LEFT)) {TuxPos_x -= GetFrameTime() * 800.0f;}
|
||||||
if (IsKeyDown(KEY_RIGHT)) TuxPos_x += GetFrameTime() * 800.0f;
|
if (IsKeyDown(KEY_RIGHT)) {TuxPos_x += GetFrameTime() * 800.0f;}
|
||||||
if (IsKeyDown(KEY_UP)) TuxPos_y -= GetFrameTime() * 800.0f;
|
if (IsKeyDown(KEY_UP)) {TuxPos_y -= GetFrameTime() * 800.0f;}
|
||||||
if (IsKeyDown(KEY_DOWN)) TuxPos_y += GetFrameTime() * 800.0f;
|
if (IsKeyDown(KEY_DOWN)) {TuxPos_y += GetFrameTime() * 800.0f;}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,5 @@ void Func_License()
|
||||||
"This program comes with ABSOLUTELY NO WARRANTY; \n"
|
"This program comes with ABSOLUTELY NO WARRANTY; \n"
|
||||||
"This is free software, and you are welcome to redistribute it\n"
|
"This is free software, and you are welcome to redistribute it\n"
|
||||||
"under certain conditions; for details read the LICENSE.\n"
|
"under certain conditions; for details read the LICENSE.\n"
|
||||||
"For the source code go to https://gitdab.com/Canneddonuts/Tux_Vs_X_ENGINE.git\n"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
14
src/Main.c
14
src/Main.c
|
@ -4,9 +4,6 @@
|
||||||
#include "Debug.h"
|
#include "Debug.h"
|
||||||
#include "Copying.h"
|
#include "Copying.h"
|
||||||
|
|
||||||
// Functions
|
|
||||||
void Func_CheckHitboxToggle();
|
|
||||||
|
|
||||||
// Globles
|
// Globles
|
||||||
|
|
||||||
// Position Varaibles
|
// Position Varaibles
|
||||||
|
@ -15,7 +12,6 @@ float TuxPos_x = 32.0f, TuxPos_y = 62.0f;
|
||||||
|
|
||||||
// Toggle bools
|
// Toggle bools
|
||||||
bool ShowHitbox = false;
|
bool ShowHitbox = false;
|
||||||
bool ShowPos = false;
|
|
||||||
|
|
||||||
// Setup Code
|
// Setup Code
|
||||||
void Func_Setup()
|
void Func_Setup()
|
||||||
|
@ -47,10 +43,7 @@ void Func_MainGameLoop()
|
||||||
// GameLoop
|
// GameLoop
|
||||||
while (!WindowShouldClose()) {
|
while (!WindowShouldClose()) {
|
||||||
|
|
||||||
// Checks and calls the Pos show function
|
Func_ShowPos();
|
||||||
if (IsKeyPressed(KEY_P)) ShowPos = !ShowPos;
|
|
||||||
if (ShowPos==true) Func_ShowPos();
|
|
||||||
|
|
||||||
Func_Controls();
|
Func_Controls();
|
||||||
|
|
||||||
TuxHitbox.x = TuxPos_x+50;
|
TuxHitbox.x = TuxPos_x+50;
|
||||||
|
@ -77,13 +70,12 @@ void Func_MainGameLoop()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (collision) {
|
if (collision) {
|
||||||
DrawText("FINALY BASIC AWFUL COLLISION", 50, 18, 20, MAROON);
|
DrawText("FINALY BASIC AWFUL COLLISION", 50, 18, 20, BLACK);
|
||||||
} else {
|
} else {
|
||||||
DrawText("Tux Vs X ENGINE PROTOTYPE please read the LINCENSE", 50, 18, 20, BLACK);
|
DrawText("Tux Vs X ENGINE PROTOTYPE please read the LINCENSE", 50, 18, 20, BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawText("Press 'H' to toggle hitboxes", 50, 72, 20, DARKGREEN);
|
DrawText("Press 'H' to toggle hitboxes", 50, 72, 20, BLACK);
|
||||||
DrawText("Press 'P' to toggle printing of the positions", 50, 95, 20, DARKGREEN);
|
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue