Skip to content

Commit

Permalink
update TODO comments and fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
julesgrc0 committed May 24, 2024
1 parent b636f7d commit 656d938
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/screens/loading/loading.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void loading_screen(w_state *state) {
const char *loading_text = "Loading...";
const char *error_text = "Failed to load resources !";

// TODO: use gui label
/// TODO: use gui label

Vector2 loading_pos = {
.x = (GetScreenWidth() - MeasureText(loading_text, text_size)) / 2.f,
Expand Down
16 changes: 12 additions & 4 deletions src/screens/menu/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ void menu_screen(w_state *state) {
ctx, Vector2Add(title_text->position, VEC(0, title_text->font_size + 10)),
(char *)TextFormat("made by @julesgrc0 - %s", WISPY_VERSION), 20, WHITE);

// TODO: pre-render the cubes to a texture


/// TODO: pre-render to a texture
unsigned int cubes[RENDER_CUBE_COUNT * RENDER_CUBE_COUNT] = {0};
for (unsigned int y = 0; y < RENDER_CUBE_COUNT; y++) {
for (unsigned int x = 0; x < RENDER_CUBE_COUNT; x++) {
cubes[x + y * RENDER_CUBE_COUNT] = GetRandomValue(0, 2);
/// TODO: fix sin wave
cubes[x + y * RENDER_CUBE_COUNT] = (int)(sin(x / 100.0f) * 1.5f + 1.5f);
}
}


while (!WindowShouldClose() && is_active) {

BeginTextureMode(state->render);
Expand All @@ -65,21 +70,24 @@ void menu_screen(w_state *state) {
}
}

/// TODO: move to home view (start)
if (update_button(play_button)) {
is_active = false;
}
if (update_button(setting_button)) {
// TODO: Implement settings screen
/// TODO: Implement settings screen
}
if (update_button(exit_button)) {
state->state = FS_EXIT;
break;
}

update_text(title_text);
update_text(credit_text);

EndTextureMode();


BeginDrawing();
ClearBackground(BLACK);
draw_render_texture(state);
Expand Down
Empty file added src/screens/menu/views/home.h
Empty file.
Empty file added src/screens/menu/views/maps.h
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion src/terrain/terrain_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ char *get_terrain_path_folder();
char *get_terrain_path_config();
char *get_terrain_path_chunk(unsigned int position);

// TODO: compress chunk files
/// TODO: compress chunk files
bool read_chunk_file(unsigned int position, w_block *blocks);
bool write_chunk_file(unsigned int position, w_block *blocks);

0 comments on commit 656d938

Please sign in to comment.