From f37c35a40d2a472f39bf9cc85259201fb1a9f538 Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Thu, 5 Jul 2012 22:39:56 +0200 Subject: [PATCH] Workaround: TMufasabitmap = Pointer in lape. --- Units/MMLAddon/LPInc/lpcompile.inc | 4 ++++ Units/MMLAddon/LPInc/lpexportedmethods.inc | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Units/MMLAddon/LPInc/lpcompile.inc b/Units/MMLAddon/LPInc/lpcompile.inc index 12a5b9093..3896f41f2 100644 --- a/Units/MMLAddon/LPInc/lpcompile.inc +++ b/Units/MMLAddon/LPInc/lpcompile.inc @@ -129,3 +129,7 @@ addGlobalType('array of TSysProc', 'TSysProcArr'); addGlobalType('packed record _type, is_text_color: integer; r_low,r_high,g_low,g_high,b_low,b_high,set_col: integer; ref_color,tol,cts: integer; end;', 'TOCRFilterData'); addGlobalType('array of TOCRFilterData', 'TOCRFilterDataArray'); + +{ This is a workaround to allow Lape to export TMufasaBitmaps. + Also see lpexportedmethods.inc } +addGlobalType('Pointer', 'TMufasaBitmap'); diff --git a/Units/MMLAddon/LPInc/lpexportedmethods.inc b/Units/MMLAddon/LPInc/lpexportedmethods.inc index 6594a2e1a..8064afccc 100644 --- a/Units/MMLAddon/LPInc/lpexportedmethods.inc +++ b/Units/MMLAddon/LPInc/lpexportedmethods.inc @@ -44,7 +44,11 @@ AddGlobalFunc('function CreateDTMPoint(x,y,c,t,asz: integer; bp: boolean): TMDTM { Bitmap } AddGlobalFunc('function CreateBitmapString(bmp: integer): string', @Lape_CreateBitmapString); -//AddGlobalFunc('function GetMufasaBitmap(bmp: integer): TMufasaBitmap', @Lape_GetMufasaBitmap); + +{ This is a temporary workaround to allow Lape to pass TMufasaBitmaps to plugins. + Also see lpcompile.inc} +AddGlobalFunc('function GetMufasaBitmap(bmp: integer): Pointer', @Lape_GetMufasaBitmap); + AddGlobalFunc('function CreateBitmap(w,h: integer): integer', @Lape_CreateBitmap); AddGlobalFunc('procedure FreeBitmap(Number: integer);', @Lape_FreeBitmap); AddGlobalFunc('procedure SaveBitmap(Bmp: integer; path: string);', @Lape_SaveBitmap);