did you test this?
That's why I've renamed the structures since I first used the RayLib.
This function also only needs Vector2.
This doesn't work!
Code: Select all
#include "raylib_pb_helper.h"
#include "rlgl.h"
void pbhelper_DrawTextPro(Font* font, const char *text, Vector2 *position, Vector2 *origin, float rotation, float fontSize, float spacing, Color tint) {
if( font && text && position && origin)
rlPushMatrix();
rlTranslatef(position->x, position->y, 0.0f);
rlRotatef(rotation, 0.0f, 0.0f, 1.0f);
rlTranslatef(-origin->x, -origin->y, 0.0f);
DrawTextEx(*font, text, (Vector2){ 0.0f, 0.0f }, fontSize, spacing, tint);
rlPopMatrix();
}
It is considered solved.
I had only one small mistake in this declaration (raylib.pbi)
DrawTextPro(*in_font.ray::Font, text.p-utf8, *in_position.ray::Vector2, *origin.ray::Vector2, rotation.rl_float, fontSize.rl_float, spacing.rl_float, tint.rl_ColorLong) __PBAS(DrawTextPro) (Mistake with float - Variable)
A small note:
The matrix structure exists both in "raylib.h" and in "rlgl.h".
(On MacOS the OSX_DEPLOYMENT_TARGET = 11.0) > 11 not work!
It works!
/*
The "raylib4.2" has so many great improvements and additional useful features.
I'm trying to keep porting it. (no ugly inline-c)
*/