Browse Source

moved constants to header file & made them an enum

IverMartinson 8 months ago
parent
commit
815b649e10
1 changed files with 16 additions and 5 deletions
  1. 16 5
      src/RasterIver/headers/rasteriver.h

+ 16 - 5
src/RasterIver/headers/rasteriver.h

@@ -4,12 +4,23 @@
 #include <stdint.h>
 #include <stdint.h>
 
 
 typedef int RI_result;
 typedef int RI_result;
+typedef int RI_flag;
 typedef uint32_t RI_uint;
 typedef uint32_t RI_uint;
 
 
-extern const RI_result RI_SUCCESS;
-extern const RI_result RI_ERROR;
-extern const RI_result RI_NOT_RUNNING;
-extern const RI_result RI_RUNNING;
+// RI_result
+typedef enum {
+    RI_ERROR = -1,
+    RI_SUCCESS = 0,
+    RI_NOT_RUNNING = -2,
+    RI_RUNNING = 1,
+};
+
+// RI_flag
+typedef enum {
+    RI_FLAG_DEBUG = 0,
+    RI_FLAG_DEBUG_VERBOSE = 1,
+    RI_FLAG_SHOW_Z_BUFFER = 2,
+};
 
 
 RI_result RI_Init();
 RI_result RI_Init();
 RI_result RI_Stop();
 RI_result RI_Stop();
@@ -18,6 +29,6 @@ RI_result RI_RequestPolygons(int RI_PolygonsToRequest);
 RI_result RI_Tick();
 RI_result RI_Tick();
 RI_result RI_SetBackground(RI_uint RI_BackgroundColor);
 RI_result RI_SetBackground(RI_uint RI_BackgroundColor);
 RI_result RI_ShowZBuffer(int RI_ShowZBufferFlag);
 RI_result RI_ShowZBuffer(int RI_ShowZBufferFlag);
-RI_result RI_SetDebugFlag(int RI_ShowDebugFlag);
+RI_result RI_SetFlag(RI_flag RI_FlagToSet, int RI_Value);
 
 
 #endif // RASTERIVER_H
 #endif // RASTERIVER_H