It works perfectly! Thank you so much for the help! ![]()
Here is the new game loop:
while( quit == false )
{
Uint32 ticks = delta.get_ticks();
scrolling_background();
if( tileedit ) editor_show( current_tile );
while( SDL_PollEvent( &event ) )
{
if( event.type == SDL_KEYDOWN )
{
if( event.key.keysym.sym == SDLK_t ) tileedit = !tileedit;
}
if( event.type == SDL_QUIT ) quit = true;
if( tileedit == false ) player1.control();
else if( tileedit ) editor_control( tiles );
}
if( tileedit == false )
{
player1.jump();
scrolling_background();
player1.move( ticks , tiles );
enemy1.move_enemy( ticks , tiles );
player1.player_camera();
}
else editor_camera();
for( int t = 0 ; t < TOTAL_TILES ; t++ )
{
tiles[t]->show();
}
if( tileedit == false ) player1.show();
enemy1.show();
if( SDL_Flip( screen ) == -1 ) return 5;
}
Thanks again. ![]()

Find content
Not Telling