Mac D2COMP_LoadItemPaletteFile: __fastcc void (char * szPaletteFilename, int32_t nPaletteSlot)
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
Set prototype
mac 0x00042042signatureundefined D2COMP_LoadItemPaletteFile(void)→void D2COMP_LoadItemPaletteFile(char * szPaletteFilename, int32_t nPaletteSlot)conventionunknown→__fastcc