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