gfx and 2-2 and multi objects
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user