diff --git a/Examples/SpriteHandler_examples.h b/Examples/SpriteHandler_examples.h index 9ba994d..11b003c 100644 --- a/Examples/SpriteHandler_examples.h +++ b/Examples/SpriteHandler_examples.h @@ -233,17 +233,25 @@ namespace sprite_handler begin_screen(); int anim_frame = 0; - return_cursor(); - sh.clear(); - sprh.draw(sh, anim_frame); - sh.print_screen_buffer(Color::Black); - Delay::sleep(0'200'000); - - kpd = keyboard->readKey(); - auto key = keyboard::get_char_key(kpd); - auto lo_key = str::to_lower(key); - if (lo_key == 'q') - goto quit; + for (int i = 0; i < 100; ++i) + { + float t = i / 99.f; + float ang = t*360.f; + + sprite0->set_rotation(ang); + + return_cursor(); + sh.clear(); + sprh.draw(sh, anim_frame); + sh.print_screen_buffer(Color::Black); + Delay::sleep(0'20'000); + + kpd = keyboard->readKey(); + auto key = keyboard::get_char_key(kpd); + auto lo_key = str::to_lower(key); + if (lo_key == 'q') + goto quit; + } quit: end_screen(sh);