room_positions = (Vector3*)malloc(sizeof(Vector3)*(room_count + 1));
/* TODO: Clean this up and integrate into platform system. */
-#define ENABLE_BARROWGEN 0
+#define ENABLE_BARROWGEN 1
#if ENABLE_BARROWGEN
barrow.max_iterations *= 1;
IVec2 grid_size = {.x = GRID_X*2.0, .y = GRID_Y * 2.0};
DrawModelEx(barrow_model, barrow_position, barrow_rotation_axis, barrow_rotation, barrow_scale, DARKGRAY);
DrawModelEx(floor_model, floor_position, floor_rotation_axis, floor_rotation, floor_scale, DARKGRAY);
- DrawSphere(room_positions[0], 0.25, RED);
+ for (int n = 0; n < room_count+1; n++)
+ {
+ DrawSphere(room_positions[n], 0.25, LIME);
+ }
EndShaderMode();
EndMode3D();
void drawing_resource_ready_mode()
{
- static int status_phase = 0;
const float font_size = 32.0f;
- const char format_string[] = "%s\n\n%3.2f%%";
const char tribute_string[] = "This game is dedicated to the North American Muskrat, Ondatra Zibethicus";
ClearBackground(LIGHTGRAY);
barrow_model.materials[0].shader = shader;
room_positions[0] = (Vector3){barrow_scale.x/2.0f, floor_position.y - 1.0f, -barrow_scale.z/2.0f};
+ printf("bs %f %f %f\n", VEC3_UNROLL(barrow_scale));
printf("sphere %f %f %f\n", VEC3_UNROLL(room_positions[0]));
+ for (int n = 1; n < room_count+1; n++)
+ {
+ room_positions[n].z *= -1.0f;
+ room_positions[n].x += room_positions[0].x/2.0f;
+ room_positions[n].z += room_positions[0].z/2.0f;
+ printf("rp %f %f %f\n", VEC3_UNROLL(room_positions[n]));
+ }
while(!IsModelReady(barrow_model)){}
}
cam.position = barrow_position;
cam.position.y -= 0.5f;
cam.position.x = barrow_scale.x/2.0f;
- cam.position.z = (-barrow_scale.z/2.0f);
+ cam.position.z = (-barrow_scale.z/2.0f) - 3.0f;
cam.target = (Vector3){barrow_scale.x/2.0f, cam.position.y - 7.0f, cam.position.z/2.0f};
cam.up = (Vector3){0.0f, 1.0f, 0.0f};
cam.fovy = 90.0f;
int seed_y = ((sinf(angle) * (dist_offset + (grid_size.y/4.0f))) + (grid_size.y/2.0f));
// TODO: One of these will probably have to be mirrored.
- room_positions[n+1] = (Vector3){.x = seed_x, .y = 0.0f, .z = seed_y};
+ room_positions[n+1] = (Vector3)
+ {
+ .x = seed_x - center_x,
+ .y = -3.0f,
+ .z = seed_y - center_y
+ };
grid[seed_x][seed_y].b = 1.0f;
grid[seed_x][seed_y].c = 0.0f;