ja pinta el logo en tamany 1:1
moguda la logica del main a la classe Logo
This commit is contained in:
27
source/logo.h
Normal file
27
source/logo.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <memory>
|
||||
#include "surface.h"
|
||||
#include "s_sprite.h"
|
||||
|
||||
class Logo
|
||||
{
|
||||
|
||||
private:
|
||||
bool running = true;
|
||||
Uint64 ticks = 0;
|
||||
std::shared_ptr<Surface> logo_surface = nullptr;
|
||||
std::unique_ptr<SSprite> logo_sprite = nullptr;
|
||||
|
||||
void init();
|
||||
void close();
|
||||
void checkEvents();
|
||||
void update();
|
||||
void render();
|
||||
|
||||
public:
|
||||
Logo();
|
||||
~Logo();
|
||||
int run();
|
||||
};
|
||||
Reference in New Issue
Block a user