Try again with re-declaring system header functions

This commit is contained in:
UnknownShadow200 2024-06-04 08:00:06 +10:00
parent 19c9c15e62
commit c0087369f0
2 changed files with 50 additions and 4 deletions

View File

@ -33,8 +33,26 @@ cc_bool Platform_SingleProcess = true;
/*########################################################################################################################*
*---------------------------------------------------Imported headers------------------------------------------------------*
*#########################################################################################################################*/
// On 68k these are implemented using direct 68k opcodes
// On PPC these are implemented using function calls
#if TARGET_CPU_68K
#define MAC_SYSAPI(_type) static _type
#define MAC_ONEWORDINLINE(w1) = w1
#define MAC_TWOWORDINLINE(w1,w2) = {w1, w2}
#define MAC_THREEWORDINLINE(w1,w2,w3) = {w1, w2, w3}
#define MAC_FOURWORDINLINE(w1,w2,w3,w4) = {w1, w2, w3, w4}
#else
#define MAC_SYSAPI(_type) extern pascal _type
#define MAC_ONEWORDINLINE(w1)
#define MAC_TWOWORDINLINE(w1,w2)
#define MAC_THREEWORDINLINE(w1,w2,w3)
#define MAC_FOURWORDINLINE(w1,w2,w3,w4)
#endif
typedef unsigned long MAC_FourCharCode;
// ==================================== IMPORTS FROM TIMER.H ====================================
// Availability: in InterfaceLib 7.1 and later
static void Microseconds(UnsignedWide* microTickCount) FOURWORDINLINE(0xA193, 0x225F, 0x22C8, 0x2280);
MAC_SYSAPI(void) Microseconds(UnsignedWide* microTickCount) MAC_FOURWORDINLINE(0xA193, 0x225F, 0x22C8, 0x2280);
/*########################################################################################################################*
*---------------------------------------------------------Memory----------------------------------------------------------*

View File

@ -14,18 +14,46 @@
#include <Dialogs.h>
#include <Fonts.h>
#include <Events.h>
#include <DiskInit.h>
static WindowPtr win;
/*########################################################################################################################*
*---------------------------------------------------Imported headers------------------------------------------------------*
*#########################################################################################################################*/
// On 68k these are implemented using direct 68k opcodes
// On PPC these are implemented using function calls
#if TARGET_CPU_68K
#define MAC_SYSAPI(_type) static _type
#define MAC_ONEWORDINLINE(w1) = w1
#define MAC_TWOWORDINLINE(w1,w2) = {w1, w2}
#define MAC_THREEWORDINLINE(w1,w2,w3) = {w1, w2, w3}
#define MAC_FOURWORDINLINE(w1,w2,w3,w4) = {w1, w2, w3, w4}
#else
#define MAC_SYSAPI(_type) extern pascal _type
#define MAC_ONEWORDINLINE(w1)
#define MAC_TWOWORDINLINE(w1,w2)
#define MAC_THREEWORDINLINE(w1,w2,w3)
#define MAC_FOURWORDINLINE(w1,w2,w3,w4)
#endif
typedef unsigned long MAC_FourCharCode;
// ==================================== IMPORTS FROM DISKINIT.H ====================================
// Availability: in InterfaceLib 7.1 and later
MAC_SYSAPI(void) DILoad(void) MAC_THREEWORDINLINE(0x7002, 0x3F00, 0xA9E9);
// Availability: in InterfaceLib 7.1 and later
static long GetScrap(Handle dst, FourCharCode type, SInt32* offset) ONEWORDINLINE(0xA9FD);
MAC_SYSAPI(void) DIUnload(void) MAC_THREEWORDINLINE(0x7004, 0x3F00, 0xA9E9);
// Availability: in InterfaceLib 7.1 and later
static OSStatus PutScrap(SInt32 srcLen, FourCharCode type, const void* src) ONEWORDINLINE(0xA9FE);
MAC_SYSAPI(short) DIBadMount(Point where, UInt32 evtMessage) MAC_THREEWORDINLINE(0x7000, 0x3F00, 0xA9E9);
// ==================================== IMPORTS FROM SCRAP.H ====================================
// Availability: in InterfaceLib 7.1 and later
MAC_SYSAPI(long) GetScrap(Handle dst, MAC_FourCharCode type, SInt32* offset) MAC_ONEWORDINLINE(0xA9FD);
// Availability: in InterfaceLib 7.1 and later
MAC_SYSAPI(OSStatus) PutScrap(SInt32 srcLen, MAC_FourCharCode type, const void* src) MAC_ONEWORDINLINE(0xA9FE);
/*########################################################################################################################*