REDIVIVUS

Proposals / #954

Mac D2COMP_LoadItemPaletteFile: __fastcc void (char * szPaletteFilename, int32_t nPaletteSlot)

applied · by KierTaylor · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 111 · 3c6740e

Mac body: ECX is appended (strcat) to 'Data\\Global\\Items\\Palette\\' and '.dat' is added, then the file is loaded; EDX (ESI) is multiplied by 0x6900 to select the destination palette slot; no stack arguments are read and it has a single plain RET. Windows twin D2COMP_LoadItemPaletteFile 0x00505470 is void (int32_t nPaletteSlot, char * szPaletteFilename); the Mac register order puts the file name first.

Changes 1, applied together

  1. Set prototype mac 0x00042042

    signatureundefined D2COMP_LoadItemPaletteFile(void)→void D2COMP_LoadItemPaletteFile(char * szPaletteFilename, int32_t nPaletteSlot)
    conventionunknown→__fastcc