retep998
|
|
Reply #15 Posted on: August 23, 2010, 03:34:18 pm |
|
|
Location: Where else? Joined: Jan 2010
Posts: 248
|
Also, I'd recommend using "sprite_id" instead of "sprite" because really, you could probably enter any number and it would be considered acceptable by the compiler.
What happens when you give gm a decimal sprite id like 2.5? Does it round, floor, ceil? Or does it just ignore it? Or does it error? Or does it crash? Or does it fuck up utterly?
|
|
|
Logged
|
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #18 Posted on: August 23, 2010, 04:15:35 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
ENIGMA Will do no such thing. A warning is thrown if the variable is not an ENIGMA type, and the value is truncated.
|
|
|
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
|
|
|
TheExDeus
|
|
Reply #19 Posted on: August 23, 2010, 05:13:59 pm |
|
|
Joined: Apr 2008
Posts: 1860
|
What happens when you give gm a decimal sprite id like 2.5? Its rounds it. So 2.5 would be 2. And in what format should these functions be? I guess the best way to document them would be trought the description boxes in function progress page. This way it automatically goes into the database. I see it works again. Thou another input box should be need no? Like one box for the function "draw_sprite(sprite_id sprite, int image_index,int x,int y)" and the big box for the description. So when you type/search the function you get something like: Function name - Description E.g. draw_sprite(sprite_id sprite, int image_index,int x,int y) - Draws a sprite with its origin at position (x,y) and subimage of image_index. Or: draw_sprite( sprite_id sprite, int image_index, int x, int y) - Draws a sprite with its origin at position (x,y) and subimage of image_index.
|
|
|
Logged
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #21 Posted on: August 23, 2010, 06:39:59 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
HaRRiKiRi: The function list page (however outdated) will allow you to submit a description.
|
|
|
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
|
|
|
|
|
TheExDeus
|
|
Reply #24 Posted on: August 24, 2010, 05:08:04 am |
|
|
Joined: Apr 2008
Posts: 1860
|
The function list page (however outdated) will allow you to submit a description. I tried submitting one, but it still shows that no description was submitted to the function. I tried "draw_sprite". And the thing is, if I can't change the function string itself, then I need to write its description accordingly. Like instead of: draw_sprite(sprite_id sprite, int image_index,int x,int y) - Draws a sprite with its origin at position (x,y) and sub-image of image_index. How I initially planned, I need to write: Draws a sprite with its origin at position (x,y) and sub-image of subimg. So if in the future you change the argument names, like replacing subimg to image_index (thou this is a variable, so subimg probably would stay), then description would need to be changed too. This way I would also be able to set the argument types, as this does seem a manual process (thou it could be possible to get the argument types from C+ definitions and generate these automatically..). We need an open source documentation system for enigma, which can be stored both locally and also retrieved off the internet, with the optional feature of also being able to add and edit documentation, all from within the LGM IDE. This would be nice. Especially saving locally.
|
|
|
Logged
|
|
|
|
|