From 43da578ff243090751618e8c5f529011630bb87b Mon Sep 17 00:00:00 2001 From: IllusionMan1212 Date: Tue, 23 Jan 2024 22:13:55 +0200 Subject: [PATCH] game: small animation duration adjustments and adjust window color bits --- game.odin | 4 ++-- glx/constants.odin | 4 ++++ zephr/zephr.odin | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/game.odin b/game.odin index ad31a5a..8ca2be6 100644 --- a/game.odin +++ b/game.odin @@ -59,9 +59,9 @@ Game :: struct { } @private -TILE_ANIM_DURATION :: time.Millisecond * 300 +TILE_ANIM_DURATION :: time.Millisecond * 250 @private -TILE_SPAWN_DURATION :: time.Millisecond * 300 +TILE_SPAWN_DURATION :: time.Millisecond * 200 @private GAMEOVER_ANIM_DURATION :: time.Millisecond * 300 diff --git a/glx/constants.odin b/glx/constants.odin index 79fdcec..f79a313 100644 --- a/glx/constants.odin +++ b/glx/constants.odin @@ -6,6 +6,10 @@ Drawable :: x11.XID RENDER_TYPE :: 0x8011 RGBA_BIT :: 0x00000001 +RED_SIZE :: 8 +GREEN_SIZE :: 9 +BLUE_SIZE :: 10 +ALPHA_SIZE :: 11 DEPTH_SIZE :: 12 DOUBLEBUFFER :: 5 SAMPLES :: 100001 diff --git a/zephr/zephr.odin b/zephr/zephr.odin index e620aed..fc06e55 100644 --- a/zephr/zephr.odin +++ b/zephr/zephr.odin @@ -884,6 +884,10 @@ x11_create_window :: proc(window_title: cstring, window_size: Vec2, icon_path: c visual_attributes := []i32 { glx.RENDER_TYPE, glx.RGBA_BIT, + glx.RED_SIZE, 8, + glx.GREEN_SIZE, 8, + glx.BLUE_SIZE, 8, + glx.ALPHA_SIZE, 8, glx.DEPTH_SIZE, 24, glx.DOUBLEBUFFER, 1, glx.SAMPLES, 4, // MSAA