diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..7916011 Binary files /dev/null and b/.DS_Store differ diff --git a/Makefile b/Makefile index 147483e..3a52a9e 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ executable = super_pang_clone -source = *.cpp +source = source/*.cpp windows: @echo off if not exist bin\ (mkdir bin) - g++ $(source) -std=c++11 -Wall -O2 -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o bin/$(executable).exe - strip -s -R .comment -R .gnu.version bin/$(executable).exe --strip-unneeded + g++ $(source) -std=c++11 -Wall -O2 -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o $(executable).exe + strip -s -R .comment -R .gnu.version $(executable).exe --strip-unneeded macos: mkdir -p bin - g++ $(source) -std=c++11 -Wall -O2 -lSDL2 -lSDL2_image -lSDL2_mixer -ffunction-sections -fdata-sections -o bin/$(executable)_macos + g++ $(source) -std=c++11 -Wall -O2 -lSDL2 -lSDL2_image -lSDL2_mixer -ffunction-sections -fdata-sections -o $(executable)_macos linux: mkdir -p bin - g++ $(source) -std=c++11 -Wall -Os -lSDL2 -lSDL2_image -lSDL2_mixer -ffunction-sections -fdata-sections -Wl,--gc-sections -o bin/$(executable)_linux - strip -s -R .comment -R .gnu.version bin/$(executable)_linux --strip-unneeded \ No newline at end of file + g++ $(source) -std=c++11 -Wall -Os -lSDL2 -lSDL2_image -lSDL2_mixer -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(executable)_linux + strip -s -R .comment -R .gnu.version $(executable)_linux --strip-unneeded \ No newline at end of file diff --git a/libFLAC-8.dll b/libFLAC-8.dll deleted file mode 100644 index b56ea2a..0000000 Binary files a/libFLAC-8.dll and /dev/null differ diff --git a/libjpeg-9.dll b/libjpeg-9.dll deleted file mode 100644 index 9d8911c..0000000 Binary files a/libjpeg-9.dll and /dev/null differ diff --git a/libmodplug-1.dll b/libmodplug-1.dll deleted file mode 100644 index d66a317..0000000 Binary files a/libmodplug-1.dll and /dev/null differ diff --git a/libmpg123-0.dll b/libmpg123-0.dll deleted file mode 100644 index 240298b..0000000 Binary files a/libmpg123-0.dll and /dev/null differ diff --git a/libogg-0.dll b/libogg-0.dll deleted file mode 100644 index 233c0f4..0000000 Binary files a/libogg-0.dll and /dev/null differ diff --git a/libopus-0.dll b/libopus-0.dll deleted file mode 100644 index 94ea541..0000000 Binary files a/libopus-0.dll and /dev/null differ diff --git a/libopusfile-0.dll b/libopusfile-0.dll deleted file mode 100644 index 260796b..0000000 Binary files a/libopusfile-0.dll and /dev/null differ diff --git a/libpng16-16.dll b/libpng16-16.dll deleted file mode 100644 index fd5db8d..0000000 Binary files a/libpng16-16.dll and /dev/null differ diff --git a/libtiff-5.dll b/libtiff-5.dll deleted file mode 100644 index af3c3e6..0000000 Binary files a/libtiff-5.dll and /dev/null differ diff --git a/libvorbis-0.dll b/libvorbis-0.dll deleted file mode 100644 index 4e4aaa5..0000000 Binary files a/libvorbis-0.dll and /dev/null differ diff --git a/libvorbisfile-3.dll b/libvorbisfile-3.dll deleted file mode 100644 index 5d90a23..0000000 Binary files a/libvorbisfile-3.dll and /dev/null differ diff --git a/libwebp-7.dll b/libwebp-7.dll deleted file mode 100644 index c11bf13..0000000 Binary files a/libwebp-7.dll and /dev/null differ diff --git a/background.cpp b/source/background.cpp similarity index 100% rename from background.cpp rename to source/background.cpp diff --git a/background.h b/source/background.h similarity index 100% rename from background.h rename to source/background.h diff --git a/balloon.cpp b/source/balloon.cpp similarity index 99% rename from balloon.cpp rename to source/balloon.cpp index 7ab3b4e..43d0b77 100644 --- a/balloon.cpp +++ b/source/balloon.cpp @@ -1,5 +1,3 @@ -#include "const.h" -#include "globals.h" #include "balloon.h" //Constructor diff --git a/balloon.h b/source/balloon.h similarity index 98% rename from balloon.h rename to source/balloon.h index e893f20..df1e9b8 100644 --- a/balloon.h +++ b/source/balloon.h @@ -2,6 +2,8 @@ #include "struct.h" #include "sprite.h" +#include "const.h" +#include "globals.h" #ifndef BALLOON_H #define BALLOON_H diff --git a/bullet.cpp b/source/bullet.cpp similarity index 98% rename from bullet.cpp rename to source/bullet.cpp index 2d4952c..69b8dde 100644 --- a/bullet.cpp +++ b/source/bullet.cpp @@ -1,5 +1,3 @@ -#include "const.h" -#include "globals.h" #include "bullet.h" //Constructor diff --git a/bullet.h b/source/bullet.h similarity index 96% rename from bullet.h rename to source/bullet.h index d6f5fec..db057d7 100644 --- a/bullet.h +++ b/source/bullet.h @@ -2,6 +2,8 @@ #include "struct.h" #include "sprite.h" +#include "const.h" +#include "globals.h" #ifndef BULLET_H #define BULLET_H diff --git a/const.h b/source/const.h similarity index 100% rename from const.h rename to source/const.h diff --git a/gamedirector.cpp b/source/gamedirector.cpp similarity index 99% rename from gamedirector.cpp rename to source/gamedirector.cpp index 372d2df..f8c0dae 100644 --- a/gamedirector.cpp +++ b/source/gamedirector.cpp @@ -1,13 +1,3 @@ -#include "const.h" -#include "struct.h" -#include "ltexture.h" -#include "globals.h" -#include "player.h" -#include "balloon.h" -#include "bullet.h" -#include "background.h" -#include "text.h" -#include "menu.h" #include "gamedirector.h" //Calcula el cuadrado de la distancia entre dos puntos diff --git a/gamedirector.h b/source/gamedirector.h similarity index 98% rename from gamedirector.h rename to source/gamedirector.h index 116fc4e..158be9c 100644 --- a/gamedirector.h +++ b/source/gamedirector.h @@ -1,11 +1,15 @@ #pragma once -#include "player.h" +#include "background.h" #include "balloon.h" #include "bullet.h" -#include "background.h" -#include "text.h" +#include "const.h" +#include "globals.h" +#include "ltexture.h" #include "menu.h" +#include "player.h" +#include "struct.h" +#include "text.h" #ifndef GAMEDIRECTOR_H #define GAMEDIRECTOR_H diff --git a/globals.h b/source/globals.h similarity index 64% rename from globals.h rename to source/globals.h index f0ced3e..96ae335 100644 --- a/globals.h +++ b/source/globals.h @@ -3,7 +3,6 @@ #include #include #include -#include "ltexture.h" #ifndef GLOBALS_H #define GLOBALS_H @@ -14,17 +13,6 @@ SDL_Window *gWindow = NULL; //El renderizador de la ventana SDL_Renderer *gRenderer = NULL; -//Texturas con gráficos -LTexture gPlayerTexture; -LTexture gGameBackgroundTexture; -LTexture gTitleBackgroundTexture; -LTexture gWhiteFontTexture; -LTexture gBlackFontTexture; -LTexture gMenuTexture; -LTexture gBalloonTexture; -LTexture gBulletTexture; -LTexture gMiscTexture; - //Manejador para el mando 1 SDL_Joystick* gGameController = NULL; diff --git a/source/globals2.h b/source/globals2.h new file mode 100644 index 0000000..66a034b --- /dev/null +++ b/source/globals2.h @@ -0,0 +1,19 @@ +#pragma once + +#include "ltexture.h" + +#ifndef GLOBALS2_H +#define GLOBALS2_H + +//Texturas con gráficos +LTexture gPlayerTexture; +LTexture gGameBackgroundTexture; +LTexture gTitleBackgroundTexture; +LTexture gWhiteFontTexture; +LTexture gBlackFontTexture; +LTexture gMenuTexture; +LTexture gBalloonTexture; +LTexture gBulletTexture; +LTexture gMiscTexture; + +#endif \ No newline at end of file diff --git a/ltexture.cpp b/source/ltexture.cpp similarity index 95% rename from ltexture.cpp rename to source/ltexture.cpp index fba3356..f9c7887 100644 --- a/ltexture.cpp +++ b/source/ltexture.cpp @@ -1,9 +1,3 @@ -#include -#include -#include -#include -#include "const.h" -#include "globals.h" #include "ltexture.h" LTexture::LTexture() diff --git a/ltexture.h b/source/ltexture.h similarity index 97% rename from ltexture.h rename to source/ltexture.h index eb8ce0c..feb4bb1 100644 --- a/ltexture.h +++ b/source/ltexture.h @@ -2,6 +2,8 @@ #include #include +#include "const.h" +#include "globals2.h" #include #include diff --git a/main.cpp b/source/main.cpp similarity index 99% rename from main.cpp rename to source/main.cpp index 96c4732..27fb9c6 100644 --- a/main.cpp +++ b/source/main.cpp @@ -46,6 +46,7 @@ un tipo asociado diferente a NO_KIND #include "const.h" #include "gamedirector.h" #include "globals.h" +#include "globals2.h" #include "ltexture.h" #include "menu.h" #include "player.h" diff --git a/menu.cpp b/source/menu.cpp similarity index 98% rename from menu.cpp rename to source/menu.cpp index 7c69006..5046c71 100644 --- a/menu.cpp +++ b/source/menu.cpp @@ -1,6 +1,3 @@ -#include "const.h" -#include "globals.h" -#include "text.h" #include "menu.h" //Constructor diff --git a/menu.h b/source/menu.h similarity index 96% rename from menu.h rename to source/menu.h index a98af25..3ad1bfb 100644 --- a/menu.h +++ b/source/menu.h @@ -1,6 +1,9 @@ #pragma once #include "sprite.h" +#include "const.h" +#include "globals.h" +#include "text.h" #ifndef MENU_H #define MENU_H diff --git a/player.cpp b/source/player.cpp similarity index 99% rename from player.cpp rename to source/player.cpp index d62cba7..5f0848e 100644 --- a/player.cpp +++ b/source/player.cpp @@ -1,5 +1,3 @@ -#include "const.h" -#include "globals.h" #include "player.h" //Constructor diff --git a/player.h b/source/player.h similarity index 97% rename from player.h rename to source/player.h index a21d7f7..60f1678 100644 --- a/player.h +++ b/source/player.h @@ -2,6 +2,9 @@ #include "struct.h" #include "spriteanimated.h" +#include "const.h" +#include "globals.h" +#include "globals2.h" #ifndef PLAYER_H #define PLAYER_H diff --git a/sprite.cpp b/source/sprite.cpp similarity index 100% rename from sprite.cpp rename to source/sprite.cpp diff --git a/sprite.h b/source/sprite.h similarity index 100% rename from sprite.h rename to source/sprite.h diff --git a/spriteanimated.cpp b/source/spriteanimated.cpp similarity index 98% rename from spriteanimated.cpp rename to source/spriteanimated.cpp index dbcc781..c83d7ee 100644 --- a/spriteanimated.cpp +++ b/source/spriteanimated.cpp @@ -1,8 +1,5 @@ -#include "const.h" #include "spriteanimated.h" -#include - //Constructor SpriteAnimated::SpriteAnimated() { diff --git a/spriteanimated.h b/source/spriteanimated.h similarity index 97% rename from spriteanimated.h rename to source/spriteanimated.h index 9189d5b..693d745 100644 --- a/spriteanimated.h +++ b/source/spriteanimated.h @@ -3,6 +3,8 @@ #include #include #include "sprite.h" +#include "const.h" +#include #ifndef SPRITEANIMATED_H #define SPRITEANIMATED_H diff --git a/struct.h b/source/struct.h similarity index 86% rename from struct.h rename to source/struct.h index 72c5f61..7f0c7bb 100644 --- a/struct.h +++ b/source/struct.h @@ -1,5 +1,7 @@ #pragma once +#include + #ifndef STRUCT_H #define STRUCT_H diff --git a/text.cpp b/source/text.cpp similarity index 98% rename from text.cpp rename to source/text.cpp index eaf29bf..b0fde2a 100644 --- a/text.cpp +++ b/source/text.cpp @@ -1,4 +1,3 @@ -#include "const.h" #include "text.h" //Constructor diff --git a/text.h b/source/text.h similarity index 95% rename from text.h rename to source/text.h index 4c536f9..2df41e6 100644 --- a/text.h +++ b/source/text.h @@ -1,6 +1,7 @@ #pragma once #include "sprite.h" +#include "const.h" #ifndef TEXT_H #define TEXT_H diff --git a/zlib1.dll b/zlib1.dll deleted file mode 100644 index 3a45deb..0000000 Binary files a/zlib1.dll and /dev/null differ