@@ -179,14 +179,39 @@ void drawMainObjects(SDL_Renderer *renderer)
179
179
SDL_DestroyTexture (txt );
180
180
}
181
181
182
+ int current_hit_up = 0 ;
183
+ int current_hit_up1 = 0 ;
182
184
183
185
void drawMainMenu (SDL_Renderer * renderer , SDL_Texture * logo , SDL_Texture * start )
184
186
{
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 };
186
210
SDL_RenderCopy (renderer , logo , NULL , & LogoPos );
187
211
SDL_Rect StartPos = {160 , 100 , 480 ,32 };
188
212
SDL_RenderCopy (renderer , start , NULL , & StartPos );
189
213
214
+ SDL_SetRenderDrawColor (renderer , 100 , 100 , 100 , 100 );
190
215
}
191
216
192
217
void drawGameOver (SDL_Renderer * renderer , SDL_Texture * gameOver , SDL_Texture * restartScreen )
0 commit comments