twn_rendering -> twn_draw

This commit is contained in:
2024-10-07 17:53:09 +03:00
parent 9353999a30
commit ade1af12ca
22 changed files with 238 additions and 186 deletions

View File

@ -1,5 +1,5 @@
#include "twn_rendering_c.h"
#include "twn_rendering.h"
#include "twn_draw_c.h"
#include "twn_draw.h"
#include "twn_util.h"
#include "twn_config.h"
#include "twn_engine_context_c.h"
@ -248,7 +248,7 @@ void text_cache_reset_arena(TextCache *cache) {
}
void push_text(char *string, Vec2 position, int height_px, Color color, const char *font_path) {
void draw_text(const char *string, Vec2 position, int height_px, Color color, const char *font_path) {
ensure_font_cache(font_path, height_px);
/* the original string might not be around by the time it's used, so copy it */
@ -273,7 +273,7 @@ void push_text(char *string, Vec2 position, int height_px, Color color, const ch
}
int text_get_width(char *string, int height_px, const char *font_path) {
int draw_text_width(const char *string, int height_px, const char *font_path) {
ensure_font_cache(font_path, height_px);
FontData *font_data = get_font_data(font_path, height_px);