diff options
-rw-r--r-- | src/loader.c | 19 | ||||
-rw-r--r-- | src/loader.h | 27 |
2 files changed, 22 insertions, 24 deletions
diff --git a/src/loader.c b/src/loader.c index 2a3a08c..30907f4 100644 --- a/src/loader.c +++ b/src/loader.c @@ -29,6 +29,25 @@ static void *bg_new_img(void *data); static void *bg_next_frame(void *data); static void error_occurred(struct imv_loader *ldr); +struct imv_loader { + pthread_mutex_t lock; + pthread_t bg_thread; + char *path; + BYTE *buffer; + size_t buffer_size; + FIMEMORY *fi_buffer; + FIMULTIBITMAP *mbmp; + FIBITMAP *bmp; + int width; + int height; + int cur_frame; + int next_frame; + int num_frames; + double frame_time; + unsigned int new_image_event; + unsigned int bad_image_event; +}; + static void block_usr1_signal(void) { sigset_t sigmask; diff --git a/src/loader.h b/src/loader.h index 197b6e2..4fd4067 100644 --- a/src/loader.h +++ b/src/loader.h @@ -18,30 +18,9 @@ along with this program; if not, write to the Free Software 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; - BYTE *buffer; - size_t buffer_size; - FIMEMORY *fi_buffer; - FIMULTIBITMAP *mbmp; - FIBITMAP *bmp; - int width; - int height; - int cur_frame; - int next_frame; - int num_frames; - double frame_time; - unsigned int new_image_event; - unsigned int bad_image_event; -}; +#include <unistd.h> + +struct imv_loader; /* Creates an instance of imv_loader */ struct imv_loader *imv_loader_create(void); |