paul@118 | 1 | /* |
paul@118 | 2 | * Common image-related functions. |
paul@118 | 3 | * |
paul@118 | 4 | * Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk> |
paul@118 | 5 | * |
paul@118 | 6 | * This program is free software: you can redistribute it and/or modify |
paul@118 | 7 | * it under the terms of the GNU General Public License as published by |
paul@118 | 8 | * the Free Software Foundation, either version 3 of the License, or |
paul@118 | 9 | * (at your option) any later version. |
paul@118 | 10 | * |
paul@118 | 11 | * This program is distributed in the hope that it will be useful, |
paul@118 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@118 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@118 | 14 | * GNU General Public License for more details. |
paul@118 | 15 | * |
paul@118 | 16 | * You should have received a copy of the GNU General Public License |
paul@118 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
paul@118 | 18 | */ |
paul@118 | 19 | |
paul@118 | 20 | #include "image.h" |
paul@118 | 21 | |
paul@118 | 22 | |
paul@118 | 23 | |
paul@118 | 24 | void init_stored_regions(stored_region_t *r, int frames, |
paul@118 | 25 | uint8_t *regions, uint32_t region_size) |
paul@118 | 26 | { |
paul@118 | 27 | int frame; |
paul@118 | 28 | |
paul@118 | 29 | for (frame = 0; frame < frames; frame++) |
paul@118 | 30 | { |
paul@118 | 31 | r->stored = 0; |
paul@118 | 32 | r->image = regions; |
paul@118 | 33 | regions += region_size; |
paul@118 | 34 | r++; |
paul@118 | 35 | } |
paul@118 | 36 | } |