switching to cmake; alyson setup

This commit is contained in:
n0ffie 2025-02-06 22:47:32 +01:00
parent 9504620227
commit 23a40216de
20 changed files with 307 additions and 125300 deletions

View file

@ -0,0 +1,17 @@
#pragma once
#ifndef ALYSON_HPP
#define ALYSON_HPP
#ifndef ASSETS_PATH
#define ASSETS_PATH "./assets/"
#endif
#define MANGLE_RES_PATH(path) ASSETS_PATH "/" path
int init();
void update(float dt);
void render(float dt);
#endif // ALYSON_HPP

42
alyson/includes/rlyson.h Normal file
View file

@ -0,0 +1,42 @@
#ifndef RLYSON_HPP
#define RLYSON_HPP
#include <raylib.h>
/*
the following functions are not part of the raylib API,
but are used by alyson and can be used by other projects using alyson
*/
typedef enum {
TEXT_ORIENTATION_LEFT,
TEXT_ORIENTATION_RIGHT,
TEXT_ORIENTATION_CENTER
} text_orientation_t;
/*
* Draws a text with all possible parameters
* @function DrawTextFull
* @param font Font to use
* @param text Text to draw
* @param origin Position to draw the text from
* @param orientation Text orientation
* @param fontSize Font size
* @param spacing Spacing between letters
* @param lineSpacing Line spacing
* @param tint Tint of the text
*/
void DrawTextFull(
Font font,
const char *text,
Vector2 origin,
text_orientation_t orientation,
float fontSize,
float spacing,
float lineSpacing,
Color tint
);
#endif // RLYSON_HPP