From 8785e19a18f33f760aa182aa5d7fef5aaa0cc610 Mon Sep 17 00:00:00 2001 From: scawful Date: Fri, 8 Nov 2024 21:03:38 -0500 Subject: [PATCH] Refactor dungeon and snes_color headers: reorder includes and update struct definitions for clarity --- src/incl/dungeon.h | 4 ++-- src/incl/snes_color.h | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/incl/dungeon.h b/src/incl/dungeon.h index 96d323dd..325be811 100644 --- a/src/incl/dungeon.h +++ b/src/incl/dungeon.h @@ -1,12 +1,12 @@ #ifndef YAZE_BASE_DUNGEON_H_ #define YAZE_BASE_DUNGEON_H_ -#include - #ifdef __cplusplus extern "C" { #endif +#include + struct object_door { object_door() = default; object_door(short id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer) diff --git a/src/incl/snes_color.h b/src/incl/snes_color.h index af9e03bf..7bfa59af 100644 --- a/src/incl/snes_color.h +++ b/src/incl/snes_color.h @@ -10,22 +10,20 @@ extern "C" { /** * @brief Primitive of 16-bit RGB SNES color. */ -struct snes_color { +typedef struct snes_color { uint16_t red; /**< Red component of the color. */ uint16_t blue; /**< Blue component of the color. */ uint16_t green; /**< Green component of the color. */ -}; -typedef struct snes_color snes_color; +} snes_color; /** * @brief Primitive of a SNES color palette. */ -struct snes_palette { +typedef struct snes_palette { unsigned int id; /**< ID of the palette. */ unsigned int size; /**< Size of the palette. */ snes_color* colors; /**< Pointer to the colors in the palette. */ -}; -typedef struct snes_palette snes_palette; +} snes_palette; #ifdef __cplusplus }