Move pragmautil.hpp into core

This commit is contained in:
Tulpen 2023-05-30 15:20:34 +01:00
parent 53675a789c
commit 9c76df4faa
7 changed files with 10 additions and 15 deletions

View file

@ -1,6 +1,6 @@
#include "enginever.hpp"
#include "engine.hpp"
#include <pragmautil.hpp>
#include "../pragmautil.hpp"
#include <core/graphics/drawable.hpp>
namespace hibis {

View file

@ -3,7 +3,7 @@
namespace hibis {
class Node {
public:
virtual void process(float delta) = 0;
virtual void physicsProcess(float delta) = 0;
virtual void process(float delta) {}
virtual void physicsProcess(float delta) {}
};
}
}

View file

@ -1,7 +1,7 @@
#pragma once
#include "resource.hpp"
#include <pragmautil.hpp>
#include "../pragmautil.hpp"
namespace hibis {
TODO("Make this function")

View file

@ -8,7 +8,7 @@ confdata.set('version', meson.project_version())
configure_file(input: 'core/enginever.in.hpp', output: 'enginever.hpp', configuration: confdata)
# Include Directory
include_dirs = include_directories('./include')
include_dirs = [] # include_directories('./include')
# Files
libhibis_src_core = files('core/engine/engine.cpp')

View file

@ -59,21 +59,16 @@ namespace hibis::rsdl {
}
void RSDL::drawText(Resource* resource, std::string text, IntVec2 pos, Color color) {
WARNING("tulip what the hell is this, this sucks.\nAvoid remaking textures every time text has to be drawn")
WARNING("(Tulip, this is abysmal) Avoid remaking textures every time text has to be drawn")
if (Font* font = (Font*)resource) {
SDL_Surface* textSurface = TTF_RenderText_Solid(font->mLoadedFont, text.c_str(), SDL_Color {color.r, color.g, color.b, color.a });
SDL_Texture* textTexture = SDL_CreateTextureFromSurface(mRendererContext, textSurface);
int width = 0;
int height = 0;
TTF_SizeText(font->mLoadedFont, text.c_str(), &width, &height);
SDL_Rect textRect;
textRect.x = pos.x;
textRect.y = pos.y;
textRect.w = width;
textRect.h = height;
TTF_SizeText(font->mLoadedFont, text.c_str(), &textRect.w, &textRect.h);
SDL_RenderCopy(mRendererContext, textTexture, NULL, &textRect);

View file

@ -14,7 +14,7 @@
#include <pragmautil.hpp>
#if defined(_MSC_VER) || defined(_MSC_FULL_VER)
WARNING("Please avoid using MSVC in C++ projects utilising std::chrono due to frame timing issues")
WARNING("Please avoid using MSVC in C++ projects utilising std::chrono and std::this_thread due to unfixed frame timing issues in the MSVC C++ implementation")
#endif
using namespace hibis;