|
GamePascal |
codetricity
Member #17,059
March 2019
|
Working on a little project to see how far I can go with it. Always wanted to do something like this, so giving a go. More info coming... {"name":"gpide001.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/c\/ccdbb3019f79a00db5c949372dcc8e3c.jpg","w":942,"h":766,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/c\/ccdbb3019f79a00db5c949372dcc8e3c"}
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Interesting... What's with the Capital_UnderScore naming? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
codetricity
Member #17,059
March 2019
|
Edgar Reynaldo said: What's with the Capital_UnderScore naming? I adopted this style almost 20 years ago. It's what I call Object/Method or Class/Method case or whatever. You can only export routines from standard DLLs in Delphi (there are package libraries (BPL), but that's a story for another day), so you must flatten your objects, most of the functionality is in the form of classes, for example, TVideo.Load() the direct representation of this on the front end will be Video_Load. Video_Create will return the TVideo class, and Class_Method routines allow you to interact with the objects inside the DLL.
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Well, at least it's not m_pHungarian So you made an IDE? What languages does it support, and what features has it got? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
codetricity
Member #17,059
March 2019
|
Edgar Reynaldo said: Well, at least it's not m_pHungarian Oh gosh no, haha. Quote: So you made an IDE? What languages does it support, and what features has it got? It's for that experimental object pascal compiler.
The compiler is exposed as a service (CaaS) so I can access all features of it from a simple API: 1function Compiler_Create: TCompiler; external cDllName;
2procedure Compiler_Destroy(var aCompiler: TCompiler); external cDllName;
3procedure Compiler_Reset(aCompiler: TCompiler); external cDllName;
4procedure Compiler_SetInputFile(aCompiler: TCompiler; aFilename: string); external cDllName;
5procedure Compiler_SetConsoleApp(aCompiler: TCompiler; aValue: Boolean); external cDllName;
6procedure Compiler_SetAddVersionInfo(aCompiler: TCompiler; aValue: Boolean); external cDllName;
7procedure Compiler_SetModuleName(aCompiler: TCompiler; aFilename: string); external cDllName;
8procedure Compiler_SetEnableRuntimeThemes(aCompiler: TCompiler; aValue: Boolean); external cDllName;
9procedure Compiler_SetExeIconFilename(aCompiler: TCompiler; aFilename: string); external cDllName;
10procedure Compiler_SetHighDpiAware(aCompiler: TCompiler; aValue: Boolean); external cDllName;
11function Compiler_Compile(aCompiler: TCompiler; var aOutputFilename: string): Boolean; external cDllName;
12function Compiler_GetErrorCount(aCompiler: TCompiler): Integer; external cDllName;
13function Compiler_GetWarningCount(aCompiler: TCompiler): Integer; external cDllName;
14function Compiler_GetErrorMessage(aCompiler: TCompiler; aIndex: Integer; var aFilename: string; var aLineNum: Integer; var aLinePos: Integer; var aMsg: string): string; external cDllName;
15function Compiler_GetWarningMessage(aCompiler: TCompiler; aIndex: Integer; var aFilename: string; var aLineNum: Integer; var aLinePos: Integer; var aMsg: string): string; external cDllName;
16procedure Compiler_SetCompileEvent(aCompiler: TCompiler; aSender: Pointer; aHandler: TCompilerCompileEvent); external cDllName;
17procedure Compiler_GetCompileEvent(aCompiler: TCompiler; var aSender: Pointer; var aHandler: TCompilerCompileEvent); external cDllName;
18procedure Compiler_SetMessageEvent(aCompiler: TCompiler; aSender: Pointer; aHandler: TCompilerMessageEvent); external cDllName;
19procedure Compiler_GetMessageEvent(aCompiler: TCompiler; var aSender: Pointer; var aHandler: TCompilerMessageEvent); external cDllName;
20procedure Compiler_SetVersionInfo(aCompiler: TCompiler; aCompanyName: string; aFileVersion: string;
21 aFileDescription: string; aInternalName: string; aLegalCopyright: string;
22 aLegalTrademarks: string; aOriginalFilename: string; aProductName: string;
23 aProductVersion: string; aComments: string); external cDllName;
24function Compiler_CodeCompletion(aCompiler: TCompiler; const aCode: string; aX, aY: Integer; var aList: TStringArray; var aTypeName: string): Boolean; external cDllName;
25function Compiler_FindDeclaration(aCompiler: TCompiler; const aCode: string; aX, aY: Integer): string; external cDllName;
26procedure Compiler_AddSearchPath(aCompiler: TCompiler; aPath: string); external cDllName;
27procedure Compiler_AddSearchPaths(aCompiler: TCompiler; aPath: string); external cDllName;
Call Compiler_CodeCompletion with the code you're currently editing, and it will do a partial compile and return data that you can use for code completion/param hints. Pass the word the cursor is under to Compiler_FindDeclaration, and you can use this info to lookup an entry in the help file for context help. Compiler_GetErrorMessage return info that allows you to navigate to the source file location of error. At the moment, the compiler can produce standard win32 EXEs/DLLs. The game library uses Allegro5.
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
That looks pretty dang cool. What incentives are there to change from C++ development to Object Pascal or Delphi? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Niunio
Member #1,975
March 2002
|
Edgar Reynaldo said: What incentives are there to change from C++ development to Object Pascal or Delphi?
Can't remember more right now. ----------------- |
codetricity
Member #17,059
March 2019
|
Niunio said:
Yea, what he said. Plus, I've been using Pascal (Turbo Pascal, Borland Pascal, Pascal for Windows, Delphi) since what, 1986 I think. I know c/c++ too, prefer Pascal. Edit 1
|
|