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);
+
EndShaderMode();
EndMode3D();
orb_normal_color = ColorNormalize(orb_color);
- orb_intensity = 64.0f; /* TODO: normalized distance from center, but lighting shader already has this. */
+ orb_intensity = 84.0f; /* TODO: normalized distance from center, but lighting shader already has this. */
orb_directionality = player_angles;
DrawTextureEx(hand_01_texture, hand_position, hand_rotation, hand_scale, orb_color);
DrawText(TextFormat("tgt x %f\ntgt y %f\ntgt z %f", cam.target.x, cam.target.y, cam.target.z), 0, 128+64, 16, GREEN);
DrawText(TextFormat("rot x %f\nrot y %f\nrot z %f", player_angles.x, player_angles.y, player_angles.z), 0, 128+(64*2), 16, GREEN);
DrawText(TextFormat("ray hit %d\nlength %f", player_collision.hit, player_collision.distance), 0, 128+(64*3), 16, GREEN);
- DrawText(TextFormat("vel x %f\nvel y %f\nvel z %f", player_velocity.x, player_velocity.y, player_velocity.z), 0, 128+(64*4), 16, GREEN);
+ DrawText(TextFormat("c x %f\nc y %f\nc z %f", room_positions[0].x, room_positions[0].y, room_positions[0].z), 0, 128+(64*4), 16, GREEN);
}
}
void drawing_resource_ready_mode()
{
static int status_phase = 0;
- const float font_size =32.0f;
+ 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";
barrow_model.materials[0].maps[MATERIAL_MAP_ROUGHNESS].texture = barrow_albedo;
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("sphere %f %f %f\n", VEC3_UNROLL(room_positions[0]));
+
while(!IsModelReady(barrow_model)){}
}
while(!IsModelReady(coffin_model)){}
coffin_model.materials[0].shader = shader;
- hand_01_image = LoadImage("./assets/hand_1.png");
+ hand_01_image = LoadImage("./assets/hand_2.png");
while(!IsImageReady(hand_01_image)){}
hand_01_texture = LoadTextureFromImage(hand_01_image);
while(!IsTextureReady(hand_01_texture)){}
int center_x = grid_size.x/2;
int center_y = grid_size.y/2;
float central_chamber_radius = barrow_radius/6;
+ room_positions[0] = (Vector3){.x = center_x, .y = 0.0f, .z = center_y};
for (int x = 0; x < grid_size.x; x++)
{
}
/* Set up seed-points to create connected rooms */
- const int seed_count = 7;//sqrt(grid_size.x) * 2;
+ const int seed_count = room_count;
const float small_room_radius = 10.0f;
const float phase = ((rand() % 360)/(float)360) * (M_PI*2);
int seed_x = ((cosf(angle) * (dist_offset + (grid_size.x/4.0f))) + (grid_size.x/2.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};
+
grid[seed_x][seed_y].b = 1.0f;
grid[seed_x][seed_y].c = 0.0f;