convert indentation to spaces

This commit is contained in:
Sven Balzer
2025-03-16 18:56:40 +01:00
parent 09b1f3943a
commit 6a7f54ca5a
9 changed files with 169 additions and 169 deletions
+12 -12
View File
@@ -28,7 +28,7 @@ static SDL_Window *window;
static SDL_GPUGraphicsPipeline *basic_graphics_pipeline;
static SDL_GPUGraphicsPipeline *world_graphics_pipeline;
static SDL_GPUSampler *point_sampler;
static SDL_GPUSampler *point_sampler;
static SDL_GPUBuffer *vertex_buffer;
static SDL_GPUBuffer *index_buffer;
@@ -152,7 +152,7 @@ static void save_map() {
if (fwrite(&map_width, sizeof(Uint32), 1, file) != 1) {
log_error("fwrite for map_width has failed.");
return;
}
}
if (fwrite(&map_height, sizeof(Uint32), 1, file) != 1) {
log_error("fwrite for map_height has failed.");
@@ -213,7 +213,7 @@ static void load_map() {
}
static bool update_buffer(SDL_GPUBuffer *buffer, Uint32 offset, Uint32 num_bytes, void *data) {
SDL_GPUTransferBufferCreateInfo transfer_buffer_info = {
SDL_GPUTransferBufferCreateInfo transfer_buffer_info = {
.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD,
.size = num_bytes,
};
@@ -242,7 +242,7 @@ static bool update_buffer(SDL_GPUBuffer *buffer, Uint32 offset, Uint32 num_bytes
SDL_GPUTransferBufferLocation transfer_info = {
.transfer_buffer = transfer_buffer,
.offset = 0,
.offset = 0,
};
SDL_GPUBufferRegion buffer_region = {
@@ -414,7 +414,7 @@ static SDL_GPUTexture *create_shader_texture(const char *path) {
if (properties) SDL_DestroyProperties(properties);
Uint32 upload_size = width * height * channels;
SDL_GPUTransferBufferCreateInfo transfer_buffer_info = {
SDL_GPUTransferBufferCreateInfo transfer_buffer_info = {
.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD,
.size = upload_size,
};
@@ -509,7 +509,7 @@ static SDL_GPUTexture *create_shader_texture(const char *name, const char *data,
if (properties) SDL_DestroyProperties(properties);
Uint32 upload_size = width * height * channels;
SDL_GPUTransferBufferCreateInfo transfer_buffer_info = {
SDL_GPUTransferBufferCreateInfo transfer_buffer_info = {
.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD,
.size = upload_size,
};
@@ -739,25 +739,25 @@ static bool recreate_graphics_pipelines() {
{
.location = 0,
.buffer_slot = 0,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3,
.offset = offsetof(Vertex, pos),
},
{
.location = 1,
.buffer_slot = 1,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2,
.offset = offsetof(Instance, pos),
},
{
.location = 2,
.buffer_slot = 1,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4,
.offset = offsetof(Instance, uv0uv1),
},
{
.location = 3,
.buffer_slot = 1,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4,
.offset = offsetof(Instance, uv2uv3),
},
};
@@ -854,13 +854,13 @@ static bool recreate_graphics_pipelines() {
{
.location = 0,
.buffer_slot = 0,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3,
.format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3,
.offset = offsetof(Vertex, pos),
},
{
.location = 1,
.buffer_slot = 1,
.format = SDL_GPU_VERTEXELEMENTFORMAT_UINT,
.format = SDL_GPU_VERTEXELEMENTFORMAT_UINT,
.offset = 0,
},
};