Merge branch 'master' of ssh.marcbarbier.fr:Marc/gamejam-polytech

This commit is contained in:
2023-01-21 12:58:58 +01:00
8 changed files with 67 additions and 36 deletions
+10 -2
View File
@@ -8,7 +8,7 @@
#include <SDL2/SDL_surface.h>
#include <time.h>
#include <unistd.h>
#include "scaller.h"
long timecode;
long iter;
@@ -29,10 +29,11 @@ static void game_main(void) {
//main game code
if(iter == 0) {
menu_render();
RenderObject_t text;
SDL_Color white = {255, 255, 255, 255};
TTF_Init();
if(text_renderText(&text, 0.f, 0.f, 1000, 1, white, "./assets/fonts/arial.ttf", 25, "Hello World") < 0){
if(text_renderText(&text, 0.1f, 0.1f, 1000, 1, white, "./assets/fonts/arial.ttf", 25, "Hello World") < 0){
printf("error");
exit(1);
}
@@ -40,14 +41,21 @@ static void game_main(void) {
SDL_Surface* img = IMG_Load("./assets/img/pp.png");
RenderObject_t duck = {
<<<<<<< HEAD
0.25,
0.25,
=======
0.5,
0.5,
>>>>>>> 781f4ba7beb2793dbdb38f1f2ca35f8a5fb52da3
0,
0.50,
0.50,
0,
img
};
scaller(duck.surface, 1, &duck.width, &duck.height);
placer(duck.surface, 1, &duck.x, &duck.y);
renderer_renderObject(text);
renderer_renderObject(duck);