forked from jaildesigner-jailgames/jaildoctors_dilemma
Añadida la paleta de spectrum
This commit is contained in:
@@ -177,7 +177,7 @@ bool Input::discoverGameController()
|
|||||||
std::cout << "SDL_GetError() = " << SDL_GetError() << std::endl;
|
std::cout << "SDL_GetError() = " << SDL_GetError() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
//mGameController = mConnectedControllers[0];
|
// mGameController = mConnectedControllers[0];
|
||||||
SDL_GameControllerEventState(SDL_ENABLE);
|
SDL_GameControllerEventState(SDL_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ private:
|
|||||||
};
|
};
|
||||||
GameControllerBindings_t mGameControllerBindings[17]; // Vector con las teclas asociadas a los inputs predefinidos
|
GameControllerBindings_t mGameControllerBindings[17]; // Vector con las teclas asociadas a los inputs predefinidos
|
||||||
|
|
||||||
//SDL_GameController *mGameController; // Manejador para el mando
|
// SDL_GameController *mGameController; // Manejador para el mando
|
||||||
std::vector<SDL_GameController*> mConnectedControllers;
|
std::vector<SDL_GameController *> mConnectedControllers;
|
||||||
std::vector<std::string> mControllerNames;
|
std::vector<std::string> mControllerNames;
|
||||||
int mNumGamepads;
|
int mNumGamepads;
|
||||||
std::string mDBpath; // Ruta al archivo gamecontrollerdb.txt
|
std::string mDBpath; // Ruta al archivo gamecontrollerdb.txt
|
||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
void bindGameControllerButton(Uint8 input, SDL_GameControllerButton button);
|
void bindGameControllerButton(Uint8 input, SDL_GameControllerButton button);
|
||||||
|
|
||||||
// Comprueba si un input esta activo
|
// Comprueba si un input esta activo
|
||||||
bool checkInput(Uint8 input, bool repeat, int device=INPUT_USE_ANY, int index=0);
|
bool checkInput(Uint8 input, bool repeat, int device = INPUT_USE_ANY, int index = 0);
|
||||||
|
|
||||||
// Comprueba si hay algun mando conectado
|
// Comprueba si hay algun mando conectado
|
||||||
bool gameControllerFound();
|
bool gameControllerFound();
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Item::Item(item_t item)
|
|||||||
renderer = item.renderer;
|
renderer = item.renderer;
|
||||||
|
|
||||||
// Crea objetos
|
// Crea objetos
|
||||||
texture = new LTexture(renderer,asset->get(item.tileset));
|
texture = new LTexture(renderer, asset->get(item.tileset));
|
||||||
sprite = new Sprite(item.x, item.y, 8, 8, texture, renderer);
|
sprite = new Sprite(item.x, item.y, 8, 8, texture, renderer);
|
||||||
|
|
||||||
// Inicia variables
|
// Inicia variables
|
||||||
|
|||||||
139
source/utils.cpp
139
source/utils.cpp
@@ -143,70 +143,173 @@ bool checkCollision(SDL_Point &p, SDL_Rect &r)
|
|||||||
// Devuelve un color_t a partir de un string
|
// Devuelve un color_t a partir de un string
|
||||||
color_t stringToColor(std::string str)
|
color_t stringToColor(std::string str)
|
||||||
{
|
{
|
||||||
color_t color = {0x00, 0x00, 0x00};
|
const std::string palette = "spectrum";
|
||||||
|
|
||||||
|
if (palette = "spectrum")
|
||||||
|
{
|
||||||
if (str == "black")
|
if (str == "black")
|
||||||
{
|
{
|
||||||
color = {0x00, 0x00, 0x00};
|
return {0x00, 0x00, 0x00};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "light_black")
|
else if (str == "light_black")
|
||||||
{
|
{
|
||||||
color = {0x3C, 0x35, 0x1F};
|
return {0x00, 0x00, 0x00};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "blue")
|
else if (str == "blue")
|
||||||
{
|
{
|
||||||
color = {0x31, 0x33, 0x90};
|
return {0x00, 0x00, 0xFF};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "light_blue")
|
else if (str == "light_blue")
|
||||||
{
|
{
|
||||||
color = {0x15, 0x59, 0xDB};
|
return {0x00, 0x00, 0xEE};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "red")
|
else if (str == "red")
|
||||||
{
|
{
|
||||||
color = {0xA7, 0x32, 0x11};
|
return {0xFF, 0x00, 0x00};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "light_red")
|
else if (str == "light_red")
|
||||||
{
|
{
|
||||||
color = {0xD8, 0x55, 0x25};
|
return {0xEE, 0x00, 0x00};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "purple")
|
else if (str == "purple")
|
||||||
{
|
{
|
||||||
color = {0xA1, 0x55, 0x89};
|
return {0xFF, 0x00, 0xFF};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "light_purple")
|
else if (str == "light_purple")
|
||||||
{
|
{
|
||||||
color = {0xCD, 0x7A, 0x50};
|
return {0xEE, 0x00, 0xEE};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "green")
|
else if (str == "green")
|
||||||
{
|
{
|
||||||
color = {0x62, 0x9A, 0x31};
|
return {0x00, 0xFF, 0x00};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "light_green")
|
else if (str == "light_green")
|
||||||
{
|
{
|
||||||
color = {0x9C, 0xD3, 0x3C};
|
return {0x00, 0xEE, 0x00};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "cyan")
|
else if (str == "cyan")
|
||||||
{
|
{
|
||||||
color = {0x28, 0xA4, 0xCB};
|
return {0x00, 0xFF, 0xFF};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "light_cyan")
|
else if (str == "light_cyan")
|
||||||
{
|
{
|
||||||
color = {0x65, 0xDC, 0xD6};
|
return {0x00, 0xEE, 0xEE};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "yellow")
|
else if (str == "yellow")
|
||||||
{
|
{
|
||||||
color = {0xE8, 0xBC, 0x50};
|
return {0xFF, 0xFF, 0x00};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "light_yellow")
|
else if (str == "light_yellow")
|
||||||
{
|
{
|
||||||
color = {0xF1, 0xE7, 0x82};
|
return {0xEE, 0xEE, 0x00};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "white")
|
else if (str == "white")
|
||||||
{
|
{
|
||||||
color = {0xBF, 0xBF, 0xBD};
|
return {0xEE, 0xEE, 0xEE};
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (str == "light_white")
|
else if (str == "light_white")
|
||||||
{
|
{
|
||||||
color = {0xF2, 0xF1, 0xED};
|
return {0xFF, 0xFF, 0xFF};
|
||||||
}
|
}
|
||||||
return color;
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (str == "black")
|
||||||
|
{
|
||||||
|
return {0x00, 0x00, 0x00};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "light_black")
|
||||||
|
{
|
||||||
|
return {0x3C, 0x35, 0x1F};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "blue")
|
||||||
|
{
|
||||||
|
return {0x31, 0x33, 0x90};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "light_blue")
|
||||||
|
{
|
||||||
|
return {0x15, 0x59, 0xDB};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "red")
|
||||||
|
{
|
||||||
|
return {0xA7, 0x32, 0x11};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "light_red")
|
||||||
|
{
|
||||||
|
return {0xD8, 0x55, 0x25};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "purple")
|
||||||
|
{
|
||||||
|
return {0xA1, 0x55, 0x89};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "light_purple")
|
||||||
|
{
|
||||||
|
return {0xCD, 0x7A, 0x50};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "green")
|
||||||
|
{
|
||||||
|
return {0x62, 0x9A, 0x31};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "light_green")
|
||||||
|
{
|
||||||
|
return {0x9C, 0xD3, 0x3C};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "cyan")
|
||||||
|
{
|
||||||
|
return {0x28, 0xA4, 0xCB};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "light_cyan")
|
||||||
|
{
|
||||||
|
return {0x65, 0xDC, 0xD6};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "yellow")
|
||||||
|
{
|
||||||
|
return {0xE8, 0xBC, 0x50};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "light_yellow")
|
||||||
|
{
|
||||||
|
return {0xF1, 0xE7, 0x82};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "white")
|
||||||
|
{
|
||||||
|
return {0xBF, 0xBF, 0xBD};
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (str == "light_white")
|
||||||
|
{
|
||||||
|
return {0xF2, 0xF1, 0xED};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {0x00, 0x00, 0x00};
|
||||||
}
|
}
|
||||||
12
todo.txt
12
todo.txt
@@ -7,9 +7,9 @@ x (A) Colisiones con los enemigos {cm:2022-08-29}
|
|||||||
x (A) Decidir un diseño para qué sucede en caso de morir: Recordar el punto por donde se entró al mapa y la velocidad en el eje X/Y que llevaba el personaje, crear puntos de reaparicion en las habitaciones, etc {cm:2022-08-29}
|
x (A) Decidir un diseño para qué sucede en caso de morir: Recordar el punto por donde se entró al mapa y la velocidad en el eje X/Y que llevaba el personaje, crear puntos de reaparicion en las habitaciones, etc {cm:2022-08-29}
|
||||||
x En el Jet Set Willy el juego recuerda la posicion y el momento. En las Tres Luces de Glaurung solo la posición. Se va a optar por seguir el diseño del Jet Set Willy {cm:2022-08-29}
|
x En el Jet Set Willy el juego recuerda la posicion y el momento. En las Tres Luces de Glaurung solo la posición. Se va a optar por seguir el diseño del Jet Set Willy {cm:2022-08-29}
|
||||||
x (A) Crear tiles que maten {cm:2022-08-29}
|
x (A) Crear tiles que maten {cm:2022-08-29}
|
||||||
(A) Modificar el salto para que coincida con el del JSW, no ha de colisionar lateralmente
|
x (A) Modificar el salto para que coincida con el del JSW, no ha de colisionar lateralmente
|
||||||
|
|
||||||
(A) Crear tiles que deslicen, (no tipo hielo sino cinta)
|
(A) Crear tiles que arrastren, tipo cinta transportadora
|
||||||
(A) Tiles animados
|
(A) Tiles animados
|
||||||
(A) Crear ascensores
|
(A) Crear ascensores
|
||||||
x (A) Enemigos de diferente tamaño {cm:2022-08-30}
|
x (A) Enemigos de diferente tamaño {cm:2022-08-30}
|
||||||
@@ -27,10 +27,10 @@ x (A) Tecla + y - para cambiar tamaño de ventana. O control F1 a F4 {cm:2022-08
|
|||||||
(A) Añadir a cada habitación el color del nombre de la habitación
|
(A) Añadir a cada habitación el color del nombre de la habitación
|
||||||
|
|
||||||
x (A) Crear el logo al estilo del logo de ERBE o TOPO, con lineas que lo formen
|
x (A) Crear el logo al estilo del logo de ERBE o TOPO, con lineas que lo formen
|
||||||
(A) El titulo del juego hacerlo parecido al del Jet Set Willy in Paris
|
x (A) El titulo del juego hacerlo parecido al del Jet Set Willy in Paris
|
||||||
- Ha de generarse como las cargas de pantalla de spectrum
|
x - Ha de generarse como las cargas de pantalla de spectrum
|
||||||
- Luego se colorea
|
x - Luego se colorea
|
||||||
- Finalmente, cada elemento cambia de color como si fueran luces de neon
|
x - Finalmente, cada elemento cambia de color como si fueran luces de neon
|
||||||
x (A) En el titulo del juego, por la parte inferior ha de aparecer una marquesina con texto, al estilo demoscene
|
x (A) En el titulo del juego, por la parte inferior ha de aparecer una marquesina con texto, al estilo demoscene
|
||||||
x (A) La pantalla de titulo no tiene menu, solo un PRESS ENTER TO PLAY
|
x (A) La pantalla de titulo no tiene menu, solo un PRESS ENTER TO PLAY
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user