about summary refs log blame commit diff stats
path: root/src/pong.h
blob: 76fa05d477938eca3adb8be544c6bb3290ff3773 (plain) (tree)
1
2
3
4
5
6
7

              
                                           
                   

                           
                   







                      
                   























                               
                               



                                                                                                      

                   
                     
 
      
#ifndef PONG_H
#define PONG_H
#define MOUSE_LEFT_BUTTON MOUSE_BUTTON_LEFT
#include "raylib.h"
#include "SDL2/SDL.h"
#include "SDL2/SDL_mixer.h"
#include "sounds.h"
#include <stdatomic.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <time.h>
#include <stdatomic.h>
#include <threads.h>
#include <setjmp.h>
#include <string.h>

#define LEFT 0
#define RIGHT 1

struct Players {
	float Y;
	Rectangle HitBox;
	int Score;
	int Direction;
	Rectangle BallDetector;
};

struct Balls {
	float X;
	float Y;
	float Angle;
	float Speed;
	int Direction;
	Rectangle HitBox;
};

extern int Difficulty;
extern bool GameGoing;
extern atomic_int Ticks;
extern char VersionString[256];

void enemy(struct Players *Enemy, struct Balls ball);
void ball(Rectangle *Player, Rectangle *Enemy, struct Balls *Ball, int *PlayerScore, int *EnemyScore);
bool play_audio(int SoundEffect);
int title_screen();
void versus_main();
void marathon_main();

#endif