Movidos los archivos de clases comunes a la carpeta common

This commit is contained in:
JailDesigner committed 2022-10-19 09:38:38 +02:00
1 parent cf357560b2
commit b07baa4669
43 files changed
+85 -86

No files matched your search

+4 -3
View File
@@ -1,16 +1,17 @@
executable = coffee_crisis
source = source/*.cpp source/common/*.cpp
windows:
@echo off
if not exist bin\ (mkdir bin)
g++ -std=c++11 -Wall -O2 source/*.cpp -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o bin/$(executable).exe
g++ $(source) -std=c++11 -Wall -O2 -lmingw32 -lSDL2main -lSDL2 -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
macos:
mkdir -p bin
g++ source/*.cpp -std=c++11 -Wall -O2 -lSDL2 -ffunction-sections -fdata-sections -o bin/$(executable)_macos
g++ $(source) -std=c++11 -Wall -O2 -lSDL2 -ffunction-sections -fdata-sections -o bin/$(executable)_macos
linux:
mkdir -p bin
g++ source/*.cpp -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o bin/$(executable)_linux
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o bin/$(executable)_linux
strip -s -R .comment -R .gnu.version bin/$(executable)_linux --strip-unneeded
opendingux:
mkdir -p bin
+3 -3
View File
@@ -1,8 +1,8 @@
#pragma once
#include <SDL2/SDL.h>
#include "utils.h"
#include "animatedsprite.h"
#include "common/utils.h"
#include "common/animatedsprite.h"
#include <vector>
#include <sstream>
@@ -86,7 +86,7 @@ private:
std::vector<float> h; // Vector con los valores de zoom para el alto del globo
};
// Objetos
// Objetos y punteros
AnimatedSprite *sprite; // Sprite del objeto globo
// Variables
+3 -3
View File
@@ -1,8 +1,8 @@
#pragma once
#include <SDL2/SDL.h>
#include "utils.h"
#include "sprite.h"
#include "common/utils.h"
#include "common/sprite.h"
#ifndef BULLET_H
#define BULLET_H
@@ -20,7 +20,7 @@
class Bullet
{
private:
// Objetos
// Objetos y punteros
Sprite *sprite; // Sprite con los graficos y métodos de pintado
// Variables
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -1,4 +1,4 @@
#include "const.h"
#include "../const.h"
#include "menu.h"
// Constructor
+1 -1
View File
@@ -68,7 +68,7 @@ private:
int a; // Cantidad de transparencia para el rectangulo del selector
};
// Objetos
// Objetos y punteros
SDL_Renderer *renderer; // Puntero al renderizador de la ventana
Text *text; // Texto para poder escribir los items del menu
Input *input; // Gestor de eventos de entrada de teclado o gamepad
@@ -1,4 +1,4 @@
#include "const.h"
#include "../const.h"
#include "movingsprite.h"
// Constructor
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
#include "const.h"
#include "../const.h"
#include "smartsprite.h"
// Constructor
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -22,7 +22,7 @@ private:
int w;
};
// Objetos
// Objetos y punteros
Sprite *sprite; // Objeto con los graficos para el texto
LTexture *texture; // Textura con los bitmaps del texto
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
#include "const.h"
#include "../const.h"
#include "writer.h"
// Constructor
+1 -1
View File
@@ -11,7 +11,7 @@
class Writer
{
private:
// Objetos
// Objetos y punteros
Text *text; // Objeto encargado de escribir el texto
// Variables
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "utils.h"
#include "common/utils.h"
#include "lang.h"
#ifndef CONST_H
+1 -1
View File
@@ -1,6 +1,6 @@
#include "const.h"
#include "director.h"
#include "utils.h"
#include "common/utils.h"
#include <iostream>
#include <string>
+12 -13
View File
@@ -1,27 +1,27 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "balloon.h"
#include "bullet.h"
#include "common/asset.h"
#include "common/input.h"
#include "common/jail_audio.h"
#include "common/menu.h"
#include "common/movingsprite.h"
#include "common/screen.h"
#include "common/smartsprite.h"
#include "common/sprite.h"
#include "common/text.h"
#include "common/utils.h"
#include "common/writer.h"
#include "const.h"
#include "fade.h"
#include "game.h"
#include "input.h"
#include "intro.h"
#include "item.h"
#include "jail_audio.h"
#include "logo.h"
#include "menu.h"
#include "movingsprite.h"
#include "player.h"
#include "screen.h"
#include "smartsprite.h"
#include "sprite.h"
#include "text.h"
#include "title.h"
#include "utils.h"
#include "writer.h"
#ifndef DIRECTOR_H
#define DIRECTOR_H
@@ -29,11 +29,10 @@
// Textos
#define WINDOW_CAPTION "Coffee Crisis"
// Clase Director
class Director
{
private:
// Objetos
// Objetos y punteros
SDL_Window *window; // La ventana donde dibujamos
SDL_Renderer *renderer; // El renderizador de la ventana
Screen *screen; // Objeto encargado de dibujar en pantalla
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "ltexture.h"
#include "common/ltexture.h"
#ifndef FADE_H
#define FADE_H
+12 -12
View File
@@ -1,23 +1,23 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "common/asset.h"
#include "balloon.h"
#include "bullet.h"
#include "const.h"
#include "fade.h"
#include "input.h"
#include "common/input.h"
#include "item.h"
#include "jail_audio.h"
#include "menu.h"
#include "movingsprite.h"
#include "common/jail_audio.h"
#include "common/menu.h"
#include "common/movingsprite.h"
#include "player.h"
#include "screen.h"
#include "smartsprite.h"
#include "sprite.h"
#include "text.h"
#include "utils.h"
#include "writer.h"
#include "common/screen.h"
#include "common/smartsprite.h"
#include "common/sprite.h"
#include "common/text.h"
#include "common/utils.h"
#include "common/writer.h"
#include <iostream>
#ifndef GAME_H
@@ -114,7 +114,7 @@ private:
demoKeys_t dataFile[TOTAL_DEMO_DATA]; // Datos del fichero con los movimientos para la demo
};
// Objetos
// Objetos y punteros
SDL_Renderer *renderer; // El renderizador de la ventana
Screen *screen; // Objeto encargado de dibujar en pantalla
Asset *asset; // Objeto que gestiona todos los ficheros de recursos
+7 -7
View File
@@ -1,13 +1,13 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "common/asset.h"
#include "const.h"
#include "jail_audio.h"
#include "screen.h"
#include "sprite.h"
#include "text.h"
#include "utils.h"
#include "common/jail_audio.h"
#include "common/screen.h"
#include "common/sprite.h"
#include "common/text.h"
#include "common/utils.h"
#ifndef INSTRUCTIONS_H
#define INSTRUCTIONS_H
@@ -22,7 +22,7 @@ enum mode_e
class Instructions
{
private:
// Objetos
// Objetos y punteros
SDL_Renderer *renderer; // El renderizador de la ventana
Screen *screen; // Objeto encargado de dibujar en pantalla
std::vector<LTexture *> itemTextures; // Vector con las texturas de los items
+7 -7
View File
@@ -1,13 +1,13 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "common/asset.h"
#include "const.h"
#include "jail_audio.h"
#include "screen.h"
#include "smartsprite.h"
#include "utils.h"
#include "writer.h"
#include "common/jail_audio.h"
#include "common/screen.h"
#include "common/smartsprite.h"
#include "common/utils.h"
#include "common/writer.h"
#include <vector>
#ifndef INTRO_H
@@ -17,7 +17,7 @@
class Intro
{
private:
// Objetos
// Objetos y punteros
SDL_Renderer *renderer; // El renderizador de la ventana
Screen *screen; // Objeto encargado de dibujar en pantalla
LTexture *texture; // Textura con los graficos
+3 -3
View File
@@ -1,8 +1,8 @@
#pragma once
#include <SDL2/SDL.h>
#include "animatedsprite.h"
#include "utils.h"
#include "common/animatedsprite.h"
#include "common/utils.h"
#ifndef ITEM_H
#define ITEM_H
@@ -19,7 +19,7 @@
class Item
{
private:
// Objetos
// Objetos y punteros
AnimatedSprite *sprite; // Sprite con los graficos del objeto
// Variables
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "common/asset.h"
#include <string>
#ifndef LANG_H
+6 -6
View File
@@ -1,12 +1,12 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "common/asset.h"
#include "const.h"
#include "jail_audio.h"
#include "screen.h"
#include "sprite.h"
#include "utils.h"
#include "common/jail_audio.h"
#include "common/screen.h"
#include "common/sprite.h"
#include "common/utils.h"
#ifndef LOGO_H
#define LOGO_H
@@ -15,7 +15,7 @@
class Logo
{
private:
// Objetos
// Objetos y punteros
SDL_Renderer *renderer; // El renderizador de la ventana
Screen *screen; // Objeto encargado de dibujar en pantalla
Asset *asset; // Objeto que gestiona todos los ficheros de recursos
+6 -6
View File
@@ -1,11 +1,11 @@
#pragma once
#include <SDL2/SDL.h>
#include "utils.h"
#include "input.h"
#include "asset.h"
#include "ltexture.h"
#include "animatedsprite.h"
#include "common/utils.h"
#include "common/input.h"
#include "common/asset.h"
#include "common/ltexture.h"
#include "common/animatedsprite.h"
#ifndef PLAYER_H
#define PLAYER_H
@@ -31,7 +31,7 @@
class Player
{
private:
// Objetos
// Objetos y punteros
SDL_Renderer *renderer; // El renderizador de la ventana
AnimatedSprite *headSprite; // Sprite para dibujar la cabeza
AnimatedSprite *bodySprite; // Sprite para dibujar el cuerpo
+11 -12
View File
@@ -1,21 +1,21 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "common/asset.h"
#include "common/input.h"
#include "common/jail_audio.h"
#include "common/menu.h"
#include "common/movingsprite.h"
#include "common/screen.h"
#include "common/smartsprite.h"
#include "common/sprite.h"
#include "common/text.h"
#include "common/utils.h"
#include "const.h"
#include "fade.h"
#include "game.h"
#include "input.h"
#include "instructions.h"
#include "item.h"
#include "jail_audio.h"
#include "menu.h"
#include "movingsprite.h"
#include "screen.h"
#include "smartsprite.h"
#include "sprite.h"
#include "text.h"
#include "utils.h"
#ifndef TITLE_H
#define TITLE_H
@@ -29,7 +29,6 @@
// Cantidad de eventos de la pantalla de titulo
#define TITLE_TOTAL_EVENTS 2
// Clase Title
class Title
{
private:
@@ -42,7 +41,7 @@ private:
bool keyPressed; // Variable para evitar la repetición de teclas en los menus
};
// Objetos
// Objetos y punteros
SDL_Renderer *renderer; // El renderizador de la ventana
Screen *screen; // Objeto encargado de dibujar en pantalla
Asset *asset; // Objeto que gestiona todos los ficheros de recursos