Make writing patches not affect the expression

This also removes one int member from the struct that shouldn't be there
This commit is contained in:
ISSOtm
2020-02-23 22:27:33 +01:00
parent ef2bfe4ea0
commit cfe21876e5
4 changed files with 14 additions and 26 deletions

View File

@@ -19,7 +19,7 @@ extern char *tzObjectname;
extern struct Section *pSectionList, *pCurrentSection;
void out_SetFileName(char *s);
void out_CreatePatch(uint32_t type, struct Expression *expr);
void out_CreatePatch(uint32_t type, struct Expression const *expr);
void out_WriteObject(void);
#endif /* RGBDS_ASM_OUTPUT_H */

View File

@@ -25,8 +25,6 @@ struct Expression {
uint32_t nRPNCapacity; // Size of the `tRPN` buffer
uint32_t nRPNLength; // Used size of the `tRPN` buffer
uint32_t nRPNPatchSize; // Size the expression will take in the obj file
// FIXME: does this need to be part of the struct?
uint32_t nRPNOut; // How many bytes have been written
};
/* FIXME: Should be defined in `asmy.h`, but impossible with POSIX Yacc */
@@ -44,7 +42,6 @@ void rpn_HIGH(struct Expression *expr, const struct Expression *src);
void rpn_LOW(struct Expression *expr, const struct Expression *src);
void rpn_UNNEG(struct Expression *expr, const struct Expression *src);
void rpn_UNNOT(struct Expression *expr, const struct Expression *src);
uint16_t rpn_PopByte(struct Expression *expr);
void rpn_BankSymbol(struct Expression *expr, char *tzSym);
void rpn_BankSection(struct Expression *expr, char *tzSectionName);
void rpn_BankSelf(struct Expression *expr);