1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-25 10:42:20 -05:00
Simba/Projects/MMLLib/libmml.lpr

76 lines
1.0 KiB
ObjectPascal
Raw Normal View History

library libmml;
{$mode objfpc}{$H+}
uses
2010-03-26 10:20:50 -04:00
cmem,Classes,interfaces,graphics,client,sysutils,MufasaTypes,dtmutil;
{$R *.res}
2010-03-26 07:22:08 -04:00
type
PTPoint = ^TPoint;
2010-03-26 10:20:50 -04:00
PPDTM = ^PDTM;
2010-03-26 07:22:08 -04:00
var
C: TClient;
function test: pchar;
begin
result := PChar('hello world');
end;
procedure init;
begin
C:=TCLient.Create('');
end;
function getmousepos: tpoint;
begin
C.IOManager.GetMousePos(result.x,result.y);
end;
2010-03-26 07:22:08 -04:00
function returnpoints: PTPoint;
2010-03-26 07:22:08 -04:00
begin
result := AllocMem(sizeof(TPoint) * 2);
result[0].x := 5;
result[0].y := 10;
result[1].x := 20;
result[1].y := 30;
end;
function printpoints(b: PTPoint; len: integer): boolean;
var i:integer;
begin
for i := 0 to len - 1 do
writeln('X, Y: (' + inttostr(b[i].x) + ', ' + inttostr(b[i].y) + ')');
end;
procedure hoi(var i: integer);
begin
i := i + 1;
end;
2010-03-26 10:20:50 -04:00
function givedtm:PPDTM;
var
dtm: PPDTM;
begin
dtm := AllocMem(sizeof(pdtm));
initdtm(dtm^,2);
result:=dtm;
dtm^.n := PChar('wat');
end;
exports
test,
init,
2010-03-26 07:22:08 -04:00
getmousepos,
returnpoints,
printpoints,
2010-03-26 10:20:50 -04:00
hoi,
givedtm;
begin
end.