You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
496 B

#include "sprite.h"
#include "raylib.h"
#include <stdio.h>
void SpriteAdd(Sprite *sprites, int *spriteAmount, Texture2D *texture, int x, int y){
if(*spriteAmount < 100){
(sprites + *spriteAmount) -> texture = texture;
(sprites + *spriteAmount) -> x = x;
(sprites + *spriteAmount) -> y = y;
(*spriteAmount)++;
}
else{
printf("Voll\n");
}
}
void DrawSprite(Sprite *sprite){
DrawTexture(*sprite->texture, sprite->x, sprite->y, WHITE);
}