2021-09-18 15:22:16 +00:00
|
|
|
#include <stdio.h>
|
2021-08-28 22:48:16 +00:00
|
|
|
#include "raylib.h"
|
2021-09-12 19:23:15 +00:00
|
|
|
|
2021-08-28 22:48:16 +00:00
|
|
|
|
|
|
|
#include "Controls.h"
|
2021-09-05 16:30:50 +00:00
|
|
|
#include "Debug.h"
|
2021-09-18 15:22:16 +00:00
|
|
|
#include "Copying.h"
|
2021-08-28 22:48:16 +00:00
|
|
|
|
|
|
|
// Globles
|
|
|
|
|
|
|
|
// Position Varaibles
|
|
|
|
float EnemyPos_x = 482.0f, EnemyPos_y = 62.0f;
|
2021-09-05 16:30:50 +00:00
|
|
|
float TuxPos_x = 32.0f, TuxPos_y = 62.0f;
|
2021-08-28 22:48:16 +00:00
|
|
|
|
2021-09-18 15:22:16 +00:00
|
|
|
|
|
|
|
|
2021-08-28 22:48:16 +00:00
|
|
|
// Setup Code
|
|
|
|
int Func_Setup()
|
|
|
|
{
|
|
|
|
const int screenWidth = 800;
|
|
|
|
const int screenHeight = 450;
|
|
|
|
|
|
|
|
InitWindow(screenWidth, screenHeight, "Tux Vs Windows");
|
|
|
|
|
|
|
|
SetTargetFPS(60);
|
|
|
|
}
|
|
|
|
|
|
|
|
// GameLoop Code
|
|
|
|
int Func_MainGameLoop()
|
|
|
|
{
|
|
|
|
// Load Textures
|
|
|
|
Texture2D tux = LoadTexture("assets/tux.png");
|
|
|
|
Texture2D enemy = LoadTexture("assets/enemy.png");
|
|
|
|
Texture2D arctic = LoadTexture("assets/arctic.png");
|
|
|
|
|
|
|
|
// GameLoop
|
|
|
|
while (!WindowShouldClose())
|
|
|
|
{
|
|
|
|
Func_ShowPos();
|
|
|
|
Func_Controls();
|
|
|
|
|
|
|
|
|
|
|
|
BeginDrawing();
|
|
|
|
ClearBackground(RAYWHITE);
|
|
|
|
|
2021-09-18 15:22:16 +00:00
|
|
|
// Put the sprites and text on the screen
|
2021-08-28 22:48:16 +00:00
|
|
|
DrawTexture(arctic, 50, 0, RAYWHITE);
|
|
|
|
DrawTexture(tux, TuxPos_x, TuxPos_y, RAYWHITE);
|
|
|
|
DrawTexture(enemy, EnemyPos_x, EnemyPos_y, RAYWHITE);
|
2021-09-18 15:22:16 +00:00
|
|
|
DrawText("Tux Vs X ENGINE PROTOTYPE please read the LINCENSE", 50, 18, 20, BLACK);
|
2021-08-28 22:48:16 +00:00
|
|
|
EndDrawing();
|
|
|
|
}
|
|
|
|
// Unload Textures
|
|
|
|
UnloadTexture(tux);
|
|
|
|
UnloadTexture(enemy);
|
|
|
|
UnloadTexture(arctic);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
Func_Setup();
|
|
|
|
Func_MainGameLoop();
|
|
|
|
|
|
|
|
CloseWindow();
|
|
|
|
|
2021-09-18 15:22:16 +00:00
|
|
|
Func_License();
|
|
|
|
|
2021-08-28 22:48:16 +00:00
|
|
|
return 0;
|
|
|
|
}
|