www.midletpascal.com seems to have exceeded their bandwidth .
So am I right in thinking that in MP, the only "uses" units are Java classes? I can't seem to find a way to use a simple particle.pas unit that I want to use.
Any ideas?
www.midletpascal.com seems to have exceeded their bandwidth .
So am I right in thinking that in MP, the only "uses" units are Java classes? I can't seem to find a way to use a simple particle.pas unit that I want to use.
Any ideas?
I haven't tried MP at all yet, but what about the good old {$I File} method. Seems that while most low end compilers don't support Uses directly they all support include files.
PS: Savage or Will could you please put your two cents in on: http://www.pascalgamedevelopment.com...pic.php?t=3040 I'm quite worried that my goals and current target don't fit the contest goals, it also seems that others are moving along the same route I am.
- Jeremy
http://www.eonclash.com/
As far as I know you cannot include an existing unit but have to create a new unit and paste all the stuff you want into it. If I remember correctly there was a wishlist item to import existing files.
William Cairns
My Games: http://www.cairnsgames.co.za (Currently very inactive)
MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)
Ah ok, just found the "new source file" option. Better than nothing I suppose.Originally Posted by cairnswm
I don't think MP supports include files. It can't even do compiler directives yet.Originally Posted by jdarling
I think that "uses unit.pas" is not pascal optimized and are working as C include file.
Btw, I can add uses particle; to my main source file and it compiles. But if I try and reference a procedure/function that exists in the particle.mpsrc file the compiler/IDE complains .
I create a new project called TEST.
Went to Project - New Source File
- Names the file TestUnitOne
Modified the file as follows:
Went back tot he main file and modified it as follows (Uses clause and drawtext line):Code:unit TestUnitOne; interface { add public declarations here } Procedure WriteHeading; implementation { add unit functions & procedures here } Procedure WriteHeading; Begin DrawText('HEADING',10,10); end; initialization { add initialization code here } end.
Seems to work fine.Code:program Test; Uses TestUnitOne; begin WriteHeading; repaint; delay(2000); end.
William Cairns
My Games: http://www.cairnsgames.co.za (Currently very inactive)
MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)
Bookmarks