ENIGMA Forums

General fluff => Announcements => Topic started by: Josh @ Dreamland on August 28, 2010, 06:26:16 am

Title: Mini Progress Feed
Post by: Josh @ Dreamland on August 28, 2010, 06:26:16 am
They say coordinating programmers is like herding cats.

Well, if herding cats is this disinteresting, I believe them.

Anyway, I have truly no idea where everybody is. I swear LGM still isn't rebuilding ENIGMA for me on Linux. I think Retro's done with his packages, and I think they only contain the essentials now, but I'm not certain. Last I heard he was uploading them at 80kbps, with an ETA of 18 hours or something? It wasn't exactly encouraging.

Anyway, I wanted Ism to get our new C++ resource working (as in, saving) before the release, as it is the method by which users can create and share C++ functions. With it, you can take part in ENIGMA's development, whether by implementing your own C++ functions or by including other users' to test or for personal use. The resource has many applications outside of the beta program; I know it'll become a crowd pleaser over time. Especially when I finish what I'm working on right now.

Basically, I have three things in my scope at the moment:
1) var[x,y]
2) room order: base off resource tree, not ID
3) OBJ.varname

Presently, I am working on the third. It worked in R3, but was so inefficient I decided to replace it early on, but didn't finish it.
When that is done, with() should start working also.

I added backgrounds to the executable, but I don't do much with them at the moment. I didn't want to add tiles until I worked out a depth system that agreed with the way I read events from a YAML configuration file. As it stands, the compiler doesn't ship knowing the name of a single event: How am I supposed to give draw event order special behavior?

Actually, the answer just came to me (Which is odd considering the hour; I think I had the idea before). In essence, the special variable I'll need to instantiate for depth will insert its call into the correct depth layer on construct. On assign, it unlinks and re-inserts. On destruct, it unlinks finally.

Okay, that solved, I'm going to sleep, then finish OBJ.varname so with and such works. To-do to finish that:
1) Keep list of `member` instances parsed as "access_%1"
2) Add that function to the usable function list so as to avoid a.b.c mis-parse.
3) Check variable data from all objects for type conflicts
4) Generate the access functions based off data from all objects

Next I'll do var[x,y] (needs replaced with var(x,y)), then rooms (needs double-buffered: one array by room ID, one non-sparse array for quick traversal.

Mac progress... Good on my end, waiting for update from TGMG. Must have fixed ten problems. Looking promising.

For now, good night.
Title: Re: Mini Progress Feed
Post by: The 11th plague of Egypt on August 28, 2010, 07:24:58 am
I'm really going to need OBJ.varname, but wth is var[x,y]? Some kind of temporary array?
Title: Re: Mini Progress Feed
Post by: MrJackSparrow2 on August 28, 2010, 01:21:04 pm
Not var as in a local scope, var as in a variable. It's a GM-style 2d array. The parser doesn't knw wtf to do when it comes across the comma between brackets.
Title: Re: Mini Progress Feed
Post by: Josh @ Dreamland on August 28, 2010, 02:33:38 pm
Well, when it sees the comma at present, it does what C++ would do: use the latter term.
Title: Re: Mini Progress Feed
Post by: RetroX on August 28, 2010, 10:25:44 pm
It was, for whatever reason, my internet flopping.  It's back to 512 k/s upload, now.

For the packages, it's just me running a script that will pull the latest SVN revision, build packages, start dropbox (if it's not already started), create a package list file, and upload the files to my dropbox account.

If anyone's even attempted to install my packages up to this point, I'd suggest that right now, you uninstall it, delete the ENIGMA icon from the applications menu, and download the latest version of it (a list of the current packages can be found here (http://dl.dropbox.com/u/6125077/enigma/pkglist)).


Also, for the record, I am still getting the undefined object_locals error that I've been getting from the beginning. :V

That being:
Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function ‘void enigma::constructor(enigma::object_basic*)’:
Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:50:17: error: ‘struct enigma::object_locals’ has no member named ‘alarm’
In file included from SHELLmain.cpp:121:0:
Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:69:15: error: ‘struct enigma::object_locals’ has no member named ‘image_single’
Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:70:15: error: ‘struct enigma::object_locals’ has no member named ‘image_speed’
Title: Re: Mini Progress Feed
Post by: Josh @ Dreamland on August 29, 2010, 01:12:57 am
Retro: I asked you ages ago to test file_find_first on your system. The only explanation I have is that ENIGMA cannot read the YAML files defining those locals on your platform. I have a hunch it has to do with access() rather than opendir().

Progress:
Haven't seen Ism all bloody day. Worked with TGMG and resolved a few more Mac issues, but there seems to be a problem with one of the compatibility macros on that platform. We'll look into it tomorrow.

Fixed the parsing of `OBJECT.variable`. Its functionality, however, is not yet finished. I may finish it before I fall asleep, but I can't promise that. It will be finished sometime today, though.

Annoyed at a problem retep and Rusky are experiencing. For some reason, their MinGW configurations are trying to access something from the Program Files, but only manage to call C:Program. Talk about annoying.

Further update:

Code: (C++) [Select]
int cfp;
cfp.x = 0;
cfp.y = 0;
cfp.randomness = 0;
cfp.bliss = 0;
cfp.speed = 0;
cfp.health = 0;
string xfp;
xfp.length = 0;

instance_nearest(x,y,0).r = 0

er.ar.bar = car;

string *xstr;
xstr.length = 0;


//=======================================\\
// P a r s e s   t o
//=======================================//

int cfp;
int cfp;
enigma::glaccess(cfp)-> x = 0;
enigma::glaccess(cfp)-> y = 0;
enigma::varaccess_randomness(int(cfp))= 0;
enigma::varaccess_bliss(int(cfp))= 0;
enigma::glaccess(cfp)-> speed = 0;
enigma::glaccess(cfp)-> health = 0;
string<> xfp;
xfp.length = 0;
with(enigma::varaccess_nigr(int(anus)))
  enigma::varaccess_arse(int(self))= enigma::varaccess_tits(int(self));
enigma::varaccess_r(int(instance_nearest(x, y, 0)))= 0;
enigma::varaccess_bar(int(enigma::varaccess_ar(int(er))))= car;
string<> * xstr;
xstr -> length = 0;

What that means is as follows:
1) string is incorrect until I remove the template flag when typedef'd with zero unfilled parameters
2) OBJ.x will operate more efficiently than OBJ.randomness, because x is guaranteed to exist.
3) Operator <dot> is now universal. Pointer.Member === Pointer->Member.  StructInst.Member is left alone. Instance.Member is parsed correctly to allow lookup.

With() has one remaining bug, being that this code:
Code: (GML) [Select]
with (a) b.c = d;Intermediately parses to
Code: (GML) [Select]
with (a) self.b.self.c = d;Instead of just self.b.c, as it should.

The reason self is added at all is because the system recognizes self (-3 or whatever it is) as [the currently active object], which with() modifies.
Title: Re: Mini Progress Feed
Post by: Brett on August 29, 2010, 02:05:02 pm
Shouldn't it parse to?

with (a) self.b.c = self.d;

because d should be a variable of the <A> object? I could be wrong though, I don't know how enigma works internally. Just want to save you a possible headache.
Title: Re: Mini Progress Feed
Post by: Josh @ Dreamland on August 29, 2010, 02:18:41 pm
Ah, yes. That was just me being tired at two in the morning. I didn't feel like intercepting parse output between the part where self. is added and OBJ.varname is replaced. :P
Title: Re: Mini Progress Feed
Post by: retep998 on August 29, 2010, 09:41:52 pm
on windows a command-line argument that has spaces in it, must be enclosed in double quotes, otherwise it will be treated as multiple arguments.
i don't care what you think of windows, or how make SHOULD work, the problem is it DOESN'T work, so you better go adding those double quotes or you're gonna lose a large customer base.
Title: Re: Mini Progress Feed
Post by: Josh @ Dreamland on August 30, 2010, 12:21:03 am
Listen. To. Me.
I. Do. NOT. Call. ANYTHING. In. The. Program. Files.

Again,
I. Do. NOT. Call. ANYTHING. In. The. Program. Files.

I don't care if you know what happens when you type text into the black box Microsoft calls a terminal. I do not make calls to system(), because system() incorrectly parses quotes on Windows, ignoring them. Instead, I call CreateProcess, of which parameter0 is an unquoted path to the module to be loaded.

If you listened in the damn IRC, you would have heard that the error still persists when Make is called manually by the user. Meaning one of two things
1) The unescaped string is in the makefiles (unlikely)
2) The MinGW configuration being called is invalid (very likely in your case: using Code::Blocks' custom MinGW shipment)

I have no idea why Rusky is experiencing that problem, since his MinGW has no affiliation with the Program Files, either, but you two are the only Windows users experiencing this issue.
Title: Re: Mini Progress Feed
Post by: Josh @ Dreamland on August 31, 2010, 03:29:19 am
Okay, as of now, OBJECT.variablename works for everything but global, which some part of me is still deciding what to do with. As I mentioned earlier that such would effect, with() now works again as well.  The list of things from R3 not yet implemented is quickly shrinking.

var[,] and build mode are the two remaining big ones.
Title: Re: Mini Progress Feed
Post by: The 11th plague of Egypt on September 04, 2010, 02:56:06 pm
Need...more...NEWS! :v:
Title: Re: Mini Progress Feed
Post by: Josh @ Dreamland on September 05, 2010, 07:00:25 am
Well, I did fix var[,] as well as hexadecimal (which no one even missed yet). I also fixed a problem with abs(), string(), and possibly the Bessel functions. I've not tested the Bessel functions for some reason; they either work or error at compile time. Fixed some bugs with the new accessor system and the new type resolution system, but I know of a bug that has not yet been reported regarding a.b.c access potentially failing where b is not an integer (in cases such as object0.name.length()). I have a generic idea of how to solve that, but I need to get :: working in the syntax check and parser first.

I've also been working a lot with TGMG to try to work out the rest of the parse errors on Apple. It's astounding. I got macro unrolled-versions of all the headers from TGMG to debug here on Linux where my tools all work, and ran the parser on it... No error. This means one of two things:
1) The macros somehow interfere with the parsing
2) The parser is misbehaving in some other way on Apple
The former is unlikely due to the fact that there are no macros even near the code in question. The latter would be a horrific realization.

Looking at implementing build mode, it seems I'll be going with my original plan to incorporate cross-platforming: A window system similar to GM systems. Basically, the API will look like this:

Code: [Select]
int win = gui_window_create(0,0,640,480);
int pan = gui_panel_create(win,0,0,640,480);
int but = gui_button_create(pan,8,8,120,24,"Press Me");

gui_window_step(win);
if (gui_button_pressed(but))
  game_end();
Title: Re: Mini Progress Feed
Post by: The 11th plague of Egypt on September 05, 2010, 08:51:05 am
The new API looks easy to understand. Nice.

Good luck with the Mac