spaceshipsim/src/globals.h

55 lines
1.5 KiB
C
Raw Permalink Normal View History

2018-03-25 10:08:19 +00:00
/*
* Copyright (C) 2018 Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
* Author: Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef VERSION
# define VERSION "[version]"
#endif
2018-03-25 12:27:10 +00:00
#ifndef FPS
2018-03-25 12:53:40 +00:00
# define FPS 60.0f
2018-03-25 12:27:10 +00:00
#endif
2018-03-25 16:24:39 +00:00
#ifndef ACCEL
2018-03-29 10:55:48 +00:00
# define ACCEL 0.1f
2018-03-25 16:24:39 +00:00
#endif
#ifndef TURN_ACCEL
# define TURN_ACCEL (M_PI / FPS) // turn at pi radians / sec
#endif
#ifndef WINDOW_WIDTH
# define WINDOW_WIDTH 800
#endif
#ifndef WINDOW_HEIGHT
# define WINDOW_HEIGHT 600
#endif
2018-03-25 12:27:10 +00:00
#include <math.h>
#ifndef M_PI
# define M_PI 3.14159265f
#endif
#define RAD_TO_DEG(x) (x * 180 / M_PI)
2018-03-25 12:53:40 +00:00
#include <allegro5/allegro.h>
extern int redraw; ///< Whether or not to redraw the screen.
2018-03-25 12:27:10 +00:00
extern int run; ///< Whether or not to continue running the simulation.
2018-03-25 14:59:03 +00:00
extern int show_help; ///< Whether or not to show the help info.
extern int show_info; ///< Whether or not to show simulation info.