afegit gif.cpp i jail_shader.cpp desde coffee_crisis_arcade_edition
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
#include "notifier.h"
|
||||
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||
#include <SDL2/SDL_render.h> // for SDL_RenderFillRect, SDL_RenderClear
|
||||
#include <algorithm> // for remove_if
|
||||
#include <string> // for string, basic_string
|
||||
#include <vector> // for vector
|
||||
#include "jail_audio.h" // for JA_PlaySound
|
||||
#include "options.h" // for Options, options, OptionsNotification
|
||||
#include "resource.h" // for Resource
|
||||
#include "screen.h" // for Screen
|
||||
#include "s_sprite.h" // for SSprite
|
||||
#include "text.h" // for Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "surface.h" // for Surface
|
||||
#include <SDL2/SDL_timer.h> // Para SDL_GetTicks
|
||||
#include <algorithm> // Para remove_if
|
||||
#include <iterator> // Para prev
|
||||
#include <string> // Para string, basic_string
|
||||
#include <vector> // Para vector
|
||||
#include "jail_audio.h" // Para JA_PlaySound
|
||||
#include "options.h" // Para Options, options, NotificationPosition
|
||||
#include "resource.h" // Para Resource
|
||||
#include "s_sprite.h" // Para SSprite
|
||||
#include "screen.h" // Para Screen
|
||||
#include "surface.h" // Para Surface
|
||||
#include "text.h" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "utils.h" // Para PaletteColor
|
||||
|
||||
// [SINGLETON]
|
||||
Notifier *Notifier::notifier_ = nullptr;
|
||||
@@ -59,8 +59,8 @@ void Notifier::update()
|
||||
// Si la notificación anterior está "saliendo", no hagas nada
|
||||
if (!notifications_.empty() && ¬ification != ¬ifications_.front())
|
||||
{
|
||||
auto &previous_notification = *(std::prev(¬ification));
|
||||
if (previous_notification.state == NotificationStatus::RISING)
|
||||
const auto &PREVIOUS_NOTIFICATION = *(std::prev(¬ification));
|
||||
if (PREVIOUS_NOTIFICATION.state == NotificationStatus::RISING)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -236,8 +236,8 @@ void Notifier::show(std::vector<std::string> texts, NotificationText text_is, Ui
|
||||
else if (SHAPE == NotificationShape::SQUARED)
|
||||
{
|
||||
n.surface->clear(bg_color_);
|
||||
SDL_Rect rect = {0, 0, n.surface->getWidth(), n.surface->getHeight()};
|
||||
n.surface->drawRectBorder(&rect, static_cast<Uint8>(PaletteColor::CYAN));
|
||||
SDL_Rect squared_rect = {0, 0, n.surface->getWidth(), n.surface->getHeight()};
|
||||
n.surface->drawRectBorder(&squared_rect, static_cast<Uint8>(PaletteColor::CYAN));
|
||||
}
|
||||
|
||||
// Dibuja el icono de la notificación
|
||||
|
||||
Reference in New Issue
Block a user