gfx and 2-2 and multi objects

This commit is contained in:
2026-02-08 20:01:32 -06:00
parent ce57691f96
commit e06ab8f76b
12 changed files with 483 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdbool.h>
#include <time.h>
#include <init.h>
#include <SDL2/SDL.h>
@@ -23,12 +24,15 @@ int main(int argc, char *argv[])
}
srand(time(NULL));
OBJECT obj = init_stuffs(startw,starth);
STUFFS stuff = {
startw,
starth,
false,
0,
0,
&obj,
};
@@ -47,9 +51,11 @@ int main(int argc, char *argv[])
} else if(e.type==SDL_MOUSEBUTTONUP){
stuff.mousedown=false;
}
stuff.mx=e.button.x;
stuff.my=e.button.y;
}
draw(renderer,window,&stuff);
SDL_Delay(30);
SDL_Delay(10);
}
SDL_DestroyRenderer(renderer);