mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Clean object file format code and documentation
Remove unused code. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -264,22 +264,12 @@ Patch(void)
|
||||
}
|
||||
break;
|
||||
case PATCH_WORD_L:
|
||||
case PATCH_WORD_B:
|
||||
if (t >= -32768 && t <= 65535) {
|
||||
t &= 0xFFFF;
|
||||
if (pPatch->Type == PATCH_WORD_L) {
|
||||
pSect->pData[pPatch->nOffset] =
|
||||
t & 0xFF;
|
||||
pSect->pData[pPatch->nOffset +
|
||||
1] =
|
||||
(t >> 8) & 0xFF;
|
||||
} else {
|
||||
//Assume big endian
|
||||
pSect->pData[pPatch->nOffset] =
|
||||
(t >> 8) & 0xFF;
|
||||
pSect->pData[pPatch->nOffset +
|
||||
1] = t & 0xFF;
|
||||
}
|
||||
pSect->pData[pPatch->nOffset] =
|
||||
t & 0xFF;
|
||||
pSect->pData[pPatch->nOffset + 1] =
|
||||
(t >> 8) & 0xFF;
|
||||
} else {
|
||||
errx(1,
|
||||
"%s(%ld) : Value must be 16-bit",
|
||||
@@ -296,15 +286,6 @@ Patch(void)
|
||||
pSect->pData[pPatch->nOffset + 3] =
|
||||
(t >> 24) & 0xFF;
|
||||
break;
|
||||
case PATCH_LONG_B:
|
||||
pSect->pData[pPatch->nOffset + 0] =
|
||||
(t >> 24) & 0xFF;
|
||||
pSect->pData[pPatch->nOffset + 1] =
|
||||
(t >> 16) & 0xFF;
|
||||
pSect->pData[pPatch->nOffset + 2] =
|
||||
(t >> 8) & 0xFF;
|
||||
pSect->pData[pPatch->nOffset + 3] = t & 0xFF;
|
||||
break;
|
||||
}
|
||||
|
||||
pPatch = pPatch->pNext;
|
||||
|
||||
Reference in New Issue
Block a user