arreglos en la estructura
afegida una escena de test
This commit is contained in:
1 parent
6961986ad2
commit
9b168f02eb
13 files changed
+142
-49
No files matched your search
@@ -1,8 +0,0 @@
|
||||
#include <memory>
|
||||
|
||||
#include "system/director.hpp"
|
||||
|
||||
auto main() -> int {
|
||||
auto director = std::make_unique<Director>();
|
||||
return 0;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "rendering/video.hpp"
|
||||
// video.cpp
|
||||
|
||||
#include "video.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
@@ -54,7 +56,7 @@ auto Video::initSDL() -> int {
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
}
|
||||
//SDL_SetTextureScaleMode(game_texture_, toSdlScaleMode(config_.texture_filter));
|
||||
// SDL_SetTextureScaleMode(game_texture_, toSdlScaleMode(config_.texture_filter));
|
||||
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Video subsystem initialized successfully");
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// video.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
namespace Defaults::Video {
|
||||
constexpr int ZOOM = 3;
|
||||
constexpr bool FULLSCREEN = false;
|
||||
constexpr float WIDTH = 320.0F;
|
||||
constexpr float HEIGHT = 240.0F;
|
||||
} // namespace Defaults::Video
|
||||
@@ -1,26 +0,0 @@
|
||||
#include "system/director.hpp"
|
||||
|
||||
#include "rendering/video.hpp"
|
||||
#include "system/defaults.hpp"
|
||||
|
||||
Director::Director() {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Game start!");
|
||||
|
||||
video = std::make_shared<Video>(
|
||||
Video::Config{
|
||||
Defaults::Video::FULLSCREEN,
|
||||
Defaults::Video::ZOOM,
|
||||
Defaults::Video::WIDTH,
|
||||
Defaults::Video::HEIGHT});
|
||||
}
|
||||
|
||||
Director::~Director() {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Bye!");
|
||||
SDL_Quit();
|
||||
}
|
||||
|
||||
auto Director::iterate() -> int {
|
||||
return 0;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "rendering/video.hpp"
|
||||
|
||||
class Director {
|
||||
public:
|
||||
Director();
|
||||
~Director();
|
||||
|
||||
auto iterate() -> int;
|
||||
|
||||
private:
|
||||
std::shared_ptr<Video> video;
|
||||
};
|
||||
Reference in new issue
Block a user