shithub: rgbds

Download patch

ref: 09dff85d5be33432e5bab6e13a27b6b48727b67f
parent: 20e5685c1a54d4c530d36bf34864c4d34ce1bcb7
author: ISSOtm <eldredhabert0@gmail.com>
date: Mon Feb 3 09:50:00 EST 2020

Merge `common.h` into `linkdefs.h`

--- a/include/common.h
+++ /dev/null
@@ -1,45 +1,0 @@
-/*
- * This file is part of RGBDS.
- *
- * Copyright (c) 1997-2018, Carsten Sorensen and RGBDS contributors.
- *
- * SPDX-License-Identifier: MIT
- */
-
-#ifndef RGBDS_COMMON_H
-#define RGBDS_COMMON_H
-
-#define RGBDS_OBJECT_VERSION_STRING "RGB%1hhu"
-#define RGBDS_OBJECT_VERSION_NUMBER (uint8_t)6
-
-enum eBankCount {
-	BANK_COUNT_ROM0  = 1,
-	BANK_COUNT_ROMX  = 511,
-	BANK_COUNT_WRAM0 = 1,
-	BANK_COUNT_WRAMX = 7,
-	BANK_COUNT_VRAM  = 2,
-	BANK_COUNT_OAM   = 1,
-	BANK_COUNT_HRAM  = 1,
-	BANK_COUNT_SRAM  = 16
-};
-
-enum eBankGBCount {
-	BANK_MIN_ROM0  = 0,
-	BANK_MAX_ROM0  = BANK_COUNT_ROM0  + BANK_MIN_ROM0  - 1,
-	BANK_MIN_ROMX  = 1,
-	BANK_MAX_ROMX  = BANK_COUNT_ROMX  + BANK_MIN_ROMX  - 1,
-	BANK_MIN_WRAM0 = 0,
-	BANK_MAX_WRAM0 = BANK_COUNT_WRAM0 + BANK_MIN_WRAM0 - 1,
-	BANK_MIN_WRAMX = 1,
-	BANK_MAX_WRAMX = BANK_COUNT_WRAMX + BANK_MIN_WRAMX - 1,
-	BANK_MIN_VRAM  = 0,
-	BANK_MAX_VRAM  = BANK_COUNT_VRAM  + BANK_MIN_VRAM  - 1,
-	BANK_MIN_OAM   = 0,
-	BANK_MAX_OAM   = BANK_COUNT_OAM   + BANK_MIN_OAM   - 1,
-	BANK_MIN_HRAM  = 0,
-	BANK_MAX_HRAM  = BANK_COUNT_HRAM  + BANK_MIN_HRAM  - 1,
-	BANK_MIN_SRAM  = 0,
-	BANK_MAX_SRAM  = BANK_COUNT_SRAM  + BANK_MIN_SRAM  - 1
-};
-
-#endif /* RGBDS_COMMON_H */
--- a/include/link/assign.h
+++ b/include/link/assign.h
@@ -12,8 +12,6 @@
 
 #include <stdint.h>
 
-#include "common.h"
-
 extern uint64_t nbSectionsToAssign;
 
 /**
--- a/include/linkdefs.h
+++ b/include/linkdefs.h
@@ -9,6 +9,39 @@
 #ifndef RGBDS_LINKDEFS_H
 #define RGBDS_LINKDEFS_H
 
+#define RGBDS_OBJECT_VERSION_STRING "RGB%1hhu"
+#define RGBDS_OBJECT_VERSION_NUMBER (uint8_t)6
+
+enum eBankCount {
+	BANK_COUNT_ROM0  = 1,
+	BANK_COUNT_ROMX  = 511,
+	BANK_COUNT_WRAM0 = 1,
+	BANK_COUNT_WRAMX = 7,
+	BANK_COUNT_VRAM  = 2,
+	BANK_COUNT_OAM   = 1,
+	BANK_COUNT_HRAM  = 1,
+	BANK_COUNT_SRAM  = 16
+};
+
+enum eBankGBCount {
+	BANK_MIN_ROM0  = 0,
+	BANK_MAX_ROM0  = BANK_COUNT_ROM0  + BANK_MIN_ROM0  - 1,
+	BANK_MIN_ROMX  = 1,
+	BANK_MAX_ROMX  = BANK_COUNT_ROMX  + BANK_MIN_ROMX  - 1,
+	BANK_MIN_WRAM0 = 0,
+	BANK_MAX_WRAM0 = BANK_COUNT_WRAM0 + BANK_MIN_WRAM0 - 1,
+	BANK_MIN_WRAMX = 1,
+	BANK_MAX_WRAMX = BANK_COUNT_WRAMX + BANK_MIN_WRAMX - 1,
+	BANK_MIN_VRAM  = 0,
+	BANK_MAX_VRAM  = BANK_COUNT_VRAM  + BANK_MIN_VRAM  - 1,
+	BANK_MIN_OAM   = 0,
+	BANK_MAX_OAM   = BANK_COUNT_OAM   + BANK_MIN_OAM   - 1,
+	BANK_MIN_HRAM  = 0,
+	BANK_MAX_HRAM  = BANK_COUNT_HRAM  + BANK_MIN_HRAM  - 1,
+	BANK_MIN_SRAM  = 0,
+	BANK_MAX_SRAM  = BANK_COUNT_SRAM  + BANK_MIN_SRAM  - 1
+};
+
 enum RPNCommand {
 	RPN_ADD		= 0x00,
 	RPN_SUB		= 0x01,
--- a/src/asm/asmy.y
+++ b/src/asm/asmy.y
@@ -31,7 +31,6 @@
 
 #include "extern/utf8decoder.h"
 
-#include "common.h"
 #include "linkdefs.h"
 
 uint32_t nListCountEmpty;
--- a/src/asm/output.c
+++ b/src/asm/output.c
@@ -28,7 +28,6 @@
 
 #include "extern/err.h"
 
-#include "common.h"
 #include "linkdefs.h"
 
 void out_SetCurrentSection(struct Section *pSect);
--- a/src/link/object.c
+++ b/src/link/object.c
@@ -21,7 +21,6 @@
 
 #include "extern/err.h"
 #include "linkdefs.h"
-#include "common.h"
 
 static struct SymbolList {
 	size_t nbSymbols;
--- a/src/link/section.c
+++ b/src/link/section.c
@@ -14,7 +14,6 @@
 #include "extern/err.h"
 
 #include "hashmap.h"
-#include "common.h"
 
 uint16_t startaddr[] = {
 	[SECTTYPE_ROM0]  = 0x0000,