blob: 8fb51c5948a36cc55bf550ac6c93c5fa49ac31b2 (
plain) (
tree)
|
|
#ifndef PONG_H
#define PONG_H
#define MOUSE_LEFT_BUTTON MOUSE_BUTTON_LEFT
#include "raylib.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>
#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;
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();
//Sounds
extern const int SOUND_BOUNCE;
extern const int MUSIC_DEFEAT;
extern const int MUSIC_VICTORY;
extern const int MUSIC_TITLE;
extern const int STOP_ALL_SOUNDS;
extern const int SOUND_PLAYER_SCORE;
extern const int SOUND_ENEMY_SCORE;
#endif
|