diff --git a/README.md b/README.md index 9084eea..c95bb5e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Module build order: ## Milestone -Day 37 : Basic Bitmap Rendering +Day 38 : Basic Linear Bitmap Blending Features Done so far: @@ -59,10 +59,13 @@ Features Done so far: * Record & replay input. * WIP : 2.5D Tile Map * Virtualized into chunks - * Bitmap file loading & basic rendering + * Bitmap file loading + * Compression mode 3 + * Linear alpha blending ## Gallery +![img](docs/imgs/handmade_win32_2023-10-21_02-16-43.png) ![img](docs/imgs/handmade_win32_2023-10-20_23-14-37.png) ![img](docs/imgs/Code_2023-10-20_21-57-06.png) ![img](docs/imgs/handmade_win32_2023-10-19_22-57-13.gif) diff --git a/data/content/mojito_head.bmp b/data/content/mojito_head.bmp index f915936..f87b7c9 100644 Binary files a/data/content/mojito_head.bmp and b/data/content/mojito_head.bmp differ diff --git a/docs/imgs/handmade_win32_2023-10-21_02-16-43.png b/docs/imgs/handmade_win32_2023-10-21_02-16-43.png new file mode 100644 index 0000000..528783b Binary files /dev/null and b/docs/imgs/handmade_win32_2023-10-21_02-16-43.png differ diff --git a/project/engine/engine.cpp b/project/engine/engine.cpp index 175f82d..a3920ed 100644 --- a/project/engine/engine.cpp +++ b/project/engine/engine.cpp @@ -939,6 +939,11 @@ void update_and_render( f32 delta_time, InputState* input, OffscreenBuffer* back , & game_state->test_bg_hh ); + draw_bitmap( back_buffer + , scast(f32, back_buffer->width) / 2.5f, scast(f32, back_buffer->height) / 2.5f + , & game_state->hero_front_head + ); + // Scrolling f32 screen_center_x = 0.5f * scast(f32, back_buffer->width); f32 screen_center_y = 0.5f * scast(f32, back_buffer->height); @@ -1027,7 +1032,7 @@ void update_and_render( f32 delta_time, InputState* input, OffscreenBuffer* back draw_bitmap( back_buffer , player_screen_pos_x, player_screen_pos_y - , & game_state->hero_front_head ); + , & game_state->mojito_head ); #if 0 draw_rectangle( back_buffer