Files
dusk/src2/sdl_assets_loader.h
2026-02-04 10:16:16 -06:00

21 lines
518 B
C++

#pragma once
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_mixer.h>
#include <SDL2/SDL_ttf.h>
#include <iostream>
typedef struct
{
SDL_Texture *texture;
SDL_Rect textureBounds;
} Sprite;
Sprite loadSprite(SDL_Renderer *renderer, const char *filePath, int positionX, int positionY);
Mix_Chunk *loadSound(const char *filePath);
Mix_Music *loadMusic(const char *filePath);
void updateTextureText(SDL_Texture *&texture, const char *text, TTF_Font *&fontSquare, SDL_Renderer *renderer);