TheExDeus
|
 |
Posted on: February 21, 2012, 03:17:10 pm |
|
|
 Joined: Apr 2008
Posts: 1860
|
Maybe Josh can make a graph detailing how and what is called from the "Run" button to the first frame of the launched program. Right now I can't figure out what is called in what order and where it is called from. I am looking into Android now and in the new versions of NDK it can compile so called Native programs (that is C++ without any Java or even wrappers for Java code). So I can code everything in pure C++ and run it. I wanted to create the basic framework in ENIGMA so I could launch it, but I don't know where to start. The Platforms folder has functions that I know are called in the beginning (like win32 window create function) but I don't know where it is called from. I looked in the SHELLmain, but it didn't get any clearer. I can't actually find "main()". I also see that there is a lot of useless code (which I thought was removed last October when Josh did "the clean up"). One example of that is COLLIGMA which pops up here and there. I also think folders like Universal_System should be better structured (like Load and resource inits in one folder, general purpose functions in another and so on). Basically, I really love ENIGMA and I want to use it everywhere, but there is a lot of obstacles in the way of that. Slow progress is one thing.. for example, the "Clean released" option with .ico support is still not there. MinGW didn't fix that bug you were having? And weren't there a workaround? Its just that the parser you are always working on actually does its job. There are bugs here and there, but mostly I can work around them. I think its much more important to make everything usable and structured and only then update/optimize/rewrite something.
|
|
« Last Edit: February 21, 2012, 03:20:57 pm by HaRRiKiRi »
|
Logged
|
|
|
|
Post made February 22, 2012, 10:20:28 am was deleted at the author's request.
|
Josh @ Dreamland
|
 |
Reply #2 Posted on: February 22, 2012, 11:38:35 am |
|
|
Prince of all Goldfish
 Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
I've been trying to think of a good graph structure for the job. Some kind of flow chart, obviously, but it'd be good if the nodes on it could be expanded and hidden. I'll think about that--it could be a cool new way to document applications.
Also, MinGW fixed that bug three days ago. It should be upstream here shortly. I think.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Post made February 22, 2012, 01:18:33 pm was deleted at the author's request.
|
IsmAvatar
|
 |
Reply #4 Posted on: February 22, 2012, 03:01:00 pm |
|
|
LateralGM Developer
 Location: Pennsylvania/USA Joined: Apr 2008
Posts: 877
|
main() is a method for programs that compile into an exe. ENIGMA is a dll. DLLs have multiple external functions that another program will call. These are usually marked as `extern "C"`. In ENIGMA, we have a macro defining `dllexport` to the appropriate export flags. The main ones are defined in CompilerSource/main.cpp. For an overview of the dll-exported functions, please see the Driver wiki page: http://enigma-dev.org/docs/Wiki/EnigmaDriver as well as the more general Backend page which covers everything lower-level from the Plugin's side: http://enigma-dev.org/docs/Wiki/Backend
|
|
« Last Edit: February 22, 2012, 03:02:38 pm by IsmAvatar »
|
Logged
|
|
|
|
|
|
IsmAvatar
|
 |
Reply #7 Posted on: February 22, 2012, 11:38:04 pm |
|
|
LateralGM Developer
 Location: Pennsylvania/USA Joined: Apr 2008
Posts: 877
|
Ah, in that case, you're dealing with platform-specific code, since we generate platform-specific exes (or elfs or apps), and initialization sets up platform-specific things (like the window). As you can probably figure out from the wiki, ENIGMAsystem/SHELL houses the game code. From there, logically, you would look in Platforms for platform specific code, and then identify your platform, and then seek out the respective main.cpp (Josh points them out). Hope that helps.
|
|
|
Logged
|
|
|
|
|
TheExDeus
|
 |
Reply #9 Posted on: February 23, 2012, 03:27:43 pm |
|
|
 Joined: Apr 2008
Posts: 1860
|
The return key makes for an excellent way to make your post more readable.  Yeah I wanted to write the topic just like ENIGMA is now structured. IsmAvatar: I knew that. I just didn't know in what order everything is called. I just figured out that WinMain was the entry point for windows app. I thought it was main() like usual. I think I get kind of sort of what is going on now. I will probably not be able to use enigma::initialize_everything(); if that is not OS specific, as Android requires external resources and so on. But I should be able to make the basic functions.
|
|
|
Logged
|
|
|
|
|
|
TheExDeus
|
 |
Reply #12 Posted on: February 25, 2012, 12:23:07 pm |
|
|
 Joined: Apr 2008
Posts: 1860
|
Also, where can I specify an include directory? Is it searchdirs: in the .ey? edit: Whatever. Somebody here with a half decent brain would hook up Android. I can't, because I just can't navigate that maze. The creator (e.g. Josh) could. So again, I will just wait for someone to hook it up and I will make functions for it (like OpenGLES drawing functions). The basic idea is to use the new NDK. Then create basic 5 functions or so (AndroidMain is the entry point, then like 3 feedback functions for cmd's (like destroy window) and inputs (sensors)) and make it compile using ndk-build. An example: http://developer.android.com/reference/android/app/NativeActivity.htmlI could get to the point where it asks for jni.h (which I know where it is). As I don't know where to specify the include dirs I just copied it to MinGW (which is creates a shitload of conflicts). Now I just have problems with Actions (like place_free) not being defined in some scope. No idea how I ended up with that error. Now even my Windows compile doesn't work. I can compile that example using the ndk-build and so on. So that works. I can even run it on emulator. Its just that I can't make ENIGMA do the same.
|
|
« Last Edit: February 25, 2012, 12:29:28 pm by HaRRiKiRi »
|
Logged
|
|
|
|
|