Sa marche putain!
This commit is contained in:
+18
-2
@@ -1,16 +1,32 @@
|
||||
#include "renderer.h"
|
||||
#include "text.h"
|
||||
#include <SDL2/SDL_image.h>
|
||||
#include <SDL2/SDL_surface.h>
|
||||
|
||||
int main(void) {
|
||||
renderer_main();
|
||||
RenderObject_t text;
|
||||
SDL_Color white = {128, 128, 128, 128};
|
||||
SDL_Color white = {255, 255, 255, 255};
|
||||
TTF_Init();
|
||||
if(text_renderText(&text, 0.f, 0.f, 1, white, "/home/gryf/.local/share/fonts/ARIAL.TTF", 25, "Hello World") < 0){
|
||||
if(text_renderText(&text, 0.f, 0.f, 1000, 1, white, "/usr/share/fonts/TTF/arial.ttf", 25, "Hello World") < 0){
|
||||
printf("error");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
SDL_Surface* img = IMG_Load("pp.png");
|
||||
|
||||
RenderObject_t duck = {
|
||||
0.2,
|
||||
0.2,
|
||||
0,
|
||||
0.50,
|
||||
0.50,
|
||||
0,
|
||||
img
|
||||
};
|
||||
|
||||
renderer_renderObject(text);
|
||||
renderer_renderObject(duck);
|
||||
while(1);
|
||||
|
||||
text_freeFontCache();
|
||||
|
||||
Reference in New Issue
Block a user