transfered from codeberg
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include "chunk_position_to_vector_3.h"
|
||||
|
||||
#include "chunk.h"
|
||||
#include "raylib.h"
|
||||
|
||||
Vector3 chunk_position_to_vector_3(struct chunk_position_struct chunk_position)
|
||||
{
|
||||
return (Vector3)
|
||||
{
|
||||
(float)chunk_position.x,
|
||||
(float)chunk_position.y,
|
||||
(float)chunk_position.z
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef chunk_position_to_vector_3_h
|
||||
#define chunk_position_to_vector_3_h
|
||||
|
||||
struct chunk_position_struct;
|
||||
struct Vector3;
|
||||
|
||||
struct Vector3 chunk_position_to_vector_3(struct chunk_position_struct chunk_position);
|
||||
|
||||
#endif
|
||||
3
source_code/utilities_module/config.h
Normal file
3
source_code/utilities_module/config.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#define max_active_chunks 1000
|
||||
#define render_distance 6
|
||||
#define vertical_render_distance 3 // chunks below ground only
|
||||
6
source_code/utilities_module/constants.h
Normal file
6
source_code/utilities_module/constants.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef constants_h
|
||||
#define constants_h
|
||||
|
||||
#define number_of_planes_for_a_cube 6
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "function_success.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
bool function_success(const uint8_t code, const char* error_message)
|
||||
{
|
||||
if (code == EXIT_SUCCESS)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
fprintf(stderr, "\nError: %s\n", error_message);
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef function_success_h
|
||||
#define function_success_h
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
bool function_success(const uint8_t code, const char* error_message);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user