locLogo y stars

main
fanta 3 weeks ago
parent 3e72683a68
commit 73547e5aa2

BIN
bocm

Binary file not shown.

@ -47,18 +47,16 @@ int loadBackgroundColor(void){
return 0; return 0;
} }
int locLogo(void){ void locLogo(int x, int y){
SDL_Rect srcrect = {0, 0, 100, 73}; SDL_Rect srcrect = {0, 0, 100, 73};
SDL_Rect dstrect = {10, 10, 100, 73}; SDL_Rect dstrect = {x, y, 100, 73};
SDL_RenderCopy(renderer, texture, &srcrect, &dstrect); SDL_RenderCopy(renderer, texture, &srcrect, &dstrect);
return 0;
} }
int locStars(void){ void locStars(int x, int y){
SDL_Rect srcrect = {1, 32, 22, 21}; SDL_Rect srcrect = {1, 32, 22, 21};
SDL_Rect dstrect = {100, 100, 22, 21}; SDL_Rect dstrect = {x, y, 22, 21};
SDL_RenderCopy(renderer, texture, &srcrect, &dstrect); SDL_RenderCopy(renderer, texture, &srcrect, &dstrect);
return 0;
} }
int destroy(void){ int destroy(void){

@ -10,8 +10,13 @@ int windowLoop(void){
} }
loadBackgroundColor(); loadBackgroundColor();
locLogo(); locLogo(10,10);
locStars(); locStars(135,43);
locStars(135,83);
locStars(135,123);
locStars(135,163);
locLogo(200,200);
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);

Loading…
Cancel
Save