aboutsummaryrefslogtreecommitdiff
path: root/src/loader.h
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-27 13:44:29 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-27 13:44:29 +0000
commitb17cb802d0b008e886e194972e661a65b0b28aa9 (patch)
tree896fea12540a43b232a5f3aec7d9e80916cb58f1 /src/loader.h
parent60d604587dcc77244c63f171bfb4e2e292dc6dda (diff)
downloadimv-b17cb802d0b008e886e194972e661a65b0b28aa9.tar.gz
Start performing loading in BG
Diffstat (limited to 'src/loader.h')
-rw-r--r--src/loader.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/loader.h b/src/loader.h
index 4d7c8d9..84c8b4d 100644
--- a/src/loader.h
+++ b/src/loader.h
@@ -19,29 +19,36 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <FreeImage.h>
+#include <SDL2/SDL.h>
+#include <pthread.h>
+
+struct imv_texture;
struct imv_loader {
+ pthread_mutex_t lock;
+ pthread_t bg_thread;
+ char *path;
+ FIBITMAP *out_bmp;
+ char *out_err;
FIMULTIBITMAP *mbmp;
- FIBITMAP *cur_bmp;
+ FIBITMAP *bmp;
int width;
int height;
int cur_frame;
int next_frame;
int num_frames;
- int changed;
double frame_time;
};
void imv_init_loader(struct imv_loader *img);
void imv_destroy_loader(struct imv_loader *img);
-int imv_can_load_image(const char* path);
-int imv_loader_load(struct imv_loader *img, const char* path);
-void imv_loader_load_next_frame(struct imv_loader *img);
+void imv_loader_load_path(struct imv_loader *ldr, const char *path);
-int imv_loader_is_animated(struct imv_loader *img);
-void imv_loader_play(struct imv_loader *img, double time);
+FIBITMAP *imv_loader_get_image(struct imv_loader *ldr);
+char *imv_loader_get_error(struct imv_loader *ldr);
-int imv_loader_has_changed(struct imv_loader *img);
+/* void imv_loader_next_frame(struct imv_loader *ldr); */
+/* void imv_loader_time_passed(struct imv_loader *ldr, double dt); */
#endif