mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
@@ -20,6 +20,8 @@ extern struct Section *pSectionList, *pCurrentSection;
|
||||
|
||||
void out_SetFileName(char *s);
|
||||
void out_CreatePatch(uint32_t type, struct Expression const *expr);
|
||||
bool out_CreateAssert(enum AssertionType type, struct Expression const *expr,
|
||||
char const *message);
|
||||
void out_WriteObject(void);
|
||||
|
||||
#endif /* RGBDS_ASM_OUTPUT_H */
|
||||
|
||||
@@ -22,6 +22,7 @@ enum WarningID {
|
||||
WARNING_OBSOLETE,
|
||||
WARNING_SHIFT,
|
||||
WARNING_USER,
|
||||
WARNING_ASSERT,
|
||||
WARNING_SHIFT_AMOUNT,
|
||||
WARNING_TRUNCATION,
|
||||
|
||||
|
||||
@@ -10,6 +10,28 @@
|
||||
#ifndef RGBDS_LINK_PATCH_H
|
||||
#define RGBDS_LINK_PATCH_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "link/section.h"
|
||||
|
||||
#include "linkdefs.h"
|
||||
|
||||
struct Assertion {
|
||||
struct Patch patch;
|
||||
// enum AssertionType type; The `patch`'s field is instead re-used
|
||||
struct Section *section;
|
||||
char *message;
|
||||
|
||||
struct Assertion *next;
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks all assertions
|
||||
* @return true if assertion failed
|
||||
*/
|
||||
void patch_CheckAssertions(struct Assertion *assertion);
|
||||
|
||||
/**
|
||||
* Applies all SECTIONs' patches to them
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,13 @@
|
||||
|
||||
#define RGBDS_OBJECT_VERSION_STRING "RGB%1hhu"
|
||||
#define RGBDS_OBJECT_VERSION_NUMBER (uint8_t)9
|
||||
#define RGBDS_OBJECT_REV 1
|
||||
#define RGBDS_OBJECT_REV 2
|
||||
|
||||
enum AssertionType {
|
||||
ASSERT_WARN,
|
||||
ASSERT_ERROR,
|
||||
ASSERT_FATAL
|
||||
};
|
||||
|
||||
enum RPNCommand {
|
||||
RPN_ADD = 0x00,
|
||||
|
||||
Reference in New Issue
Block a user