1.1 --- a/examples/vga/main.c Sat Nov 10 19:06:08 2018 +0100
1.2 +++ b/examples/vga/main.c Sat Nov 10 19:20:13 2018 +0100
1.3 @@ -95,10 +95,6 @@
1.4
1.5 uint8_t *screen_starts[FRAME_COUNT];
1.6
1.7 -/* Origin details for the viewport. */
1.8 -
1.9 -int xorigins[FRAME_COUNT], yorigins[FRAME_COUNT];
1.10 -
1.11
1.12
1.13 /* Bundled image and font data. */
1.14 @@ -208,12 +204,11 @@
1.15
1.16 /* Scrolling viewport. */
1.17
1.18 - viewport_t v;
1.19 + Viewport(v, &display_config, SCROLL_XSTEP, SOURCE_YSTEP, plot_screen_edge);
1.20
1.21 - /* Initialise the viewport. */
1.22 + /* Reset the viewport to a well-defined state. */
1.23
1.24 - init_viewport(&v, &display_config, xorigins, yorigins,
1.25 - SCROLL_XSTEP, SOURCE_YSTEP, plot_screen_edge);
1.26 + viewport_set_origin(&v, 0, 0);
1.27
1.28 /* Animation loop. */
1.29