migrant a SDL3

This commit is contained in:
2025-03-25 20:26:45 +01:00
parent f1b0303474
commit a9c869baf6
49 changed files with 374 additions and 416 deletions

View File

@@ -1,5 +1,5 @@
#include "bullet.h"
#include <SDL3/SDL_rect.h> // Para SDL_Rect
#include <SDL3/SDL_rect.h> // Para SDL_FRect
#include <memory> // Para unique_ptr, make_unique, shared_ptr
#include "param.h" // Para Param, ParamGame, param
#include "sprite.h" // Para Sprite
@@ -7,7 +7,7 @@ class Texture; // lines 5-5
// Constructor
Bullet::Bullet(int x, int y, BulletType bullet_type, bool powered_up, int owner, std::shared_ptr<Texture> texture)
: sprite_(std::make_unique<Sprite>(texture, SDL_Rect{x, y, BULLET_WIDTH_, BULLET_HEIGHT_})),
: sprite_(std::make_unique<Sprite>(texture, SDL_FRect{x, y, BULLET_WIDTH_, BULLET_HEIGHT_})),
pos_x_(x),
pos_y_(y),
bullet_type_(bullet_type),