From 0433e8daa29071aded573258a8e1c9cac0a7be76 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 3 Jul 2024 09:40:06 +0200 Subject: [PATCH] output: small cr fixes --- src/game/level.c | 2 +- src/game/output.c | 10 +++++----- src/game/output.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/game/level.c b/src/game/level.c index e5002c1527..12fd18e387 100644 --- a/src/game/level.c +++ b/src/game/level.c @@ -891,7 +891,7 @@ static void Level_CompleteSetup(int32_t level_num) // Configure enemies who carry and drop items Carrier_InitialiseLevel(level_num); - size_t max_vertices = Level_CalculateMaxVertices(); + const size_t max_vertices = Level_CalculateMaxVertices(); LOG_INFO("Maximum vertices: %d", max_vertices); Output_ReserveVertexBuffer(max_vertices); diff --git a/src/game/output.c b/src/game/output.c index e77c3b22f7..d90a32ae9e 100644 --- a/src/game/output.c +++ b/src/game/output.c @@ -78,11 +78,6 @@ static const int16_t *Output_CalcRoomVertices(const int16_t *obj_ptr); static int32_t Output_CalcFogShade(int32_t depth); static void Output_CalcWibbleTable(void); -void Output_ReserveVertexBuffer(size_t size) -{ - m_VBuf = GameBuf_Alloc(size * sizeof(PHD_VBUF), GBUF_VERTEX_BUFFER); -} - static const int16_t *Output_DrawObjectG3( const int16_t *obj_ptr, int32_t number) { @@ -408,6 +403,11 @@ void Output_Shutdown(void) Memory_FreePointer(&m_BackdropImagePath); } +void Output_ReserveVertexBuffer(const size_t size) +{ + m_VBuf = GameBuf_Alloc(size * sizeof(PHD_VBUF), GBUF_VERTEX_BUFFER); +} + void Output_SetWindowSize(int width, int height) { S_Output_SetWindowSize(width, height); diff --git a/src/game/output.h b/src/game/output.h index 60de706bf4..6a70cfa8d4 100644 --- a/src/game/output.h +++ b/src/game/output.h @@ -7,6 +7,7 @@ bool Output_Init(void); void Output_Shutdown(void); +void Output_ReserveVertexBuffer(size_t size); void Output_SetWindowSize(int width, int height); void Output_ApplyRenderSettings(void); @@ -15,7 +16,6 @@ void Output_DownloadTextures(int page_count); RGBA_8888 Output_RGB2RGBA(const RGB_888 color); void Output_SetPalette(RGB_888 palette[256]); RGB_888 Output_GetPaletteColor(uint8_t idx); -void Output_ReserveVertexBuffer(size_t size); int32_t Output_GetNearZ(void); int32_t Output_GetFarZ(void);