Skip to content

Commit

Permalink
Workaround: TMufasabitmap = Pointer in lape.
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlijnWajer committed Jul 5, 2012
1 parent 599a790 commit f37c35a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Units/MMLAddon/LPInc/lpcompile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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');
6 changes: 5 additions & 1 deletion Units/MMLAddon/LPInc/lpexportedmethods.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f37c35a

Please sign in to comment.