1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/lib/image.c Sat Nov 10 17:03:17 2018 +0100
1.3 @@ -0,0 +1,36 @@
1.4 +/*
1.5 + * Common image-related functions.
1.6 + *
1.7 + * Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk>
1.8 + *
1.9 + * This program is free software: you can redistribute it and/or modify
1.10 + * it under the terms of the GNU General Public License as published by
1.11 + * the Free Software Foundation, either version 3 of the License, or
1.12 + * (at your option) any later version.
1.13 + *
1.14 + * This program is distributed in the hope that it will be useful,
1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.17 + * GNU General Public License for more details.
1.18 + *
1.19 + * You should have received a copy of the GNU General Public License
1.20 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
1.21 + */
1.22 +
1.23 +#include "image.h"
1.24 +
1.25 +
1.26 +
1.27 +void init_stored_regions(stored_region_t *r, int frames,
1.28 + uint8_t *regions, uint32_t region_size)
1.29 +{
1.30 + int frame;
1.31 +
1.32 + for (frame = 0; frame < frames; frame++)
1.33 + {
1.34 + r->stored = 0;
1.35 + r->image = regions;
1.36 + regions += region_size;
1.37 + r++;
1.38 + }
1.39 +}