Minor things.

This commit is contained in:
2025-12-12 19:14:38 +01:00
parent a6d8d7d0c2
commit 11e91aa01c
4 changed files with 26 additions and 15 deletions

View File

@@ -94,6 +94,8 @@ uint32_t floor_texture_variant(uint32_t x, uint32_t y, uint32_t seed, uint32_t n
return (wang_hash(x * 73856093u ^ y * 19349663u ^ seed)) % num_variants;
}
#define SHADOW_ALPHA 64
static void state_render(Presentation_State *state) {
Presentation_State_Ingame_Context *ctx = (Presentation_State_Ingame_Context *)state->context;
(void)ctx;
@@ -170,7 +172,7 @@ static void state_render(Presentation_State *state) {
(Vector2) { pres_x, pres_y },
0.0f,
1.0f,
(Color) { 0, 0, 0, 32 }
(Color) { 0, 0, 0, SHADOW_ALPHA }
);
float rotation = 0.0f;
@@ -216,6 +218,15 @@ static void state_render(Presentation_State *state) {
e = game_world_try_get_entity_by_id(world, e->child);
i += 1;
}
// TODO: SS - Don't draw player-name if playing by yourself.
// TODO: SS - Don't draw your own player-name, only others.
{ // Draw player-name.
const char *player_name = "mirakel"; // NOTE: SS - Hardcoded.
const uint32_t font_size = 8;
int text_width = MeasureText(player_name, font_size);
DrawText(player_name, pres_x - (float)text_width/2.0f + 4, pres_y - 16, font_size, (Color) { 255, 255, 255, 128 });
}
break;
}
@@ -234,7 +245,7 @@ static void state_render(Presentation_State *state) {
(Vector2) { pres_x, pres_y },
0.0f,
1.0f,
(Color) { 0, 0, 0, 32 }
(Color) { 0, 0, 0, SHADOW_ALPHA }
);
DrawTexturePro(