From db0457b9e5e49f504344dbf3a0127bf2a5a58ad6 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Wed, 17 Sep 2008 14:45:35 +0200 Subject: [PATCH] Push parameters of _SetEntries into the stack instead of registers. Add graphical display type (clut, fixed, direct). Signed-off-by: Laurent Vivier --- libmacos/macos/quickdraw.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libmacos/macos/quickdraw.h b/libmacos/macos/quickdraw.h index b205a35..c7a4b2a 100644 --- a/libmacos/macos/quickdraw.h +++ b/libmacos/macos/quickdraw.h @@ -9,6 +9,12 @@ #include #include +enum { + clutType = 0, + fixedType = 1, + directType = 2 +}; + struct BitMap { void* baseAddr; int16_t rowBytes; @@ -145,9 +151,9 @@ static inline void InitGraf(void * port) static inline void SetEntries(short start, short count, CSpecArray aTable) { - asm("move.l %0, %%d0\n" - "move.l %1, %%d1\n" - "move.l %2, %%a0\n" + asm("move.w %0, -(%%sp)\n" + "move.w %1, -(%%sp)\n" + "move.l %2, -(%%sp)\n" Trap(_SetEntries) :: "g" (start), "g" (count), "g" (aTable) : UNPRESERVED_REGS);