transfered from codeberg

This commit is contained in:
2026-03-26 14:46:39 -05:00
parent 630f28bb7e
commit 5ed2173793
136 changed files with 14932 additions and 0 deletions

View File

@@ -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
};
}

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#define max_active_chunks 1000
#define render_distance 6
#define vertical_render_distance 3 // chunks below ground only

View File

@@ -0,0 +1,6 @@
#ifndef constants_h
#define constants_h
#define number_of_planes_for_a_cube 6
#endif

View File

@@ -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;
}

View File

@@ -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