Browse Source

added RI prefixes to headers

Iver 2 weeks ago
parent
commit
76a6079ea9

BIN
builds/librasteriver.so


BIN
builds/main.bin


+ 1 - 9
changelog.txt

@@ -1,9 +1 @@
--rasterizer ignores 100% transparent pixels
--added emoji gif
--plane obj's UVs no longer flip when it's turned around
--fixed "
-src/main/main.c:43:67: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
-   43 |     PM_image* image = PM_load_image(filename, context.debug_flags & RI_DEBUG_PITMAP == 0 ? 0 : 1);
-   "
--updated example screen
--added new gif to readme
+-added RI prefix to header files

+ 2 - 2
issues.txt

@@ -1,3 +1,3 @@
--not freeing memory every i dont think
+-not freeing memory ever i dont think
 -i think polygons that are outside the frustum are still being added to the tiles, e.g., an object that is just off screen
 -i think polygons that are outside the frustum are still being added to the tiles, e.g., an object that is just off screen
--latest version of PitMap (images now read in the correct orientation)
+-sdl event handler should have va_list args system so you can put input in it

+ 3 - 3
src/headers/functions.h → src/headers/RI_functions.h

@@ -1,7 +1,7 @@
-#ifndef FUNCTIONS_H
-#define FUNCTIONS_H
+#ifndef RI_FUNCTIONS_H
+#define RI_FUNCTIONS_H
 
 
-#include "types.h"
+#include "RI_types.h"
 
 
 // returns the RI_context
 // returns the RI_context
 RI_context *RI_get_context();
 RI_context *RI_get_context();

+ 2 - 2
src/headers/math.h → src/headers/RI_math.h

@@ -1,5 +1,5 @@
-#ifndef MATH_H
-#define MATH_H
+#ifndef RI_MATH_H
+#define RI_MATH_H
 
 
 #include "stdint.h"
 #include "stdint.h"
 #include <math.h>
 #include <math.h>

+ 4 - 4
src/headers/memory.h → src/headers/RI_memory.h

@@ -1,4 +1,4 @@
-#include "types.h"
+#include "RI_types.h"
 
 
 RI_context context;
 RI_context context;
 
 
@@ -32,7 +32,7 @@ void* written_RI_realloc(void *__ptr, size_t __size, const char *caller, int lin
             context.memory.allocation_table_length += 50;
             context.memory.allocation_table_length += 50;
             context.memory.allocation_search_limit += 50;
             context.memory.allocation_search_limit += 50;
             
             
-            context.memory.allocation_table = RI_realloc(context.memory.allocation_table, sizeof(RI_memory_allocation) * context.memory.allocation_table_length);
+            context.memory.allocation_table = (RI_memory_allocation*)RI_realloc(context.memory.allocation_table, sizeof(RI_memory_allocation) * context.memory.allocation_table_length);
         }
         }
 
 
         context.memory.allocation_table[context.memory.current_allocation_index].allocated = 1;
         context.memory.allocation_table[context.memory.current_allocation_index].allocated = 1;
@@ -57,7 +57,7 @@ void* written_RI_malloc(size_t __size, const char *caller, int line, RI_context
             context.memory.allocation_table_length += 50;
             context.memory.allocation_table_length += 50;
             context.memory.allocation_search_limit += 50;
             context.memory.allocation_search_limit += 50;
             
             
-            context.memory.allocation_table = RI_realloc(context.memory.allocation_table, sizeof(RI_memory_allocation) * context.memory.allocation_table_length);
+            context.memory.allocation_table = (RI_memory_allocation*)RI_realloc(context.memory.allocation_table, sizeof(RI_memory_allocation) * context.memory.allocation_table_length);
         }
         }
 
 
         context.memory.allocation_table[context.memory.current_allocation_index].allocated = 1;
         context.memory.allocation_table[context.memory.current_allocation_index].allocated = 1;
@@ -82,7 +82,7 @@ void* written_RI_calloc(size_t __nmemb, size_t __size, const char *caller, int l
             context.memory.allocation_table_length += 50;
             context.memory.allocation_table_length += 50;
             context.memory.allocation_search_limit += 50;
             context.memory.allocation_search_limit += 50;
             
             
-            context.memory.allocation_table = RI_realloc(context.memory.allocation_table, sizeof(RI_memory_allocation) * context.memory.allocation_table_length);
+            context.memory.allocation_table = (RI_memory_allocation*)RI_realloc(context.memory.allocation_table, sizeof(RI_memory_allocation) * context.memory.allocation_table_length);
         }
         }
 
 
         context.memory.allocation_table[context.memory.current_allocation_index].allocated = 1;
         context.memory.allocation_table[context.memory.current_allocation_index].allocated = 1;

+ 3 - 3
src/headers/types.h → src/headers/RI_types.h

@@ -1,9 +1,9 @@
-#ifndef STRUCTS_H
-#define STRUCTS_H
+#ifndef RI_STRUCTS_H
+#define RI_STRUCTS_H
 
 
 #include <SDL2/SDL.h>
 #include <SDL2/SDL.h>
 #include <CL/cl.h>
 #include <CL/cl.h>
-#include "math.h"
+#include "RI_math.h"
 
 
 enum {
 enum {
     RI_ASPECT_MODE_STRETCH = 1 << 0,
     RI_ASPECT_MODE_STRETCH = 1 << 0,

+ 3 - 3
src/headers/rasteriver.h

@@ -1,8 +1,8 @@
 #ifndef RASTERIVER_H
 #ifndef RASTERIVER_H
 #define RASTERIVER_H
 #define RASTERIVER_H
 
 
-#include "types.h"
-#include "functions.h"
-#include "math.h"
+#include "RI_types.h"
+#include "RI_functions.h"
+#include "RI_math.h"
 
 
 #endif
 #endif

+ 1 - 1
src/main/main.c

@@ -3,7 +3,7 @@
 #include <CL/cl.h>
 #include <CL/cl.h>
 #include <SDL2/SDL.h>
 #include <SDL2/SDL.h>
 #include "../headers/rasteriver.h"
 #include "../headers/rasteriver.h"
-#include "../headers/memory.h"
+#include "../headers/RI_memory.h"
 #include "../headers/pitmap.h"
 #include "../headers/pitmap.h"
 #include <time.h>
 #include <time.h>