Browse Source

updated headers

Iver 6 days ago
parent
commit
b2d836d96b
2 changed files with 23 additions and 0 deletions
  1. 10 0
      src/headers/PM_functions.h
  2. 13 0
      src/headers/PM_structs.h

+ 10 - 0
src/headers/PM_functions.h

@@ -0,0 +1,10 @@
+#ifndef PM_FUNCTIONS_H
+#define PM_FUNCTIONS_H
+
+// loads an image file and returns a PM_image
+PM_image* PM_load_image(const char* filename, unsigned char debug_mode);
+
+// unallocated a PM_image*
+void PM_free_image(PM_image* image);
+
+#endif

+ 13 - 0
src/headers/PM_structs.h

@@ -0,0 +1,13 @@
+#ifndef PM_STRUCTS_H
+#define PM_STRUCTS_H
+
+typedef struct {
+    uint32_t* frame_buffer; // the array that stores the pixel data
+    int width; // width of the image
+    int height; // height of the image INCLUDING all stacked frames
+    int frame_height; // height of each FRAME
+    int frame_count; // number of frames
+    uint16_t* frame_delays; // centisecond delay for each frame
+} PM_image;
+
+#endif