mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Use meaningful types for byte output functions
This commit is contained in:
@@ -26,8 +26,8 @@ struct Section *out_FindSectionByName(const char *pzName);
|
||||
void out_NewSection(char const *pzName, uint32_t secttype, int32_t org,
|
||||
struct SectionSpec const *attributes);
|
||||
|
||||
void out_AbsByte(int32_t b);
|
||||
void out_AbsByteGroup(char const *s, int32_t length);
|
||||
void out_AbsByte(uint8_t b);
|
||||
void out_AbsByteGroup(uint8_t const *s, int32_t length);
|
||||
void out_Skip(int32_t skip);
|
||||
void out_String(char const *s);
|
||||
void out_RelByte(struct Expression *expr);
|
||||
|
||||
@@ -1137,7 +1137,7 @@ constlist_8bit_entry : /* empty */
|
||||
char *s = $1;
|
||||
int32_t length = charmap_Convert(&s);
|
||||
|
||||
out_AbsByteGroup(s, length);
|
||||
out_AbsByteGroup((uint8_t*)s, length);
|
||||
free(s);
|
||||
}
|
||||
;
|
||||
|
||||
@@ -199,9 +199,8 @@ void out_NewSection(char const *pzName, uint32_t secttype, int32_t org,
|
||||
/*
|
||||
* Output an absolute byte (bypassing ROM/union checks)
|
||||
*/
|
||||
static void absByteBypassCheck(int32_t b)
|
||||
static void absByteBypassCheck(uint8_t b)
|
||||
{
|
||||
b &= 0xFF;
|
||||
pCurrentSection->tData[nPC] = b;
|
||||
pCurrentSection->nPC++;
|
||||
nPC++;
|
||||
@@ -210,14 +209,14 @@ static void absByteBypassCheck(int32_t b)
|
||||
/*
|
||||
* Output an absolute byte
|
||||
*/
|
||||
void out_AbsByte(int32_t b)
|
||||
void out_AbsByte(uint8_t b)
|
||||
{
|
||||
checkcodesection();
|
||||
checksectionoverflow(1);
|
||||
absByteBypassCheck(b);
|
||||
}
|
||||
|
||||
void out_AbsByteGroup(char const *s, int32_t length)
|
||||
void out_AbsByteGroup(uint8_t const *s, int32_t length)
|
||||
{
|
||||
checkcodesection();
|
||||
checksectionoverflow(length);
|
||||
@@ -278,11 +277,10 @@ void out_RelByte(struct Expression *expr)
|
||||
/*
|
||||
* Output an absolute word
|
||||
*/
|
||||
static void absWord(int32_t b)
|
||||
static void absWord(uint16_t b)
|
||||
{
|
||||
checkcodesection();
|
||||
checksectionoverflow(2);
|
||||
b &= 0xFFFF;
|
||||
pCurrentSection->tData[nPC] = b & 0xFF;
|
||||
pCurrentSection->tData[nPC + 1] = b >> 8;
|
||||
pCurrentSection->nPC += 2;
|
||||
@@ -312,7 +310,7 @@ void out_RelWord(struct Expression *expr)
|
||||
/*
|
||||
* Output an absolute longword
|
||||
*/
|
||||
static void absLong(int32_t b)
|
||||
static void absLong(uint32_t b)
|
||||
{
|
||||
checkcodesection();
|
||||
checksectionoverflow(sizeof(int32_t));
|
||||
|
||||
Reference in New Issue
Block a user