include allegro_color and platform specific headers already in libsuperderpy.h, clean up

This commit is contained in:
Sebastian Krzyszkowiak 2018-11-26 01:25:56 +01:00
parent de46cff0a4
commit 9ecd29a7c3
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF
20 changed files with 31 additions and 65 deletions

View file

@ -1,15 +1,15 @@
SET(SRC_LIST
utils.c
maths.c
character.c
config.c
timeline.c
gamestate.c
internal.c
libsuperderpy.c
mainloop.c
character.c
internal.c
tween.c
maths.c
shader.c
timeline.c
tween.c
utils.c
)
if (EMSCRIPTEN)
list(APPEND SRC_LIST emscripten-audio-stream.c)

View file

@ -19,12 +19,6 @@
*/
#include "internal.h"
#include "utils.h"
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_ttf.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
SYMBOL_EXPORT void SelectSpritesheet(struct Game* game, struct Character* character, char* name) {
struct Spritesheet* tmp = character->spritesheets;

View file

@ -22,8 +22,6 @@
#define LIBSUPERDERPY_CHARACTER_H
#include "libsuperderpy.h"
#include <allegro5/allegro.h>
#include <allegro5/allegro_font.h>
struct SpritesheetFrame {
char* file;

View file

@ -17,9 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "internal.h"
#include <allegro5/allegro.h>
SYMBOL_EXPORT void InitConfig(struct Game* game) {
const ALLEGRO_FILE_INTERFACE* iface = al_get_new_file_interface();

View file

@ -19,7 +19,6 @@
*/
#include "internal.h"
#include "emscripten.h"
#undef al_create_audio_stream
#undef al_load_audio_stream

View file

@ -23,7 +23,7 @@
#ifndef LIBSUPERDERPY_EMSCRIPTEN_H
#define LIBSUPERDERPY_EMSCRIPTEN_H
#include <allegro5/allegro_audio.h>
#include "libsuperderpy.h"
typedef struct {
ALLEGRO_SAMPLE* sample;

View file

@ -18,9 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gamestate.h"
#include "internal.h"
#include "utils.h"
static struct Gamestate* AddNewGamestate(struct Game* game, const char* name) {
struct Gamestate* tmp = game->_priv.gamestates;

View file

@ -21,7 +21,6 @@
#define LIBSUPERDERPY_GAMESTATE_H
#include "libsuperderpy.h"
#include <allegro5/allegro.h>
struct Gamestate_API {
void (*Gamestate_Draw)(struct Game* game, void* data);

View file

@ -19,11 +19,7 @@
#include "internal.h"
#include "3rdparty/valgrind.h"
#include "libsuperderpy.h"
#include <allegro5/allegro_ttf.h>
#include <dlfcn.h>
#include <math.h>
#include <stdio.h>
SYMBOL_INTERNAL void SimpleCompositor(struct Game* game, struct Gamestate* gamestates) {
struct Gamestate* tmp = gamestates;

View file

@ -19,8 +19,6 @@
#define LIBSUPERDERPY_INTERNAL_H
#include "libsuperderpy.h"
#include <allegro5/allegro.h>
#include <allegro5/allegro_font.h>
#if defined(_WIN32) || defined(__CYGWIN__)
#define SYMBOL_INTERNAL

View file

@ -25,14 +25,10 @@
#define ALLEGRO_UNSTABLE
#endif
#include "libsuperderpy.h"
#include "internal.h"
#include <dlfcn.h>
#include <libgen.h>
#include <locale.h>
#include <math.h>
#include <stdio.h>
#include <sys/param.h>
#include <unistd.h>
#ifdef ALLEGRO_MACOSX
#include <mach-o/dyld.h>

View file

@ -32,20 +32,33 @@ struct GamestateResources;
#include <allegro5/allegro.h>
#include <allegro5/allegro_acodec.h>
#include <allegro5/allegro_audio.h>
#include <allegro5/allegro_color.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_opengl.h>
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_ttf.h>
#include <allegro5/allegro_video.h>
#ifdef ALLEGRO_ANDROID
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <sys/param.h>
#if defined(ALLEGRO_ANDROID)
#define ALLEGRO_UNSTABLE
#include <allegro5/allegro_android.h>
#endif
#ifdef __EMSCRIPTEN__
#include "emscripten-audio-stream.h"
#elif defined(ALLEGRO_WINDOWS)
#include <allegro5/allegro_windows.h>
#elif defined(ALLEGRO_WITH_XWINDOWS)
#include <allegro5/allegro_x.h>
#elif defined(ALLEGRO_MACOS)
#include <allegro5/allegro_osx.h>
#elif defined(ALLEGRO_IPHONE)
#include <allegro5/allegro_iphone.h>
#elif defined(__EMSCRIPTEN__)
#include <emscripten.h>
#endif
#include "character.h"
#include "config.h"
#include "gamestate.h"
@ -55,8 +68,9 @@ struct GamestateResources;
#include "timeline.h"
#include "tween.h"
#include "utils.h"
#include <math.h>
#include <sys/param.h>
#ifdef __EMSCRIPTEN__
#include "emscripten-audio-stream.h"
#endif
#define LIBSUPERDERPY_BITMAP_HASHMAP_BUCKETS 16

View file

@ -21,7 +21,6 @@
*/
#include "internal.h"
#include "libsuperderpy.h"
static inline void HandleEvent(struct Game* game, ALLEGRO_EVENT* ev) {
switch (ev->type) {

View file

@ -18,14 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "maths.h"
#include "config.h"
#include "internal.h"
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_ttf.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
SYMBOL_EXPORT double DotProduct(const double v[], const double u[], int n) {
float result = 0.0;

View file

@ -22,8 +22,6 @@
#define LIBSUPERDERPY_MATHS_H
#include "libsuperderpy.h"
#include <allegro5/allegro.h>
#include <allegro5/allegro_font.h>
double DotProduct(const double v[], const double u[], int n);
double VectorLength(double x, double y, double z);

View file

@ -17,10 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "shader.h"
#include "internal.h"
#include <allegro5/allegro.h>
#include <math.h>
static ALLEGRO_USTR* GetShaderSource(struct Game* game, const char* filename) {
ALLEGRO_FILE* fp = al_fopen(filename, "r");

View file

@ -17,10 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "timeline.h"
#include "internal.h"
#include "utils.h"
#include <allegro5/allegro.h>
static void DestroyArgs(struct TM_Arguments* args) {
struct TM_Arguments* pom;

View file

@ -17,10 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tween.h"
#include "internal.h"
#include <allegro5/allegro.h>
#include <math.h>
// Easing formulas (c) 2011, Auerhaus Development, LLC
// Originally licensed under WTFPL 2.0

View file

@ -18,14 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils.h"
#include "config.h"
#include "internal.h"
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_ttf.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#ifdef ALLEGRO_ANDROID
#include <android/log.h>
#endif

View file

@ -22,8 +22,6 @@
#define LIBSUPERDERPY_UTILS_H
#include "libsuperderpy.h"
#include <allegro5/allegro.h>
#include <allegro5/allegro_font.h>
#ifdef ALLEGRO_WINDOWS
#define LIBRARY_EXTENSION ".dll"