mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Use // line comments not /* block comments
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "link/output.hpp"
|
||||
|
||||
@@ -98,10 +98,8 @@ Section const *out_OverlappingSection(Section const §ion) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Performs sanity checks on the overlay file.
|
||||
* @return The number of ROM banks in the overlay file
|
||||
*/
|
||||
// Performs sanity checks on the overlay file.
|
||||
// @return The number of ROM banks in the overlay file
|
||||
static uint32_t checkOverlaySize() {
|
||||
if (!overlayFile)
|
||||
return 0;
|
||||
@@ -126,12 +124,10 @@ static uint32_t checkOverlaySize() {
|
||||
return (overlaySize + BANK_SIZE - 1) / BANK_SIZE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Expand `sections[SECTTYPE_ROMX]` to cover all the overlay banks.
|
||||
* This ensures that `writeROM` will output each bank, even if some are not
|
||||
* covered by any sections.
|
||||
* @param nbOverlayBanks The number of banks in the overlay file
|
||||
*/
|
||||
// Expand `sections[SECTTYPE_ROMX]` to cover all the overlay banks.
|
||||
// This ensures that `writeROM` will output each bank, even if some are not
|
||||
// covered by any sections.
|
||||
// @param nbOverlayBanks The number of banks in the overlay file
|
||||
static void coverOverlayBanks(uint32_t nbOverlayBanks) {
|
||||
// 2 if is32kMode, 1 otherwise
|
||||
uint32_t nbRom0Banks = sectionTypeInfo[SECTTYPE_ROM0].size / BANK_SIZE;
|
||||
@@ -162,12 +158,10 @@ static uint8_t getNextFillByte() {
|
||||
return padValue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Write a ROM bank's sections to the output file.
|
||||
* @param bankSections The bank's sections, ordered by increasing address
|
||||
* @param baseOffset The address of the bank's first byte in GB address space
|
||||
* @param size The size of the bank
|
||||
*/
|
||||
// Write a ROM bank's sections to the output file.
|
||||
// @param bankSections The bank's sections, ordered by increasing address
|
||||
// @param baseOffset The address of the bank's first byte in GB address space
|
||||
// @param size The size of the bank
|
||||
static void
|
||||
writeBank(std::deque<Section const *> *bankSections, uint16_t baseOffset, uint16_t size) {
|
||||
uint16_t offset = 0;
|
||||
@@ -327,10 +321,8 @@ static bool compareSymbols(SortedSymbol const &sym1, SortedSymbol const &sym2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Write a bank's contents to the sym file
|
||||
* @param bankSections The bank's sections
|
||||
*/
|
||||
// Write a bank's contents to the sym file
|
||||
// @param bankSections The bank's sections
|
||||
static void writeSymBank(SortedSections const &bankSections, SectionType type, uint32_t bank) {
|
||||
#define forEachSortedSection(sect, ...) \
|
||||
do { \
|
||||
@@ -421,9 +413,7 @@ static void printSectionName(std::string const &name, FILE *file) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Write a bank's contents to the map file
|
||||
*/
|
||||
// Write a bank's contents to the map file
|
||||
static void writeMapBank(SortedSections const §List, SectionType type, uint32_t bank) {
|
||||
fprintf(
|
||||
mapFile,
|
||||
@@ -495,9 +485,7 @@ static void writeMapBank(SortedSections const §List, SectionType type, uint3
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Write the total used and free space by section type to the map file
|
||||
*/
|
||||
// Write the total used and free space by section type to the map file
|
||||
static void writeMapSummary() {
|
||||
fputs("SUMMARY:\n", mapFile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user