#define GAME_TITLE "pong" #define FALSE 0 #define TRUE 1 #define WINDOW_WIDTH 800 #define WINDOW_HEIGHT 600 #define FPS 30 #define FRAME_TARGET_TIME (1000 / FPS) #define INPUT_RESET 0b10000000 #define PADDLE_1_UP 0b00001000 #define PADDLE_1_DOWN 0b00000100 #define PADDLE_2_UP 0b00000010 #define PADDLE_2_DOWN 0b00000001 #define CENTER_LINE_WIDTH WINDOW_WIDTH / 100 #define CENTER_LINE_HEIGHT WINDOW_HEIGHT / 8 #define SCORE_TALLY_WIDTH WINDOW_WIDTH / 100 #define SCORE_TALLY_HEIGHT WINDOW_HEIGHT / 16 #define PLAYER1_SCORE_TALLY_X WINDOW_WIDTH * 0.25 - CENTER_LINE_WIDTH / 2 #define PLAYER2_SCORE_TALLY_X WINDOW_WIDTH * 0.75 - CENTER_LINE_WIDTH / 2 #define SCORE_TALLY_Y SCORE_TALLY_HEIGHT #define BALL_RADIUS WINDOW_WIDTH / 50 #define BALL_INIT_X WINDOW_WIDTH / 2 - BALL_RADIUS / 2 #define BALL_INIT_Y WINDOW_HEIGHT / 2 - BALL_RADIUS / 2 #define BALL_INIT_SPEED 300 #define PADDLE_WIDTH WINDOW_WIDTH / 50 #define PADDLE_HEIGHT WINDOW_HEIGHT / 4 #define PADDLE1_X PADDLE_WIDTH * 2 #define PADDLE2_X WINDOW_WIDTH - PADDLE_WIDTH * 3 #define PADDLE_Y WINDOW_HEIGHT / 2 - PADDLE_HEIGHT / 2 #define PADDLE_SPEED WINDOW_HEIGHT / 2 #define MAX_SND_CHANNELS 1