mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-29 14:27:50 +00:00
Use callback for PC's value
This causes it to auto-update whenever the current section's attributes are updated, simplifying the code and eliminating redundancy. This should also overall reduce overhead (one extra function call on each PC evaluation, but less bookkeeping for each byte output)
This commit is contained in:
@@ -405,7 +405,6 @@ static void updateUnion(void)
|
||||
|
||||
nPC = unionStart[unionIndex];
|
||||
pCurrentSection->nPC = unionStart[unionIndex];
|
||||
pPCSymbol->nValue = unionStart[unionIndex];
|
||||
}
|
||||
|
||||
static size_t strlenUTF8(const char *s)
|
||||
@@ -858,7 +857,6 @@ endu : T_POP_ENDU
|
||||
nUnionDepth--;
|
||||
nPC = unionStart[nUnionDepth] + unionSize[nUnionDepth];
|
||||
pCurrentSection->nPC = nPC;
|
||||
pPCSymbol->nValue = nPC;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user