Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Josh @ Dreamland

Could you elaborate? You mean having separate drawing functions for all six alignments? Then how will that be backwards compatible with GM? Or how will draw_set_halign/valign actually work in that case?
No, just put the original function in a big if for align being top-left, and then put the rest of the code in the else with whatever hackery is required, that way you don't have to iterate the string for draw_text() when the aligns are default.

Also, why do I need this: ...
Otherwise, \r\n will put two newlines, or if you place ", u+= str[i]=='\n';" at the end of the proposed replacement, '\n\n' will be treated as one line.

General ENIGMA / Re: Questions on EDL and ENIGMA
« on: July 09, 2011, 02:17:38 PM »
Not all of the DND functions are implemented, no. A good deal of them are; they're just not a major priority as we are trying to get the actual function base implemented first.

You certainly can use C++ functions in EDL, as well as its types and classes. At the moment, functions and classes must be declared in ENIGMA Settings->Definitions, but we will be adding a separate resource for that shortly.

We're trying to minimize differences while adding features. Most of the differences at the moment are just a matter of which features are missing from GML, and which are new to EDL.  The biggest stumbling blocks at the moment are that in the latest 'stable' tag, = is exclusively an assignment, and == is the only comparison operator. We have modified the trunk to default to Game Maker's behavior, and made the settings panel actually work in it.

In the trunk, the biggest difference is the behavior of booleans. In GM, (-1) is considered false because it's not greater than zero; in EDL, (-1) is true because it is nonzero.

If you would like to just pick a set of functions we haven't implemented and write them, that would always be appreciated.

As far as compiling to C++ first, it is in our benefit to do so. By letting the GCC take care of compilation for us, we gain a large number of powerful optimizations. We also gain access to a source that we can examine to find lapses in the compiler's understanding of the code; it's much cleaner that way.

That code doesn't consider newlines. Not having the code as fa_left fucks everything up, efficiency wise. You're best to fork up front.

Function Peer Review / Re: "Choose" statement
« on: July 08, 2011, 03:16:40 PM »
Ah; you've stumbled on a way to make ENIGMA honor max() having unlimited parameters. :P
That's... typically kind of dangerous, but I guess it's as good a hack as any. For the time being, you can implement those functions like this:

Code: (C) [Select]
variant choose(...);
int choose(const enigma::varargs& args) {
   return args.get(rand() % args.argc);
#define choose(x...) choose((varargs(), x))

You must declare and implement choose before defining it. In the source, you may be wise to #undef choose, then implement it. DO NOT implement choose(...); it's too segfault-prone. This way, worst-case scenario is link error, not random abort().

He was bitching at me about the fonts being misaligned last revision, so I think whatever is broken is unique to this one. I fixed font_add_sprite() for him a while back.

Function Peer Review / Re: "Choose" statement
« on: July 08, 2011, 02:27:42 PM »
max(varargs(), (varargs(), 10, 25, 34.2)); is incorrect; the string should come out as
max((varargs(), 10, 25, 34.2));

But I don't parse that.
#define max(x...) max((varargs(),x))

and #define won't give me the number of arguments passed.

Again, double max(double numbers, ...){} won't work. It will kill the program as soon as the user calls max(somevar,someothervar). That wasn't a joke. It's possible that C++0x offers a functionality to overload an stdargs pass, but I don't know how well it is supported.

Function Peer Review / Re: "Choose" statement
« on: July 08, 2011, 11:39:23 AM »
For starters, HaRRi, stdargs.h will kill the program if you pass it a var or a variant.
Also, good luck getting the argument count.

General ENIGMA / Re: Enigma status
« on: July 08, 2011, 11:37:39 AM »
I've begun work on a varargs class that, when excepted as a parameter, allows functions to be called with unlimited arguments. Like in scripting languages. You could fetch the number of arguments, iterate through them, sort them... anything you need to implement functions like mean(), mode(), median(),  choose()... The drawback is that they require a macro.

At the moment I'm torn between allowing ENIGMA to deal with that macro (it has to have some knowledge of it to allow unlimited arguments in a function) or just adding a #pragma directive that will give them infinite parameters automatically. I'll probably do the former; the latter's kludgy.

I made some move toward implementing that for you, but I forget where I left off. *shrug*
Sorry about that.
Case-closed then, yes? :P

Issues Help Desk / Re: enigma can't find 'make'
« on: July 06, 2011, 11:43:29 AM »
I thought Ism fixed that... ;__;
My word.

Anyway, glad that's working now. We'll try to work some of the kinks that plagued you out of the system. Both of us have a big to-do, but this will probably end up queued up, seeing as it keeps causing major issue.

Issues Help Desk / Re: enigma can't find 'make'
« on: July 05, 2011, 10:16:11 PM »
HaRRi: Make sure you rebuild the DLL. I corrected that dog shit problem in 798; the same revision that introduced it.
As for the exception, that's greek to me.

Dom: I'll have IsmAvatar print the SVN revision number; in the meantime, does a blank game work? A game with just one room? A game with a room and an object with/without a sprite? 799 had a problem with objects that don't have sprites.

Issues Help Desk / Re: Install Enigma on Mac
« on: July 05, 2011, 12:28:05 AM »
That depends mostly on TGMG. Most of the developers and those active in the IRC go with trunk/. That folder, though we try to keep it working as best as we can, often ends up accidentally destroyed. We maintain stable mostly to work on Windows. It pretty much always works on Linux; Mac, however, is still foreign to most of us, and usually isn't considered in marking as stable.

That said, I don't know which to recommend on Apple. I'd probably try trunk/ first since we don't ensure consistency on tags/update-stable on Mac. If that fails, though, maybe TGMG maintains the stable tag of Mac...

If both fail, wait for TGMG to respond. He keeps what's basically a fork of the project for Mac on his own Git repository. It is the most likely to work, but it has some test-related quirks...

Issues Help Desk / Re: enigma can't find 'make'
« on: July 04, 2011, 12:49:48 PM »
I'm not sure, then; my Windows testers all report that the new trunk revision fixed that issue. If a full reinstall from trunk didn't fix it, I'm mostly out of ideas... Are you able to confirm it's updated to r800?

Issues Help Desk / Re: enigma can't find 'make'
« on: July 04, 2011, 10:39:01 AM »
Yeah; I committed a bunch of stuff a couple days ago
Revision 800 corrects that issue; just update (maybe LGM will update for you) and it'll be fixed.

Function Peer Review / Re: "Choose" statement
« on: July 03, 2011, 05:13:10 PM »
ENIGMA will have one shortly. I need to make modifications to the syntax checker to allow functions to accept enigma::varargs.