More player-tints. Escape to quit when in main-menu.

This commit is contained in:
2025-12-16 12:59:59 +01:00
parent 76e5b3b282
commit fb885c0fc3
3 changed files with 32 additions and 3 deletions

View File

@@ -84,12 +84,15 @@ static void state_tick(Presentation_State *state) {
ctx->simulation_accumulator -= sim_dt;
}
// TODO: SS - I believe that this is where we should send game-messages to the clients and the host.
{ // TEMP: SS
if(IsKeyPressed(KEY_TAB)) {
ctx->debug_draw_session_details = !ctx->debug_draw_session_details;
}
if(IsKeyPressed(KEY_ESCAPE)) {
// TODO: SS - Show pause-menu instead.
presentation_state_machine_go_to(&presentation_state_main_menu);
}
}
@@ -99,11 +102,32 @@ 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;
}
Color get_tint_for_player_id(uint16_t player_id) {
Color get_tint_for_player_id(uint16_t player_id) { // TODO: SS - Could get values from 'the active color-palette'.
switch(player_id) {
case 0: {
return (Color) { 255, 135, 102, 255 };
}
case 1: {
return (Color) { 230, 204, 138, 255 };
}
case 3: {
return (Color) { 240, 236, 226, 255 };
}
case 4: {
return (Color) { 77, 106, 148, 255 };
}
case 5: {
return (Color) { 36, 43, 74, 255 };
}
case 6: {
return (Color) { 153, 92, 149, 255 };
}
case 7: {
return (Color) { 245, 79, 79, 255 };
}
case 8: {
return (Color) { 53, 121, 133, 255 };
}
default: {
return (Color) { 82, 33, 110, 255 };
}