Skip to content

Commit 9915ee7

Browse files
committed
Праска хуй
1 parent 30ff06b commit 9915ee7

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

main.c

+26-1
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,39 @@ void drawMainObjects(SDL_Renderer *renderer)
179179
SDL_DestroyTexture(txt);
180180
}
181181

182+
int current_hit_up = 0;
183+
int current_hit_up1 = 0;
182184

183185
void drawMainMenu(SDL_Renderer *renderer, SDL_Texture *logo, SDL_Texture *start)
184186
{
185-
SDL_Rect LogoPos = {200, 10, 480,32};
187+
SDL_Texture *texture_for_standing_in_plus[4];
188+
const char *standing_files_in_plus[4] = {"../Sprites/bot_down1.bmp", "../Sprites/bot_down2.bmp", "../Sprites/bot_down1.bmp", "../Sprites/bot_down2.bmp"};
189+
if(loadTextureArray(renderer, standing_files_in_plus, 4, texture_for_standing_in_plus) != 0)
190+
{
191+
return;
192+
}
193+
SDL_Rect hut = {300, 400, 150, 150};
194+
SDL_RenderCopy(renderer, texture_for_standing_in_plus[current_hit_up % 4], NULL, &hut);
195+
current_hit_up = (current_hit_up + 1) % 4;
196+
197+
SDL_Texture *texture_for[4];
198+
const char *standing_files[4] = {"../Sprites/stand1.bmp", "../Sprites/stand2.bmp", "../Sprites/stand2.bmp", "../Sprites/stand1.bmp"};
199+
if(loadTextureArray(renderer, standing_files, 4, texture_for) != 0)
200+
{
201+
return;
202+
}
203+
SDL_Rect hut1 = {100, 400, 170, 150};
204+
SDL_RenderCopy(renderer, texture_for[current_hit_up1 % 4], NULL, &hut1);
205+
current_hit_up1 = (current_hit_up1 + 1) % 4;
206+
207+
SDL_Delay(100);
208+
209+
SDL_Rect LogoPos = {200, 10, 480, 32};
186210
SDL_RenderCopy(renderer, logo, NULL, &LogoPos);
187211
SDL_Rect StartPos = {160, 100, 480,32};
188212
SDL_RenderCopy(renderer, start, NULL, &StartPos);
189213

214+
SDL_SetRenderDrawColor(renderer, 100, 100, 100, 100);
190215
}
191216

192217
void drawGameOver(SDL_Renderer *renderer, SDL_Texture *gameOver, SDL_Texture *restartScreen)

0 commit comments

Comments
 (0)