Acabat el nou motor per a textos en pantalla
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
#include "text.h"
|
||||
#include <SDL2/SDL_rect.h> // Para SDL_Rect
|
||||
#include <fstream> // Para basic_ifstream, basic_istream, basic_ostream
|
||||
#include <iostream> // Para cerr
|
||||
#include <stdexcept> // Para runtime_error
|
||||
#include "sprite.h" // Para Sprite
|
||||
#include "screen.h" // Para Screen
|
||||
#include "texture.h" // Para Texture
|
||||
#include "utils.h" // Para Color, getFileName, printWithDots
|
||||
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||
#include <SDL2/SDL_render.h> // for SDL_TEXTUREACCESS_TARGET
|
||||
#include <stddef.h> // for size_t
|
||||
#include <fstream> // for basic_ifstream, basic_istream, basic...
|
||||
#include <iostream> // for cerr
|
||||
#include <stdexcept> // for runtime_error
|
||||
#include "screen.h" // for Screen
|
||||
#include "sprite.h" // for Sprite
|
||||
#include "texture.h" // for Texture
|
||||
#include "utils.h" // for Color, getFileName, printWithDots
|
||||
|
||||
// Llena una estructuta TextFile desde un fichero
|
||||
std::shared_ptr<TextFile> loadTextFile(const std::string &file_path)
|
||||
@@ -46,9 +50,7 @@ std::shared_ptr<TextFile> loadTextFile(const std::string &file_path)
|
||||
{
|
||||
// Almacena solo las lineas impares
|
||||
if (line_read % 2 == 1)
|
||||
{
|
||||
tf->offset[index++].w = std::stoi(buffer);
|
||||
}
|
||||
|
||||
// Limpia el buffer
|
||||
buffer.clear();
|
||||
|
||||
Reference in New Issue
Block a user