Make comments more consistent

- Changes most `/* comments */` to `// comments`
- Changes `/**` block comments consistently to `/*`
- Adds consistent license comments to all files

Also renames `T_POP_SET` to `T_Z80_SET`
This commit is contained in:
Rangi
2022-08-29 18:01:34 -04:00
committed by Eldred Habert
parent dca24a6d50
commit fa13611bbf
76 changed files with 1077 additions and 1335 deletions

View File

@@ -71,19 +71,19 @@ struct Options {
extern Options options;
/**
/*
* Prints the error count, and exits with failure
*/
[[noreturn]] void giveUp();
/**
/*
* Prints a warning, and does not change the error count
*/
void warning(char const *fmt, ...);
/**
/*
* Prints an error, and increments the error count
*/
void error(char const *fmt, ...);
/**
/*
* Prints a fatal error, increments the error count, and gives up
*/
[[noreturn]] void fatal(char const *fmt, ...);
@@ -120,4 +120,4 @@ static constexpr auto flipTable(std::integer_sequence<T, i...>) {
// Flipping tends to happen fairly often, so take a bite out of dcache to speed it up
static constexpr auto flipTable = detail::flipTable(std::make_integer_sequence<uint16_t, 256>());
#endif /* RGBDS_GFX_MAIN_HPP */
#endif // RGBDS_GFX_MAIN_HPP

View File

@@ -21,7 +21,7 @@ class ProtoPalette;
namespace packing {
/**
/*
* Returns which palette each proto-palette maps to, and how many palettes are necessary
*/
std::tuple<DefaultInitVec<size_t>, size_t>
@@ -29,4 +29,4 @@ std::tuple<DefaultInitVec<size_t>, size_t>
}
#endif /* RGBDS_GFX_PAL_PACKING_HPP */
#endif // RGBDS_GFX_PAL_PACKING_HPP

View File

@@ -29,4 +29,4 @@ void rgb(std::vector<Palette> &palettes);
}
#endif /* RGBDS_GFX_PAL_SORTING_HPP */
#endif // RGBDS_GFX_PAL_SORTING_HPP

View File

@@ -12,4 +12,4 @@
void parseInlinePalSpec(char const * const arg);
void parseExternalPalSpec(char const *arg);
#endif /* RGBDS_GFX_PAL_SPEC_HPP */
#endif // RGBDS_GFX_PAL_SPEC_HPP

View File

@@ -11,4 +11,4 @@
void process();
#endif /* RGBDS_GFX_CONVERT_HPP */
#endif // RGBDS_GFX_CONVERT_HPP

View File

@@ -21,7 +21,7 @@ class ProtoPalette {
std::array<uint16_t, 4> _colorIndices{UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX};
public:
/**
/*
* Adds the specified color to the set
* Returns false if the set is full
*/
@@ -41,4 +41,4 @@ public:
decltype(_colorIndices)::const_iterator end() const;
};
#endif /* RGBDS_GFX_PROTO_PALETTE_HPP */
#endif // RGBDS_GFX_PROTO_PALETTE_HPP

View File

@@ -11,4 +11,4 @@
void reverse();
#endif /* RGBDS_GFX_REVERSE_HPP */
#endif // RGBDS_GFX_REVERSE_HPP

View File

@@ -20,7 +20,7 @@ struct Rgba {
constexpr Rgba(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
: red(r), green(g), blue(b), alpha(a) {}
/**
/*
* Constructs the color from a "packed" RGBA representation (0xRRGGBBAA)
*/
explicit constexpr Rgba(uint32_t rgba = 0)
@@ -35,7 +35,7 @@ struct Rgba {
(uint8_t)(cgbColor & 0x8000 ? 0x00 : 0xFF)};
}
/**
/*
* Returns this RGBA as a 32-bit number that can be printed in hex (`%08x`) to yield its CSS
* representation
*/
@@ -45,7 +45,7 @@ struct Rgba {
}
friend bool operator!=(Rgba const &lhs, Rgba const &rhs) { return lhs.toCSS() != rhs.toCSS(); }
/**
/*
* CGB colors are RGB555, so we use bit 15 to signify that the color is transparent instead
* Since the rest of the bits don't matter then, we return 0x8000 exactly.
*/
@@ -55,7 +55,7 @@ struct Rgba {
bool isTransparent() const { return alpha < transparency_threshold; }
static constexpr uint8_t opacity_threshold = 0xF0;
bool isOpaque() const { return alpha >= opacity_threshold; }
/**
/*
* Computes the equivalent CGB color, respects the color curve depending on options
*/
uint16_t cgbColor() const;
@@ -64,4 +64,4 @@ struct Rgba {
uint8_t grayIndex() const;
};
#endif /* RGBDS_GFX_RGBA_HPP */
#endif // RGBDS_GFX_RGBA_HPP