parent
4cc6db1a87
commit
a4caadbfc4
@ -1,14 +1,19 @@
|
|||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
void SpriteAdd(struct Sprite *cursors, int *j, Texture2D *texture, int x, int y){
|
void SpriteAdd(struct Sprite *sprites, int *spriteAmount, Texture2D *texture, int x, int y){
|
||||||
if(*j < 100){
|
if(*spriteAmount < 100){
|
||||||
(cursors + *j) -> texture = texture;
|
(sprites + *spriteAmount) -> texture = texture;
|
||||||
(cursors + *j) -> x = x;
|
(sprites + *spriteAmount) -> x = x;
|
||||||
(cursors + *j) -> y = y;
|
(sprites + *spriteAmount) -> y = y;
|
||||||
(*j)++;
|
(*spriteAmount)++;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
printf("Voll\n");
|
printf("Voll\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DrawSprite(struct Sprite *sprite){
|
||||||
|
DrawTexture(*sprite->texture, sprite->x, sprite->y, WHITE);
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in new issue